--- /usr/portage/www-client/mozilla-firefox/mozilla-firefox-1.0.6-r5.ebuild 2005-08-11 03:06:00.000000000 +0000 +++ /usr/local/portage/www-client/mozilla-firefox/mozilla-firefox-1.0.6-r5.ebuild 2005-08-14 05:03:14.000000000 +0000 @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-1.0.6-r5.ebuild,v 1.3 2005/08/11 02:49:01 agriffis Exp $ +# $Header: $ unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179 inherit flag-o-matic toolchain-funcs eutils mozconfig mozilla-launcher makeedit multilib @@ -17,7 +17,7 @@ KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~ppc ~sparc ~x86" SLOT="0" LICENSE="MPL-1.1 NPL-1.1" -IUSE="gnome java mozdevelop mozsvg mozcalendar" +IUSE="gnome java mozdevelop mozsvg mozcalendar ssl" # xrender.pc appeared for the first time in xorg-x11-6.7.0-r2 # and is required to build with support for cairo. #71504 @@ -127,11 +127,17 @@ # patch to add border to tooltips # https://bugzilla.mozilla.org/show_bug.cgi?id=238052 epatch ${FILESDIR}/gtk-tooltips.patch + + #rpath patch + epatch ${FILESDIR}/mozilla-rpath-1.patch } src_compile() { declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} + grep -Flr "#RPATH_FIXER" --include=*.mk . | xargs sed -i -e \ + 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' + #################################### # # mozconfig, CFLAGS and CXXFLAGS setup @@ -183,6 +189,27 @@ edit_makefiles emake || die + #################################### + # + # Build Mozilla NSS + # + #################################### + + # Build the NSS/SSL support + if use ssl; then + einfo "Building Mozilla-Firefox NSS..." + + # Fix #include problem + cd ${S}/security/coreconf || die "cd coreconf failed" + echo 'INCLUDES += -I$(DIST)/include/nspr -I$(DIST)/include/dbm'\ + >>headers.mk + emake -j1 || die "make security headers failed" + + cd ${S}/security/nss || die "cd nss failed" + emake -j1 moz_import || die "make moz_import failed" + emake -j1 || die "make nss failed" + fi + } src_install() { @@ -228,6 +255,34 @@ cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/include/idl + # Install the NSS/SSL libs, headers and tools + if use ssl; then + einfo "Installing Mozilla-Firefox NSS..." + # Install the headers ('make install' do not work for headers ...) + insinto ${MOZILLA_FIVE_HOME}/include/nss + [ -d ${S}/dist/public/nss ] && doins ${S}/dist/public/nss/*.h + [ -d ${S}/dist/public/seccmd ] && doins ${S}/dist/public/seccmd/*.h + [ -d ${S}/dist/public/security ] && doins ${S}/dist/public/security/*.h + # These come with zlib ... + rm -f ${D}${MOZILLA_FIVE_HOME}/include/nss/{zconf.h,zlib.h} + + cd ${S}/security/nss + + mkdir -p ${WORKDIR}/nss/{bin,lib} + export SOURCE_BIN_DIR=${WORKDIR}/nss/bin + export SOURCE_LIB_DIR=${WORKDIR}/nss/lib + + make install || die "make failed" + # Gets installed as symbolic links ... + # cp -Lf ${WORKDIR}/nss/bin/* ${D}/usr/bin + cp -Lf ${WORKDIR}/nss/lib/* ${D}${MOZILLA_FIVE_HOME} + + # Need to unset these incase we want to rebuild, else the build + # gets newked. + unset SOURCE_LIB_DIR + unset SOURCE_BIN_DIR + fi + # Dirty hack to get some applications using this header running dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \ /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h @@ -245,10 +300,12 @@ doexe ${S}/build/unix/firefox-config # Fix pkgconfig files and install them + sed -i -e "s|-L/usr/lib/firefox-${PV}|-L\$\{libdir\}|" firefox-nspr.pc insinto /usr/$(get_libdir)/pkgconfig for x in ${S}/build/unix/*.pc; do sed -i -e "s|^libdir=.*|libdir=${MOZILLA_FIVE_HOME}| - s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include|" ${x} + s|^includedir=.*|includedir=${MOZILLA_FIVE_HOME}/include| + s|\(^Libs: -L.*\)\($\)|\1 -Wl,-R\$\{libdir\}\2|" ${x} doins ${x} done