diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2023-08-01 22:21:46 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2023-08-02 06:38:31 -0400 |
commit | ff400d7539fc97a478f50776d449e922ec1e3ea7 (patch) | |
tree | 695042d7359257aaf8bf2f08f1a205c631b75b95 /sci-mathematics | |
parent | dev-perl/B-Hooks-EndOfScope: Stabilize 0.260.0 ppc, #910854 (diff) | |
download | gentoo-ff400d7539fc97a478f50776d449e922ec1e3ea7.tar.gz gentoo-ff400d7539fc97a478f50776d449e922ec1e3ea7.tar.bz2 gentoo-ff400d7539fc97a478f50776d449e922ec1e3ea7.zip |
sci-mathematics/pari: new revision to fix USE=X handling
Pari's build system is interesting, and choosing a graphics library (for
use in plotting) is... not straightforward. We have two patches that
affect it, and still nobody has noticed in all this time that USE=X does
precisely nothing at all.
I've just sent one of those patches, for building against fltk,
upstream. To avoid having to reroll the other patch and add an X11 case
to it, this revision switches from using e.g. the "--with-fltk" flag to
using "--graphic=fltk" instead. This turns out to be a stronger hint to
the build system, and more imporantly supports both none/X11 as options,
unlike --with-foo. Hopefully it allows us to go patch-free with the next
release of pari.
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/pari/pari-2.15.4-r1.ebuild (renamed from sci-mathematics/pari/pari-2.15.4.ebuild) | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sci-mathematics/pari/pari-2.15.4.ebuild b/sci-mathematics/pari/pari-2.15.4-r1.ebuild index 4869bbe3d995..f7363f67f698 100644 --- a/sci-mathematics/pari/pari-2.15.4.ebuild +++ b/sci-mathematics/pari/pari-2.15.4-r1.ebuild @@ -16,6 +16,7 @@ LICENSE="GPL-2" SLOT="0/8" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" IUSE="data doc examples fltk gmp test threads X" +REQUIRED_USE="fltk? ( !X )" # mutually exclusive plot implementations RESTRICT="!test? ( test )" BDEPEND=" @@ -31,6 +32,9 @@ DEPEND=" X? ( x11-libs/libX11:0= )" RDEPEND="${DEPEND}" +# Both of these should be obsolete in the next version. I've sent the +# fltk CXXFLAGS bit upstream, and using --graphic=<foo> hopefully works +# around the automagic parts. PATCHES=( "${FILESDIR}/${PN}"-2.9.4-fltk-detection.patch "${FILESDIR}/${PN}"-2.11.2-no-automagic.patch @@ -71,6 +75,13 @@ src_configure() { # expecting a compiler driver. See bugs 722090 and 871117. # DLLDFLAGS, on the other hand, is used exactly like LDFLAGS would # be in a less-weird build system. + # + # There's a lot of automagic involved in the graphics detection. We + # first pass --graphic=none, which disables some of it. We then pass + # --graphic=fltk (or --graphic=X11) only if USE=fltk (or USE=X) is + # set. This is a stronger hint to the build system than --with-fltk + # would be, and importantly does not rely on the corresponding but + # nonexistent(!) option option for X11. LD="" DLLD="$(tc-getCC)" DLLDFLAGS="${LDFLAGS}" ./Configure \ --prefix="${EPREFIX}"/usr \ --datadir="${EPREFIX}/usr/share/${PN}" \ @@ -80,9 +91,10 @@ src_configure() { --with-readline="${EPREFIX}"/usr \ --with-readline-lib="${EPREFIX}/usr/$(get_libdir)" \ --with-ncurses-lib="${EPREFIX}/usr/$(get_libdir)" \ - $(use_with fltk) \ + --graphic=none \ + $(usex X --graphic=X11 "" "" "") \ + $(usex fltk --graphic=fltk "" "" "") \ $(use_with gmp) \ - --without-qt \ $(usex threads "--mt=pthread" "" "" "") \ || die "./Configure failed" } |