|
|
# Copyright 1999-2004 Gentoo Foundation | # Copyright 1999-2004 Gentoo Foundation |
# Distributed under the terms of the GNU General Public License v2 | # 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 | inherit eutils mozilla flag-o-matic |
| |
|
|
LICENSE="MPL-1.1" | LICENSE="MPL-1.1" |
SLOT="0" | SLOT="0" |
| |
KEYWORDS="~x86 ~ppc ~sparc ~amd64" |
KEYWORDS="~x86" |
IUSE="" | IUSE="" |
DEPEND="sys-apps/gawk | DEPEND="sys-apps/gawk |
dev-lang/perl | dev-lang/perl |
|
|
| |
S=${WORKDIR}/mozilla | S=${WORKDIR}/mozilla |
| |
src_compile() { |
src_unpack() { |
|
unpack ${A} |
# 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" | # Fix those darn directories! Make something more "standard" |
# That can extend to future versions with much more ease. - Chris | # That can extend to future versions with much more ease. - Chris |
epatch ${FILESDIR}/${P}-dir.patch |
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 |
|
# remove --enable-optimize and let the code below |
|
# add the appropriate one - basic |
|
grep -v enable-optimize ${FILESDIR}/mozconfig >> ${S}/.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' >> ${S}/.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' >> ${S}/.mozconfig |
|
elif is-flag -O1; then |
|
echo 'ac_add_options --enable-optimize=-O1' >> ${S}/.mozconfig |
|
else |
|
# mozilla fallback |
|
echo 'ac_add_options --enable-optimize=-O2' >> ${S}/.mozconfig |
|
fi |
|
} |
|
|
|
src_compile() { |
# The build system is a weeee bit sensitive to naughty -O flags. | # The build system is a weeee bit sensitive to naughty -O flags. |
# filter them out and let the build system figure out what | # filter them out and let the build system figure out what |
# won't let it die :) - Chris | # won't let it die :) - Chris |
|
|
src_install() { | src_install() { |
| |
# patch the final nvu binary to workaround bug #67658 | # 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 | make -f client.mk DESTDIR=${D} install || die |
| |