aboutsummaryrefslogtreecommitdiffstats
path: root/main/openjdk7/APKBUILD
blob: a013bfb9f8dbbb4acb121d39db6f6b7186a1c37b (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
# Contributor: Timo Teras <timo.teras@iki.fi>
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=openjdk7
_icedteaver=2.5.4
# pkgver is <JDK version>.<JDK update>
# check icedtea JDK when updating
pkgver=7.75.$_icedteaver
pkgrel=1
pkgdesc="Sun OpenJDK 7 via IcedTea"
url="http://icedtea.classpath.org/"
arch="x86 x86_64"
license="GPL-2 with Classpath"
depends="$pkgname-jre"
options="sover-namecheck"
makedepends="findutils tar zip paxmark gawk util-linux libxslt
	     autoconf automake linux-headers
	     ca-certificates
	     nss-dev cups-dev jpeg-dev giflib-dev libpng-dev libxt-dev
	     lcms2-dev libxp-dev libxtst-dev libxinerama-dev zlib-dev
	     libxrender-dev alsa-lib-dev freetype-dev fontconfig-dev
	     gtk+2.0-dev krb5-dev attr-dev"
install=""

# upstream binary versions
RHINO_VER=1_7R3
ANT_VER=1.9.2

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

_dropsver=$_icedteaver
_dropsurl=http://icedtea.classpath.org/download/drops/icedtea7/$_dropsver

source="http://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz
	saveas-$_dropsurl/openjdk.tar.bz2/openjdk-$_dropsver.tar.bz2
	saveas-$_dropsurl/corba.tar.bz2/corba-$_dropsver.tar.bz2
	saveas-$_dropsurl/jaxp.tar.bz2/jaxp-$_dropsver.tar.bz2
	saveas-$_dropsurl/jaxws.tar.bz2/jaxws-$_dropsver.tar.bz2
	saveas-$_dropsurl/jdk.tar.bz2/jdk-$_dropsver.tar.bz2
	saveas-$_dropsurl/langtools.tar.bz2/langtools-$_dropsver.tar.bz2
	saveas-$_dropsurl/hotspot.tar.bz2/hotspot-$_dropsver.tar.bz2
	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

	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-musl.patch
	icedtea-jdk-no-soname.patch
	icedtea-jdk-giflib51.patch
	"

# icedtea6-1.9.7-generate_cacerts-1.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=$INSTALL_BASE \
		--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-$_dropsver.tar.bz2 \
		--with-hotspot-src-zip=$srcdir/hotspot-$_dropsver.tar.bz2 \
		--with-corba-src-zip=$srcdir/corba-$_dropsver.tar.bz2 \
		--with-jaxp-src-zip=$srcdir/jaxp-$_dropsver.tar.bz2 \
		--with-jaxws-src-zip=$srcdir/jaxws-$_dropsver.tar.bz2 \
		--with-jdk-src-zip=$srcdir/jdk-$_dropsver.tar.bz2 \
		--with-langtools-src-zip=$srcdir/langtools-$_dropsver.tar.bz2 \
		--with-pax=paxmark \
		--with-jdk-home=$BOOTSTRAP_JAVA_HOME \
		--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="646064d7a8d57c2cae0ef35a05de57c8  icedtea-2.5.4.tar.gz
90c83c73214a083b24adfee9a1be56a4  openjdk-2.5.4.tar.bz2
06235b1e4b024402d6ec5cf0672cc353  corba-2.5.4.tar.bz2
d3ffad8f8b415f002fd0f308279accbc  jaxp-2.5.4.tar.bz2
03bb3aa6f03765816adf3d312feed05e  jaxws-2.5.4.tar.bz2
4e848b426d98b60523f71e9f35edfff8  jdk-2.5.4.tar.bz2
ffc690fecd801662d4b4f8874aecbc68  langtools-2.5.4.tar.bz2
c3bbd2ff7bf67eae93f9c55ad3ff3b91  hotspot-2.5.4.tar.bz2
9a2826a1819aa128629778217af36c55  apache-ant-1.9.2-bin.tar.gz
99d94103662a8d0b571e247a77432ac5  rhino1_7R3.zip
f87dd2c4c3c97fc3ac33080a65ca9e14  icedtea-hotspot-musl.patch
aefe00f7f9b91805f402efad9208dd53  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
66f6e66eb135f0d88847910f6581d323  icedtea-jdk-musl.patch
d014431e70cdabb82a75e4b9ae4c28a9  icedtea-jdk-no-soname.patch
529dd5e5372112470dacc08c95b0c22a  icedtea-jdk-giflib51.patch"
sha256sums="5301b9a8592af2cf8e3e7a3650e5e1fe744c6d2de7f8ff78080b2eeae86a9800  icedtea-2.5.4.tar.gz
88c92a3cab37446352086876771733229b1602d4f79ef68629a151180652e1f1  openjdk-2.5.4.tar.bz2
7411fe2df795981124ae2e4da0ddb7d98db0a94c9399a12876be03e7177eaa0b  corba-2.5.4.tar.bz2
84623e50b69710d12209fc761a49953c78f1a664ff54e022a77e35e25489f2f3  jaxp-2.5.4.tar.bz2
4bd38a8121d85c422b425177ce648afdee9da18812c91c5b74939c58db33ab4b  jaxws-2.5.4.tar.bz2
e99b65baf66d8818e3c8fd31d71fbad4ad0ceb0b7fa4c2e0607eca3a40f2ba09  jdk-2.5.4.tar.bz2
4fd76cbdf18174128863514b4d3997cb623368697bf4f5af6d079dbbcd7b378a  langtools-2.5.4.tar.bz2
4825f8543aa0c065530b05b0a95915a44eea153bbb696d2ffc4b50a398813e34  hotspot-2.5.4.tar.bz2
cab1b8754e5f1f2aa869e2ba603903ae5e81a585de4eafd00f173531a11b5a45  apache-ant-1.9.2-bin.tar.gz
885b46e24fe5af23ad3712c5e08e8d97d6d92a4b89e1be860e8fe88e4a3dacd1  rhino1_7R3.zip
a7922430cb767c8a4baae232c8b2e5f377aeb7cfde0c9901cd7774f078e7f92e  icedtea-hotspot-musl.patch
afed589db3dbd89513fc890d5b315ca2a5953e8915ff2f24d38448ec145266e9  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
b3f82269f69483d3fe137e369f9325003ce7872d886cdf67705b434ce949b5bc  icedtea-jdk-musl.patch
6c0bbe710395c4ced1359ab279be6a7c36da5bfb9fd60dc47d920f06a0456d82  icedtea-jdk-no-soname.patch
77fba3032edf6cce549cd4e174d9296684b20f4589dc59179fcc8cba7426a4e9  icedtea-jdk-giflib51.patch"
sha512sums="2014afcde6c6798fd9ac2a39dc3515b152809bd888d5c1f69ce431f3e04d696de873e5a6aa085317a73efda2270ec6c4f8ac0eb255493f58c159d2c3560acd34  icedtea-2.5.4.tar.gz
1f53421a3eae13003290b762150e6c24cceee11e1ff9c68f8097a7e88b6befe0b7f80f44e28f61f009c18991ea72cbda5514e6a884b982e630706c4c9afba64e  openjdk-2.5.4.tar.bz2
d1d9b085d4f514a3a8ae01c61ee2f828fe35f78bf1a81ec481e33494e679870dad07518176f77188b9617973839259004a4b13f7815031e488bfc0302c260462  corba-2.5.4.tar.bz2
85caaed404ab953481de90e4a50b29bf92eb3e676fd6cdc954fd8a9592f0d6ed9938c1390e7ce862ac48c6e502ae6dd4bd76294dbe1f56cd5362f3965a191eee  jaxp-2.5.4.tar.bz2
461a49455176d35806e69a4f7585719f6d77adcb10966a4bf7b1bfbde86dae5117bb1c6a0f79eaf7f41d4b95ecc83255843d80d3fb7d39265bee844f8e7bfd22  jaxws-2.5.4.tar.bz2
d3f3cedfd1532f5a64e5ab7e0c651ca16f7c98082d7d9c7c8961f348fde9d7a1c040d6361b515812098533c44dc44092d3467d096a5e73f76823062d06773730  jdk-2.5.4.tar.bz2
2fd48f7c4fed57afe9058a3f012ef4ecbaa121bde43fade5d0795effef48dadc7e2f1735aa8b1a4df2784fa013c1c89082e19c4b7d41845f8c2b242a072a6d1d  langtools-2.5.4.tar.bz2
3a55c4052861d6f736f41264588a461e0a97a2b820016499c5e4e15601e920f5f9024519948f21a22c17d9486ae408979044700d13e97f82317135c928c22659  hotspot-2.5.4.tar.bz2
618c0c3d80f7c44c2bb8cdfdc2b5278ccd926ab1aa0c8f7099bd0ad5cb4c090f023c0b86c8267052a0a6b1ac57076296fcc16042b9e7a72a1482af63c99e0e49  apache-ant-1.9.2-bin.tar.gz
77964485481e22d20459ea094c773e1930c5ef22d69bc449375a1ead31f340b3a652e2dd85c645e210be1abc8e623aeb560a5dc81629f388322af270ce868d36  rhino1_7R3.zip
994e8a79a0a23f26d633bf2ce9dad62198c699892f6e7729cc6e509481330399bb2ba736514b516fd2b3dd125fd6c74a127ae7f16d643c3f6a69776737cdb933  icedtea-hotspot-musl.patch
2b2cdf2c27f95ba5557748bcc49c27e498a1e2efb3526da8dea847f3b0a0776dfdd403e898c9bec9187135750183c89bde183c6fc6112109e39d984df77e9b44  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
44a35941c80f408d0607e32763b3b6ccee21e1d39886309327d3d74d2900117e4346ef59e77c663fd022fec10ee8f365eeb46c1260014d5765d226ce175ce3c5  icedtea-jdk-musl.patch
bf4b184e170f7b0ff64ab30d2162784fe2bd5460d1fa31973259f7065fd4c511c46f97724fe2bd72bb94e9006cb568d0e0c87d1a9c90819e65880f8f44830bb1  icedtea-jdk-no-soname.patch
b4a90ef63dbaec764569a671f850db42a2257b729858923a3831dafaa098c61a635462ee5c72e7fb3ddb2e54d6ee98ff69bf2b4b4f3ec9310f54caf7739e9e82  icedtea-jdk-giflib51.patch"