2013-04-28 07:01:01 +08:00
|
|
|
|
# Contributor: Weng Xuetian <wengxt@gmail.com>
|
|
|
|
|
|
|
|
|
|
pkgname=firefox-kde
|
2014-06-11 06:05:32 +08:00
|
|
|
|
pkgver=30.0
|
2014-06-13 08:28:45 +08:00
|
|
|
|
pkgrel=3
|
2013-04-28 07:01:01 +08:00
|
|
|
|
pkgdesc="Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE"
|
2013-08-24 22:38:13 +08:00
|
|
|
|
_kmozillahelper_obsver=b88c72dfdc858f6209feb123227bd7df
|
|
|
|
|
_kmozillahelper_pkgname=kmozillahelper
|
|
|
|
|
_kmozillahelper_pkgver=0.6.4
|
2013-04-28 07:01:01 +08:00
|
|
|
|
url='http://www.mozilla.org/projects/firefox'
|
|
|
|
|
arch=('x86_64')
|
2014-02-15 01:38:57 +08:00
|
|
|
|
license=('MPL')
|
2014-06-12 00:43:01 +08:00
|
|
|
|
depends=('gtk2' 'startup-notification' 'libnotify' 'alsa-lib' 'gstreamer0.10' 'gst-plugins-base' 'libxt' 'dbus-glib' 'libevent' 'sqlite3' 'kdelibs' 'nss')
|
2014-06-11 06:05:32 +08:00
|
|
|
|
makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'unzip' 'autoconf2.13' 'mesa' 'yasm' 'cmake' 'automoc4' 'libpulse' 'xorg-server')
|
2013-08-24 22:38:13 +08:00
|
|
|
|
optdepends=('networkmanager: Location detection via available WiFi networks'
|
|
|
|
|
'libpulse: PulseAudio audio driver')
|
2013-04-28 07:01:01 +08:00
|
|
|
|
screenshot="http://img864.imageshack.us/img864/5116/firefoxm.png"
|
2013-08-24 22:38:13 +08:00
|
|
|
|
provides=("firefox=${pkgver}" "kmozillahelper=${_kmozillahelper_pkgver}")
|
2013-05-07 04:46:15 +08:00
|
|
|
|
conflicts=('firefox' 'kmozillahelper')
|
|
|
|
|
replaces=('kmozillahelper')
|
2013-04-28 07:01:01 +08:00
|
|
|
|
install=firefox.install
|
|
|
|
|
url="http://www.mozilla.org/projects/firefox"
|
2013-05-07 05:06:51 +08:00
|
|
|
|
optdepends=('firefox-i18n: for multilanguage support')
|
2013-05-07 05:00:15 +08:00
|
|
|
|
#
|
|
|
|
|
# For whom want to update this package
|
|
|
|
|
#
|
|
|
|
|
# Alternative firefox source url:
|
|
|
|
|
# http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/source/firefox-${pkgver}.source.tar.bz2
|
|
|
|
|
# This URL uses CDN so it's faster, but maybe out of date when new firefox release comes out.
|
|
|
|
|
#
|
|
|
|
|
# Find Firefox KDE related patch:
|
|
|
|
|
# patch http://www.rosenauer.org/hg/mozilla/
|
|
|
|
|
# patch https://build.opensuse.org/package/show?package=MozillaFirefox&project=mozilla%3AFactory
|
|
|
|
|
#
|
|
|
|
|
# Usually, we also port non-openSUSE specific patch together.
|
|
|
|
|
#
|
2014-06-11 06:05:32 +08:00
|
|
|
|
_patchrev=8ce6c378e34d
|
2014-02-15 01:38:57 +08:00
|
|
|
|
_patchurl=http://www.rosenauer.org/hg/mozilla/raw-file/$_patchrev
|
2013-04-28 07:01:01 +08:00
|
|
|
|
source=(ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/source/firefox-${pkgver}.source.tar.bz2
|
|
|
|
|
mozconfig
|
|
|
|
|
firefox.desktop
|
|
|
|
|
vendor.js
|
|
|
|
|
kde.js
|
2013-08-24 22:38:13 +08:00
|
|
|
|
firefox-20.0.1-fixed-loading-icon.png
|
2013-04-28 07:01:01 +08:00
|
|
|
|
duckduckgo.xml
|
2013-08-24 22:38:13 +08:00
|
|
|
|
"kmozillahelper-0.6.4.tar.bz2::https://api.opensuse.org/public/source/mozilla:Factory/mozilla-kde4-integration/${_kmozillahelper_pkgname}-${_kmozillahelper_pkgver}.tar.bz2?rev=${_kmozillahelper_obsver}"
|
2014-02-15 01:38:57 +08:00
|
|
|
|
|
2014-04-30 05:00:23 +08:00
|
|
|
|
firefox-install-dir.patch
|
2014-02-15 01:38:57 +08:00
|
|
|
|
# Firefox patchset
|
2014-06-11 06:05:32 +08:00
|
|
|
|
$_patchurl/firefox-kde.patch
|
2014-02-15 01:38:57 +08:00
|
|
|
|
$_patchurl/firefox-kde-114.patch
|
|
|
|
|
$_patchurl/firefox-no-default-ualocale.patch
|
|
|
|
|
$_patchurl/firefox-branded-icons.patch
|
|
|
|
|
# Gecko/toolkit patchset
|
2014-05-11 21:31:46 +08:00
|
|
|
|
# $_patchurl/toolkit-download-folder.patch
|
2014-02-15 01:38:57 +08:00
|
|
|
|
$_patchurl/mozilla-nongnome-proxies.patch
|
|
|
|
|
$_patchurl/mozilla-prefer_plugin_pref.patch
|
|
|
|
|
$_patchurl/mozilla-kde.patch
|
2014-05-11 21:31:46 +08:00
|
|
|
|
# $_patchurl/mozilla-preferences.patch
|
2014-02-15 01:38:57 +08:00
|
|
|
|
$_patchurl/mozilla-language.patch
|
2014-06-11 06:05:32 +08:00
|
|
|
|
install-kde-js.patch
|
2013-04-28 07:01:01 +08:00
|
|
|
|
)
|
2013-05-07 05:18:59 +08:00
|
|
|
|
|
2014-02-15 01:38:57 +08:00
|
|
|
|
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
|
|
|
|
|
# Note: These are for Chakra Linux use ONLY. For your own distribution, please
|
|
|
|
|
# get your own set of keys.
|
|
|
|
|
_google_api_key=AIzaSyA33sdKPff0x3KBByOhpzc1i7RS2A1mEpY
|
|
|
|
|
|
|
|
|
|
prepare() {
|
2013-04-28 07:01:01 +08:00
|
|
|
|
cd "mozilla-release"
|
|
|
|
|
|
2014-02-15 01:38:57 +08:00
|
|
|
|
cp "$srcdir/mozconfig" .mozconfig
|
2014-04-30 05:00:23 +08:00
|
|
|
|
|
|
|
|
|
patch -Np1 -i "$srcdir/firefox-install-dir.patch"
|
2014-02-15 01:38:57 +08:00
|
|
|
|
echo -n "$_google_api_key" > google-api-key
|
2013-05-07 05:23:14 +08:00
|
|
|
|
|
2013-08-24 22:38:13 +08:00
|
|
|
|
# make makepkg -R easier
|
2014-02-15 01:38:57 +08:00
|
|
|
|
msg "Patching for KDE"
|
|
|
|
|
rm -f content/media/gstreamer/nsGStreamerFormatHelper.{h,cpp}
|
|
|
|
|
rm -f browser/components/shell/src/{nsKDEShellService,nsUnixShellService}.{h,cpp}
|
|
|
|
|
rm -f browser/base/content/browser-kde.xul
|
|
|
|
|
rm -f toolkit/xre/nsKDEUtils.{h,cpp}
|
|
|
|
|
rm -f uriloader/exthandler/unix/{nsCommonRegistry,nsKDERegistry}.{h,cpp}
|
|
|
|
|
rm -f toolkit/content/widgets/{dialog,preferences}-kde.xml
|
|
|
|
|
|
|
|
|
|
msg "Gecko/toolkit patchset"
|
|
|
|
|
#patch -Np1 -i "$srcdir/toolkit-download-folder.patch"
|
|
|
|
|
patch -Np1 -i "$srcdir/mozilla-nongnome-proxies.patch"
|
|
|
|
|
patch -Np1 -i "$srcdir/mozilla-prefer_plugin_pref.patch"
|
|
|
|
|
patch -Np1 -i "$srcdir/mozilla-kde.patch"
|
|
|
|
|
#patch -Np1 -i "$srcdir/mozilla-preferences.patch" #At startup, read and use the OS’s locale.
|
|
|
|
|
patch -Np1 -i "$srcdir/mozilla-language.patch"
|
|
|
|
|
|
|
|
|
|
msg "Firefox patchset"
|
|
|
|
|
patch -Np1 -i "$srcdir/firefox-kde.patch"
|
|
|
|
|
patch -Np1 -i "$srcdir/firefox-kde-114.patch"
|
|
|
|
|
patch -Np1 -i "$srcdir/firefox-no-default-ualocale.patch"
|
|
|
|
|
patch -Np1 -i "$srcdir/firefox-branded-icons.patch"
|
2014-06-11 06:05:32 +08:00
|
|
|
|
patch -Np0 -i "$srcdir/install-kde-js.patch"
|
|
|
|
|
cp "$srcdir/kde.js" browser/app/profile/
|
2014-02-15 01:38:57 +08:00
|
|
|
|
|
|
|
|
|
# configure script misdetects the preprocessor without an optimization level
|
|
|
|
|
# https://bugs.archlinux.org/task/34644
|
|
|
|
|
sed -i '/ac_cpp=/s/$CPPFLAGS/& -O2/' configure
|
2013-04-28 07:01:01 +08:00
|
|
|
|
|
2013-08-24 22:38:13 +08:00
|
|
|
|
# WebRTC build tries to execute "python" and expects Python 2
|
2014-02-15 01:38:57 +08:00
|
|
|
|
mkdir -p "$srcdir/path"
|
2013-08-24 22:38:13 +08:00
|
|
|
|
ln -sf /usr/bin/python2 "$srcdir/path/python"
|
2013-04-28 07:01:01 +08:00
|
|
|
|
|
2013-08-24 22:38:13 +08:00
|
|
|
|
# Fix tab loading icon (flickers with libpng 1.6)
|
|
|
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=841734
|
|
|
|
|
cp "$srcdir/firefox-20.0.1-fixed-loading-icon.png" \
|
|
|
|
|
browser/themes/linux/tabbrowser/loading.png
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build() {
|
2014-02-15 01:38:57 +08:00
|
|
|
|
cd "$srcdir/mozilla-release"
|
|
|
|
|
|
|
|
|
|
msg "build_kmozillahelper"
|
|
|
|
|
build_kmozillahelper
|
|
|
|
|
msg "build_firefox"
|
|
|
|
|
build_firefox
|
2013-08-24 22:38:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build_kmozillahelper() {
|
2014-02-15 01:38:57 +08:00
|
|
|
|
cd $srcdir/
|
|
|
|
|
mkdir -p kmozillahelper-build
|
|
|
|
|
cd kmozillahelper-build
|
2013-08-24 22:38:13 +08:00
|
|
|
|
|
2014-02-15 01:38:57 +08:00
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=Release ../kmozillahelper
|
|
|
|
|
make
|
2013-08-24 22:38:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build_firefox() {
|
2014-02-15 01:38:57 +08:00
|
|
|
|
cd "$srcdir/mozilla-release"
|
2013-08-24 22:38:13 +08:00
|
|
|
|
|
2013-04-28 22:10:14 +08:00
|
|
|
|
export PATH="$srcdir/path:$PATH"
|
2014-02-15 01:38:57 +08:00
|
|
|
|
export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/firefox"
|
2013-04-28 07:01:01 +08:00
|
|
|
|
export PYTHON="/usr/bin/python2"
|
|
|
|
|
|
2014-02-15 01:38:57 +08:00
|
|
|
|
export MOZ_MAKE_FLAGS="$MAKEFLAGS"
|
|
|
|
|
unset MAKEFLAGS
|
|
|
|
|
|
|
|
|
|
# Enabled PGO: https://developer.mozilla.org/en-US/docs/Building_with_Profile-Guided_Optimization
|
|
|
|
|
#make -f client.mk profiledbuild MOZ_MAKE_FLAGS="${MAKEFLAGS}"
|
|
|
|
|
|
|
|
|
|
# Set up PGO
|
|
|
|
|
export DISPLAY=:99
|
|
|
|
|
Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 $DISPLAY &
|
|
|
|
|
|
|
|
|
|
# Build
|
|
|
|
|
if ! make -f client.mk build MOZ_PGO=1; then
|
|
|
|
|
kill $!
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Kill leftovers
|
|
|
|
|
kill $! || true
|
2013-04-28 07:01:01 +08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package() {
|
2014-02-15 01:38:57 +08:00
|
|
|
|
msg "package() kmozillahelper"
|
2013-05-07 04:46:15 +08:00
|
|
|
|
cd $srcdir/kmozillahelper-build
|
|
|
|
|
make DESTDIR=$pkgdir install
|
2013-04-28 22:10:14 +08:00
|
|
|
|
|
2014-02-15 01:38:57 +08:00
|
|
|
|
msg "package() Firefox"
|
|
|
|
|
cd "$srcdir/mozilla-release"
|
2014-06-13 08:28:45 +08:00
|
|
|
|
|
|
|
|
|
make -f client.mk DESTDIR="$pkgdir" MOZ_PKG_FATAL_WARNINGS=0 install
|
2013-04-28 22:10:14 +08:00
|
|
|
|
|
2014-06-11 07:06:10 +08:00
|
|
|
|
install -Dm644 ../vendor.js "$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js"
|
|
|
|
|
install -Dm644 ../kde.js "$pkgdir/usr/lib/firefox/browser/defaults/preferences/kde.js"
|
2014-02-18 05:49:33 +08:00
|
|
|
|
install -Dm644 ../duckduckgo.xml "$pkgdir/usr/lib/firefox/browser/searchplugins/duckduckgo.xml"
|
2013-04-28 22:10:14 +08:00
|
|
|
|
|
|
|
|
|
for i in 16 22 24 32 48 256; do
|
|
|
|
|
install -Dm644 browser/branding/official/default$i.png \
|
2014-02-15 01:38:57 +08:00
|
|
|
|
"$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png"
|
2013-04-28 22:10:14 +08:00
|
|
|
|
done
|
2013-04-28 07:01:01 +08:00
|
|
|
|
|
2013-04-28 22:10:14 +08:00
|
|
|
|
install -Dm644 ../firefox.desktop \
|
2014-02-15 01:38:57 +08:00
|
|
|
|
"$pkgdir/usr/share/applications/firefox.desktop"
|
2013-04-28 22:10:14 +08:00
|
|
|
|
|
2013-04-28 07:01:01 +08:00
|
|
|
|
# Use system-provided dictionaries
|
2014-02-15 01:38:57 +08:00
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
# We don't want the development stuff
|
|
|
|
|
rm -r "$pkgdir"/usr/{include,lib/firefox-devel,share/idl}
|
|
|
|
|
|
|
|
|
|
#workaround for now
|
|
|
|
|
#https://bugzilla.mozilla.org/show_bug.cgi?id=658850
|
|
|
|
|
ln -sf firefox "$pkgdir/usr/lib/firefox/firefox-bin"
|
|
|
|
|
|
2013-04-28 07:01:01 +08:00
|
|
|
|
}
|
2013-08-24 22:38:13 +08:00
|
|
|
|
|
2014-06-11 06:05:32 +08:00
|
|
|
|
sha1sums=('21dce1a2d4b8085c5f7f66b5f4f60bc37598285d'
|
2014-06-12 00:43:01 +08:00
|
|
|
|
'c343b926a24020e84bac33c1bf4e604719305464'
|
2014-05-11 21:31:46 +08:00
|
|
|
|
'86d6c2fe4ec2b3072a132e2afbc0ac798fd51e8f'
|
2014-06-13 08:28:45 +08:00
|
|
|
|
'ca77a08b296f8673828898d91b20cc6dd8742c2f'
|
2014-06-11 07:06:10 +08:00
|
|
|
|
'ce48f8e5065319e191a7389539ec663dc8a919d7'
|
2014-05-11 21:31:46 +08:00
|
|
|
|
'0c3900ffe21bfc3d96b80ade334613bc7e76fe27'
|
|
|
|
|
'aa3442d291bd77fefa3758291baa9c609a74e5dc'
|
|
|
|
|
'5543ea72a07fb6f3af19cfbb6d1683a5fddaa807'
|
|
|
|
|
'a87a6eb5cb86f63e39249c60eb53594ce225dea0'
|
2014-06-11 06:05:32 +08:00
|
|
|
|
'438fe443a74d4c8294c44ee23e877c878c98b6a9'
|
2014-05-11 21:31:46 +08:00
|
|
|
|
'84e6e4eb614e86baf1ee565da9c2ac505940492a'
|
|
|
|
|
'9037e982ea4ca7c1bab84c56ab112445d1ca52c9'
|
2014-06-11 06:05:32 +08:00
|
|
|
|
'a424c58cbcecf59510eccf28a083818c7ae63c60'
|
2014-05-11 21:31:46 +08:00
|
|
|
|
'5a38d441d73647b12e1e13416de3fde822dfed18'
|
|
|
|
|
'05072b88a7707abca65f84cc6d1c4985c6874f6f'
|
2014-06-11 06:05:32 +08:00
|
|
|
|
'32f81cc46daa00b645c991bf8aaf51e17c4a937a'
|
2014-06-11 07:06:10 +08:00
|
|
|
|
'69170917d207096e532f24a83a55dc9d53fa268e'
|
|
|
|
|
'88b724543c5482dc8f94f141e4b87704bf60fff9')
|