summaryrefslogtreecommitdiff
path: root/extra/xulrunner/PKGBUILD
blob: 1f3cd5e447f92cf5792b7fb2eb38c70bc30da15a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# $Id: PKGBUILD 128075 2011-06-21 17:45:36Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
pkgname=xulrunner
pkgver=2.0.1
_ffoxver=4.0.1
pkgrel=3
pkgdesc="Mozilla Runtime Environment"
arch=('i686' 'x86_64' 'mips64el')
license=('MPL' 'GPL' 'LGPL')
depends=('gtk2' 'gcc-libs' 'libidl2' 'mozilla-common' 'nss' 'libxt' 'libxrender' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'alsa-lib' 'libevent' 'sqlite3>=3.7.4' 'libnotify')
makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'yasm' 'mesa')
url="http://wiki.mozilla.org/XUL:Xul_Runner"
source=(http://ftp.gnu.org/gnu/gnuzilla/${_ffoxver}/icecat-${_ffoxver}.tar.xz
        mozconfig
        mozilla-pkgconfig.patch
        xulrunner-version.patch
        xulrunner-omnijar.patch
        port_gnomevfs_to_gio.patch
        mips.patch)
options=('!emptydirs')
replaces=('xulrunner-oss')
build() {
  cd "${srcdir}/icecat-${_ffoxver}/"
   cp "${srcdir}/mozconfig" .mozconfig

  #fix libdir/sdkdir - fedora
   patch -Np1 -i "${srcdir}/mozilla-pkgconfig.patch"

  #Force installation to the same path for every version
   patch -Np1 -i "${srcdir}/xulrunner-version.patch"

  #https://bugzilla.mozilla.org/show_bug.cgi?id=620931
   patch -Np1 -i "${srcdir}/xulrunner-omnijar.patch"

  #https://bugzilla.mozilla.org/show_bug.cgi?id=494163
   patch -Np1 -i "${srcdir}/port_gnomevfs_to_gio.patch"

  [[ "$CARCH" == "mips64el" ]] && {
    echo "ac_add_options --disable-ipc" >> .mozconfig
    patch -Np0 -i "${srcdir}/mips.patch"
  }

  unset CFLAGS
  unset CXXFLAGS

  export CXXFLAGS="-fpermissive"

  make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS"
}

package() {
  cd "${srcdir}/icecat-${_ffoxver}/"
  make -j1 -f client.mk DESTDIR="${pkgdir}" install

  #Remove included dictionaries, add symlink to system myspell path.
  #Note: this will cause file conflicts when users have installed dictionaries in the old location
  rm -rf "${pkgdir}/usr/lib/xulrunner-2.0/dictionaries"
  ln -sf /usr/share/myspell/dicts "${pkgdir}/usr/lib/xulrunner-2.0/dictionaries"

  # add xulrunner library path to ld.so.conf
  install -d ${pkgdir}/etc/ld.so.conf.d
  echo "/usr/lib/xulrunner-2.0" > ${pkgdir}/etc/ld.so.conf.d/xulrunner.conf
}