APKBUILD 5.42 KB
Newer Older
Ariadne Conill's avatar
Ariadne Conill committed
1
# Contributor: William Pitcock <nenolod@dereferenced.org>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Ariadne Conill's avatar
Ariadne Conill committed
3
pkgname=xulrunner
4
pkgver=18.0.2
5
_ffoxver=$pkgver
6
pkgrel=0
Ariadne Conill's avatar
Ariadne Conill committed
7
8
pkgdesc="runtime environment for xul-based applications"
url="http://developer.mozilla.org/en/XULRunner"
9
arch="all"
Ariadne Conill's avatar
Ariadne Conill committed
10
license="GPL LGPL MPL"
11
depends=
Ariadne Conill's avatar
Ariadne Conill committed
12
13
14
15
16
depends_dev="nspr-dev
	     nss-dev
	     gtk+-dev
	     dbus-glib-dev
	     alsa-lib-dev
17
18
	     gstreamer-dev
	     gst-plugins-base-dev
Ariadne Conill's avatar
Ariadne Conill committed
19
20
21
22
23
24
	     libvorbis-dev
	     libogg-dev
	     libtheora-dev
	     wireless-tools-dev
	     libnotify-dev
	     libevent-dev
25
	     libvpx-dev
Ariadne Conill's avatar
Ariadne Conill committed
26
	     libxt-dev
27
	     libjpeg-turbo-dev
Ariadne Conill's avatar
Ariadne Conill committed
28
29
30
31
	     bzip2-dev
	     hunspell-dev
	     startup-notification-dev
	     sqlite-dev
32
	     libidl-dev
33
	     mesa-dev"
Ariadne Conill's avatar
Ariadne Conill committed
34
35
36
37
38
39
makedepends="$depends_dev 

	     autoconf2.13

	     python
	     zip
40
	     yasm
41
	     paxctl
Ariadne Conill's avatar
Ariadne Conill committed
42
43
44
45
46

	     autoconf
	     automake
	     libtool"
install=""
47
options=""
Ariadne Conill's avatar
Ariadne Conill committed
48
subpackages="$pkgname-dev"
49
50
# http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/${pkgver}/source/${pkgname}-${pkgver}.source.tar.bz2
source="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}.source.tar.bz2
Ariadne Conill's avatar
Ariadne Conill committed
51
52

	mozconfig
53
54
	0002-Use-C99-math-isfinite.patch
	0003-xulrunner-jemalloc-aslr.patch
55
	uclibc-malloc_usable_size.patch
56
	cairo.patch
57
58
	getchar.patch
	sysconf.patch
59
	mallctl.patch
Natanael Copa's avatar
Natanael Copa committed
60
	"
61
62
# help our shared-object scanner to find the libs
ldpath="/usr/lib/xulrunner-$pkgver"
63
64

_builddir="${srcdir}/mozilla-release"
Ariadne Conill's avatar
Ariadne Conill committed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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

87
88
	make -j1 -f client.mk build \
		MOZ_MAKE_FLAGS="$MAKEFLAGS" || return 1
Ariadne Conill's avatar
Ariadne Conill committed
89
90
91
92
}

package() {
	cd "$_builddir"
93
94
95
96

	# only used for startupcache creation.
	paxctl -c -m */dist/bin/xpcshell || return 1

97
	make -j1 DESTDIR="$pkgdir" -f client.mk install || return 1
Ariadne Conill's avatar
Ariadne Conill committed
98

Natanael Copa's avatar
Natanael Copa committed
99
100
101
102
103
	# make install does not install xpt.py but its needed by firefox
	mkdir -p "$pkgdir"/usr/lib/xulrunner-devel-$pkgver/sdk/bin
	cp xpcom/typelib/xpt/tools/xpt.py \
		"$pkgdir"/usr/lib/xulrunner-devel-$pkgver/sdk/bin/

104
	msg "Setting up compatibility symlinks..."
Ariadne Conill's avatar
Ariadne Conill committed
105
106
107
	ln -sf /usr/lib/xulrunner-${pkgver}/libxul.so "${pkgdir}"/usr/lib/libxul.so
	ln -sf /usr/lib/xulrunner-${pkgver}/libxpcom.so "${pkgdir}"/usr/lib/libxpcom.so
	ln -sf /usr/lib/xulrunner-${pkgver}/libmozalloc.so "${pkgdir}"/usr/lib/libmozalloc.so
Ariadne Conill's avatar
Ariadne Conill committed
108
109
}

110
111
dev() {
	replaces="xulrunner"
Natanael Copa's avatar
Natanael Copa committed
112
	depends="xulrunner"
113
114

	mkdir -p "${subpkgdir}"/usr/lib
Ariadne Conill's avatar
Ariadne Conill committed
115
	mv "${pkgdir}"/usr/lib/xulrunner-devel-${pkgver} "${subpkgdir}"/usr/lib
116
117
118
119
	mv "${pkgdir}"/usr/lib/pkgconfig "${subpkgdir}"/usr/lib
	mv "${pkgdir}"/usr/include "${subpkgdir}"/usr/include
}

120
md5sums="a7a20f52a3ffdd8d2fafa8a1a1db49c7  firefox-18.0.2.source.tar.bz2
121
300ee7803d9426dc3c91e08830e73e23  mozconfig
122
f43c1f0ae57aa8289b130c6de8caf3ce  0002-Use-C99-math-isfinite.patch
123
e8b3a22d670241bb5c038729ac49a975  0003-xulrunner-jemalloc-aslr.patch
124
125
126
998b48fe73dc642065ab25230d739b2c  uclibc-malloc_usable_size.patch
6a3942d96c7ce3c63251761cc12c8349  cairo.patch
a7b33d8b75306f225e3a8d1a8a403736  getchar.patch
127
128
090ea4daeedfff2915da62a738c7e81d  sysconf.patch
2a8cb2d3065f4475ea463f8498ea2324  mallctl.patch"
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
sha256sums="6aa2cd33903d612cf569e2824a6168feb6209f09fb3ca730ec10236da49bd236  firefox-18.0.2.source.tar.bz2
a880ba2a36168b095ddd856a6f57b84c29f59647f708107aa3ef00738f060ce3  mozconfig
2f319883300f2aef180bfb80221151fcbb29344a5a0a086d6ad1d80005daf039  0002-Use-C99-math-isfinite.patch
324d5cd26858ad21bb4680db8635fb3fd014bf00a637bf9fb2b118c2925fc5e7  0003-xulrunner-jemalloc-aslr.patch
40236401426f4aa7dc0b8ab46b9132f4453507fb61de7e393782258bf89e9e74  uclibc-malloc_usable_size.patch
519be436124cf9716d3df732e633f5d73c5c9da79bb48447e1d9724baf9b430f  cairo.patch
f30846e4b4c86dc1f7308e5e2a76951f51e2932d70b08ed8fe3129c53bb527d3  getchar.patch
15fa203c6a253b9e0229ff5bd0d1c88a4ab4ee2aef34ae88fdf7fe06ba7962f8  sysconf.patch
0634e9586d82b827af2164cd8bff86981a6d430e2eccb8c0e0089ded64c480bc  mallctl.patch"
sha512sums="c9be9d7328fe614059f895879351a48a3083f4a7ac1eb22eab3af8e94c432ad06d4f8a7295c2b843c4a289e463fcbd2dc389c8bc8018c5d8c666929a82214e54  firefox-18.0.2.source.tar.bz2
2dc845b0c50d280ab41d7eed7bad57751122e87680eef0d68478ebf0dfdbf12d3ddf9c2167e87d9145fd1e6fac61431c8c79a2153b11c512b79b92a186a79e95  mozconfig
9a6666a3b637549411ea562c9d0d6d617ed48327d0f9e4e64d27f43774c218e6c5cf5fa99d4b339a5a0f89b854a18079392eba0dafc3419adbd4cdd5d71d3f26  0002-Use-C99-math-isfinite.patch
46caf196a9f68614c42b793befc7dc85438d30ce47c06ccc925aae14728d67b0d29192edba430c0a6237192e6d51db26dfc6e6190bc01937a828effd8136f37b  0003-xulrunner-jemalloc-aslr.patch
0aa589cf43dac499f13e027240c83f221acf97e6369e78edab55ff78317f60288cbf42a2bdd1cb6167a70f781d4ca8ae2f7493b94efb5a93bbfeab3ea278c27d  uclibc-malloc_usable_size.patch
66c6cb290153e4333ffda0407230a7801149864a69eac6adc130653e7cff28b1fbfd9f20cf0cfd4ee35ae3eb8b2dc6357a48024a8e7005218b44d58efbdcf483  cairo.patch
a4692b9a8b5239523486cf10bf0debd54e8d2da6f994775a3e46dc6da71591b7ed698ceea30cd9f4bb30ca1e9b93b3eb18b8055bba5c5f6171e019a5b5cc29f8  getchar.patch
b47db40d6b54fa3bdb650d680e1468dc16f323c3cf48e4f867373bcdfde82d2dbb85910262503285ba3bde8a5757d74a17c1ae6db31116bc8a42e05ab2bb20d6  sysconf.patch
9626a29fcb26de9254628f6904d66f333a3a2fb848b6a6abc545c1a411c82e0e6637e8a62308e95dd825dde40fc10c55be6751cf800d7595e3eb03739e6d44f1  mallctl.patch"