blob: f5a7642589b1788c9fbe2d6ea81d00077d183a47 (
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
|
# Contributor: Timo Teras <timo.teras@iki.fi>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=openjdk8
_icedteaver=3.7.0
# pkgver is <JDK version>.<JDK update>.<JDK build>
# Check http://icedtea.classpath.org/wiki/Main_Page when updating!
pkgver=8.161.12
pkgrel=0
pkgdesc="OpenJDK 8 provided by IcedTea"
url="http://icedtea.classpath.org/"
arch="all"
license="custom"
depends="$pkgname-jre java-cacerts"
options="sover-namecheck"
makedepends="bash findutils tar zip file paxmark gawk util-linux libxslt
autoconf automake linux-headers sed xz coreutils
openjdk7 ca-certificates
nss-dev nss-static 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 pcsc-lite-dev lksctp-tools-dev
libxcomposite-dev"
case $CARCH in
x86) _jarch=i386;;
x86_64) _jarch=amd64;;
arm*) _jarch=aarch32;;
*) _jarch="$CARCH";;
esac
_bootstrap_java_home="/usr/lib/jvm/java-1.7-openjdk"
_java_home="/usr/lib/jvm/java-1.8-openjdk"
_jrelib="$_java_home/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"
sonameprefix="$pkgname:"
subpackages="$pkgname-dbg $pkgname-jre-lib:jrelib:noarch $pkgname-jre $pkgname-jre-base:jrebase
$pkgname-doc $pkgname-demos"
_dropsver=$_icedteaver
_dropsurl="http://icedtea.classpath.org/download/drops/icedtea8/$_dropsver"
source="http://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.xz
openjdk-$_dropsver.tar.xz::$_dropsurl/openjdk.tar.xz
corba-$_dropsver.tar.xz::$_dropsurl/corba.tar.xz
jaxp-$_dropsver.tar.xz::$_dropsurl/jaxp.tar.xz
jaxws-$_dropsver.tar.xz::$_dropsurl/jaxws.tar.xz
jdk-$_dropsver.tar.xz::$_dropsurl/jdk.tar.xz
langtools-$_dropsver.tar.xz::$_dropsurl/langtools.tar.xz
hotspot-$_dropsver.tar.xz::$_dropsurl/hotspot.tar.xz
nashorn-$_dropsver.tar.xz::$_dropsurl/nashorn.tar.xz
fix-paxmark.patch
icedtea-hotspot-musl.patch
icedtea-hotspot-musl-ppc.patch
icedtea-hotspot-noagent-musl.patch
icedtea-jdk-execinfo.patch
icedtea-jdk-fix-ipv6-init.patch
icedtea-jdk-fix-libjvm-load.patch
icedtea-jdk-musl.patch
icedtea-jdk-includes.patch
icedtea-jdk-getmntent-buffer.patch
icedtea-autoconf-config.patch
icedtea-jdk-tls-nist-curves.patch
"
builddir="$srcdir/icedtea-$_icedteaver"
unpack() {
if [ -z "$force" ]; then
verify
initdcheck
fi
mkdir -p "$srcdir"
msg "Unpacking sources..."
tar -C "$srcdir" -Jxf icedtea-$_icedteaver.tar.xz
}
prepare() {
cd "$builddir"
local ver_u=$(sed -En 's/^JDK_UPDATE_VERSION\s*=\s*(\S+).*/\1/p' Makefile.am)
local ver_b=$(sed -En 's/^BUILD_VERSION\s*=\s*b(\S+).*/\1/p' Makefile.am)
[ "${pkgver#*.}" = "$ver_u.$ver_b" ] \
|| die "Version mismatch, source is 8.$ver_u.$ver_b, but abuild defines $pkgver!"
# Busybox sha256 does not support longopts.
sed -e "s/--check/-c/g" -i Makefile.am
local patch; for patch in $source; do
case $patch in
icedtea-*.patch)
cp ../$patch patches
;;
*.patch)
msg "Applying patch $patch"
patch -p1 -i "$srcdir"/$patch
;;
esac
done
./autogen.sh
}
build() {
export JAVA_HOME="$_bootstrap_java_home"
export PATH="$JAVA_HOME/bin:$PATH"
if [ -z "$JOBS" ]; then
export JOBS=$(printf '%s\n' "$MAKEFLAGS" | sed -n -e 's/.*-j\([0-9]\+\).*/\1/p')
fi
DISTRIBUTION_PATCHES=""
local patch; for patch in $source; do
case $patch in
icedtea-*.patch)
DISTRIBUTION_PATCHES="$DISTRIBUTION_PATCHES patches/$patch"
;;
esac
done
export DISTRIBUTION_PATCHES
echo "icedtea patches: $DISTRIBUTION_PATCHES"
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix="$_java_home" \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--disable-dependency-tracking \
--disable-downloading \
--disable-precompiled-headers \
--with-parallel-jobs=${JOBS:-2} \
--with-hotspot-build=default \
--with-openjdk-src-zip="$srcdir/openjdk-$_dropsver.tar.xz" \
--with-hotspot-src-zip="$srcdir/hotspot-$_dropsver.tar.xz" \
--with-corba-src-zip="$srcdir/corba-$_dropsver.tar.xz" \
--with-jaxp-src-zip="$srcdir/jaxp-$_dropsver.tar.xz" \
--with-jaxws-src-zip="$srcdir/jaxws-$_dropsver.tar.xz" \
--with-jdk-src-zip="$srcdir/jdk-$_dropsver.tar.xz" \
--with-langtools-src-zip="$srcdir/langtools-$_dropsver.tar.xz" \
--with-nashorn-src-zip="$srcdir/nashorn-$_dropsver.tar.xz" \
--with-pax=paxmark \
--with-jdk-home="$_bootstrap_java_home" \
--with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \
--enable-nss \
--enable-sunec \
--enable-non-nss-curves
make
}
# TODO: Run tests or at least try to compile and run hello world.
check() {
cd "$builddir"/openjdk.build/images/j2sdk-image
./bin/java -version
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/$_java_home
cp -a openjdk.build/images/j2sdk-image/* "$pkgdir"/$_java_home/
rm "$pkgdir"/$_java_home/src.zip
# This archive contains absolute paths from the build environment,
# so it does not work on the target system. User can generate it
# running `java -Xshare:dump`.
rm -f "$pkgdir"/$_jrelib/server/classes.jsa
# pax mark again (due to fakeroot xattr handling bug)
./pax-mark-vm "$pkgdir"/$_java_home true
# symlink to shared java cacerts store
rm -f "$pkgdir"/$_java_home/jre/lib/security/cacerts
ln -sf /etc/ssl/certs/java/cacerts \
"$pkgdir"/$_java_home/jre/lib/security/cacerts
}
jrelib() {
pkgdesc="OpenJDK 8 Java Runtime (class libraries)"
depends=""
local file dir
for file in 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
dir=${file%/*}
mkdir -p "$subpkgdir"/$_java_home/$dir
mv "$pkgdir"/$_java_home/$file "$subpkgdir"/$_java_home/$dir
done
}
jre() {
pkgdesc="OpenJDK 8 Java Runtime"
local file dir
mkdir -p "$subpkgdir"
for file in jre/bin/policytool \
bin/appletviewer \
bin/policytool \
jre/lib/$_jarch/libawt_xawt.so \
jre/lib/$_jarch/libfontmanager.so \
jre/lib/$_jarch/libjawt.so \
jre/lib/$_jarch/libjsoundalsa.so \
jre/lib/$_jarch/libsplashscreen.so; do
dir=${file%/*}
mkdir -p "$subpkgdir"/$_java_home/$dir
mv "$pkgdir"/$_java_home/$file "$subpkgdir"/$_java_home/$dir
done
# Pax mark again (due to fakeroot xattr handling bug).
"$builddir"/pax-mark-vm "$subpkgdir"/$_java_home true
}
jrebase() {
pkgdesc="OpenJDK 8 Java Runtime (no GUI support)"
depends="$pkgname-jre-lib java-common java-cacerts"
mkdir -p "$subpkgdir"/$_java_home/bin \
"$subpkgdir"/$_java_home/lib/$_jarch
mv "$pkgdir"/$_java_home/lib/$_jarch/jli \
"$subpkgdir"/$_java_home/lib/$_jarch/
local file; for file in java orbd rmid servertool unpack200 keytool \
pack200 rmiregistry tnameserv; do
mv "$pkgdir"/$_java_home/bin/$file "$subpkgdir"/$_java_home/bin/
done
# Rest of the jre subdir (which were not taken by -jre subpkg).
mv "$pkgdir"/$_java_home/jre "$subpkgdir"/$_java_home/
# Pax mark again (due to fakeroot xattr handling bug).
"$builddir"/pax-mark-vm "$subpkgdir"/$_java_home true
}
doc() {
default_doc
mkdir -p "$subpkgdir"/$_java_home/
mv "$pkgdir"/$_java_home/man "$subpkgdir"/$_java_home/
}
demos() {
pkgdesc="OpenJDK 8 Java Demos and Samples"
depends="$pkgname"
mkdir -p "$subpkgdir"/$_java_home/
mv "$pkgdir"/$_java_home/demo "$pkgdir"/$_java_home/sample \
"$subpkgdir"/$_java_home/
}
sha512sums="f2dc2464139d18385d4734e6380d7c4efc69f0e5b507218397032e0ea1b2e0d96688c88979de90a1fcd453809a4b1d6081ce2970f4e3cc73a236bd2d17bcc704 icedtea-3.7.0.tar.xz
c8049c0101d270a8cce87973b60ddcea60297604dcc1d7cf6b26efe7c06806b18ab9f2a6012fc382b366009ec43d1cd5a27714ef5ec6028c71992eb4e8b6d1c1 openjdk-3.7.0.tar.xz
5fae98bec6b54c4bcc374db940256163fa9db2c8f9447c78e61887ecbce16f98bbd00720e9fe78f860bb2d83bc062e3beb430b637ea200d935aaae1f3e905243 corba-3.7.0.tar.xz
4c4c17a61c74dcfe8f6187055f43e47daa0f2f5f9ab6692f2149c98e4306d6e582c21d3d8d3061cfd2e7807889f645f3b8a446a7b84ca556459225df593ba996 jaxp-3.7.0.tar.xz
d68741e7f60c87c22e50c50852bbf0598f36c3c594bd70d6f575c4962b5c8d7ff99a83ddd570a15497f4f47d456c26c400b523f789dbfca542dbf023b8e93f9e jaxws-3.7.0.tar.xz
0cc54dd32a06595ae30e087ada15b0dee2f17f0ef9e5aa8e93fd7beba2937e774d444586f06208e26b904f024b6dc458855d35f59b2d531b801529daa67e3cb8 jdk-3.7.0.tar.xz
46016102f230eb56c614fc44d1deb698bb39cade7e5d34b9a2bcf792014c57f88d15d6c3ceff456dfef9e1eaa99486901784c1254afeb3cc67338dd500ef526f langtools-3.7.0.tar.xz
c7c2e4ccccdc4fd9ac2f4c71e9a89997dd68fbd73a966015f9e764489cdf0027479d4c335c8f339d5ee2eb2968bc187a12e3c5e72d94ad59556cfb452a732658 hotspot-3.7.0.tar.xz
4ca935a07bb7b5b8e3f0274bc120b6264290b6218a97457a6648ade04bd302b3838b398bd7ce423dcfe2f9bee03827332bd61abb21d9d8e58232b01acf48ccf6 nashorn-3.7.0.tar.xz
1f470432275d5beaa8b4e4352a2f24a4a00593546dc4f3bd857794c89e521e8e6d6abc540762bbd769be3e1e3da058e134dc5dc066d12b9b8a1f0656040a795c fix-paxmark.patch
bfa16565d71453a0ba4204cb7ee0f8cb8c9a272c4d71d1357af4425183e64ef8df77ae1df1bbb0f984cf2d6d04a49124a6ef50f09dfee80c5b5734596e0b2a8e icedtea-hotspot-musl.patch
e5cf4d70f96fc1e72ae8b97a887adb96092ff36584711cbb8de9d9fa9e859cb8731d638838de0d9591239fc44ffe5c74422d1842bd9f10a0c00dff1627bdeeef icedtea-hotspot-musl-ppc.patch
3c592a14f1806a431290a96a8c1413ca1cc621e73a87ed778fa98878c82809bd924072210d4e4127a6c0c32ff557d749f6c9b3ce31cbca083b013240b618b224 icedtea-hotspot-noagent-musl.patch
f6365cfafafa008bd6c1bf0ccec01a63f8a39bd1a8bc87baa492a27234d47793ba02d455e5667a873ef50148df3baaf6a8421e2da0b15faac675867da714dd5f icedtea-jdk-execinfo.patch
48533f87fc2cf29d26b259be0df51087d2fe5b252e72d00c6ea2f4add7b0fb113141718c116279c5905e03f64a1118082e719393786811367cf4d472b5d36774 icedtea-jdk-fix-ipv6-init.patch
b135991c76b0db8fa7c363e0903624668e11eda7b54a943035c214aa4d7fc8c3e8110ed200edcec82792f3c9393150a9bd628625ddf7f3e55720ff163fbbb471 icedtea-jdk-fix-libjvm-load.patch
1fbc32ddc528c7c0099dbc1e48f88d29dccf55e7b8997793aa1d3d8408003a1223d898cca4248e1a12d343d3feec5144f875e6cdac8460d763c73ab3ad7e49f9 icedtea-jdk-musl.patch
e8d9f1b867bf4fc84aa00d1237b264bcf503b1ed5f34735e14b0b747a728953fe0051a5af69ed058d377fbf65d8be1ed9e38fe5fc6edb2d50b31f34bf3ba91dc icedtea-jdk-includes.patch
7e6fa46b10c630517bfa46943858aea1d032c12d32ba3fcb7a2143ae1e896c34fa4cb8f925af80cb19f8e29149b835aa054adfd30ebb00539f6c78588d6f5211 icedtea-jdk-getmntent-buffer.patch
662d662d0a7a84be2978e921317589f212f3ba3b7629527ba0f1140b5ac4c1024893e0ed176211688ed1a4505968c4befc841ed57ffcdbb9d355c2cb0571b167 icedtea-autoconf-config.patch
9ea7ac942baf29cc619bc2e1acd59201b9f6d38f39a517b495d7613aec746459200c81afb57c5fcdcb856f6bc8b33f7566c8593fed07e5c73f43e08f1072d458 icedtea-jdk-tls-nist-curves.patch"
|