firefox: added 'gtk3' build option to build the gtk+3 UI.

Close #2954
This commit is contained in:
Juan RP 2015-11-12 17:30:42 +01:00
parent b0e04b42f6
commit 87eafb9366
1 changed files with 18 additions and 9 deletions

View File

@ -10,14 +10,17 @@ distfiles="${MOZILLA_SITE}/${pkgname}/releases/${version}/source/${pkgname}-${ve
checksum=994a346699298277b64ec0cab72660b8d3e5b879a2ac79207576f7e6c33da3ae
lib32disabled=yes
build_options="gtk3"
desc_option_gtk3="Build the GTK+3 toolkit UI"
hostmakedepends="unzip zip pkg-config perl python yasm"
makedepends="nss-devel libjpeg-turbo-devel libpng-devel
icu55-devel pixman-devel sqlite-devel gst-plugins-base1-devel gtk+-devel
makedepends="
nss-devel libjpeg-turbo-devel libpng-devel gtk+-devel
icu55-devel pixman-devel sqlite-devel gst-plugins-base1-devel
libevent-devel libnotify-devel libvpx-devel libXrender-devel
startup-notification-devel dbus-glib-devel alsa-lib-devel pulseaudio-devel
hunspell-devel libXcomposite-devel libSM-devel libXScrnSaver-devel
libXt-devel libXdamage-devel"
libXt-devel libXdamage-devel $(vopt_if gtk3 gtk+3-devel)"
depends="nss>=3.20.1 desktop-file-utils hicolor-icon-theme"
conflicts="firefox-esr>=0"
@ -39,19 +42,19 @@ pre_configure() {
[ ! -d xbps-build ] && mkdir -p xbps-build
}
do_configure() {
local cross_args
local _args
case "$XBPS_TARGET_MACHINE" in
*-musl) # XXX gold linking with --hash-style=sysv results in unhidden symbols
# XXX see https://sourceware.org/ml/binutils/2014-09/msg00230.html
#
# XXX disable jemalloc.
cross_args+=" --disable-jemalloc --enable-gold=no"
_args+=" --disable-jemalloc --enable-gold=no"
;;
esac
if [ "$CROSS_BUILD" ]; then
cross_args+=" --target=$XBPS_CROSS_TRIPLET --disable-jemalloc"
_args+=" --target=$XBPS_CROSS_TRIPLET --disable-jemalloc"
# Make config/system_wrappers/alsa/alsalib.h and pulse/pulse.h find
# the required includes. Set system nspr and nss include paths.
@ -75,6 +78,12 @@ do_configure() {
mkdir -p /usr/lib/firefox
export LDFLAGS+=" -Wl,-rpath=/usr/lib/firefox"
if [ "$build_option_gtk3" ]; then
_args+=" --enable-default-toolkit=cairo-gtk3"
else
_args+=" --enable-default-toolkit=cairo-gtk2"
fi
cd xbps-build
# XXX build without --system-cairo. See:
# - https://github.com/voidlinux/void-packages/issues/2308#issuecomment-135426813
@ -92,11 +101,11 @@ do_configure() {
--with-system-icu --enable-pulseaudio --enable-gstreamer=1.0 \
--disable-crashreporter --disable-cpp-exceptions --disable-javaxpcom \
--with-nspr-prefix=${XBPS_CROSS_BASE}/usr \
--with-nss-prefix=${XBPS_CROSS_BASE}/usr ${cross_args} \
--with-nss-prefix=${XBPS_CROSS_BASE}/usr \
--with-google-api-keyfile="${wrksrc}/google-api-key" \
--enable-optimize="$CFLAGS" --disable-strip --disable-install-strip \
--disable-static --enable-pie \
--disable-profiling --disable-profilelocking
--disable-static --enable-pie --disable-profiling \
--disable-profilelocking ${_args}
}
do_build() {
cd xbps-build