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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5F5AB158091 for ; Sun, 12 Jun 2022 15:34:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A43D9E0901; Sun, 12 Jun 2022 15:34:43 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8A8D5E0901 for ; Sun, 12 Jun 2022 15:34:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7034D341BE9 for ; Sun, 12 Jun 2022 15:34:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CCD12502 for ; Sun, 12 Jun 2022 15:34:40 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1655047506.6af7f816b2751b67fa9192c31f3463dce63d7034.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/GeographicLib/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-geosciences/GeographicLib/GeographicLib-1.52-r1.ebuild X-VCS-Directories: sci-geosciences/GeographicLib/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6af7f816b2751b67fa9192c31f3463dce63d7034 X-VCS-Branch: master Date: Sun, 12 Jun 2022 15:34:40 +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: 5c2710dd-e88d-4508-aa3e-aef03d35dc32 X-Archives-Hash: 197c20e750e17f11ede32e476098db89 commit: 6af7f816b2751b67fa9192c31f3463dce63d7034 Author: Sam James gentoo org> AuthorDate: Sun Jun 12 15:25:06 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sun Jun 12 15:25:06 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6af7f816 sci-geosciences/GeographicLib: fix distutils-r1 usage Signed-off-by: Sam James gentoo.org> .../GeographicLib/GeographicLib-1.52-r1.ebuild | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/sci-geosciences/GeographicLib/GeographicLib-1.52-r1.ebuild b/sci-geosciences/GeographicLib/GeographicLib-1.52-r1.ebuild new file mode 100644 index 000000000000..f4efd91f1f92 --- /dev/null +++ b/sci-geosciences/GeographicLib/GeographicLib-1.52-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit cmake distutils-r1 + +MY_PN="${PN,,}" + +DESCRIPTION="C++ library for converting geographic coordinate systems" +HOMEPAGE="https://sourceforge.net/projects/geographiclib/" +SRC_URI="mirror://sourceforge/${MY_PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/19" +KEYWORDS="~amd64 ~arm" +IUSE="doc examples python" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RDEPEND="python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND}" +BDEPEND=" + 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 + ) +" + +distutils_enable_tests setup.py +# there are additional docs in the python dir +distutils_enable_sphinx python/doc + +src_prepare() { + cmake_src_prepare + + if use python; then + pushd "python" || die + distutils-r1_src_prepare + popd || die + fi +} + +src_configure() { + export GEODATAPATH="/usr/share/${MY_PN}" + + local mycmakeargs=( + -DGEOGRAPHICLIB_DOCUMENTATION=$(usex doc ON OFF) + -DGEOGRAPHICLIB_LIB_TYPE="SHARED" + -DGEOGRAPHICLIB_DATA="${GEODATAPATH}" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + if use python; then + pushd "python" || die + distutils-r1_src_compile + popd || die + fi +} + +src_test() { + cmake_src_test + + if use python; then + pushd "python" || die + distutils-r1_src_test + popd || die + fi +} + +src_install() { + cmake_src_install + + # Remove python things added by the cmake_src_install function + rm -r "${ED}/usr/$(get_libdir)/python" || die + # If using Python, we re-add these python files for each implementation + if use python; then + pushd "python" || die + distutils-r1_src_install + popd || die + 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/${PN}" "${D}/usr/share/doc/${PF}" || die + + if use examples; then + dodoc -r examples + docompress -x "/usr/share/doc/${PF}/examples" + fi + + insinto "/usr/share/maxima/${MY_PN}" + doins -r maxima/. + + find "${D}" -name "*.la" -delete || die +}