--- mesa-7.2.ebuild 2008-10-22 09:09:02.000000000 -0700 +++ mesa-7.2-r1.ebuild 2009-02-19 16:50:29.000000000 -0800 @@ -45,6 +45,7 @@ IUSE="${IUSE_VIDEO_CARDS} debug doc pic + hardened motif nptl xcb @@ -105,7 +106,7 @@ src_unpack() { git_src_unpack else unpack ${A} - cd "${S}" + cd "${S}" && epatch "${FILESDIR}/7.2-glx_ro_text_segm.patch" fi # Don't compile debug code with USE=-debug - bug #125004 @@ -148,8 +149,19 @@ src_compile() { # Deactivate assembly code for pic build myconf="${myconf} $(use_enable !pic asm)" - # Sparc assembly code is not working - myconf="${myconf} $(use_enable !sparc asm)" + if use sparc; then + elog "Mesa assembly code is currently generally disabled on sparc" + myconf="${myconf} --disable-asm" + fi + + if use hardened && use x86; then + # Make glx text segments readonly on hardened + myconf="${myconf} --enable-glx-rts" + elog "Mesa assembly code is currently generally disabled on hardened x86" + # some hithereto unknown part of mesa's x86 assembly code is + # broken by readonly text segments + myconf="${myconf} --disable-asm" + fi myconf="${myconf} --disable-glut" @@ -165,6 +177,7 @@ src_compile() { myconf="${myconf} $(use_enable motif glw)" myconf="${myconf} $(use_enable motif)" + eautoreconf econf ${myconf} || die emake || die }