aboutsummaryrefslogtreecommitdiffstats
path: root/main/openjdk7/APKBUILD
blob: 78119256222ef9bce5a120ea28b6282136f0ca33 (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# Contributor: Timo Teras <timo.teras@iki.fi>
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=openjdk7
_icedteaver=2.4.7
_openjdkupdate=55
pkgver=7.$_openjdkupdate.$_icedteaver
pkgrel=0
pkgdesc="Sun OpenJDK 7 via IcedTea"
url="http://icedtea.classpath.org/"
arch="x86 x86_64 armhf"
license="GPL-2 with Classpath"
depends="$pkgname-jre"
options="sover-namecheck"
makedepends="findutils tar zip paxctl gawk pkgconfig util-linux
	     autoconf automake nss-dev cups-dev jpeg-dev giflib-dev libpng-dev libxt-dev
	     lcms2-dev libxp-dev libxtst-dev libxinerama-dev libiconv-dev zlib-dev
	     libxrender-dev alsa-lib-dev freetype-dev xulrunner-dev fontconfig-dev
	     gtk+2.0-dev krb5-dev attr-dev ca-certificates libxslt zip"
install=""

# upstream binary versions
RHINO_VER=1_7R3
ANT_VER=1.9.2
# hashes from $_builddir/Makefile.am
_CORBA_CHANGESET=e6ad5b912691
_JAXP_CHANGESET=94b7e8e0d96f
_JAXWS_CHANGESET=bd9a50a78d04
_JDK_CHANGESET=9448fff93286
_LANGTOOLS_CHANGESET=8c26a3c39128
_OPENJDK_CHANGESET=13970e76b784
# hash from $_builddir/hotspot.map
_HOTSPOT_CHANGESET=69b542696e5b

case $CARCH in
x86)	_jarch=i386;;
x86_64)	_jarch=amd64;;
arm*)	_jarch=arm;;
esac

INSTALL_BASE=/usr/lib/jvm/java-1.7-openjdk
_jrelib="$INSTALL_BASE/jre/lib/$_jarch"

# exclude xawt from ldpath to avoid duplicate provides for libmawt.so
# (also in headless). in future this should be a virtual provides.
ldpath="$_jrelib:$_jrelib/native_threads:$_jrelib/headless:$_jrelib/server:$_jrelib/jli"
somask="libjvm.so"

subpackages="$pkgname-jre-lib:jrelib $pkgname-jre $pkgname-jre-base:jrebase
	     $pkgname-doc:doc"

if [ "$BOOTSTRAP" != "no" ]; then
	makedepends="$makedepends java-gcj-compat"
	BOOTSTRAP_JAVA_HOME=/usr/lib/jvm/java-1.5-gcj/
else
	makedepends="$makedepends $pkgname"
	BOOTSTRAP_JAVA_HOME="$INSTALL_BASE"
fi

_hgurl=http://icedtea.classpath.org/hg/release/icedtea7-forest-${_icedteaver:0:3}

source="http://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz
	openjdk-${_OPENJDK_CHANGESET}.tar.gz::$_hgurl/archive/${_OPENJDK_CHANGESET}.tar.gz
	corba-${_CORBA_CHANGESET}.tar.gz::$_hgurl/corba/archive/${_CORBA_CHANGESET}.tar.gz
	jaxp-${_JAXP_CHANGESET}.tar.gz::$_hgurl/jaxp/archive/${_JAXP_CHANGESET}.tar.gz
	jaxws-${_JAXWS_CHANGESET}.tar.gz::$_hgurl/jaxws/archive/${_JAXWS_CHANGESET}.tar.gz
	jdk-${_JDK_CHANGESET}.tar.gz::$_hgurl/jdk/archive/${_JDK_CHANGESET}.tar.gz
	langools-${_LANGTOOLS_CHANGESET}.tar.gz::$_hgurl/langtools/archive/${_LANGTOOLS_CHANGESET}.tar.gz
	hotspot-${_HOTSPOT_CHANGESET}.tar.gz::$_hgurl/hotspot/archive/${_HOTSPOT_CHANGESET}.tar.gz
	http://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VER-bin.tar.gz
	ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino$RHINO_VER.zip

	fix-paxctl-args.patch
	icedtea-build-paxmark.patch
	icedtea-hotspot-musl.patch
	icedtea-hotspot-noagent-musl.patch
	icedtea-hotspot-uclibc-fixes.patch
	icedtea-jdk-fix-build.patch
	icedtea-jdk-execinfo.patch
	icedtea-jdk-fix-ipv6-init.patch
	icedtea-jdk-iconv-uclibc.patch
	icedtea-jdk-musl.patch
	icedtea-jdk-no-soname.patch
	"

# icedtea6-1.9.7-generate_cacerts-1.patch
# icedtea-jdk-no-lib-nsl-uclibc.patch

_builddir="$srcdir/icedtea-$_icedteaver"

unpack() {
	if [ -z "$force" ]; then
		verify || return 1
		initdcheck || return 1
	fi
	mkdir -p "$srcdir"
	msg "Unpacking sources..."
	tar -C "$srcdir" -zxf icedtea-$_icedteaver.tar.gz || return 1
	tar -C "$srcdir" -zxf apache-ant-$ANT_VER-bin.tar.gz || return 1
	unzip -o -q "rhino$RHINO_VER.zip" -d "$srcdir" || return 1
}

prepare() {
	cd "$_builddir"

        # Busybox sha256 does not support longopts
        sed -e "s/--check/-c/g" -i Makefile.am

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

	./autogen.sh
}

build() {
	[ -z "$JOBS" ] && export JOBS=`echo $MAKEFLAGS | sed -n -e 's/.*-j\([0-9]\+\).*/\1/p'`
	export ALT_PARALLEL_COMPILE_JOBS="${JOBS:-2}"
	export HOTSPOT_BUILD_JOBS="${JOBS:-2}"

	export JAVA_HOME=$BOOTSTRAP_JAVA_HOME
	export PATH=$JAVA_HOME/bin:$srcdir/apache-ant-$ANT_VER/bin:$PATH
	export DISTRIBUTION_PATCHES=""

	local patch
	for patch in $source; do
		case $patch in
		icedtea-*.patch)
			export DISTRIBUTION_PATCHES="$DISTRIBUTION_PATCHES patches/$patch"
			;;
		esac
	done
	echo "icedtea patches: $DISTRIBUTION_PATCHES"

	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-parallel-jobs=${JOBS:-2} \
		--disable-dependency-tracking \
		--disable-downloading \
		--with-rhino=$srcdir/rhino$RHINO_VER/js.jar \
		--with-openjdk-src-zip=$srcdir/openjdk-${_OPENJDK_CHANGESET}.tar.gz \
		--with-hotspot-src-zip=$srcdir/hotspot-${_HOTSPOT_CHANGESET}.tar.gz \
		--with-corba-src-zip=$srcdir/corba-${_CORBA_CHANGESET}.tar.gz \
		--with-jaxp-src-zip=$srcdir/jaxp-${_JAXP_CHANGESET}.tar.gz \
		--with-jaxws-src-zip=$srcdir/jaxws-${_JAXWS_CHANGESET}.tar.gz \
		--with-jdk-src-zip=$srcdir/jdk-${_JDK_CHANGESET}.tar.gz \
		--with-langtools-src-zip=$srcdir/langools-${_LANGTOOLS_CHANGESET}.tar.gz \
		--with-pax=paxctl \
		--with-jdk-home=$BOOTSTRAP_JAVA_HOME \
		--with-abs-install-dir=$INSTALL_BASE \
		--with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \
		|| return 1

	make || return 1
}

package() {
	mkdir -p "$pkgdir"/$INSTALL_BASE
	cp -a "$_builddir"/openjdk.build/j2sdk-image/* "$pkgdir"/$INSTALL_BASE
	rm "$pkgdir"/$INSTALL_BASE/src.zip
}

jrelib() {
	pkgdesc="OpenJDK 7 Java Runtime (class libraries)"
	arch="noarch"
	depends=""

	for A in jre/lib/zi jre/lib/images jre/lib/*.jar jre/lib/security \
		 jre/lib/ext/*.jar jre/lib/cmm jre/ASSEMBLY_EXCEPTION \
		 jre/THIRD_PARTY_README jre/LICENSE ; do
		dirname=${A%/*}
		mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname
		mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname
	done
}

jrebase() {
	pkgdesc="OpenJDK 7 Java Runtime (no GUI support)"
	depends="$pkgname-jre-lib java-common"
	# manually provide this to avoid clash with libgcj's libjvm.so
	provides="so:openjdk7:libjvm.so=0"

	mkdir -p "$subpkgdir"/$INSTALL_BASE/bin

	for A in java orbd rmid servertool unpack200 keytool \
		 pack200 rmiregistry tnameserv ; do
		mv "$pkgdir"/$INSTALL_BASE/bin/$A "$subpkgdir"/$INSTALL_BASE/bin
	done

	# rest of the jre subdir (which were not taken by -jre subpkg)
	mv "$pkgdir"/$INSTALL_BASE/jre "$subpkgdir"/$INSTALL_BASE
}

jre() {
	pkgdesc="OpenJDK 7 Java Runtime"
	# manually depend to avoid clash with libgcj's libjvm.so
	depends="so:openjdk7:libjvm.so=0"

	mkdir -p "$subpkgdir"
	for A in jre/bin/policytool \
		 bin/appletviewer \
		 bin/policytool \
		 jre/lib/$_jarch/xawt \
		 jre/lib/$_jarch/libsplashscreen.so ; do
		dirname=${A%/*}
		mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname
		mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname
	done
}

doc() {
	default_doc

	mkdir -p "$subpkgdir"/$INSTALL_BASE/
	mv "$pkgdir"/$INSTALL_BASE/man "$subpkgdir"/$INSTALL_BASE/
}

md5sums="3e2c46f5b0bce2821af79bb286b451b8  icedtea-2.4.7.tar.gz
b0295fd54825d3f47d47de81d81a475a  openjdk-13970e76b784.tar.gz
0a8f2235307b68553865ac38192690c7  corba-e6ad5b912691.tar.gz
ba7a21a3ef2ce5d0d47c7015e43c5dcf  jaxp-94b7e8e0d96f.tar.gz
9ef2ea5b1e87777c75a72e1dca6fab1d  jaxws-bd9a50a78d04.tar.gz
cea74e96852bf017f73222fa7045daee  jdk-9448fff93286.tar.gz
449cec19b80ab70935d02d03e3cbc568  langools-8c26a3c39128.tar.gz
0381ef3920f1ff5c8ac6c8860974d8cc  hotspot-69b542696e5b.tar.gz
9a2826a1819aa128629778217af36c55  apache-ant-1.9.2-bin.tar.gz
99d94103662a8d0b571e247a77432ac5  rhino1_7R3.zip
7ea70e69d307dfb801a198bce51405b0  fix-paxctl-args.patch
86829ac37f02f0d631ddde5f164a0015  icedtea-build-paxmark.patch
f87dd2c4c3c97fc3ac33080a65ca9e14  icedtea-hotspot-musl.patch
573e12eeae80a34541f00d5be75d6c0f  icedtea-hotspot-noagent-musl.patch
43023861c5f6efc3139a834aa3ec0476  icedtea-hotspot-uclibc-fixes.patch
07c7ab583808e8c8ceb46aff9c265aa4  icedtea-jdk-fix-build.patch
bd623081d5d2e63694c3649975b12412  icedtea-jdk-execinfo.patch
250b0807b59762670954b132e8f8dfba  icedtea-jdk-fix-ipv6-init.patch
7c0814181e5adc0763c5c0a24b01d4cb  icedtea-jdk-iconv-uclibc.patch
5b1b624b7127434c0c6329d733c917c9  icedtea-jdk-musl.patch
d014431e70cdabb82a75e4b9ae4c28a9  icedtea-jdk-no-soname.patch"
sha256sums="754350cbd704b22b7ba3d14c8283eb2d896d137824f95a9e6a2b34678658ade1  icedtea-2.4.7.tar.gz
bcd45546509defc439f42f230c0ca64e8aa6ec00542c3634aab3a4c10be3fe6b  openjdk-13970e76b784.tar.gz
cc37272df260d08207c84763d4c39d7807728ba2d5908276b9bc63e925e70674  corba-e6ad5b912691.tar.gz
3515cd105c29563bf78432576e658005386f45d7c3b2b7eac7af86cf196aaaea  jaxp-94b7e8e0d96f.tar.gz
3e107628080d84a80a78ef0ef9dc3664989291dd17c8bacf031d59fba7bd7f4d  jaxws-bd9a50a78d04.tar.gz
9222e5317264f20d4a0b8170b4c4d02459cda98333c18e3a75064e7856ff58be  jdk-9448fff93286.tar.gz
5af29e32344e2f2fc0beb31f91b8312f2a0d6d02c53b4cb700ee2e27bcf1043b  langools-8c26a3c39128.tar.gz
e3bbed298ed7c77169fdfddc47cdb85c62ef2e5e7ea04ca28aa8779861efca65  hotspot-69b542696e5b.tar.gz
cab1b8754e5f1f2aa869e2ba603903ae5e81a585de4eafd00f173531a11b5a45  apache-ant-1.9.2-bin.tar.gz
885b46e24fe5af23ad3712c5e08e8d97d6d92a4b89e1be860e8fe88e4a3dacd1  rhino1_7R3.zip
2c515d2664a3792561bd635b6df0dd24918feb3095ed938b1ec807b005928e69  fix-paxctl-args.patch
b81a5e40ce9a93409e8226fe73a228d1c277343fc4f8a888277beb0d5bf0f551  icedtea-build-paxmark.patch
a7922430cb767c8a4baae232c8b2e5f377aeb7cfde0c9901cd7774f078e7f92e  icedtea-hotspot-musl.patch
fb33409f6700f4ab69ca35f0684a5138f2afe0726ba5de7f9eaf16a18a25a77c  icedtea-hotspot-noagent-musl.patch
0ef7592b8f2c954eda0a6cf4dc4a4010942f35ea426f44e34412be6c9a949745  icedtea-hotspot-uclibc-fixes.patch
33b18e827a13cc46be11a4491deefac171c8c2c4fbdd3e0cb4a5fdafa560f958  icedtea-jdk-fix-build.patch
6cebef19d8eec5a4623a96c37ae71b79d124a10478c1db33ad5fc71bc04b30e9  icedtea-jdk-execinfo.patch
632683ec88a6fb250ef043aae9cace605d0c669b7058f8c47b62b09b03ecc6c5  icedtea-jdk-fix-ipv6-init.patch
a36ff13d81a1f1415bedd595b77f2c43574c546938cce7882cb33bbe63464865  icedtea-jdk-iconv-uclibc.patch
6a9f2e7e5f12db53feecaf5bb0afa977e45439722c040842db023c12209c0df2  icedtea-jdk-musl.patch
6c0bbe710395c4ced1359ab279be6a7c36da5bfb9fd60dc47d920f06a0456d82  icedtea-jdk-no-soname.patch"
sha512sums="e03bf4b521f8d11ac5b703b7959b8ee4688f4df486da8cb754cc88546e4f912dafb865f2f32bc37f6327417d928772870f2b6fd32c817298efdd33190c35f929  icedtea-2.4.7.tar.gz
3898815c8c7b99e8b25d710f48ef25d9e0a5ac2c332ce3c1f870b30bfe1198492029767b75f0f8cb85f6b55e2432b14e8c71b0ceab0d25e6c047bfcde766a6f5  openjdk-13970e76b784.tar.gz
ab787baa78e9494fc7a9d12351121a64392b5490409fabb6d343fcf78191e0a7f838d14e2251b35d6b8ac15df950e259bb6ae7a191934cf391a0c00774c4ce4c  corba-e6ad5b912691.tar.gz
b604b7e52453680a20bd303ffa389f937d9f31bb50016b9b359d39b7f4af6deca6cd1e5b3e13f2d40f0d0c46ae9c0370a31afd30b8cc64c5854020804dd38855  jaxp-94b7e8e0d96f.tar.gz
2a1ccdcdf4f6058649514f98c718a542cbdb5e76e997ad77fbcc1a8a7efdf2f787d04909ef0434af07c97373626b5d439718161defe537eea8a2eb56b5405de5  jaxws-bd9a50a78d04.tar.gz
498434ee55cd0ff0f9522b5e7ef6f69c7a54750ca24b336519e24822185e6311ad84ae84b40a470a34b870a19c0191433b49bfb195c5bc6f28f2d4f1f3ee4ac7  jdk-9448fff93286.tar.gz
96a0d00bc7992d84bec61999e158f9a955233a1a15671a5496fed4fd270b40b6526bb11dc70e1e5c85f2fdbdf0df06efd3e805c910d2b7410d78c9c4fe78da8a  langools-8c26a3c39128.tar.gz
6480f7df5f139d5ade06fd949e7daaa258d7a8db972ac36690092fbedb3702b8a92e51d9504d445c6c4ed07fb47e088ccf6efc01b96e292e602eaf8f246b98ed  hotspot-69b542696e5b.tar.gz
618c0c3d80f7c44c2bb8cdfdc2b5278ccd926ab1aa0c8f7099bd0ad5cb4c090f023c0b86c8267052a0a6b1ac57076296fcc16042b9e7a72a1482af63c99e0e49  apache-ant-1.9.2-bin.tar.gz
77964485481e22d20459ea094c773e1930c5ef22d69bc449375a1ead31f340b3a652e2dd85c645e210be1abc8e623aeb560a5dc81629f388322af270ce868d36  rhino1_7R3.zip
f4be5689f72e333bda03d9e89aacfd7cd9bd79601d34bdd03fd2935b46efdc277168d8195e27d35c6dff814712a80c832cab2ff02b186c6cb701de3d2a89c6c8  fix-paxctl-args.patch
be5410260f05642d592ad16945041505277e3cda48e4693a74ab5d432e1c70976d873fa61510b03c6b5fa2b22178e234628a1c72bd568bb82b39c25fddc0ebec  icedtea-build-paxmark.patch
994e8a79a0a23f26d633bf2ce9dad62198c699892f6e7729cc6e509481330399bb2ba736514b516fd2b3dd125fd6c74a127ae7f16d643c3f6a69776737cdb933  icedtea-hotspot-musl.patch
22eb55b0910d51ff2f3f2ad2d7951d2c1d60ea07e0e9561e1110cc57d75a42cc7629ebdaf70722f3f3b76eb2d977b614249b3383118f7b295648bdfda97c9d95  icedtea-hotspot-noagent-musl.patch
822eee0dc4d3ba677a289dfeb3668b536d2d626708390a9d9702fb4144a481fd443a215a0d2041c6026113837aafa4ba0b5e9ead8589d2da6717a238bbc95a5a  icedtea-hotspot-uclibc-fixes.patch
213a537de5f011cb39d608515c3413513ac75fb93593f9a9ef4205f71d72bdd8b097c80db185f7b26021d5bb85045b866f34f3478482dc4189972d8614a13458  icedtea-jdk-fix-build.patch
0391970e6a32946aa3cccf38fdef9c0fe2af26cd0df824b98aa2fcfa1bf661d4a68e339bffcfd16f386c565fc68bb28a29208a67d4bad8a0e847ad02bd8becbb  icedtea-jdk-execinfo.patch
48533f87fc2cf29d26b259be0df51087d2fe5b252e72d00c6ea2f4add7b0fb113141718c116279c5905e03f64a1118082e719393786811367cf4d472b5d36774  icedtea-jdk-fix-ipv6-init.patch
a6ee1c63a171859ab1350481bc3e5d464354f1105d80fc72c1d58620672ca5c1a550b954b35917f89537f0aeb28c49470b27522ce53588e42dedff41e074774c  icedtea-jdk-iconv-uclibc.patch
2da5596c01317cb6ce0183df0a0d7c1f6ab7b05b8060c5808300e24482ff2772206cbfc733d7b0cd66460f24d9b08b9109afdafcb293c12e98b79d307afd1b51  icedtea-jdk-musl.patch
bf4b184e170f7b0ff64ab30d2162784fe2bd5460d1fa31973259f7065fd4c511c46f97724fe2bd72bb94e9006cb568d0e0c87d1a9c90819e65880f8f44830bb1  icedtea-jdk-no-soname.patch"