From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 10437138350 for ; Thu, 2 Apr 2020 20:40:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1347CE0C7C; Thu, 2 Apr 2020 20:40:24 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E05B1E0C7C for ; Thu, 2 Apr 2020 20:40:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 49ECC34EF9D for ; Thu, 2 Apr 2020 20:40:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AD113150 for ; Thu, 2 Apr 2020 20:40:02 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1585859993.bad082bb6a82caaf88ff76cbf4bcb3af8a0b7c5b.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: sci-geosciences/geographiclib/ X-VCS-Repository: repo/proj/guru X-VCS-Files: sci-geosciences/geographiclib/geographiclib-1.50.ebuild X-VCS-Directories: sci-geosciences/geographiclib/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: bad082bb6a82caaf88ff76cbf4bcb3af8a0b7c5b X-VCS-Branch: dev Date: Thu, 2 Apr 2020 20:40:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f76ef1f6-3f98-4113-b310-80998fb645f6 X-Archives-Hash: 7f3783fdd08925abc30ee794a79d2818 commit: bad082bb6a82caaf88ff76cbf4bcb3af8a0b7c5b Author: Andrew Ammerlaan riseup net> AuthorDate: Thu Apr 2 20:39:53 2020 +0000 Commit: Andrew Ammerlaan riseup net> CommitDate: Thu Apr 2 20:39:53 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bad082bb sci-geosciences/geographiclib: enable python support Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andrew Ammerlaan riseup.net> .../geographiclib/geographiclib-1.50.ebuild | 52 +++++++++++++++++++--- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/sci-geosciences/geographiclib/geographiclib-1.50.ebuild b/sci-geosciences/geographiclib/geographiclib-1.50.ebuild index 3fa8946..96acef6 100644 --- a/sci-geosciences/geographiclib/geographiclib-1.50.ebuild +++ b/sci-geosciences/geographiclib/geographiclib-1.50.ebuild @@ -3,9 +3,9 @@ EAPI="7" -PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_COMPAT=( python3_{6,7,8} ) -inherit cmake-utils +inherit cmake distutils-r1 MY_PN="GeographicLib" MY_PV=$(ver_rs 2 -) @@ -48,14 +48,14 @@ IUSE_PRECISION=" precision_quad precision_single " -IUSE="${IUSE_GEOID_DATASET} ${IUSE_GRAVITY_MODEL} ${IUSE_MAGNETIC_MODEL} ${IUSE_PRECISION} boost doc examples geoid gravity magnetic" +IUSE="${IUSE_GEOID_DATASET} ${IUSE_GRAVITY_MODEL} ${IUSE_MAGNETIC_MODEL} ${IUSE_PRECISION} boost doc examples geoid gravity magnetic python" IUSE_EXPAND="GEOID_DATASET GRAVITY_MODEL MAGNETIC_MODEL PRECISION" REQUIRED_USE=" ^^ ( ${IUSE_PRECISION/+/} ) geoid? ( || ( ${IUSE_GEOID_DATASET/+/} ) ) gravity? ( || ( ${IUSE_GRAVITY_MODEL/+/} ) ) magnetic? ( || ( ${IUSE_MAGNETIC_MODEL/+/} ) ) - + python? ( ${PYTHON_REQUIRED_USE} ) " SRC_URI=" https://sourceforge.net/projects/${PN}/files/distrib/${MY_P}.tar.gz/download -> ${P}.tar.gz @@ -107,9 +107,20 @@ DEPEND=" S="${WORKDIR}/${MY_P}" +distutils_enable_tests setup.py + src_prepare() { #TODO: strip cflags default + + # FATAL: cmake_src_prepare has not been run + cmake_src_prepare + + if use python; then + cd "python" || die + distutils-r1_python_prepare_all + cd ".." || die + fi } src_configure() { @@ -126,12 +137,41 @@ src_configure() { -DUSE_BOOST_FOR_EXAMPLES=$(usex boost ON OFF) -DGEOGRAPHICLIB_PRECISION="${precision}" ) - cmake-utils_src_configure + + cmake_src_configure +} + +src_compile() { + if use python; then + cd "python" || die + python_foreach_impl distutils-r1_python_compile + cd ".." || die + fi + + default +} + +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() { + if use python; then + cd "python" || die + distutils-r1_python_install_all + cd ".." + fi + + # Access denied, make file needs patching + # to correctly install in ${D} default - #TODO: install python bindings correctly #TODO: install datasets #TODO: find out if java stuff need something }