summaryrefslogtreecommitdiff
path: root/libre-testing/iceweasel/PKGBUILD
diff options
context:
space:
mode:
authorIsaac David <isacdaavid@isacdaavid.info>2016-08-10 19:29:28 -0500
committerIsaac David <isacdaavid@isacdaavid.info>2016-08-10 19:29:28 -0500
commitc70d9f25e6ef965999cbe977dee5a98b033143b6 (patch)
tree81060e65e6e14d255713e8b800a2e174e1465818 /libre-testing/iceweasel/PKGBUILD
parent30df3ee262862ab29665f78a487cb81b7ac3c405 (diff)
downloadabslibre-c70d9f25e6ef965999cbe977dee5a98b033143b6.tar.gz
abslibre-c70d9f25e6ef965999cbe977dee5a98b033143b6.tar.bz2
abslibre-c70d9f25e6ef965999cbe977dee5a98b033143b6.zip
iceweasel: add experimental armv7h support to [libre-testing]
Diffstat (limited to 'libre-testing/iceweasel/PKGBUILD')
-rw-r--r--libre-testing/iceweasel/PKGBUILD219
1 files changed, 219 insertions, 0 deletions
diff --git a/libre-testing/iceweasel/PKGBUILD b/libre-testing/iceweasel/PKGBUILD
new file mode 100644
index 000000000..e5e1113d9
--- /dev/null
+++ b/libre-testing/iceweasel/PKGBUILD
@@ -0,0 +1,219 @@
+# Maintainer: André Silva <emulatorman@parabola.nu>
+# Contributor: Márcio Silva <coadde@parabola.nu>
+# Contributor (ConnochaetOS): Henry Jensen <hjensen@connochaetos.org>
+# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
+# Contributor: fauno <fauno@kiwwwi.com.ar>
+# Contributor: vando <facundo@esdebian.org>
+# Contributor (Arch): Jakub Schmidtke <sjakub@gmail.com>
+# Contributor: Figue <ffigue at gmail>
+# Contributor: taro-k <taro-k@movasense_com>
+# Contributor: Michał Masłowski <mtjm@mtjm.eu>
+# Thank you very much to the older contributors:
+# Contributor: evr <evanroman at gmail>
+# Contributor: Muhammad 'MJ' Jassim <UnbreakableMJ@gmail.com>
+
+_pgo=false
+
+# We're getting this from Debian Sid
+_debname=firefox
+_brandingver=48.0
+_brandingrel=1
+_debver=48.0
+_debrel=deb1
+_debrepo=http://ftp.debian.org/debian/pool/main/
+_parabolarepo=https://repo.parabola.nu/other/iceweasel
+debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
+
+_pkgname=firefox
+pkgname=iceweasel
+epoch=1
+pkgver=$_debver.$_debrel
+pkgrel=3
+
+pkgdesc="A libre version of Debian Iceweasel, the standalone web browser based on Mozilla Firefox."
+arch=(i686 x86_64 armv7h)
+license=(MPL GPL LGPL)
+depends=(alsa-lib dbus-glib ffmpeg gtk2 gtk3 hunspell icu=57.1 libevent
+ libvpx=1.6.0 libxt mime-types mozilla-common nss sqlite
+ startup-notification ttf-font)
+makedepends=(autoconf2.13 diffutils gconf imagemagick imake inetutils libidl2
+ libpulse librsvg-stable libxslt mesa mozilla-searchplugins
+ pkg-config python2 quilt unzip yasm zip)
+makedepends_i686=(rust)
+makedepends_x86_64=("${makedepends_i686[@]}")
+options=(!emptydirs !makeflags debug)
+if $_pgo; then
+ makedepends+=(xorg-server-xvfb)
+ options+=(!ccache)
+fi
+optdepends=('networkmanager: Location detection via available WiFi networks'
+ 'upower: Battery API')
+url="https://wiki.parabola.nu/$pkgname"
+replaces=("$pkgname-libre" "$_pkgname")
+conflicts=("$pkgname-libre")
+source=("$_debrepo/`debfile $_debname`_$_debver.orig.tar.xz"
+ "$_debrepo/`debfile $_debname`_$_debver-${_debrel#deb}.debian.tar.xz"
+ "$_parabolarepo/${pkgname}_$_brandingver-$_brandingrel.branding.tar.xz"
+ "$_parabolarepo/${pkgname}_$_brandingver-$_brandingrel.branding.tar.xz.sig"
+ mozconfig
+ libre.patch
+ remove-default-and-shell-icons-in-packaging-manifest.patch
+ gnu_headshadow.png
+ drm-free.png
+ $pkgname.desktop
+ $pkgname-install-dir.patch
+ vendor.js
+ no-libnotify.patch
+ $pkgname-gtk3-20.patch
+ enable-object-directory-paths.patch
+ mozilla-1253216.patch
+ mozilla-build-arm.patch)
+sha256sums=('032cc7c6da26b4336a6e0cea41a2821a149469b5cdeaec66723bf256bbf13ec5'
+ 'bda6131cb58bedfb33ed372ab0b8ad666f8b6b310f4788c7415efb9e3ae30ec6'
+ '0c4ce096711629db4a5f15415b9d752fd77c4eab7bfd22bd3cb6640ed9cbf861'
+ 'SKIP'
+ '6891d6237312914b579c632b71f9e4f613e7b00bbf2fd7ce53b4cf681820f609'
+ '013af398e97da9e855a143582816bf819e0d9d8d2b0e323d6b832f3df1157fdd'
+ '32f1fe3ad4f80d0ae419064db2abe49b97cd7cb18c35d68be1a2befb60172a2a'
+ '93e3001ce152e1d142619e215a9ef07dd429943b99d21726c25da9ceb31e31cd'
+ '56eba484179c7f498076f8dc603d8795e99dce8c6ea1da9736318c59d666bff6'
+ '2257dc69886bd0b72c48675a27c3a88b9cf6b598252c9e9f1c99763180684fc3'
+ '3aea6676f1e53a09673b6ae219d281fc28054beb6002b09973611c02f827651d'
+ 'e1c82f5f683258e17f7b3dba62a938e4efe4d232f45a4b82e74cd2793fd5f7fe'
+ 'e4ebdd14096d177d264a7993dbd5df46463605ff45f783732c26d30b9caa53a7'
+ 'c984c8bda3c173349d98f3fa71ec8ff8e8b74e6ca20a3f39f33596dbb4c4d1e8'
+ 'e260e555b261aabab1e48786dd514eeea056e4402af7cfd4dfd1d32858441484'
+ 'fbb6011501a74a8ea6d01c041870fcefb7ef2859c134aedc676e5f6452833f65'
+ '56eecee8162c138c442773d66483886f1242c8dd2b16eed5711ae5e63d9b0e3a')
+validpgpkeys=(
+ 'C92BAA713B8D53D3CAE63FC9E6974752F9704456' # André Silva
+ '684D54A189305A9CC95446D36B888913DDB59515' # Márcio Silva
+)
+
+prepare() {
+ cd "$srcdir/$_pkgname-$_debver"
+ mv "$srcdir/debian" .
+ mv "$srcdir/$pkgname-$_brandingver/branding" debian
+ mv "$srcdir/$pkgname-$_brandingver/patches/iceweasel-branding" debian/patches
+ cat "$srcdir/$pkgname-$_brandingver/patches/series" >> debian/patches/series
+
+ export QUILT_PATCHES=debian/patches
+ export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
+ export QUILT_DIFF_ARGS='--no-timestamps'
+
+ quilt push -av
+
+ # Put gnu_headshadow.png and drm-free.png in the source code
+ install -m644 "$srcdir/"{gnu_headshadow,drm-free}.png \
+ browser/base/content/abouthome
+
+ # Useless since we are doing it ourselves
+ patch -Np1 -i "$srcdir/remove-default-and-shell-icons-in-packaging-manifest.patch"
+
+ # Enable object directory paths for Iceweasel rebranding
+ patch -Np1 -i "$srcdir/enable-object-directory-paths.patch"
+
+ # Install to /usr/lib/$pkgname
+ patch -Np1 -i "$srcdir/$pkgname-install-dir.patch"
+
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1234158
+ patch -Np1 -i "$srcdir/$pkgname-gtk3-20.patch"
+
+ # Notifications with libnotify are broken
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1236150
+ patch -Np1 -i "$srcdir/no-libnotify.patch"
+
+ # Patch and remove anything that's left
+ patch -Np1 -i "$srcdir/libre.patch"
+ sed -i 's|Adobe Flash|SWF Player|g;
+ ' browser/base/content/pageinfo/permissions.js \
+ browser/base/content/browser-plugins.js
+ sed -i '\|["]displayName["][:] ["]Flash["]| s|Flash|SWF Player|
+ \|["]displayName["][:] ["]Shockwave["]| s|Shockwave|DCR Player|
+ \|["]displayName["][:] ["]QuickTime["]| s|QuickTime|MOV Player|
+ \|installLinux| s|true|false|
+ ' browser/base/content/browser-plugins.js
+
+ # Load our build config, disable SafeSearch
+ cp "$srcdir/mozconfig" .mozconfig
+
+ mkdir "$srcdir/path"
+ ln -s /usr/bin/python2 "$srcdir/path/python"
+
+ # Load our searchplugins
+ rm -rv browser/locales/en-US/searchplugins
+ cp -av /usr/lib/mozilla/searchplugins browser/locales/en-US
+
+ # ARM-specific changes:
+ if [[ "$CARCH" == arm* ]]; then
+ sed -i '/ac_add_options --enable-rust/d' .mozconfig
+ echo "ac_add_options --disable-ion" >> .mozconfig
+ echo "ac_add_options --disable-elf-hack" >> .mozconfig
+ echo "ac_add_options --disable-webrtc" >> .mozconfig
+
+ # Disable gold linker, reduce memory consumption at link time
+ sed -i '/ac_add_options --enable-gold/d' .mozconfig
+ LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
+ echo "ac_add_options --disable-tests" >> .mozconfig
+ echo "ac_add_options --disable-debug" >> .mozconfig
+
+ patch -p1 -i ../mozilla-1253216.patch
+ patch -p1 -i ../mozilla-build-arm.patch
+ fi
+}
+
+build() {
+ cd "$srcdir/$_pkgname-$_debver"
+
+ # _FORTIFY_SOURCE causes configure failures
+ CPPFLAGS+=" -O2"
+
+ # Hardening
+ LDFLAGS+=" -Wl,-z,now"
+
+ # GCC 6
+ CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
+
+ export PATH="$srcdir/path:$PATH"
+
+ if $_pgo; then
+ # Do PGO
+ xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" \
+ make -f client.mk build MOZ_PGO=1
+ else
+ make -f client.mk build
+ fi
+}
+
+package() {
+ cd "$srcdir/$_pkgname-$_debver"
+ make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install
+
+ install -Dm644 ../vendor.js "$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js"
+
+ _brandingdir=debian/branding
+ brandingdir=moz-objdir/$_brandingdir
+ icondir="$pkgdir/usr/share/icons/hicolor"
+ for i in 16 22 24 32 48 64 128 192 256 384; do
+ rsvg-convert -w $i -h $i "$_brandingdir/${pkgname}_icon.svg" \
+ -o "$brandingdir/default$i.png"
+ install -Dm644 "$brandingdir/default$i.png" \
+ "$icondir/${i}x${i}/apps/$pkgname.png"
+ done
+
+ install -Dm644 "$_brandingdir/${pkgname}_icon.svg" \
+ "$icondir/scalable/apps/$pkgname.svg"
+
+ install -d "$pkgdir/usr/share/applications"
+ install -m644 "$srcdir/$pkgname.desktop" \
+ "$pkgdir/usr/share/applications"
+
+ # Use system-provided dictionaries
+ rm -rf "$pkgdir/usr/lib/$pkgname/"{dictionaries,hyphenation}
+ ln -s /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries"
+ ln -s /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation"
+
+ # Replace duplicate binary with symlink
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=658850
+ ln -sf $pkgname "$pkgdir/usr/lib/$pkgname/$pkgname-bin"
+}