commit:     2baf045e3e5e57ac7b9b921d34178ef69280c3c8
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat Apr  4 22:11:49 2020 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Sat Apr  4 22:12:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2baf045e

sci-geosciences/geographiclib: fixed python and doc install

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 .../geographiclib/geographiclib-1.50.ebuild        | 32 ++++++++++------------
 sci-geosciences/geographiclib/metadata.xml         |  2 +-
 2 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/sci-geosciences/geographiclib/geographiclib-1.50.ebuild 
b/sci-geosciences/geographiclib/geographiclib-1.50.ebuild
index a880de3..7f8a351 100644
--- a/sci-geosciences/geographiclib/geographiclib-1.50.ebuild
+++ b/sci-geosciences/geographiclib/geographiclib-1.50.ebuild
@@ -94,8 +94,6 @@ LICENSE="
        magnetic? ( public-domain )
 "
 
-RESTRICT="primaryuri"
-
 RDEPEND="
        >=dev-libs/boost-1.65.0
 "
@@ -118,9 +116,6 @@ src_prepare() {
 #      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
 
-       default
-
-       # FATAL: cmake_src_prepare has not been run
        cmake_src_prepare
 
        if use python; then
@@ -138,7 +133,7 @@ src_configure() {
        use precision_quad              && precision="4"
        use precision_single            && precision="1"
 
-       export GEODATAPATH="/usr/share/GeographicLib"
+       export GEODATAPATH="/usr/share/${P}"
 
        local mycmakeargs=(
                -DGEOGRAPHICLIB_DOCUMENTATION=$(usex doc ON OFF)
@@ -146,31 +141,29 @@ src_configure() {
                -DUSE_BOOST_FOR_EXAMPLES=$(usex boost ON OFF)
                -DGEOGRAPHICLIB_PRECISION="${precision}"
                -DGEOGRAPHICLIB_DATA="${GEODATAPATH}"
-               -DCMAKE_INSTALL_PREFIX="/usr"
        )
-
        cmake_src_configure
 }
 
 src_compile() {
+       cmake_src_compile
+
        if use python; then
                cd "python" || die
                python_foreach_impl distutils-r1_python_compile
                cd ".." || die
        fi
-
-       default
 }
 
 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
-
-       # Only 1 failing test in the C code, python passes for me
-       default
 }
 
 src_install() {
@@ -181,13 +174,18 @@ src_install() {
        insinto "${GEODATAPATH}/magnetic"
        use magnetic && doins -r "${WORKDIR}"/magnetic/.
 
+       cmake_src_install
+
        if use python; then
                cd "python" || die
-               distutils-r1_python_install_all
+               python_foreach_impl distutils-r1_python_install
                cd ".."
        fi
-       # Access denied, make file needs patching
-       # to correctly install in ${D}
-       default
+
        #TODO: find out if java stuff need something
+
+       rm -rf "${D}/usr/$(get_libdir)/python" || die
+
+       use doc && mkdir -p "${D}/usr/share/${P}" || die
+       use doc && mv "${D}/usr/share/doc/${MY_PN}" "${D}/usr/share/${P}/doc" 
|| die
 }

diff --git a/sci-geosciences/geographiclib/metadata.xml 
b/sci-geosciences/geographiclib/metadata.xml
index 589c87f..2687621 100644
--- a/sci-geosciences/geographiclib/metadata.xml
+++ b/sci-geosciences/geographiclib/metadata.xml
@@ -12,7 +12,7 @@
        <use>
                <flag name="boost">Boost library is searched for in order to 
build the NearestNeighbor example</flag>
                <flag name="gravity">Install the gravity models</flag>
-               <flag name="geoids">Install the geoids datasets</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>

Reply via email to