summaryrefslogtreecommitdiff
path: root/skip/openjdk11/openjdk11.xibuild
blob: 20d09c2f719b76da4ec4fc173fbeb6dd2f27882d (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
#!/bin/sh

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

MAKEDEPS="make bash gawk grep make zip alsa-lib elfutils fontconfig freetype2 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-toybox-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"
}