Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300044 - eselect/python uses gcc/linux specific constructs
Summary: eselect/python uses gcc/linux specific constructs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All IRIX
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-07 14:29 UTC by Stuart Shelton
Modified: 2010-01-08 16:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2010-01-07 14:29:48 UTC
Unmodified, eselect-python cannot be installed on IRIX (unless using GCC) - seemingly needlessly.

The following change to the ebuild will allow it to work correctly:

--- app-admin/eselect-python/eselect-python-20091230.ebuild
+++ app-admin/eselect-python/eselect-python-20091230.ebuild
@@ -18,19 +18,19 @@ IUSE=""
 RDEPEND=">=app-admin/eselect-1.2.3"
 DEPEND="${RDEPEND}
        sys-devel/autoconf
-       >=sys-devel/gcc-3.4
        dev-libs/gnulib"
 
 pkg_setup() {
-       if [[ $(gcc-major-version) -lt 3 || ($(gcc-major-version) -eq 3 && $(gcc-minor-version) -lt 4) ]]; then
-               die "GCC >=3.4 is required"
-       fi
        if [[ ${CHOST} == *-solaris2.9 ]] ; then
                # solaris2.9 does not have scandir yet
                append-flags -I"${EPREFIX}/usr/$(get_libdir)/gnulib/include"
                append-ldflags -L"${EPREFIX}/usr/$(get_libdir)/gnulib/$(get_libdir)"
                append-libs -lgnu
        fi
+
+       if [[ ${CHOST} == *-irix* ]] ; then
+               append-cppflags -D__attribute__\\\(x\\\)=\"\"
+       fi
 }
 
 src_unpack() {


... although further integration work will be needed to bring back the GCC tests where this is the main compiler.
Comment 1 Fabian Groffen gentoo-dev 2010-01-07 14:39:33 UTC
we better fix that wrapper so it doesn't need any tricks to compile
Comment 2 Fabian Groffen gentoo-dev 2010-01-07 15:37:58 UTC
I think I fixed this mess in -r00.1, can you check?
Comment 3 Stuart Shelton 2010-01-08 14:39:55 UTC
Great - the -r00.1 version build just fine!

IRIX-MIPSpro-wrapper will inject the necessary define into all C*FLAGS if the environment variable MIPSPRO_INJECT is set - but this is a pretty blunt instrument.  Much better is if developers guard GNU-specific constructs from non-GNU compilers - which is why the option isn't enabled by default.  To be fair, most code does get this right...
Comment 4 Fabian Groffen gentoo-dev 2010-01-08 15:45:39 UTC
yeah, it's very stupid code we're talking about here.  For the next bump I'll fork it for Prefix, since "upstream" is unable to understand this needs to be done differently.
Comment 5 Fabian Groffen gentoo-dev 2010-01-08 16:14:20 UTC
no info needed