summarylogtreecommitdiffstats
path: root/PKGBUILD.gcc5
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD.gcc5')
-rw-r--r--PKGBUILD.gcc5116
1 files changed, 116 insertions, 0 deletions
diff --git a/PKGBUILD.gcc5 b/PKGBUILD.gcc5
new file mode 100644
index 000000000000..bd1283d96ae4
--- /dev/null
+++ b/PKGBUILD.gcc5
@@ -0,0 +1,116 @@
+# Maintainer: Figue <ffigue at gmail>
+# Contributor: Figue <ffigue at gmail>
+# Contributor (Parabola): fauno <fauno@kiwwwi.com.ar>
+# Thank you very much to the older contributors:
+# Contributor: evr <evanroman at gmail>
+# Contributor: Muhammad 'MJ' Jassim <UnbreakableMJ@gmail.com>
+
+pkgname=icecat
+pkgver=38.8.0
+_pkgver=38.8.0-gnu1
+_pkgverbase=${pkgver%%.*}
+pkgrel=1
+pkgdesc="GNU version of the Firefox browser."
+arch=(i686 x86_64)
+url="http://www.gnu.org/software/gnuzilla/"
+license=('GPL' 'MPL' 'LGPL')
+depends=('gtk2' 'mozilla-common' 'libxt' 'startup-notification' 'mime-types'
+ 'dbus-glib' 'alsa-lib' 'ffmpeg' 'desktop-file-utils'
+ 'libvpx' 'icu' 'libevent' 'nss' 'hunspell' 'sqlite' 'ttf-font')
+makedepends=('gcc5' 'unzip' 'zip' 'diffutils' 'python2' 'yasm' 'mesa' 'imake' 'gconf'
+ 'libpulse' 'gst-plugins-base-libs' 'inetutils')
+optdepends=('networkmanager: Location detection via available WiFi networks'
+ 'upower: Battery API')
+options=('!emptydirs' '!makeflags')
+install=icecat.install
+source=(http://ftpmirror.gnu.org/gnuzilla/${pkgver}/${pkgname}-${_pkgver}.tar.bz2{,.sig}
+#source=(https://ftp.gnu.org/gnu/gnuzilla/${pkgver}/${pkgname}-${_pkgver}.tar.bz2{,.sig} ## Main upstream download site
+#source=(https://mirrors.kernel.org/gnu/gnuzilla/${pkgver}/${pkgname}-${_pkgver}.tar.bz2 ## Good mirror
+#source=(http://jenkins.trisquel.info/icecat/${pkgname}-${_pkgver}.tar.bz2 ## Official developer (Ruben Rodriguez) site. Probably only has developer releases.
+ mozconfig
+ icecat.desktop
+ icecat-safe.desktop
+ vendor.js)
+
+sha256sums=('97f76e85cc6f98463f0e0b0e845826816032770f9b589db69ece6b1cff21936c'
+ 'SKIP'
+ '96c07883b62dc52768603bedad7e37980410b7c13b63e63880e915c872e39eea'
+ 'c44eab35f71dd3028a74632463710d674b2e8a0682e5e887535e3233a3b7bbb3'
+ '190577ad917bccfc89a9bcafbc331521f551b6f54e190bb6216eada48dcb1303'
+ '4b50e9aec03432e21b44d18c4c97b2630bace606b033f7d556c9d3e3eb0f4fa4')
+
+validpgpkeys=(A57369A8BABC2542B5A0368C3C76EED7D7E04784) # Ruben Rodriguez (GNU IceCat releases key) <ruben@gnu.org>
+
+prepare() {
+
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Patch to move files directly to /usr/lib/icecat. No more symlinks.
+ sed -e 's;$(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION);$(libdir)/$(MOZ_APP_NAME);g' -i config/baseconfig.mk
+ sed -e 's;$(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION);$(libdir)/$(MOZ_APP_NAME)-devel;g' -i config/baseconfig.mk
+
+ msg2 "Starting build..."
+
+ cp -v ${srcdir}/mozconfig .mozconfig
+
+ # WebRTC build tries to execute "python" and expects Python 2
+ mkdir "$srcdir/path"
+ ln -s /usr/bin/python2 "$srcdir/path/python"
+
+}
+
+build() {
+
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ICECATDIR="/usr/lib/${pkgname}" && export ICECATDIR
+
+ # _FORTIFY_SOURCE causes configure failures
+ CPPFLAGS+=" -O2"
+
+ # Default Arch flags
+# if [ "${CARCH}" = 'x86_64' ]; then
+# export CFLAGS="-march=x86-64 -mtune=generic -82 -pipe -fstack-protector-strong"
+# export CXXFLAGS="$CFLAGS"
+# elif [ "${CARCH}" = 'i686' ]; then
+# export CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
+# export CXXFLAGS="$CFLAGS"
+# fi
+
+ export PATH="$srcdir/path:$PATH"
+# export LDFLAGS="$LDFLAGS -Wl,-rpath,$ICECATDIR"
+# export MOZ_MAKE_FLAGS="$MAKEFLAGS"
+# export PYTHON=python2
+
+ make CXX=g++-5 CC=gcc-5 -f client.mk build
+# ./configure --with-l10n-base="${srcdir}/${pkgname}-${pkgver}"/l10n -std=gnu89
+# make
+
+}
+
+package () {
+
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make CXX=g++-5 CC=gcc-5 -f client.mk DESTDIR="${pkgdir}" install
+# make DESTDIR="${pkgdir}" install
+
+ msg2 "Finishing..."
+ install -m755 -d ${pkgdir}/usr/share/applications
+ install -m755 -d ${pkgdir}/usr/share/pixmaps
+
+ for i in 16 32 48; do
+ install -Dm644 ${srcdir}/${pkgname}-${pkgver}/browser/branding/official/default${i}.png \
+ "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/icecat.png"
+ done
+ install -Dm644 ${srcdir}/${pkgname}-${pkgver}/browser/branding/official/default48.png ${pkgdir}/usr/share/pixmaps/icecat.png
+ install -Dm644 ${srcdir}/icecat.desktop ${pkgdir}/usr/share/applications/
+ install -Dm644 ${srcdir}/icecat-safe.desktop ${pkgdir}/usr/share/applications/
+
+ # implement vendor.js setting the locale to match the os don't disable our languages extensions
+ # https://projects.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/firefox&id=281a95c2cca0db88904603d7808936f52797a690
+ install -Dm644 "${srcdir}"/vendor.js "${pkgdir}${ICECATDIR}/browser/defaults/preferences/vendor.js"
+
+ # We don't want the development stuff
+ rm -rv "$pkgdir"/usr/{include,lib/icecat-devel,share/idl}
+}
+