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 DB14913835C for ; Mon, 7 Sep 2020 15:07:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 08FBDE0933; Mon, 7 Sep 2020 15:07:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 D2032E0933 for ; Mon, 7 Sep 2020 15:07:48 +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 3489D340DDF for ; Mon, 7 Sep 2020 15:07:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A8C88352 for ; Mon, 7 Sep 2020 15:07:45 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1599491148.66e30b8c66aadf6f882b9bbae10e2d619bccee37.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/cantor/ X-VCS-Repository: proj/kde X-VCS-Files: kde-apps/cantor/cantor-20.08.49.9999.ebuild kde-apps/cantor/cantor-9999.ebuild X-VCS-Directories: kde-apps/cantor/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 66e30b8c66aadf6f882b9bbae10e2d619bccee37 X-VCS-Branch: master Date: Mon, 7 Sep 2020 15:07:45 +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: c1ce0fef-734a-41ac-989f-2933bad3092a X-Archives-Hash: 4dd069c20a03a4411605338ae8c30740 commit: 66e30b8c66aadf6f882b9bbae10e2d619bccee37 Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon Sep 7 13:09:10 2020 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Mon Sep 7 15:05:48 2020 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=66e30b8c kde-apps/cantor: Drop pkg_pretend, use optfeature in pkg_postinst >From now on make sure there is at least one of the optional runtime backends installed if all backend IUSE are disabled. Package-Manager: Portage-3.0.5, Repoman-3.0.1 Signed-off-by: Andreas Sturmlechner gentoo.org> kde-apps/cantor/cantor-20.08.49.9999.ebuild | 43 +++++++++++++---------------- kde-apps/cantor/cantor-9999.ebuild | 43 +++++++++++++---------------- 2 files changed, 38 insertions(+), 48 deletions(-) diff --git a/kde-apps/cantor/cantor-20.08.49.9999.ebuild b/kde-apps/cantor/cantor-20.08.49.9999.ebuild index 53ab76f030..c807935fdf 100644 --- a/kde-apps/cantor/cantor-20.08.49.9999.ebuild +++ b/kde-apps/cantor/cantor-20.08.49.9999.ebuild @@ -10,7 +10,7 @@ PYTHON_COMPAT=( python3_{7,8} ) PVCUT=$(ver_cut 1-3) KFMIN=5.72.0 QTMIN=5.14.2 -inherit ecm kde.org python-single-r1 +inherit ecm kde.org optfeature python-single-r1 DESCRIPTION="Interface for doing mathematics and scientific computing" HOMEPAGE="https://kde.org/applications/education/org.kde.cantor @@ -63,32 +63,17 @@ DEPEND=" ) R? ( dev-lang/R ) " -RDEPEND="${DEPEND}" +RDEPEND="${DEPEND} + !analitza? ( !julia? ( !lua? ( !python? ( !qalculate? ( !R? ( + || ( + sci-mathematics/maxima + sci-mathematics/octave + ) + ) ) ) ) ) ) +" RESTRICT+=" test" -pkg_pretend() { - ecm_pkg_pretend - - if ! has_version sci-mathematics/maxima && ! has_version sci-mathematics/octave && \ - ! use analitza && ! use julia && ! use lua && ! use python && ! use qalculate && ! use R; then - elog "You have decided to build ${PN} with no backend." - elog "To have this application functional, please enable one of the backends via USE flag:" - elog " analitza, lua, python, qalculate, R" - elog "Alternatively, install one of these:" - elog " # emerge sci-mathematics/maxima (bug #619534)" - elog " # emerge sci-mathematics/octave" - elog "Experimental available USE flag:" - elog " julia (not stable, bug #613576)" - elog - fi - - if ! has_version virtual/latex-base; then - elog "For LaTeX support:" - elog " # emerge virtual/latex-base" - fi -} - pkg_setup() { use python && python-single-r1_pkg_setup ecm_pkg_setup @@ -108,3 +93,13 @@ src_configure() { ) ecm_src_configure } + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "Optional dependencies:" + optfeature "Maxima backend" sci-mathematics/maxima + optfeature "Octave backend" sci-mathematics/octave + optfeature "LaTeX support" virtual/latex-base + fi + ecm_pkg_postinst +} diff --git a/kde-apps/cantor/cantor-9999.ebuild b/kde-apps/cantor/cantor-9999.ebuild index c27bf5f5a5..e1073ed888 100644 --- a/kde-apps/cantor/cantor-9999.ebuild +++ b/kde-apps/cantor/cantor-9999.ebuild @@ -10,7 +10,7 @@ PYTHON_COMPAT=( python3_{7,8} ) PVCUT=$(ver_cut 1-3) KFMIN=5.73.0 QTMIN=5.14.2 -inherit ecm kde.org python-single-r1 +inherit ecm kde.org optfeature python-single-r1 DESCRIPTION="Interface for doing mathematics and scientific computing" HOMEPAGE="https://kde.org/applications/education/org.kde.cantor @@ -63,32 +63,17 @@ DEPEND=" ) R? ( dev-lang/R ) " -RDEPEND="${DEPEND}" +RDEPEND="${DEPEND} + !analitza? ( !julia? ( !lua? ( !python? ( !qalculate? ( !R? ( + || ( + sci-mathematics/maxima + sci-mathematics/octave + ) + ) ) ) ) ) ) +" RESTRICT+=" test" -pkg_pretend() { - ecm_pkg_pretend - - if ! has_version sci-mathematics/maxima && ! has_version sci-mathematics/octave && \ - ! use analitza && ! use julia && ! use lua && ! use python && ! use qalculate && ! use R; then - elog "You have decided to build ${PN} with no backend." - elog "To have this application functional, please enable one of the backends via USE flag:" - elog " analitza, lua, python, qalculate, R" - elog "Alternatively, install one of these:" - elog " # emerge sci-mathematics/maxima (bug #619534)" - elog " # emerge sci-mathematics/octave" - elog "Experimental available USE flag:" - elog " julia (not stable, bug #613576)" - elog - fi - - if ! has_version virtual/latex-base; then - elog "For LaTeX support:" - elog " # emerge virtual/latex-base" - fi -} - pkg_setup() { use python && python-single-r1_pkg_setup ecm_pkg_setup @@ -108,3 +93,13 @@ src_configure() { ) ecm_src_configure } + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "Optional dependencies:" + optfeature "Maxima backend" sci-mathematics/maxima + optfeature "Octave backend" sci-mathematics/octave + optfeature "LaTeX support" virtual/latex-base + fi + ecm_pkg_postinst +}