From 19bfb92d682cbfb8ef8b46b535424222887faca1 Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Wed, 21 Oct 2020 12:19:15 +1000 Subject: [PATCH] Add ebuilds for TEOS-10 GSW Oceanographic Toolbox in C --- sci-geosciences/gsw-c/files/CMakeLists.txt | 8 +++++ sci-geosciences/gsw-c/gsw-c-3.05.0.4.ebuild | 36 +++++++++++++++++++++ sci-geosciences/gsw-c/gsw-c-9999.ebuild | 36 +++++++++++++++++++++ sci-geosciences/gsw-c/metadata.xml | 15 +++++++++ 4 files changed, 95 insertions(+) create mode 100644 sci-geosciences/gsw-c/files/CMakeLists.txt create mode 100644 sci-geosciences/gsw-c/gsw-c-3.05.0.4.ebuild create mode 100644 sci-geosciences/gsw-c/gsw-c-9999.ebuild create mode 100644 sci-geosciences/gsw-c/metadata.xml diff --git a/sci-geosciences/gsw-c/files/CMakeLists.txt b/sci-geosciences/gsw-c/files/CMakeLists.txt new file mode 100644 index 0000000..249d410 --- /dev/null +++ b/sci-geosciences/gsw-c/files/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.0) + +project(gswteos-10) + +add_library(gswteos-10 SHARED gsw_saar.c gsw_oceanographic_toolbox.c) + +install(TARGETS gswteos-10 DESTINATION lib) +install(FILES gswteos-10.h DESTINATION include) diff --git a/sci-geosciences/gsw-c/gsw-c-3.05.0.4.ebuild b/sci-geosciences/gsw-c/gsw-c-3.05.0.4.ebuild new file mode 100644 index 0000000..eb31dfc --- /dev/null +++ b/sci-geosciences/gsw-c/gsw-c-3.05.0.4.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="TEOS-10 GSW Oceanographic Toolbox in C" +HOMEPAGE="https://github.com/TEOS-10/GSW-C" + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/TEOS-10/GSW-C.git" + INHERIT_GIT="git-r3" + MY_P="${P}" +else + MY_PV=$(ver_rs 3 '-') + INHERIT_GIT="" + SRC_URI="https://github.com/TEOS-10/GSW-C/archive/${MY_PV}.tar.gz -> GSW-C-${MY_PV}.tar.gz" + S="${WORKDIR}/GSW-C-${MY_PV}" + KEYWORDS="~amd64 ~x86 ~arm ~arm64" +fi + +inherit cmake-utils ${INHERIT_GIT} + +LICENSE="Artistic" +SLOT="0" + +RDEPEND="" +DEPEND="${RDEPEND}" + +src_prepare() { + cp "${FILESDIR}"/CMakeLists.txt "${S}" || die + sed \ + -e "/DESTINATION/s:lib:$(get_libdir):g" \ + -e "/INSTALL/s:lib:$(get_libdir):g" \ + -i CMakeLists.txt || die + cmake-utils_src_prepare +} diff --git a/sci-geosciences/gsw-c/gsw-c-9999.ebuild b/sci-geosciences/gsw-c/gsw-c-9999.ebuild new file mode 100644 index 0000000..eb31dfc --- /dev/null +++ b/sci-geosciences/gsw-c/gsw-c-9999.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="TEOS-10 GSW Oceanographic Toolbox in C" +HOMEPAGE="https://github.com/TEOS-10/GSW-C" + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/TEOS-10/GSW-C.git" + INHERIT_GIT="git-r3" + MY_P="${P}" +else + MY_PV=$(ver_rs 3 '-') + INHERIT_GIT="" + SRC_URI="https://github.com/TEOS-10/GSW-C/archive/${MY_PV}.tar.gz -> GSW-C-${MY_PV}.tar.gz" + S="${WORKDIR}/GSW-C-${MY_PV}" + KEYWORDS="~amd64 ~x86 ~arm ~arm64" +fi + +inherit cmake-utils ${INHERIT_GIT} + +LICENSE="Artistic" +SLOT="0" + +RDEPEND="" +DEPEND="${RDEPEND}" + +src_prepare() { + cp "${FILESDIR}"/CMakeLists.txt "${S}" || die + sed \ + -e "/DESTINATION/s:lib:$(get_libdir):g" \ + -e "/INSTALL/s:lib:$(get_libdir):g" \ + -i CMakeLists.txt || die + cmake-utils_src_prepare +} diff --git a/sci-geosciences/gsw-c/metadata.xml b/sci-geosciences/gsw-c/metadata.xml new file mode 100644 index 0000000..d6d6177 --- /dev/null +++ b/sci-geosciences/gsw-c/metadata.xml @@ -0,0 +1,15 @@ + + + + + uleysky@gmail.com + Michael Uleysky + + + The Gibbs-SeaWater (GSW) Oceanographic Toolbox contains the TEOS-10 subroutines for evaluating + the thermodynamic properties of pure water (using IAPWS-09) and seawater (using IAPWS-08 for + the saline part). The GSW library does not provide properties of ice or moist air (these + properties can be found in the SIA library). This GSW Oceanographic Toolbox does not adhere + to strict basic-SI units but rather oceanographic units are adopted. + +