summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsabell Cowan2017-10-05 23:34:21 -0500
committerIsabell Cowan2017-10-05 23:34:21 -0500
commit82ee89ac47d29104c242df39ad4900aa4710880e (patch)
tree62b785351f8843ab594eab7bf36677ebd9789ba2
parent9740a36c9030c80a6aad664251e280b2377a80a0 (diff)
downloadaur-82ee89ac47d29104c242df39ad4900aa4710880e.tar.gz
Bumped to 57.0b5-2
* Renamed sources and patches for consistency and versioning. * Added messages and warnings to PKGBUILD. * Utilized the ./mach build system wrapper. * Updated mozconfig and dependencies. * Included many parameters for the build in the PKGBUILD header. * Patched nsNativeMenuDocListener for unity-menubar.patch
-rw-r--r--.SRCINFO90
-rw-r--r--PKGBUILD432
-rw-r--r--add-missing-pgo-rule.patch (renamed from add_missing_pgo_rule.patch)0
-rw-r--r--browser-kde-xul.patch (renamed from browser-kde.xul.diff)0
-rw-r--r--firefox-kde-opensuse-patch.patch (renamed from firefox-kde.patch.diff)0
-rw-r--r--firefox-no-default-ualocale-opensuse-patch.patch (renamed from firefox-no-default-ualocale.patch.diff)0
-rw-r--r--mozconfig29
-rw-r--r--mozilla-kde-opensuse-patch.patch (renamed from mozilla-kde.patch.diff)18
-rw-r--r--native-menu-doc-listener.patch22
-rw-r--r--no-crmf.patch (renamed from no-crmf.diff)0
-rw-r--r--pgo-fix-missing-kdejs.patch (renamed from pgo_fix_missing_kdejs.patch)0
11 files changed, 341 insertions, 250 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ab580db68ecb..249c5ee65a24 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by makepkg 5.0.2
+# Fri Oct 6 03:47:57 UTC 2017
pkgbase = firefox-kde-opensuse-beta
- pkgdesc = Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE
+ pkgdesc = Standalone web browser from mozilla.org with OpenSUSE patchs to integrate better with KDE Plasma 5
pkgver = 57.0b5
- pkgrel = 1
+ pkgrel = 2
url = https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox
arch = i686
arch = x86_64
@@ -15,83 +17,87 @@ pkgbase = firefox-kde-opensuse-beta
makedepends = yasm
makedepends = mesa
makedepends = imake
- makedepends = xorg-server-xvfb
- makedepends = libpulse
+ makedepends = gconf
makedepends = inetutils
makedepends = autoconf2.13
makedepends = rust
- makedepends = cargo
makedepends = clang
makedepends = llvm
+ makedepends = jack
+ depends = gtk3
depends = gtk2
depends = mozilla-common
depends = libxt
depends = startup-notification
depends = mime-types
depends = dbus-glib
- depends = alsa-lib
- depends = hicolor-icon-theme
- depends = libvpx
- depends = icu
- depends = libevent
+ depends = ffmpeg
depends = nss>=3.33
depends = nspr>=4.17
depends = hunspell
depends = sqlite
- depends = libnotify
+ depends = ttf-font
+ depends = libpulse
+ depends = hicolor-icon-theme
+ depends = libvpx
+ depends = icu
+ depends = libevent
depends = kmozillahelper
- depends = ffmpeg
- depends = gtk3
optdepends = networkmanager: Location detection via available WiFi networks
+ optdepends = libnotify: Notification integration
+ optdepends = pulseaudio: Audio support
optdepends = speech-dispatcher: Text-to-Speech
provides = firefox=57.0b5
conflicts = firefox
options = !emptydirs
+ options = !debug
options = strip
source = http://archive.mozilla.org/pub/firefox/releases/57.0b5/source/firefox-57.0b5.source.tar.xz
+ source = firefox-trunk+r2113.debian.tar.gz::https://bazaar.launchpad.net/~mozillateam/firefox/firefox-trunk.head/tarball/2113
+ source = mozilla-kde_g6c6109948e35.patch::http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/mozilla-kde.patch
+ source = mozilla-nongnome-proxies_g6c6109948e35.patch::http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/mozilla-nongnome-proxies.patch
+ source = firefox-branded-icons_g6c6109948e35.patch::http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/firefox-branded-icons.patch
+ source = firefox-kde_g6c6109948e35.patch::http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/firefox-kde.patch
+ source = firefox-no-default-ualocale_g6c6109948e35.patch::http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/firefox-no-default-ualocale.patch
+ source = native-menu-doc-listener.patch
+ source = firefox-kde-opensuse-patch.patch
+ source = firefox-no-default-ualocale-opensuse-patch.patch
+ source = mozilla-kde-opensuse-patch.patch
+ source = browser-kde-xul.patch
+ source = add-missing-pgo-rule.patch
+ source = pgo-fix-missing-kdejs.patch
+ source = wifi-disentangle.patch
+ source = wifi-fix-interface.patch
+ source = no-crmf.patch
+ source = firefox-install-dir.patch
source = mozconfig
- source = firefox.desktop
source = vendor.js
source = kde.js
source = firefox-fixed-loading-icon.png
- source = browser-kde.xul.diff
- source = http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/firefox-branded-icons.patch
- source = http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/firefox-kde.patch
- source = firefox-kde.patch.diff
- source = http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/firefox-no-default-ualocale.patch
- source = firefox-no-default-ualocale.patch.diff
- source = http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/mozilla-kde.patch
- source = mozilla-kde.patch.diff
- source = http://www.rosenauer.org/hg/mozilla/raw-file/6c6109948e35/mozilla-nongnome-proxies.patch
- source = firefox-trunk.debsrc.tar.gz::http://bazaar.launchpad.net/~mozillateam/firefox/firefox-trunk.head/tarball/2113
- source = add_missing_pgo_rule.patch
- source = pgo_fix_missing_kdejs.patch
- source = wifi-disentangle.patch
- source = wifi-fix-interface.patch
- source = firefox-install-dir.patch
- source = no-crmf.diff
+ source = firefox.desktop
sha256sums = bbe48656693e562b60f643a76a825b84d57581bb83dcb9a3a7fa90ac47455d5d
- sha256sums = cf218e2f68556261726168b60be8fc4fa91832a1ed5309880516519f6d832d4b
- sha256sums = 75c526e9669b91b4fe5dcea650a1e8419220abb2e9564184f0d984c71eae82e8
- sha256sums = 93c5df00f409988bbfa890ac175103476ead3af68f7501973ee70bd11dc472f8
- sha256sums = b8cc5f35ec35fc96ac5c5a2477b36722e373dbb57eba87eb5ad1276e4df7236d
- sha256sums = 68e3a5b47c6d175cc95b98b069a15205f027cab83af9e075818d38610feb6213
- sha256sums = 8da046206e98649a371ce8e9b3dffc9532f78e963f764c866bc4e021b8b6fb5a
+ sha256sums = SKIP
+ sha256sums = e25b9fa2e4ac279b5e073286b7dc9956822bf508eccb67eb870921013274a709
+ sha256sums = ef0f90c9134ef05b950f06a3ffbd699c2e5a5f99a4cdf9868e799534d68c204f
sha256sums = c85a37e71f2bd511fac88d41ca0618ee375c49fc86bc2beddf6dc17c3f17508d
sha256sums = f672e60e22869381e9c4cdd90353a053a0171778eca40d4664bc733822fd535f
- sha256sums = ecb7c3ae3f52ee9b430c1e8e69370b1dedb06674e1fcdc856d60942680bf7b62
sha256sums = b941790009bb9eda46c2d96fb0d1c83b0fe2d1acf74754ab08e6b18c1e0c6b16
+ sha256sums = 70bdf9e58397e6483b7a4d925176be74defbde0221cc3d5f253ec4ede55e6f21
+ sha256sums = ecb7c3ae3f52ee9b430c1e8e69370b1dedb06674e1fcdc856d60942680bf7b62
sha256sums = f3c50e4ec8d58b23530d87a3162e0b33af58ea73b35dc51bd29b1fad0d26f43f
- sha256sums = e25b9fa2e4ac279b5e073286b7dc9956822bf508eccb67eb870921013274a709
- sha256sums = d43305705aab0520ac55c94dab4a545e90b15093d7b4c25359f7f145fa3723c4
- sha256sums = ef0f90c9134ef05b950f06a3ffbd699c2e5a5f99a4cdf9868e799534d68c204f
- sha256sums = SKIP
+ sha256sums = 297db5d883f7f2e086d7dfe2631f1b5dcfd5909f68462940a02cc039186b65c5
+ sha256sums = 8da046206e98649a371ce8e9b3dffc9532f78e963f764c866bc4e021b8b6fb5a
sha256sums = f9067f62a25a7a77276e15f91cc9e7ba6576315345cfc6347b1b2e884becdb0c
sha256sums = 2797d1e61031d24ee24bf682c9447b3b9c1bca10f8e6cbd597b854af2de1ec54
sha256sums = f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed
sha256sums = e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1
- sha256sums = d86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd
sha256sums = fb85a538044c15471c12cf561d6aa74570f8de7b054a7063ef88ee1bdfc1ccbb
+ sha256sums = d86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd
+ sha256sums = 3a379cafc979bb2cea4380b774a69ac5a79919291060d38464f94b479c4d19a0
+ sha256sums = 93c5df00f409988bbfa890ac175103476ead3af68f7501973ee70bd11dc472f8
+ sha256sums = b8cc5f35ec35fc96ac5c5a2477b36722e373dbb57eba87eb5ad1276e4df7236d
+ sha256sums = 68e3a5b47c6d175cc95b98b069a15205f027cab83af9e075818d38610feb6213
+ sha256sums = 75c526e9669b91b4fe5dcea650a1e8419220abb2e9564184f0d984c71eae82e8
pkgname = firefox-kde-opensuse-beta
diff --git a/PKGBUILD b/PKGBUILD
index 80751916b709..6b27fdf03bb3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,68 +2,41 @@
# Contributor: Thaodan <theodorstormgrade@gmail.com>
# Contributor: Weng Xuetian <wengxt@gmail.com>
+# ------------------------ #
+# --- BUILD PARAMETERS --- #
+# ------------------------ #
# enable this if you run out of memory during linking
-#_lowmem=true
-
-# enable gtk3 (warning: flash or any other plugin crashes frequently)
-_gtk3=true
-
-# try to build with PGO
-# currently broken
-#_pgo=false
-
-# globalmenu
-# to support globalmenu a patch from ubuntu is applied
-# source:
-# http://bazaar.launchpad.net/~mozillateam/firefox/firefox-trunk.head
-# /view/head:/debian/patches/unity-menubar.patch
-
-_pkgname=firefox
-pkgname=$_pkgname-kde-opensuse-beta
-pkgver=57.0b5
-pkgrel=1
-pkgdesc="Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE"
-arch=('i686' 'x86_64')
-license=('MPL' 'GPL' 'LGPL')
-url="https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox"
-depends=('gtk2' 'mozilla-common' 'libxt' 'startup-notification' 'mime-types'
- 'dbus-glib' 'alsa-lib' 'hicolor-icon-theme'
- 'libvpx' 'icu' 'libevent' 'nss>=3.33' 'nspr>=4.17' 'hunspell'
- 'sqlite' 'libnotify' 'kmozillahelper' 'ffmpeg' )
-if [ $_gtk3 ] ; then
- depends+=('gtk3')
-fi
+_lowmem=false
-makedepends=('unzip' 'zip' 'diffutils' 'python2' 'yasm' 'mesa' 'imake'
- 'xorg-server-xvfb' 'libpulse' 'inetutils' 'autoconf2.13' 'rust'
- 'cargo' 'clang' 'llvm')
-optdepends=('networkmanager: Location detection via available WiFi networks'
- 'speech-dispatcher: Text-to-Speech')
-provides=("firefox=${pkgver}")
-conflicts=('firefox')
-_patchrev=6c6109948e35
-_debianrev=2113
-options=('!emptydirs' 'strip')
-_patchurl=http://www.rosenauer.org/hg/mozilla/raw-file/$_patchrev
-source=("http://archive.mozilla.org/pub/$_pkgname/releases/$pkgver/source/$_pkgname-$pkgver.source.tar.xz"
- mozconfig firefox.desktop vendor.js kde.js firefox-fixed-loading-icon.png
- # Firefox patchset
- browser-kde.xul.diff
- $_patchurl/firefox-branded-icons.patch
- $_patchurl/firefox-kde.patch firefox-kde.patch.diff
- $_patchurl/firefox-no-default-ualocale.patch firefox-no-default-ualocale.patch.diff
- # Gecko/toolkit patchset
- $_patchurl/mozilla-kde.patch mozilla-kde.patch.diff
- $_patchurl/mozilla-nongnome-proxies.patch
- firefox-trunk.debsrc.tar.gz::https://bazaar.launchpad.net/~mozillateam/$_pkgname/$_pkgname-trunk.head/tarball/"$_debianrev"
- add_missing_pgo_rule.patch
- pgo_fix_missing_kdejs.patch
- wifi-disentangle.patch wifi-fix-interface.patch
- firefox-install-dir.patch no-crmf.diff
-)
+# enable this to try to build with PGO (probably will fail to build)
+_pgo=false
+
+# enable this to try to use the system pixman (probably will fail at link time)
+_system_pixman=false
+
+# enable this to build with ccache
+_ccache=false
+
+# enable this to build for debug
+_debug=false
+
+# Use optimization flags (required if -D_FORTIFY_SOURCE is set and non-zero).
+# Warning, firefox may crash if set to anything but -O2.
+_optimize="-O2"
+# Upstream name, version, and soruce URL
+_realname='firefox'
+_pkgver=57.0b5
+_mozffurl="http://archive.mozilla.org/pub/$_realname/releases/$_pkgver/source/$_realname-$_pkgver.source.tar.xz"
+# Debian Firefox trunk Debian source revision and URL (for Unity (global) menubar patch).
+_debianrev=2113
+_debianurl="https://bazaar.launchpad.net/~mozillateam/$_realname/$_realname-trunk.head/tarball/$_debianrev"
+
+# OpenSUSE Firefox source revision and URL (for OpenSUSE patches).
+_opensuserev=6c6109948e35
+_opensusebaseurl="http://www.rosenauer.org/hg/mozilla/raw-file/$_opensuserev"
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
@@ -73,78 +46,200 @@ _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
_google_default_client_id=413772536636.apps.googleusercontent.com
_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
-
# Mozilla API keys (see https://location.services.mozilla.com/api)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact heftig@archlinux.org for
# more information.
_mozilla_api_key=16674381-f021-49de-8622-3021c5942aff
-prepare() {
- mkdir -p "$srcdir/patched-patches"
- cd "$srcdir/patched-patches"
+# Directory where things will be built
+if [[ "$CARCH" == 'i686' && "$CHOST" == i*86-*-linux-gnu ]]; then
+ _builddir=obj-i686-pc-linux-gnu
+elif [[ "$CARCH" == 'x86_64' && "$CHOST" == x86_64-*-linux-gnu ]]; then
+ _builddir=obj-x86_64-pc-linux-gnu
+else
+ error "Please add the correct _builddir variable for your toolchain!"
+ exit 1
+fi
- msg2 "Patching OpenSUSE Patches"
- for patch in mozilla-kde firefox-kde firefox-no-default-ualocale; do
- cp "$srcdir/$patch.patch" .
- patch -Ni "$srcdir/$patch.patch.diff"
- done
- cd "$srcdir/$_pkgname-$pkgver"
+# ------------------------- #
+# --- PATCH INFORMATION --- #
+# ------------------------- #
- cp "$srcdir/mozconfig" .mozconfig
+# To support globalmenu a patch from Ubuntu is applied.
+# source (replace ${_debianrev} with the revision above):
+# https://bazaar.launchpad.net/~mozillateam/firefox/firefox-trunk.head/revision/${_debianrev}#debian/patches/unity-menubar.patch
- patch -Np1 -i "$srcdir/firefox-install-dir.patch"
+# To integrate better with KDE Plasma 5 patches for OpenSUSE are applied.
+# source (replace ${_opensuserev} with the revision above):
+# http://www.rosenauer.org/hg/mozilla/file/${_opensuserev}
- echo -n "$_google_api_key" >google-api-key
- echo "ac_add_options --with-google-api-keyfile=\"$PWD/google-api-key\"" >>.mozconfig
+# ------------------- #
+# --- SOURCE INFO --- #
+# ------------------- #
- echo -n "$_google_default_client_id $_google_default_client_secret" >google-oauth-api-key
- echo "ac_add_options --with-google-api-keyfile=\"$PWD/google-oauth-api-key\"" >>.mozconfig
+pkgname=("$_realname-kde-opensuse-beta")
+pkgver="$_pkgver"
+pkgrel=2
+pkgdesc="Standalone web browser from mozilla.org with OpenSUSE patchs to integrate better with KDE Plasma 5"
+arch=('i686' 'x86_64')
+license=('MPL' 'GPL' 'LGPL')
+url="https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox"
+depends=('gtk3' 'gtk2' 'mozilla-common' 'libxt'
+ 'startup-notification' 'mime-types' 'dbus-glib'
+ 'ffmpeg' 'nss>=3.33' 'nspr>=4.17' 'hunspell' 'sqlite'
+ 'ttf-font' 'libpulse' 'hicolor-icon-theme' 'libvpx'
+ 'icu' 'libevent' 'kmozillahelper')
+makedepends=('unzip' 'zip' 'diffutils' 'python2' 'yasm'
+ 'mesa' 'imake' 'gconf' 'inetutils' 'autoconf2.13'
+ 'rust' 'clang' 'llvm' 'jack')
+optdepends=('networkmanager: Location detection via available WiFi networks'
+ 'libnotify: Notification integration'
+ 'pulseaudio: Audio support'
+ 'speech-dispatcher: Text-to-Speech')
+provides=("firefox=${pkgver}")
+conflicts=('firefox')
+options=('!emptydirs')
+# shellcheck disable=SC2140
+source=("$_mozffurl"
+ "firefox-trunk+r$_debianrev.debian.tar.gz"::"$_debianurl"
+ "mozilla-kde_g$_opensuserev.patch"::"$_opensusebaseurl/mozilla-kde.patch"
+ "mozilla-nongnome-proxies_g$_opensuserev.patch"::"$_opensusebaseurl/mozilla-nongnome-proxies.patch"
+ "firefox-branded-icons_g$_opensuserev.patch"::"$_opensusebaseurl/firefox-branded-icons.patch"
+ "firefox-kde_g$_opensuserev.patch"::"$_opensusebaseurl/firefox-kde.patch"
+ "firefox-no-default-ualocale_g$_opensuserev.patch"::"$_opensusebaseurl/firefox-no-default-ualocale.patch"
+ 'native-menu-doc-listener.patch'
+ 'firefox-kde-opensuse-patch.patch' 'firefox-no-default-ualocale-opensuse-patch.patch' 'mozilla-kde-opensuse-patch.patch'
+ 'browser-kde-xul.patch'
+ 'add-missing-pgo-rule.patch' 'pgo-fix-missing-kdejs.patch'
+ 'wifi-disentangle.patch' 'wifi-fix-interface.patch'
+ 'no-crmf.patch'
+ 'firefox-install-dir.patch'
+ 'mozconfig'
+ 'vendor.js' 'kde.js'
+ 'firefox-fixed-loading-icon.png'
+ 'firefox.desktop')
+sha256sums=('bbe48656693e562b60f643a76a825b84d57581bb83dcb9a3a7fa90ac47455d5d'
+ 'SKIP' # Debian source tarball is generated each time it is requested.
+ 'e25b9fa2e4ac279b5e073286b7dc9956822bf508eccb67eb870921013274a709'
+ 'ef0f90c9134ef05b950f06a3ffbd699c2e5a5f99a4cdf9868e799534d68c204f'
+ 'c85a37e71f2bd511fac88d41ca0618ee375c49fc86bc2beddf6dc17c3f17508d'
+ 'f672e60e22869381e9c4cdd90353a053a0171778eca40d4664bc733822fd535f'
+ 'b941790009bb9eda46c2d96fb0d1c83b0fe2d1acf74754ab08e6b18c1e0c6b16'
+ '70bdf9e58397e6483b7a4d925176be74defbde0221cc3d5f253ec4ede55e6f21'
+ 'ecb7c3ae3f52ee9b430c1e8e69370b1dedb06674e1fcdc856d60942680bf7b62'
+ 'f3c50e4ec8d58b23530d87a3162e0b33af58ea73b35dc51bd29b1fad0d26f43f'
+ '297db5d883f7f2e086d7dfe2631f1b5dcfd5909f68462940a02cc039186b65c5'
+ '8da046206e98649a371ce8e9b3dffc9532f78e963f764c866bc4e021b8b6fb5a'
+ 'f9067f62a25a7a77276e15f91cc9e7ba6576315345cfc6347b1b2e884becdb0c'
+ '2797d1e61031d24ee24bf682c9447b3b9c1bca10f8e6cbd597b854af2de1ec54'
+ 'f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed'
+ 'e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1'
+ 'fb85a538044c15471c12cf561d6aa74570f8de7b054a7063ef88ee1bdfc1ccbb'
+ 'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd'
+ '3a379cafc979bb2cea4380b774a69ac5a79919291060d38464f94b479c4d19a0'
+ '93c5df00f409988bbfa890ac175103476ead3af68f7501973ee70bd11dc472f8'
+ 'b8cc5f35ec35fc96ac5c5a2477b36722e373dbb57eba87eb5ad1276e4df7236d'
+ '68e3a5b47c6d175cc95b98b069a15205f027cab83af9e075818d38610feb6213'
+ '75c526e9669b91b4fe5dcea650a1e8419220abb2e9564184f0d984c71eae82e8')
- echo -n "$_mozilla_api_key" >mozilla-api-key
- echo "ac_add_options --with-mozilla-api-keyfile=\"$PWD/mozilla-api-key\"" >>.mozconfig
+if [[ ! -z "$_system_pixman" ]] && $_system_pixman; then
+ depends+=('pixman')
+fi
+if [[ ! -z "$_pgo" ]] && $_pgo; then
+ makedepends+=('xorg-server-xvfb')
+fi
+if [[ ! -z "$_debug" ]] && $_debug; then
+ options+=('debug' '!strip')
+else
+ options+=('!debug' 'strip')
+fi
- msg2 "Patching for KDE"
- patch -Np1 -i "$srcdir/mozilla-nongnome-proxies.patch"
- patch -Np1 -i "$srcdir/patched-patches/mozilla-kde.patch"
+# ---------------------- #
+# --- BUILD ROUTINES --- #
+# ---------------------- #
- cp \
- browser/base/content/browser.xul \
- browser/base/content/browser-kde.xul
- patch -Np1 -i "$srcdir/browser-kde.xul.diff"
-
- patch -Np1 -i "$srcdir/patched-patches/firefox-kde.patch"
- patch -Np1 -i "$srcdir/patched-patches/firefox-no-default-ualocale.patch"
+prepare() {
+ warning "Building Firefox takes roughly 10GiB of space, more if built with debugging symbols"
+ warning "Building Firefox can take many hours (1-10) depending on your system"
+ warning "Firefox is much more likely to crash if build with non-standard CXXFLAGS"
+ warning "Firefox will be much more reliable if built from a clean chroot"
+ warning "You have 30 seconds to reconsider your build environment"
+ sleep 30
+
+ cd "$srcdir/$_realname-$pkgver"
+
+ msg2 "Creating API key files"
+ echo -n "$_google_api_key" > google-api-key
+ echo -n "$_google_default_client_id $_google_default_client_secret" > google-oauth-api-key
+ echo -n "$_mozilla_api_key" > mozilla-api-key
+
+ msg2 "Creating .mozconfig (configure flags)"
+ {
+ cat "$srcdir/mozconfig"
+ if [[ ! -z "$_optimize" ]]; then
+ echo "ac_add_options --enable-optimize='${_optimize//\'/\'\\\'\'}'"
+ fi
+ echo "ac_add_options --with-google-api-keyfile='${PWD//\'/\'\\\'\'}/google-api-key'"
+ echo "ac_add_options --with-google-api-keyfile='${PWD//\'/\'\\\'\'}/google-oauth-api-key'"
+ echo "ac_add_options --with-mozilla-api-keyfile='${PWD//\'/\'\\\'\'}/mozilla-api-key'"
+ if [[ ! -z "$_system_pixman" ]] && $_system_pixman; then
+ echo "ac_add_options --enable-system-pixman"
+ fi
+ if [[ ! -z "$_ccache" ]] && $_ccache; then
+ echo "ac_add_options --enable-ccache"
+ fi
+ if [[ ! -z "$_debug" ]] && $_debug; then
+ echo "ac_add_options --enable-debug"
+ else
+ echo "export STRIP_FLAGS='--strip-debug'"
+ fi
+ } > .mozconfig
+
+ msg2 "Fixing OpenSUSE patches for Firefox $pkgver"
+ mkdir -p "$srcdir/patched-patches"
+ cd "$srcdir/patched-patches"
+ for patch in mozilla-kde firefox-kde firefox-no-default-ualocale; do
+ cp "$srcdir/${patch}_g$_opensuserev.patch" "$patch.patch"
+ patch -Ni "$srcdir/$patch-opensuse-patch.patch"
+ done
- patch -Np1 -i "$srcdir/firefox-branded-icons.patch"
+ cd "$srcdir/$_realname-$pkgver"
- # add globalmenu support
+ msg2 "Applying Unity (global) menubar patch"
patch -Np1 -i "$srcdir/~mozillateam/firefox/firefox-trunk.head/debian/patches/unity-menubar.patch"
+ patch -Np1 -i "$srcdir/native-menu-doc-listener.patch"
- # add missing rule for pgo builds
- patch -Np1 -i "$srcdir"/add_missing_pgo_rule.patch
-
- # add missing file Makefile for pgo builds
- patch -Np1 -i "$srcdir"/pgo_fix_missing_kdejs.patch
-
- # configure script misdetects the preprocessor without an optimization level
- # https://bugs.archlinux.org/task/34644
- # sed -i '/ac_cpp=/s/$CPPFLAGS/& -O2/' configure
+ msg2 "Applying OpenSUSE patches"
+ patch -Np1 -i "$srcdir/mozilla-nongnome-proxies_g$_opensuserev.patch"
+ patch -Np1 -i "$srcdir/patched-patches/mozilla-kde.patch"
+ cp \
+ browser/base/content/browser.xul \
+ browser/base/content/browser-kde.xul
+ patch -Np1 -i "$srcdir/browser-kde-xul.patch"
+ patch -Np1 -i "$srcdir/firefox-branded-icons_g$_opensuserev.patch"
+ patch -Np1 -i "$srcdir/patched-patches/firefox-kde.patch"
+ patch -Np1 -i "$srcdir/patched-patches/firefox-no-default-ualocale.patch"
+ msg2 "Applying Arch Linux (vendor) specific patches"
+ patch -Np1 -i "$srcdir/add-missing-pgo-rule.patch"
+ patch -Np1 -i "$srcdir/pgo-fix-missing-kdejs.patch"
# https://bugzilla.mozilla.org/show_bug.cgi?id=1371991
- patch -Np1 -i ../no-crmf.diff
-
+ patch -Np1 -i "$srcdir/no-crmf.patch"
# https://bugzilla.mozilla.org/show_bug.cgi?id=1314968
- patch -Np1 -i ../wifi-disentangle.patch
- patch -Np1 -i ../wifi-fix-interface.patch
+ patch -Np1 -i "$srcdir/wifi-disentangle.patch"
+ patch -Np1 -i "$srcdir/wifi-fix-interface.patch"
+ patch -Np1 -i "$srcdir/firefox-install-dir.patch"
+ msg2 "Creating additional PATH element to python2 (as python)"
# WebRTC build tries to execute "python" and expects Python 2
mkdir -p "$srcdir/path"
ln -sf /usr/bin/python2 "$srcdir/path/python"
+ msg2 "Replacing loading icon iwth fixed one"
# Fix tab loading icon (flickers with libpng 1.6)
# https://bugzilla.mozilla.org/show_bug.cgi?id=841734
# TODO: Remove this; Firefox 34 might use CSS animations for the loading icon
@@ -153,12 +248,11 @@ prepare() {
browser/themes/linux/tabbrowser/loading.png
touch sourcestamp.txt
-
- mkdir -p "$srcdir/build"
- mkdir -p "$srcdir/build/dist/include"
}
build() {
+ cd "$srcdir/$_realname-$pkgver"
+
export PATH="$srcdir/path:$PATH"
export PYTHON="/usr/bin/python2"
@@ -169,64 +263,48 @@ build() {
LDFLAGS+=" -Xlinker --no-keep-memory"
fi
- cd "$srcdir"
-
- if [[ "build/configure.txt" -ot "$_pkgname-$pkgver/sourcestamp.txt" ]]; then
- cd "$srcdir/$_pkgname-$pkgver"
-
- autoreconf-2.13 -i --force
- autoconf-2.13
-
- cd "$srcdir/build"
-
- # _FORTIFY_SOURCE causes configure failures
- CPPFLAGS_ORIGINAL="$CPPFLAGS"
- CPPFLAGS+=" -O2"
-
- "../$_pkgname-$pkgver"/configure \
- --prefix='/usr' \
- --disable-system-pixman # With system pixman doesn't work?
-
- touch configure.txt
-
- CPPFLAGS="$CPPFLAGS_ORIGINAL"
+ # Build fails with -D_FORTIFY_SOURCE if optimazations are not in CPPFLAGS
+ if [[ -z "${CPPFLAGS/-D_FORTIFY_SOURCE*/}" && ! -z "$_optimize" ]]; then
+ CPPFLAGS+=" $_optimize"
fi
- cd "$srcdir/build"
-
- # some headers are missing for some reason.
- ln -fs \
- "$srcdir/$_pkgname-$pkgver/nsprpub/lib/ds"/* \
- "$srcdir/$_pkgname-$pkgver/nsprpub/pr/include"/* \
- "$srcdir/$_pkgname-$pkgver/config/external/nspr"/* \
- "$srcdir/$_pkgname-$pkgver/gfx/cairo/libpixman/src"/* \
- "$srcdir/$_pkgname-$pkgver/nsprpub/lib/libc/include"/* \
- "dist/include"/
-
- MAKEARGS=('MOZ_SOURCE_CHANGESET="opensuse-kde-beta"')
- if [[ -n $_pgo ]]; then
- MAKEARGS+=('MOZ_PGO=1')
- MAKECMD=(xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" make "${MAKEARGS[@]}")
+ if [[ ! -z "$_pgo" ]] && $_pgo; then
+ export MOZ_PGO=1
+ BUILDCMD=(xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" ./mach build)
else
- MAKECMD=(make "${MAKEARGS[@]}")
+ BUILDCMD=(./mach build)
fi
- "${MAKECMD[@]}"
+ msg2 "Building Firefox"
+ "${BUILDCMD[@]}"
+
+ msg2 "Generating Firefox symbols"
+ ./mach buildsymbols
+
+ msg2 "Adding KDE Plasma 5 script to default preferences"
+ cp "$srcdir/kde.js" "$_builddir/dist/bin/defaults/pref"/
}
package() {
- cd "$srcdir/build"
+ cd "$srcdir/$_realname-$pkgver"
+
+ msg2 "Installing Firefox"
+ DESTDIR="$pkgdir" ./mach install
- [[ "$CARCH" == "i686" ]] && cp "$srcdir/kde.js" dist/bin/defaults/pref
- [[ "$CARCH" == "x86_64" ]] && cp "$srcdir/kde.js" dist/bin/defaults/pref
+ msg2 "Copying Firefox symbols zip into start directory"
+ find . -name '*crashreporter-symbols-full.zip' -exec cp -fvt "$startdir" {} +
- make install DESTDIR="$pkgdir" INSTALL_SDK=
+ msg2 "Installing KDE Plasma 5 script"
+ install -Dm644 "$srcdir/kde.js" \
+ "$pkgdir/usr/lib/firefox/browser/defaults/preferences/kde.js"
- install -Dm644 "$srcdir/vendor.js" "$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js"
- install -Dm644 "$srcdir/kde.js" "$pkgdir/usr/lib/firefox/browser/defaults/preferences/kde.js"
+ msg2 "Installing Arch Linux (vendor) script"
+ install -Dm644 "$srcdir/vendor.js" \
+ "$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js"
- _distini="$pkgdir/usr/lib/firefox/distribution/distribution.ini"
- install -Dm644 /dev/stdin "$_distini" <<END
+ msg2 "Installing distribution metadata file"
+ install -dm755 "$pkgdir/usr/lib/firefox/distribution"
+ cat > "$pkgdir/usr/lib/firefox/distribution/distribution.ini" <<END
[Global]
id=archlinux
version=1.0
@@ -234,56 +312,40 @@ about=Mozilla Firefox for Arch Linux
[Preferences]
app.distributor=archlinux
-app.distributor.channel=$pkgname
+app.distributor.channel=${pkgname[0]}
app.partner.archlinux=archlinux
END
- cd "$srcdir/$_pkgname-$pkgver"
-
+ msg2 "Installing Firefox branded icons"
for i in 16 22 24 32 48 256; do
- install -Dm644 browser/branding/official/default$i.png \
- "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png"
+ install -Dm644 "browser/branding/official/default$i.png" \
+ "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png"
done
-
install -Dm644 browser/branding/official/content/icon64.png \
- "$pkgdir/usr/share/icons/hicolor/64x64/apps/firefox.png"
+ "$pkgdir/usr/share/icons/hicolor/64x64/apps/firefox.png"
install -Dm644 browser/branding/official/mozicon128.png \
- "$pkgdir/usr/share/icons/hicolor/128x128/apps/firefox.png"
+ "$pkgdir/usr/share/icons/hicolor/128x128/apps/firefox.png"
install -Dm644 browser/branding/official/content/about-logo.png \
- "$pkgdir/usr/share/icons/hicolor/192x192/apps/firefox.png"
+ "$pkgdir/usr/share/icons/hicolor/192x192/apps/firefox.png"
install -Dm644 browser/branding/official/content/about-logo@2x.png \
- "$pkgdir/usr/share/icons/hicolor/384x384/apps/firefox.png"
+ "$pkgdir/usr/share/icons/hicolor/384x384/apps/firefox.png"
- install -Dm644 "$srcdir/firefox.desktop" "$pkgdir/usr/share/applications/firefox.desktop"
+ msg2 "Installing desktop entry"
+ install -Dm644 "$srcdir/firefox.desktop" \
+ "$pkgdir/usr/share/applications/firefox.desktop"
- # Use system-provided dictionaries
+ msg2 "Replacing Firefox dictionaries with system dictionaries"
rm -rf "$pkgdir"/usr/lib/firefox/{dictionaries,hyphenation}
ln -s /usr/share/hunspell "$pkgdir/usr/lib/firefox/dictionaries"
ln -s /usr/share/hyphen "$pkgdir/usr/lib/firefox/hyphenation"
- #workaround for now
- #https://bugzilla.mozilla.org/show_bug.cgi?id=658850
+ msg2 "Linking forefox to usr/lib/firefox/firefox-bin"
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=658850
ln -sf firefox "$pkgdir/usr/lib/firefox/firefox-bin"
+
+ msg2 "Forcing use of system SSL certificates"
+ ln -srf "$pkgdir/usr/lib/libnssckbi.so" \
+ "$pkgdir/usr/lib/$_realname/libnssckbi.so"
}
-sha256sums=('bbe48656693e562b60f643a76a825b84d57581bb83dcb9a3a7fa90ac47455d5d'
- 'cf218e2f68556261726168b60be8fc4fa91832a1ed5309880516519f6d832d4b'
- '75c526e9669b91b4fe5dcea650a1e8419220abb2e9564184f0d984c71eae82e8'
- '93c5df00f409988bbfa890ac175103476ead3af68f7501973ee70bd11dc472f8'
- 'b8cc5f35ec35fc96ac5c5a2477b36722e373dbb57eba87eb5ad1276e4df7236d'
- '68e3a5b47c6d175cc95b98b069a15205f027cab83af9e075818d38610feb6213'
- '8da046206e98649a371ce8e9b3dffc9532f78e963f764c866bc4e021b8b6fb5a'
- 'c85a37e71f2bd511fac88d41ca0618ee375c49fc86bc2beddf6dc17c3f17508d'
- 'f672e60e22869381e9c4cdd90353a053a0171778eca40d4664bc733822fd535f'
- 'ecb7c3ae3f52ee9b430c1e8e69370b1dedb06674e1fcdc856d60942680bf7b62'
- 'b941790009bb9eda46c2d96fb0d1c83b0fe2d1acf74754ab08e6b18c1e0c6b16'
- 'f3c50e4ec8d58b23530d87a3162e0b33af58ea73b35dc51bd29b1fad0d26f43f'
- 'e25b9fa2e4ac279b5e073286b7dc9956822bf508eccb67eb870921013274a709'
- 'd43305705aab0520ac55c94dab4a545e90b15093d7b4c25359f7f145fa3723c4'
- 'ef0f90c9134ef05b950f06a3ffbd699c2e5a5f99a4cdf9868e799534d68c204f'
- 'SKIP'
- 'f9067f62a25a7a77276e15f91cc9e7ba6576315345cfc6347b1b2e884becdb0c'
- '2797d1e61031d24ee24bf682c9447b3b9c1bca10f8e6cbd597b854af2de1ec54'
- 'f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed'
- 'e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1'
- 'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd'
- 'fb85a538044c15471c12cf561d6aa74570f8de7b054a7063ef88ee1bdfc1ccbb')
+
+# vim: set ts=2 sw=2 et syn=sh ft=sh:
diff --git a/add_missing_pgo_rule.patch b/add-missing-pgo-rule.patch
index bc30c2a2673b..bc30c2a2673b 100644
--- a/add_missing_pgo_rule.patch
+++ b/add-missing-pgo-rule.patch
diff --git a/browser-kde.xul.diff b/browser-kde-xul.patch
index dd382dfa6004..dd382dfa6004 100644
--- a/browser-kde.xul.diff
+++ b/browser-kde-xul.patch
diff --git a/firefox-kde.patch.diff b/firefox-kde-opensuse-patch.patch
index 0a1bee9e2e36..0a1bee9e2e36 100644
--- a/firefox-kde.patch.diff
+++ b/firefox-kde-opensuse-patch.patch
diff --git a/firefox-no-default-ualocale.patch.diff b/firefox-no-default-ualocale-opensuse-patch.patch
index b0bb00597ecf..b0bb00597ecf 100644
--- a/firefox-no-default-ualocale.patch.diff
+++ b/firefox-no-default-ualocale-opensuse-patch.patch
diff --git a/mozconfig b/mozconfig
index d5cbeafe6362..b14a525fe2ed 100644
--- a/mozconfig
+++ b/mozconfig
@@ -1,49 +1,36 @@
+# Build target
ac_add_options --enable-application=browser
+# Basic options
ac_add_options --prefix=/usr
+ac_add_options --enable-release
ac_add_options --enable-gold
ac_add_options --enable-pie
-ac_add_options --enable-optimize="-O2"
-
-ac_add_options --enable-release
+# Branding
ac_add_options --enable-official-branding
ac_add_options --enable-update-channel=release
ac_add_options --with-distribution-id=org.archlinux
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
-export MOZ_SOURCE_REPO=https://hg.mozilla.org/mozilla-unified
export MOZ_ADDON_SIGNING=1
export MOZ_REQUIRE_SIGNING=1
-export BUILD_OFFICIAL=1
-
# System libraries
-ac_add_options --with-system-nspr
-ac_add_options --with-system-nss
-ac_add_options --with-system-icu
-ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
-ac_add_options --with-system-libvpx
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi
-# System pixman doesn't work?
-#ac_add_options --enable-system-pixman
-ac_add_options --disable-libproxy
-#ac_add_options --enable-shared-js
# Features
+ac_add_options --enable-alsa
+ac_add_options --enable-jack
ac_add_options --enable-startup-notification
ac_add_options --enable-crashreporter
ac_add_options --disable-updater
-ac_add_options --disable-gconf
-ac_add_options --disable-tests
-
-
-STRIP_FLAGS="--strip-debug"
-
# PGO
mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 $(MAKE) -C $(MOZ_OBJDIR) pgo-profile-run'
+
+# Build options (generated in PKGBUILD)
diff --git a/mozilla-kde.patch.diff b/mozilla-kde-opensuse-patch.patch
index 373953595fe2..77b4e1847e14 100644
--- a/mozilla-kde.patch.diff
+++ b/mozilla-kde-opensuse-patch.patch
@@ -1,5 +1,5 @@
---- mozilla-kde.patch 2017-10-03
-+++ mozilla-kde.patch 2017-10-03
+--- mozilla-kde.patch
++++ mozilla-kde.patch
@@ -9,12 +9,7 @@
diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
--- a/modules/libpref/Preferences.cpp
@@ -122,6 +122,20 @@
@@ -1143,26 +1143,26 @@ nsresult nsOSHelperAppService::OSProtoco
ContentAction::Action::defaultActionForScheme(QString(aProtocolScheme) + ':');
+@@ -3200,12 +3180,12 @@
+ --- a/widget/gtk/moz.build
+ +++ b/widget/gtk/moz.build
+ @@ -109,16 +109,17 @@ else:
+- include('/ipc/chromium/chromium-config.mozbuild')
+
+ FINAL_LIBRARY = 'xul'
+
+ LOCAL_INCLUDES += [
+ '/layout/generic',
++ '/layout/style',
+ '/layout/xul',
+ '/other-licenses/atk-1.0',
+ + '/toolkit/xre',
@@ -3303,7 +3283,7 @@
+ return NS_OK;
+ }
diff --git a/native-menu-doc-listener.patch b/native-menu-doc-listener.patch
new file mode 100644
index 000000000000..5cc90c9ecae8
--- /dev/null
+++ b/native-menu-doc-listener.patch
@@ -0,0 +1,22 @@
+--- a/widget/gtk/nsNativeMenuDocListener.cpp
++++ b/widget/gtk/nsNativeMenuDocListener.cpp
+@@ -64,7 +64,8 @@
+ {
+ MOZ_ASSERT(mContentToObserverTable.Count() == 0,
+ "Some nodes forgot to unregister listeners. This is bad! (and we're lucky we made it this far)");
+- MOZ_COUNT_DTOR(nsNativeMenuDocListener);
++ // This shouldn't be here? https://bugzilla.mozilla.org/show_bug.cgi?id=977380
++ // MOZ_COUNT_DTOR(nsNativeMenuDocListener);
+ }
+
+ void
+@@ -287,7 +288,8 @@
+ mLastSource(nullptr),
+ mLastTarget(nullptr)
+ {
+- MOZ_COUNT_CTOR(nsNativeMenuDocListener);
++ // This shouldn't be here, see destructor for details.
++ // MOZ_COUNT_CTOR(nsNativeMenuDocListener);
+ }
+
+ void
diff --git a/no-crmf.diff b/no-crmf.patch
index 242304eb4182..242304eb4182 100644
--- a/no-crmf.diff
+++ b/no-crmf.patch
diff --git a/pgo_fix_missing_kdejs.patch b/pgo-fix-missing-kdejs.patch
index b3487b620dd0..b3487b620dd0 100644
--- a/pgo_fix_missing_kdejs.patch
+++ b/pgo-fix-missing-kdejs.patch