summaryrefslogtreecommitdiff
path: root/repo/system/openjdk11/openjdk11.xibuild
blob: c3c9c64a5aa1f13c60671e3c0beec7fa9dfdf9c3 (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
#!/bin/sh

NAME="openjdk11"
DESC="Oracle OpenJDK 11"

MAKEDEPS="make 
bash
gawk
grep
make
zip
alsa-lib
elfutils
fontconfig
freetype2
giflib
lcms2
libexecinfo
libffi
libjpeg-turbo
libx11
cups
libxext
libxrandr
libxrender
libxt
libxtst
zlib"

DEPS="musl"

PKG_VER=11.0.16+2
SOURCE="https://github.com/openjdk/jdk11u/archive/jdk-$PKG_VER.tar.gz"

bootstrapjdk="OpenJDK11U-jdk_x64_alpine-linux_hotspot_11.0.15_10"
bootstrapjdk_url="https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15%2B10/$bootstrapjdk.tar.gz"

ADDITIONAL="$bootstrapjdk_url
    build.patch
    fix-bootjdk-check.patch
    fix-musl.patch
    fix-sbase-commands.patch
"

java_home="/usr/lib/jvm/java-11-openjdk"

prepare () {
    apply_patches
    tar xf $bootstrapjdk.tar.gz
    bootjdk=jdk-11.0.15+10
}

build () {
    bash ./configure \
        --with-boot-jdk=$bootjdk \
        --with-toolchain-type=clang \
		--prefix="$java_home" \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-extra-cflags="$CFLAGS" \
		--with-extra-cxxflags="$CXXFLAGS" \
		--with-extra-ldflags="$LDFLAGS" \
		--with-zlib=system \
		--with-libjpeg=system \
		--with-libpng=system \
		--with-lcms=system \
		--with-jobs=${JOBS:-4} \
		--with-test-jobs=${JOBS:-4} \
		--with-native-debug-symbols=none \
		--disable-warnings-as-errors \
		--disable-precompiled-headers \
		--enable-dtrace=no \
		--with-jvm-variants=server \
		--with-debug-level=release \
		--with-version-pre= \
		--with-version-opt="xilinux" \
		--with-version-build=${pkgver} \
		--with-vendor-name="XiLinux" 
    MAKEFLAGS="" make images
}

package () {
    mkdir -p "$PKG_DEST/$java_home"
    cp -r build/*-normal-server-release/images/jdk/* "$PKG_DEST/$java_home"
}