summaryrefslogtreecommitdiffstats
path: root/main/xulrunner/APKBUILD
blob: b8408260a4b69d5626c243b7846ea68d131c78fc (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xulrunner
pkgver=1.9.2.14
pkgrel=0
pkgdesc="runtime environment for xul-based applications"
url="http://developer.mozilla.org/en/XULRunner"
arch="all"
license="GPL LGPL MPL"
depends=
depends_dev="nspr-dev
	     nss-dev
	     gtk+-dev
	     dbus-glib-dev
	     alsa-lib-dev
	     libvorbis-dev
	     libogg-dev
	     libtheora-dev
	     wireless-tools-dev
	     libnotify-dev
	     libevent-dev
	     libxt-dev
	     jpeg-dev
	     bzip2-dev
	     hunspell-dev
	     startup-notification-dev
	     sqlite-dev
	     libidl-dev
	     fts-dev"
makedepends="$depends_dev 

	     autoconf2.13

	     python
	     zip

	     autoconf
	     automake
	     libtool"
install=""
subpackages="$pkgname-dev"
source="http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/${pkgver}/source/${pkgname}-${pkgver}.source.tar.bz2

	mozconfig

	enable-x86_64-tracemonkey.patch
	fix-xulrunner-launcher.patch
	mozilla-pkgconfig.patch

	xulrunner-png14.patch
	xulrunner-version.patch

	mozjs-c99math.patch

	ipc-chromium-execinfo.patch

	fix-mozilla-portability-cluelessness-libpr0n-edition.patch"

_xulrunner_version="${pkgver%.*}"
_builddir="${srcdir}/mozilla-${_xulrunner_version}"
prepare() {
	local i

	cd "$_builddir"

	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	cp "${srcdir}/mozconfig" .mozconfig
}

build() {
	cd "$_builddir"

	# mozilla's buildsystem is on drugs, so we just kill our CFLAGS and hope
	# for the best. --nenolod
	unset CFLAGS
	unset CXXFLAGS

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

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1

	msg "Setting up compatibility symlinks..."
	ln -sf /usr/lib/xulrunner-${_xulrunner_version}/libxul.so "${pkgdir}"/usr/lib/libxul.so
	ln -sf /usr/lib/xulrunner-${_xulrunner_version}/libxpcom.so "${pkgdir}"/usr/lib/libxpcom.so
	ln -sf /usr/lib/xulrunner-${_xulrunner_version}/libmozjs.so "${pkgdir}"/usr/lib/libmozjs.so
}

dev() {
	replaces="xulrunner"

	mkdir -p "${subpkgdir}"/usr/lib
	mv "${pkgdir}"/usr/lib/xulrunner-devel-${_xulrunner_version} "${subpkgdir}"/usr/lib
	mv "${pkgdir}"/usr/lib/pkgconfig "${subpkgdir}"/usr/lib
	mv "${pkgdir}"/usr/include "${subpkgdir}"/usr/include
}

md5sums="41c7a79027258df59f29eca49582e4ee  xulrunner-1.9.2.14.source.tar.bz2
d0908177f4c3879817f5dc7287cbb2b2  mozconfig
faecc31fd371db93311109117f6bcc40  enable-x86_64-tracemonkey.patch
86d33a17286131d9ef4cdfb35ee56f1f  fix-xulrunner-launcher.patch
d839d1c4ef736e6d89ccf91b23b965a4  mozilla-pkgconfig.patch
39e3c85c80f7897ac463e7fe7ad9a343  xulrunner-png14.patch
371303c5bdc4fa0d955d14521b93b69d  xulrunner-version.patch
03b73ac11442a26a978c53a6c114ef2b  mozjs-c99math.patch
ac1c3725167eb26c89d62b1818810ee4  ipc-chromium-execinfo.patch
7123ec519e3a4d2c8d07369065a61dc7  fix-mozilla-portability-cluelessness-libpr0n-edition.patch"