--- nvu-0.50.ebuild 2004-11-27 23:07:43.000000000 +0800 +++ nvu-0.60.ebuild 2004-12-08 16:53:56.198334440 +0800 @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-www/nvu/nvu-0.50.ebuild,v 1.8 2004/11/27 14:51:05 chriswhite Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-www/nvu/nvu-0.60.ebuild,v 1.8 2004/11/27 14:51:05 chriswhite Exp $ inherit eutils mozilla flag-o-matic @@ -10,7 +10,7 @@ LICENSE="MPL-1.1" SLOT="0" -KEYWORDS="~x86 ~ppc ~sparc ~amd64" +KEYWORDS="~x86" IUSE="" DEPEND="sys-apps/gawk dev-lang/perl @@ -18,16 +18,37 @@ S=${WORKDIR}/mozilla -src_compile() { +src_unpack() { + unpack ${A} + cd ${S} + # Fix those darn directories! Make something more "standard" + # That can extend to future versions with much more ease. - Chris + epatch ${FILESDIR}/nvu-0.50-dir.patch # I had to manually edit the mozconfig.linux file as it # has some quirks... just copy the darn thing over :) - Chris - cp ${FILESDIR}/mozconfig ${S}/.mozconfig - - # Fix those darn directories! Make something more "standard" - # That can extend to future versions with much more ease. - Chris - epatch ${FILESDIR}/${P}-dir.patch + # cp ${FILESDIR}/mozconfig ${S}/.mozconfig + # remove --enable-optimize and let the code below + # add the appropriate one - basic + grep -v enable-optimize ${FILESDIR}/mozconfig > .mozconfig + + # copied from mozilla.eclass (modified slightly), + # otherwise it defaults to -O which crashes on startup for me - basic + # Set optimization level based on CFLAGS + if is-flag -O0; then + echo 'ac_add_options --enable-optimize=-O0' >> .mozconfig + elif [[ ${ARCH} == alpha || ${ARCH} == amd64 || ${ARCH} == ia64 ]]; then + # more than -O1 causes segfaults on 64-bit (bug 33767) + echo 'ac_add_options --enable-optimize=-O1' >> .mozconfig + elif is-flag -O1; then + echo 'ac_add_options --enable-optimize=-O1' >> .mozconfig + else + # mozilla fallback + echo 'ac_add_options --enable-optimize=-O2' >> .mozconfig + fi +} +src_compile() { # The build system is a weeee bit sensitive to naughty -O flags. # filter them out and let the build system figure out what # won't let it die :) - Chris @@ -39,7 +60,7 @@ src_install() { # patch the final nvu binary to workaround bug #67658 - epatch ${FILESDIR}/${P}-nvu.patch + epatch ${FILESDIR}/nvu-0.50-nvu.patch make -f client.mk DESTDIR=${D} install || die