# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="3" inherit mozilla-scm mozilla-config pax-utils DESCRIPTION="Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications" HOMEPAGE="http://developer.mozilla.org/en/docs/XULRunner" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" SLOT="1.9" IUSE="debug gconf" DEPEND=" gconf? ( gnome-base/gconf:2 ) " RDEPEND="${DEPEND} !www-plugins/weave " src_prepare() { epatch "${FILESDIR}"/gcc46.patch # fix double symbols due to double -ljemalloc sed -i \ -e '/^LIBS += $(JEMALLOC_LIBS)/s/^/#/' \ xulrunner/stub/Makefile.in \ || die # Gentoo install dirs sed -i \ -e 's:$(MOZ_APP_VERSION):'"${MAJ_XUL_PV}:" \ config/autoconf.mk.in \ || die "${MAJ_XUL_PV} sed failed!" # Enable gnomebreakpad if use debug ; then sed -i \ -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ build/unix/run-mozilla.sh \ || die "sed failed!" fi eautoreconf cd js/src eautoreconf } src_configure() { # Disable no-print-directory MAKEOPTS=${MAKEOPTS/--no-print-directory/} # Ensure that are plugins dir is enabled as default sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \ "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!" # hack added to workaround bug 299905 on hosts with libc that doesn't # support tls, (probably will only hit this condition with Gentoo Prefix) tc-has-tls -l || export ac_cv_thread_keyword=no mozconfig_configure \ $(use_enable gconf) } src_install() { mozilla-scm_src_install rm "${ED}"/usr/bin/xulrunner dodir /usr/bin dosym "${MOZLIBDIR}/xulrunner" "/usr/bin/xulrunner-${MAJ_XUL_PV}" || die # env.d file for ld search path dodir /etc/env.d echo "LDPATH=${EPREFIX}/${MOZLIBDIR}" > "${ED}"/etc/env.d/08xulrunner || die "env.d failed" pax-mark m "${ED}"/${MOZLIBDIR}/plugin-container }