Summary: | dev-libs/mpfr: please review prefix changes | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Christoph Junghans (RETIRED) <junghans> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | prefix |
Priority: | Normal | Keywords: | Inclusion, PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 315803 | ||
Attachments: |
patch against mpfr-3.1.1.ebuild
patch against mpfr-2.4.2_p3-r1.ebuild mpfr-eroot.patch |
Created attachment 352970 [details, diff]
patch against mpfr-2.4.2_p3-r1.ebuild
Comment on attachment 352966 [details, diff] patch against mpfr-3.1.1.ebuild > econf \ > --docdir="${EPREFIX}"/usr/share/doc/${PF} \ >+ --with-gmp-lib="${EPREFIX}"/usr/$(get_libdir) \ >+ --with-gmp-include="${EPREFIX}"/usr/include || die > $(use_enable static-libs static) Probably don't want that || die there. (In reply to Ryan Hill from comment #2) > Comment on attachment 352966 [details, diff] [details, diff] > patch against mpfr-3.1.1.ebuild > > > econf \ > > --docdir="${EPREFIX}"/usr/share/doc/${PF} \ > >+ --with-gmp-lib="${EPREFIX}"/usr/$(get_libdir) \ > >+ --with-gmp-include="${EPREFIX}"/usr/include || die > > $(use_enable static-libs static) > > Probably don't want that || die there. I don't know where this came from! Agreed, it should be "\"$ Is the rest ok to commit? Looks fine to me. Go ahead. @@ -4,0 +5,4 @@ + 21 Jul 2013; Christoph Junghans <ottxor@gentoo.org> mpfr-2.4.2_p3-r1.ebuild, + mpfr-3.1.2.ebuild: + added prefix support (bug #476336) + removed from prefix overlay Comment on attachment 352966 [details, diff] patch against mpfr-3.1.1.ebuild i've fixed this in cvs, but keep this in mind with all other prefix patches you post >+ # needed for FreeMiNT >+ [[ ${CHOST} == *-mint* ]] && elibtoolize never conditionalize elibtoolize > econf \ > --docdir="${EPREFIX}"/usr/share/doc/${PF} \ >+ --with-gmp-lib="${EPREFIX}"/usr/$(get_libdir) \ >+ --with-gmp-include="${EPREFIX}"/usr/include || die never use `die` with econf Created attachment 361200 [details, diff]
mpfr-eroot.patch
Sorry to reopen. But I suppose the variable used in econf should be EROOT instead of EPREFIX. Because when we are cross compiling mpfr, there should be a way to pass ROOT into econf.
Comment on attachment 361200 [details, diff] mpfr-eroot.patch >Index: mpfr-3.1.2-r1.ebuild >=================================================================== >RCS file: /var/cvsroot/gentoo-x86/dev-libs/mpfr/mpfr-3.1.2-r1.ebuild,v >retrieving revision 1.1 >diff -u -B -r1.1 mpfr-3.1.2-r1.ebuild >--- mpfr-3.1.2-r1.ebuild 13 Sep 2013 18:32:04 -0000 1.1 >+++ mpfr-3.1.2-r1.ebuild 18 Oct 2013 07:04:24 -0000 >@@ -45,9 +45,9 @@ > > src_configure() { > econf \ >- --docdir="${EPREFIX}"/usr/share/doc/${PF} \ >- --with-gmp-lib="${EPREFIX}"/usr/$(get_libdir) \ >- --with-gmp-include="${EPREFIX}"/usr/include \ >+ --docdir="${EROOT}"usr/share/doc/${PF} \ EROOT for docdir seems strange. >+ --with-gmp-lib="${EROOT}"usr/$(get_libdir) \ >+ --with-gmp-include="${EROOT}"usr/include \ For these two it make sense! > $(use_enable static-libs static) > } > (In reply to Christoph Junghans from comment #9) > Comment on attachment 361200 [details, diff] [details, diff] > mpfr-eroot.patch > > >Index: mpfr-3.1.2-r1.ebuild > >=================================================================== > >RCS file: /var/cvsroot/gentoo-x86/dev-libs/mpfr/mpfr-3.1.2-r1.ebuild,v > >retrieving revision 1.1 > >diff -u -B -r1.1 mpfr-3.1.2-r1.ebuild > >--- mpfr-3.1.2-r1.ebuild 13 Sep 2013 18:32:04 -0000 1.1 > >+++ mpfr-3.1.2-r1.ebuild 18 Oct 2013 07:04:24 -0000 > >@@ -45,9 +45,9 @@ > > > > src_configure() { > > econf \ > >- --docdir="${EPREFIX}"/usr/share/doc/${PF} \ > >- --with-gmp-lib="${EPREFIX}"/usr/$(get_libdir) \ > >- --with-gmp-include="${EPREFIX}"/usr/include \ > >+ --docdir="${EROOT}"usr/share/doc/${PF} \ > EROOT for docdir seems strange. Why is it strange? There is docdir inside ROOT, too. If there if no further objections, I'll go ahead to commit this EPREFIX to EROOT in a week. Thanks. (In reply to Benda Xu from comment #10) > (In reply to Christoph Junghans from comment #9) > > Comment on attachment 361200 [details, diff] [details, diff] [details, diff] > > mpfr-eroot.patch > > > > >Index: mpfr-3.1.2-r1.ebuild > > >=================================================================== > > >RCS file: /var/cvsroot/gentoo-x86/dev-libs/mpfr/mpfr-3.1.2-r1.ebuild,v > > >retrieving revision 1.1 > > >diff -u -B -r1.1 mpfr-3.1.2-r1.ebuild > > >--- mpfr-3.1.2-r1.ebuild 13 Sep 2013 18:32:04 -0000 1.1 > > >+++ mpfr-3.1.2-r1.ebuild 18 Oct 2013 07:04:24 -0000 > > >@@ -45,9 +45,9 @@ > > > > > > src_configure() { > > > econf \ > > >- --docdir="${EPREFIX}"/usr/share/doc/${PF} \ > > >- --with-gmp-lib="${EPREFIX}"/usr/$(get_libdir) \ > > >- --with-gmp-include="${EPREFIX}"/usr/include \ > > >+ --docdir="${EROOT}"usr/share/doc/${PF} \ > > EROOT for docdir seems strange. > > Why is it strange? There is docdir inside ROOT, too. docdir is output, but with-gmp-* is input, it makes sense to search for gmp in ${EROOT}, but why should the documentation be written to ${EROOT}? (In reply to Christoph Junghans from comment #12) > (In reply to Benda Xu from comment #10) > > (In reply to Christoph Junghans from comment #9) > > > Comment on attachment 361200 [details, diff] [details, diff] [details, diff] [details, diff] > > > mpfr-eroot.patch > > > > > > >Index: mpfr-3.1.2-r1.ebuild > > > >=================================================================== > > > >RCS file: /var/cvsroot/gentoo-x86/dev-libs/mpfr/mpfr-3.1.2-r1.ebuild,v > > > >retrieving revision 1.1 > > > >diff -u -B -r1.1 mpfr-3.1.2-r1.ebuild > > > >--- mpfr-3.1.2-r1.ebuild 13 Sep 2013 18:32:04 -0000 1.1 > > > >+++ mpfr-3.1.2-r1.ebuild 18 Oct 2013 07:04:24 -0000 > > > >@@ -45,9 +45,9 @@ > > > > > > > > src_configure() { > > > > econf \ > > > >- --docdir="${EPREFIX}"/usr/share/doc/${PF} \ > > > >- --with-gmp-lib="${EPREFIX}"/usr/$(get_libdir) \ > > > >- --with-gmp-include="${EPREFIX}"/usr/include \ > > > >+ --docdir="${EROOT}"usr/share/doc/${PF} \ > > > EROOT for docdir seems strange. > > > > Why is it strange? There is docdir inside ROOT, too. > docdir is output, but with-gmp-* is input, it makes sense to search for gmp > in ${EROOT}, but why should the documentation be written to ${EROOT}? You are right Chris. I misunderstood the use of --docdir here. committed with gmp-{lib,include}. Thanks. --- ./ChangeLog +++ ./ChangeLog @@ -4,0 +5,3 @@ + 03 Nov 2013; Benda Xu <heroxbd@gentoo.org> mpfr-3.1.2-r1.ebuild: + EROOT for gmp locations to do cross compiling correctly. bug #476336 + err, no, this is broken. here's a simple rule of thumb: ROOT is never valid in a src_* function. if you try to use it, you're doing something wrong. (In reply to SpanKY from comment #14) > err, no, this is broken. here's a simple rule of thumb: ROOT is never valid > in a src_* function. if you try to use it, you're doing something wrong. Mike, would you elaborate the reason? If ROOT cannot be used in src_configure, how a native gcc (needs mpfr) could be cross-built? (In reply to Benda Xu from comment #15) --docdir is the path mpfr uses to store things. it doesn't use it for input at build time at all. the --with-gmp-{lib,include} configure flags should simply be deleted. the toolchain itself knows how to find the right gmp paths. if it doesn't, then your toolchain is broken and that should be fixed. Commit message: Revert gmp lib/include flags as they are wrong & unnecessary. Tweak the docdir flag to be a bit simpler. http://sources.gentoo.org/dev-libs/mpfr/mpfr-3.1.2-r1.ebuild?r1=1.6&r2=1.7 (In reply to SpanKY from comment #17) > Commit message: Revert gmp lib/include flags as they are wrong & > unnecessary. Tweak the docdir flag to be a bit simpler. > http://sources.gentoo.org/dev-libs/mpfr/mpfr-3.1.2-r1.ebuild?r1=1.6&r2=1.7 Test of this version on Prefix successful. Test of cross-triplet-prefix will follow. (In reply to Benda Xu from comment #18) > (In reply to SpanKY from comment #17) > > Commit message: Revert gmp lib/include flags as they are wrong & > > unnecessary. Tweak the docdir flag to be a bit simpler. > > http://sources.gentoo.org/dev-libs/mpfr/mpfr-3.1.2-r1.ebuild?r1=1.6&r2=1.7 > > Test of this version on Prefix successful. Erm, breaks on AIX here: When "$CC$CFLAGS" is empty, mpfr tries to extract them from "gmp.h" using ('/lib/cpp' 'gcc -E' 'cc -E') in that order. This did work --with-gmp-include, but without gmp-include /lib/cpp falls back to /usr/include/gmp.h, giving wrong compiler and CFLAGS. This one causes configure to completely ignore preinstalled gmp.h - unsure if this is a problem as gmp.h may define ABI specific CFLAGS though: ... src_configure() { + tc-export CC econf \ ... (In reply to Michael Haubenwallner from comment #19) yes, mpfr has some crazy logic in it: dnl ******************************************************************** dnl Check for CC and CFLAGS in gmp.h if test -z "$user_redefine_cc" && test "$cross_compiling" != yes ; then dnl We need to guess the C preprocessor instead of using AC_PROG_CPP, dnl since AC_PROG_CPP implies AC_PROG_CC, which chooses a compiler dnl (before we have the chance to get it from gmp.h) and does some dnl checking related to this compiler (such as dependency tracking dnl options); if the compiler changes due to __GMP_CC in gmp.h, one dnl would have incorrect settings. dnl FIXME: Move this in aclocal ? if test -z "$GMP_CC$GMP_CFLAGS" ; then AC_MSG_CHECKING(for CC and CFLAGS in gmp.h) GMP_CC=__GMP_CC GMP_CFLAGS=__GMP_CFLAGS for cpp in /lib/cpp gcc cc c99 do i wouldn't mind patching it out at the high level: -if test -z "$user_redefine_cc" && test "$cross_compiling" != yes ; then +if false ; then Commit message: Disable logic to probe gmp.h using the wrong toolchain http://sources.gentoo.org/dev-libs/mpfr/mpfr-3.1.2-r1.ebuild?r1=1.7&r2=1.8 (In reply to SpanKY from comment #21) Yep, does work too, thanks! |
Created attachment 352966 [details, diff] patch against mpfr-3.1.1.ebuild Changes: - FreeMint needs elibtoolize - prefix gmp-{lib,include} - so.1 -> $(get_libname 1) For SLOT=1 - FreeMint needs elibtoolize - ${D} -> ${ED} - rm dylib, too