aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2020-04-11 20:43:44 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2020-04-12 08:22:10 +0200
commited15f952fd0885f13dde9b67710f1478c2076900 (patch)
tree5168c6cd63c0dec907ae449af743218d7b48d0a2 /sci-geosciences
parentmedia-plugins/whysynth: (diff)
downloadguru-ed15f952fd0885f13dde9b67710f1478c2076900.tar.gz
guru-ed15f952fd0885f13dde9b67710f1478c2076900.tar.bz2
guru-ed15f952fd0885f13dde9b67710f1478c2076900.zip
sci-geosciences/geographiclib: new version
Package-Manager: Portage-2.3.98, Repoman-2.3.22 Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'sci-geosciences')
-rw-r--r--sci-geosciences/geographiclib/Manifest1
-rw-r--r--sci-geosciences/geographiclib/geographiclib-1.50.1.ebuild196
2 files changed, 197 insertions, 0 deletions
diff --git a/sci-geosciences/geographiclib/Manifest b/sci-geosciences/geographiclib/Manifest
index bee036f1..8aae5b95 100644
--- a/sci-geosciences/geographiclib/Manifest
+++ b/sci-geosciences/geographiclib/Manifest
@@ -1,3 +1,4 @@
+DIST geographiclib-1.50.1.tar.gz 2463854 BLAKE2B bed7d003dee92e794af993d8fef6cbf1233f9e3f37f53dd6026f16a237dba46bb4d4e2db7adea7931b632bb419288c9731c79cf65f15a4f35e95e8ada34a8f42 SHA512 1db874f30957a0edb8a1df3eee6db73cc993629e3005fe912e317a4ba908e7d7580ce483bb0054c4b46370b8edaec989609fb7e4eb6ba00c80182db43db436f1
DIST geographiclib-1.50.tar.gz 2463958 BLAKE2B f3d136f5c90453542bfc8976c7e01b8e6721389d5b92bc4baa18fbbe6775dd6e171bc6eed39d658e579005718a3366d5b7769dd34fc7a45b0947a9de703ad505 SHA512 e4571780daa4f0a83f83d92a812c7059f27e33621a8643edfaf58fe66f395973fbd3559157f52ca54369136331189f0be3e3e458cc7cd243b09b75b466434afe
DIST geoids-egm2008-1.tar.bz2 162388303 BLAKE2B ec79dbe2b25e8f9474fb4e8b704f9cb3c99d80004d0049bcfd956f7bcaa0822e6c0fcdc076f14075c688aeaac47bf68e192a114fca4c21edd81be880114b85f4 SHA512 0928a6e19aea2f372e946ce69c3a3826c2685c0a4029eb4bec7ab16873c03fbcc224ce47d99e6b6798e274a7d469fd3d303954938fb1f58c5dd5ba74907913d9
DIST geoids-egm2008-2_5.tar.bz2 34927299 BLAKE2B bd4e3a04221669fe58e41eb4b93965415f3e238cd9af475fe78fe00592ebc80470309ac63366d9416bb2e0fd835dcb28a1302d89670d85271546a712c0918cc6 SHA512 dd65c8dc916f98a8592cc64518e2a6ac657d7d02d8316ff74cf3fcc62e413a8780ec52421b90e2ab4d846bd7fa2231e6d0a39467a7ea5b8774c71b9fece3cb34
diff --git a/sci-geosciences/geographiclib/geographiclib-1.50.1.ebuild b/sci-geosciences/geographiclib/geographiclib-1.50.1.ebuild
new file mode 100644
index 00000000..1bfe5851
--- /dev/null
+++ b/sci-geosciences/geographiclib/geographiclib-1.50.1.ebuild
@@ -0,0 +1,196 @@
+# 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}-${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/+/} ) )
+ 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/${P}" || die
+}