aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-geosciences')
-rw-r--r--sci-geosciences/geographiclib/geographiclib-1.50-r1.ebuild200
-rw-r--r--sci-geosciences/geographiclib/geographiclib-1.50-r2.ebuild199
-rw-r--r--sci-geosciences/geographiclib/metadata.xml24
3 files changed, 199 insertions, 224 deletions
diff --git a/sci-geosciences/geographiclib/geographiclib-1.50-r1.ebuild b/sci-geosciences/geographiclib/geographiclib-1.50-r1.ebuild
deleted file mode 100644
index e05ee127b..000000000
--- a/sci-geosciences/geographiclib/geographiclib-1.50-r1.ebuild
+++ /dev/null
@@ -1,200 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-
-inherit cmake distutils-r1
-
-MY_PN="GeographicLib"
-MY_PV=$(ver_rs 2 -)
-MY_P="${MY_PN}-${MY_PV}"
-
-DESCRIPTION="C++ library for converting geographic coordinate systems"
-HOMEPAGE="https://sourceforge.net/projects/geographiclib/"
-
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE_GEOIDS_DATASET="
- geoids_dataset_egm84-30
- geoids_dataset_egm84-15
- geoids_dataset_egm96-15
- geoids_dataset_egm96-5
- geoids_dataset_egm2008-5
- geoids_dataset_egm2008-2-5
- geoids_dataset_egm2008-1
-"
-IUSE_GRAVITY_MODEL="
- gravity_model_egm84
- gravity_model_egm96
- gravity_model_egm2008
- gravity_model_wgs84
-"
-IUSE_MAGNETIC_MODEL="
- magnetic_model_wmm2010
- magnetic_model_wmm2015v2
- magnetic_model_wmm2020
- magnetic_model_igrf11
- magnetic_model_igrf12
- magnetic_model_emm2010
- magnetic_model_emm2015
- magnetic_model_emm2017
-"
-IUSE_PRECISION="
- precision_arbitrary
- +precision_double
- precision_long-double
- precision_quad
- precision_single
-"
-IUSE="${IUSE_GEOIDS_DATASET} ${IUSE_GRAVITY_MODEL} ${IUSE_MAGNETIC_MODEL} ${IUSE_PRECISION} boost doc examples geoids gravity magnetic python"
-IUSE_EXPAND="GEOIDS_DATASET GRAVITY_MODEL MAGNETIC_MODEL PRECISION"
-
-#reverse required use needed, e.g. !geoids? ( !geoids_dataset_egm2008-1 ) and so on, use bash magic to generate them
-REQUIRED_USE="
- ^^ ( ${IUSE_PRECISION/+/} )
- geoids? ( || ( ${IUSE_GEOIDS_DATASET/+/} ) )
- gravity? ( || ( ${IUSE_GRAVITY_MODEL/+/} ) )
- magnetic? ( || ( ${IUSE_MAGNETIC_MODEL/+/} ) )
- !geoids? ( ${IUSE_GEOIDS_DATASET/geoids/!geoids} )
- !gravity? ( ${IUSE_GRAVITY_MODEL/gravity/!gravity} )
- !magnetic? ( ${IUSE_MAGNETIC_MODEL/magnetic/!magnetic} )
- python? ( ${PYTHON_REQUIRED_USE} )
-"
-
-COMMON_URI="https://sourceforge.net/projects/${PN}/files"
-SRC_URI="
-${COMMON_URI}/distrib/${MY_P}.tar.gz/download -> ${P}.tar.gz
-
-geoids_dataset_egm84-30? ( ${COMMON_URI}/geoids-distrib/egm84-30.tar.bz2 -> geoids-egm84-30.tar.bz2 )
-geoids_dataset_egm84-15? ( ${COMMON_URI}/geoids-distrib/egm84-15.tar.bz2 -> geoids-egm84-15.tar.bz2 )
-geoids_dataset_egm96-15? ( ${COMMON_URI}/geoids-distrib/egm96-15.tar.bz2 -> geoids-egm96-15.tar.bz2 )
-geoids_dataset_egm96-5? ( ${COMMON_URI}/geoids-distrib/egm96-5.tar.bz2 -> geoids-egm96-5.tar.bz2 )
-geoids_dataset_egm2008-5? ( ${COMMON_URI}/geoids-distrib/egm2008-5.tar.bz2 -> geoids-egm2008-5.tar.bz2 )
-geoids_dataset_egm2008-2-5? ( ${COMMON_URI}/geoids-distrib/egm2008-2_5.tar.bz2 -> geoids-egm2008-2_5.tar.bz2 )
-geoids_dataset_egm2008-1? ( ${COMMON_URI}/geoids-distrib/egm2008-1.tar.bz2 -> geoids-egm2008-1.tar.bz2 )
-
-gravity_model_egm84? ( ${COMMON_URI}/gravity-distrib/egm84.tar.bz2 -> gravity-egm84.tar.bz2 )
-gravity_model_egm96? ( ${COMMON_URI}/gravity-distrib/egm96.tar.bz2 -> gravity-egm96.tar.bz2 )
-gravity_model_egm2008? ( ${COMMON_URI}/gravity-distrib/egm2008.tar.bz2 -> gravity-egm2008.tar.bz2 )
-gravity_model_wgs84? ( ${COMMON_URI}/gravity-distrib/wgs84.tar.bz2 -> gravity-wgs84.tar.bz2 )
-
-magnetic_model_wmm2010? ( ${COMMON_URI}/magnetic-distrib/wmm2010.tar.bz2 -> magnetic-wmm2010.tar.bz2 )
-magnetic_model_wmm2015v2? ( ${COMMON_URI}/magnetic-distrib/wmm2015v2.tar.bz2 -> magnetic-wmm2015v2.tar.bz2 )
-magnetic_model_wmm2020? ( ${COMMON_URI}/magnetic-distrib/wmm2020.tar.bz2 -> magnetic-wmm2020.tar.bz2 )
-magnetic_model_igrf11? ( ${COMMON_URI}/magnetic-distrib/igrf11.tar.bz2 -> magnetic-igrf11.tar.bz2 )
-magnetic_model_igrf12? ( ${COMMON_URI}/magnetic-distrib/igrf12.tar.bz2 -> magnetic-igrf12.tar.bz2 )
-magnetic_model_emm2010? ( ${COMMON_URI}/magnetic-distrib/emm2010.tar.bz2 -> magnetic-emm2010.tar.bz2 )
-magnetic_model_emm2015? ( ${COMMON_URI}/magnetic-distrib/emm2015.tar.bz2 -> magnetic-emm2015.tar.bz2 )
-magnetic_model_emm2017? ( ${COMMON_URI}/magnetic-distrib/emm2017.tar.bz2 -> magnetic-emm2017.tar.bz2 )
-"
-#TODO: find out the licenses of the geoid and gravity datasets
-LICENSE="
- MIT
- geoids? ( public-domain )
- gravity? ( public-domain )
- magnetic? ( public-domain )
-"
-
-RDEPEND="
- >=dev-libs/boost-1.65.0
-"
-DEPEND="
- ${RDEPEND}
- doc? (
- >=app-doc/doxygen-1.8.7
- >=dev-lang/perl-5.26.1-r1
- >=dev-python/sphinx-1.6.3-r2
- >=sys-apps/util-linux-2.31
- )
-"
-
-S="${WORKDIR}/${MY_P}"
-
-distutils_enable_tests setup.py
-# there are additional docs in the python dir
-distutils_enable_sphinx python/doc
-
-src_prepare() {
- #TODO: strip cflags
-# sed -i "s|CXXFLAGS = -g -Wall -Wextra -O3 -std=c++0x||" tools/Makefile.mk || die
-# sed -i "s|CXXFLAGS = -g -Wall -Wextra -O3 -std=c++0x||" src/Makefile.mk || die
-
- cmake_src_prepare
-
- if use python; then
- cd "python" || die
- distutils-r1_python_prepare_all
- cd ".." || die
- fi
-}
-
-src_configure() {
- local precision
- use precision_arbitrary && precision="5"
- use precision_double && precision="2"
- use precision_long-double && precision="3"
- use precision_quad && precision="4"
- use precision_single && precision="1"
-
- export GEODATAPATH="/usr/share/${PN}"
-
- local mycmakeargs=(
- -DGEOGRAPHICLIB_DOCUMENTATION=$(usex doc ON OFF)
- -DGEOGRAPHICLIB_LIB_TYPE="SHARED"
- -DUSE_BOOST_FOR_EXAMPLES=$(usex boost ON OFF)
- -DGEOGRAPHICLIB_PRECISION="${precision}"
- -DGEOGRAPHICLIB_DATA="${GEODATAPATH}"
- )
- cmake_src_configure
-}
-
-src_compile() {
- cmake_src_compile
-
- if use python; then
- cd "python" || die
- python_foreach_impl distutils-r1_python_compile
- cd ".." || die
- use doc && build_sphinx python/doc
- fi
-}
-
-src_test() {
- # Only 1 failing test in the C code, python passes for me
- cmake_src_test
-
- if use python; then
- cd "python" || die
- python_foreach_impl python_test
- cd ".." || die
- fi
-}
-
-src_install() {
- insinto "${GEODATAPATH}/geoids"
- use geoids && doins -r "${WORKDIR}"/geoids/.
- insinto "${GEODATAPATH}/gravity"
- use gravity && doins -r "${WORKDIR}"/gravity/.
- insinto "${GEODATAPATH}/magnetic"
- use magnetic && doins -r "${WORKDIR}"/magnetic/.
-
- cmake_src_install
-
- # remove python things added by the cmake_src_install function
- # these are installed in the wrong python dir
- rm -rf "${D}/usr/$(get_libdir)/python" || die
- # if use python we re-add these python files correctly
- if use python; then
- cd "python" || die
- python_foreach_impl distutils-r1_python_install
- cd ".."
- fi
-
- #TODO: find out if java stuff need something
-
- # Installs to wrong doc dir for some reason
- # Also happens with USE="-doc"
- mv "${D}/usr/share/doc/${MY_PN}" "${D}/usr/share/doc/${P}" || die
-}
diff --git a/sci-geosciences/geographiclib/geographiclib-1.50-r2.ebuild b/sci-geosciences/geographiclib/geographiclib-1.50-r2.ebuild
new file mode 100644
index 000000000..005bb88cb
--- /dev/null
+++ b/sci-geosciences/geographiclib/geographiclib-1.50-r2.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit cmake distutils-r1
+
+MY_PN="GeographicLib"
+MY_PV=$(ver_rs 2 -)
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="C++ library for converting geographic coordinate systems"
+HOMEPAGE="https://sourceforge.net/projects/geographiclib/"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE_GEOIDS_DATASETS="
+ geoids_datasets_egm84-30
+ geoids_datasets_egm84-15
+ geoids_datasets_egm96-15
+ geoids_datasets_egm96-5
+ geoids_datasets_egm2008-5
+ geoids_datasets_egm2008-2-5
+ geoids_datasets_egm2008-1
+"
+IUSE_GRAVITY_MODELS="
+ gravity_models_egm84
+ gravity_models_egm96
+ gravity_models_egm2008
+ gravity_models_wgs84
+"
+IUSE_MAGNETIC_MODELS="
+ magnetic_models_wmm2010
+ magnetic_models_wmm2015v2
+ magnetic_models_wmm2020
+ magnetic_models_igrf11
+ magnetic_models_igrf12
+ magnetic_models_emm2010
+ magnetic_models_emm2015
+ magnetic_models_emm2017
+"
+IUSE_PRECISION="
+ precision_arbitrary
+ +precision_double
+ precision_long-double
+ precision_quad
+ precision_single
+"
+IUSE="${IUSE_GEOIDS_DATASETS} ${IUSE_GRAVITY_MODELS} ${IUSE_MAGNETIC_MODELS} ${IUSE_PRECISION} boost doc examples geoids gravity magnetic python"
+IUSE_EXPAND="GEOIDS_DATASETS GRAVITY_MODELS MAGNETIC_MODELS PRECISION"
+
+REQUIRED_USE="
+ ^^ ( ${IUSE_PRECISION/+/} )
+ geoids? ( || ( ${IUSE_GEOIDS_DATASETS/+/} ) )
+ gravity? ( || ( ${IUSE_GRAVITY_MODELS/+/} ) )
+ magnetic? ( || ( ${IUSE_MAGNETIC_MODELS/+/} ) )
+ !geoids? ( ${IUSE_GEOIDS_DATASETS/geoids/!geoids} )
+ !gravity? ( ${IUSE_GRAVITY_MODELS/gravity/!gravity} )
+ !magnetic? ( ${IUSE_MAGNETIC_MODELS/magnetic/!magnetic} )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+COMMON_URI="https://sourceforge.net/projects/${PN}/files"
+SRC_URI="
+${COMMON_URI}/distrib/${MY_P}.tar.gz/download -> ${P}.tar.gz
+
+geoids_datasets_egm84-30? ( ${COMMON_URI}/geoids-distrib/egm84-30.tar.bz2 -> geoids-egm84-30.tar.bz2 )
+geoids_datasets_egm84-15? ( ${COMMON_URI}/geoids-distrib/egm84-15.tar.bz2 -> geoids-egm84-15.tar.bz2 )
+geoids_datasets_egm96-15? ( ${COMMON_URI}/geoids-distrib/egm96-15.tar.bz2 -> geoids-egm96-15.tar.bz2 )
+geoids_datasets_egm96-5? ( ${COMMON_URI}/geoids-distrib/egm96-5.tar.bz2 -> geoids-egm96-5.tar.bz2 )
+geoids_datasets_egm2008-5? ( ${COMMON_URI}/geoids-distrib/egm2008-5.tar.bz2 -> geoids-egm2008-5.tar.bz2 )
+geoids_datasets_egm2008-2-5? ( ${COMMON_URI}/geoids-distrib/egm2008-2_5.tar.bz2 -> geoids-egm2008-2_5.tar.bz2 )
+geoids_datasets_egm2008-1? ( ${COMMON_URI}/geoids-distrib/egm2008-1.tar.bz2 -> geoids-egm2008-1.tar.bz2 )
+
+gravity_models_egm84? ( ${COMMON_URI}/gravity-distrib/egm84.tar.bz2 -> gravity-egm84.tar.bz2 )
+gravity_models_egm96? ( ${COMMON_URI}/gravity-distrib/egm96.tar.bz2 -> gravity-egm96.tar.bz2 )
+gravity_models_egm2008? ( ${COMMON_URI}/gravity-distrib/egm2008.tar.bz2 -> gravity-egm2008.tar.bz2 )
+gravity_models_wgs84? ( ${COMMON_URI}/gravity-distrib/wgs84.tar.bz2 -> gravity-wgs84.tar.bz2 )
+
+magnetic_models_wmm2010? ( ${COMMON_URI}/magnetic-distrib/wmm2010.tar.bz2 -> magnetic-wmm2010.tar.bz2 )
+magnetic_models_wmm2015v2? ( ${COMMON_URI}/magnetic-distrib/wmm2015v2.tar.bz2 -> magnetic-wmm2015v2.tar.bz2 )
+magnetic_models_wmm2020? ( ${COMMON_URI}/magnetic-distrib/wmm2020.tar.bz2 -> magnetic-wmm2020.tar.bz2 )
+magnetic_models_igrf11? ( ${COMMON_URI}/magnetic-distrib/igrf11.tar.bz2 -> magnetic-igrf11.tar.bz2 )
+magnetic_models_igrf12? ( ${COMMON_URI}/magnetic-distrib/igrf12.tar.bz2 -> magnetic-igrf12.tar.bz2 )
+magnetic_models_emm2010? ( ${COMMON_URI}/magnetic-distrib/emm2010.tar.bz2 -> magnetic-emm2010.tar.bz2 )
+magnetic_models_emm2015? ( ${COMMON_URI}/magnetic-distrib/emm2015.tar.bz2 -> magnetic-emm2015.tar.bz2 )
+magnetic_models_emm2017? ( ${COMMON_URI}/magnetic-distrib/emm2017.tar.bz2 -> magnetic-emm2017.tar.bz2 )
+"
+#TODO: find out the licenses of the geoid and gravity datasets
+LICENSE="
+ MIT
+ geoids? ( public-domain )
+ gravity? ( public-domain )
+ magnetic? ( public-domain )
+"
+
+RDEPEND="
+ >=dev-libs/boost-1.65.0
+"
+DEPEND="
+ ${RDEPEND}
+ doc? (
+ >=app-doc/doxygen-1.8.7
+ >=dev-lang/perl-5.26.1-r1
+ >=dev-python/sphinx-1.6.3-r2
+ >=sys-apps/util-linux-2.31
+ )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+distutils_enable_tests setup.py
+# there are additional docs in the python dir
+distutils_enable_sphinx python/doc
+
+src_prepare() {
+ #TODO: strip cflags
+# sed -i "s|CXXFLAGS = -g -Wall -Wextra -O3 -std=c++0x||" tools/Makefile.mk || die
+# sed -i "s|CXXFLAGS = -g -Wall -Wextra -O3 -std=c++0x||" src/Makefile.mk || die
+
+ cmake_src_prepare
+
+ if use python; then
+ cd "python" || die
+ distutils-r1_python_prepare_all
+ cd ".." || die
+ fi
+}
+
+src_configure() {
+ local precision
+ use precision_arbitrary && precision="5"
+ use precision_double && precision="2"
+ use precision_long-double && precision="3"
+ use precision_quad && precision="4"
+ use precision_single && precision="1"
+
+ export GEODATAPATH="/usr/share/${PN}"
+
+ local mycmakeargs=(
+ -DGEOGRAPHICLIB_DOCUMENTATION=$(usex doc ON OFF)
+ -DGEOGRAPHICLIB_LIB_TYPE="SHARED"
+ -DUSE_BOOST_FOR_EXAMPLES=$(usex boost ON OFF)
+ -DGEOGRAPHICLIB_PRECISION="${precision}"
+ -DGEOGRAPHICLIB_DATA="${GEODATAPATH}"
+ )
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+
+ if use python; then
+ cd "python" || die
+ python_foreach_impl distutils-r1_python_compile
+ cd ".." || die
+ use doc && build_sphinx python/doc
+ fi
+}
+
+src_test() {
+ # Only 1 failing test in the C code, python passes for me
+ cmake_src_test
+
+ if use python; then
+ cd "python" || die
+ python_foreach_impl python_test
+ cd ".." || die
+ fi
+}
+
+src_install() {
+ insinto "${GEODATAPATH}/geoids"
+ use geoids && doins -r "${WORKDIR}"/geoids/.
+ insinto "${GEODATAPATH}/gravity"
+ use gravity && doins -r "${WORKDIR}"/gravity/.
+ insinto "${GEODATAPATH}/magnetic"
+ use magnetic && doins -r "${WORKDIR}"/magnetic/.
+
+ cmake_src_install
+
+ # remove python things added by the cmake_src_install function
+ # these are installed in the wrong python dir
+ rm -rf "${D}/usr/$(get_libdir)/python" || die
+ # if use python we re-add these python files correctly
+ if use python; then
+ cd "python" || die
+ python_foreach_impl distutils-r1_python_install
+ cd ".."
+ fi
+
+ #TODO: find out if java stuff need something
+
+ # Installs to wrong doc dir for some reason
+ # Also happens with USE="-doc"
+ mv "${D}/usr/share/doc/${MY_PN}" "${D}/usr/share/doc/${PN}" || die
+}
diff --git a/sci-geosciences/geographiclib/metadata.xml b/sci-geosciences/geographiclib/metadata.xml
index 26876219d..981bcd1d1 100644
--- a/sci-geosciences/geographiclib/metadata.xml
+++ b/sci-geosciences/geographiclib/metadata.xml
@@ -14,30 +14,6 @@
<flag name="gravity">Install the gravity models</flag>
<flag name="geoids">Install the geoid datasets</flag>
<flag name="magnetic">Install the magnetic field models</flag>
- <flag name="geoids_dataset_egm84-30">http://earth-info.nga.mil/GandG/wgs84/gravitymod/wgs84_180/wgs84_180.html 30' grid</flag>
- <flag name="geoids_dataset_egm84-15">http://earth-info.nga.mil/GandG/wgs84/gravitymod/wgs84_180/wgs84_180.html 15' grid</flag>
- <flag name="geoids_dataset_egm96-15">http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html 15' grid</flag>
- <flag name="geoids_dataset_egm96-5">http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html 5' grid</flag>
- <flag name="geoids_dataset_egm2008-5">http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008 5' grid</flag>
- <flag name="geoids_dataset_egm2008-2-5">http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008 2.5' grid</flag>
- <flag name="geoids_dataset_egm2008-1">http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008 1' grid</flag>
- <flag name="gravity_model_egm84">the Earth Gravity Model 1984, which includes terms up to degree 180</flag>
- <flag name="gravity_model_egm96">the Earth Gravity Model 1996, which includes terms up to degree 360</flag>
- <flag name="gravity_model_egm2008"> the Earth Gravity Model 2008, which includes terms up to degree 2190</flag>
- <flag name="gravity_model_wgs84">the WGS84 Reference Ellipsoid. This is just reproduces the normal gravitational field for the reference ellipsoid. This includes the zonal coefficients up to order 20.</flag>
- <flag name="magnetic_model_wmm2010">the World Magnetic Model 2010, which approximates the main magnetic field for the period 2010–2015.</flag>
- <flag name="magnetic_model_wmm2020"> the World Magnetic Model 2020, which approximates the main magnetic field for the period 2020–2025.</flag>
- <flag name="magnetic_model_wmm2015v2">the World Magnetic Model 2015, which approximates the main magnetic field for the period 2015–2020.</flag>
- <flag name="magnetic_model_igrf11">the International Geomagnetic Reference Field (11th generation), which approximates the main magnetic field for the period 1900–2015.</flag>
- <flag name="magnetic_model_igrf12">the International Geomagnetic Reference Field (12th generation), which approximates the main magnetic field for the period 1900–2020.</flag>
- <flag name="magnetic_model_emm2010">the Enhanced Magnetic Model 2010, which approximates the main and crustal magnetic fields for the period 2010–2015.</flag>
- <flag name="magnetic_model_emm2015">the Enhanced Magnetic Model 2015, which approximates the main and crustal magnetic fields for the period 2000–2020.</flag>
- <flag name="magnetic_model_emm2017">the Enhanced Magnetic Model 2017, which approximates the main and crustal magnetic fields for the period 2000–2022.</flag>
- <flag name="precision_arbitrary">floating point arbitrary precision</flag>
- <flag name="precision_double">floating point 53-bit precision</flag>
- <flag name="precision_quad">floating point 113-bit precision</flag>
- <flag name="precision_long-double">floating point 64-bit precision</flag>
- <flag name="precision_single">floating point 24-bit precision</flag>
</use>
<longdescription lang="en">
GeographicLib is a small set of C++ classes for converting between geographic, UTM, UPS, MGRS, and geocentric coordinates, for gravity (e.g., EGM2008), geoid, and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems.