Skip to content

Commit 38412b6

Browse files
committed
update(openjdk^8)[2]
1 parent 8d99e53 commit 38412b6

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

projects/openjdk.org/package.yml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,14 @@ build:
6767
- run:
6868
- BOOT_JDK_VERSION="${BOOT_JDK{{version.major}}_VERSION}"
6969
- BOOT_JDK_MAJOR=$(echo "${BOOT_JDK_VERSION}" | grep -o '^[0-9]\+')
70+
- |
71+
if test {{version.major}} = 8; then
72+
BOOT_JDK_TAG_VERSION="jdk${BOOT_JDK_VERSION}"
73+
else
74+
BOOT_JDK_TAG_VERSION="jdk-${BOOT_JDK_VERSION}"
75+
fi
7076
- BOOT_JDK_URL_VERSION="$(echo "${BOOT_JDK_VERSION}" | sed -e 's/\+/_/g' -e 's/-//g')"
71-
- BOOT_JDK_URL="https://github.com/adoptium/temurin${BOOT_JDK_MAJOR}-binaries/releases/download/jdk-${BOOT_JDK_VERSION}/OpenJDK${BOOT_JDK_MAJOR}U-jdk_${BOOT_JDK_ARCH}_hotspot_${BOOT_JDK_URL_VERSION}.tar.gz"
77+
- BOOT_JDK_URL="https://github.com/adoptium/temurin${BOOT_JDK_MAJOR}-binaries/releases/download/${BOOT_JDK_TAG_VERSION}/OpenJDK${BOOT_JDK_MAJOR}U-jdk_${BOOT_JDK_ARCH}_hotspot_${BOOT_JDK_URL_VERSION}.tar.gz"
7278
- wget -c "${BOOT_JDK_URL}" -O - | tar xz -C . --strip-components=1
7379
working-directory: boot-jdk
7480
- run:
@@ -86,11 +92,37 @@ build:
8692
clang --version | grep "clang version ${LLVM_VERSION_MAJOR}"
8793
unset LLVM_VERSION_MAJOR LLVM_BIN_PATH PATH_WITHOUT_.LLVM
8894
fi
89-
if: <12
95+
if: ^11
96+
# v8-specific hacks
97+
- run:
98+
- export ARGS="$(echo "$ARGS" | tr ' ' '\n' | sed -f $PROP | tr '\n' ' ')"
99+
- sed -i 's/-isysroot \\"\$SYSROOT\\"//g' common/autoconf/flags.m4
100+
- sed -i 's|-isysroot \\"\$SDKPATH\\" -iframework\\"\$SDKPATH/System/Library/Frameworks\\"||g' common/autoconf/toolchain.m4
101+
- sed -i 's|-isysroot \\"\$\(SDKPATH\)\\" -iframework\\"$\(SDKPATH\)/System/Library/Frameworks\\"||g' common/autoconf/toolchain.m4
102+
- sed -i 's/-Xlinker -O1//g' common/autoconf/flags.m4 hotspot/make/linux/makefiles/gcc.make
103+
- |
104+
if test {{hw.platform}} = "linux"; then
105+
export ARGS="$(echo "$ARGS" | sed -e 's/--with-toolchain-type=clang/--with-toolchain-type=gcc/' -e 's/CXXFILT=llvm-cxxfilt/CXXFILT=c++filt/')"
106+
source <(pkgx +gnu.org/gcc^11)
107+
export CC=gcc
108+
export CXX=g++
109+
export LD=ld.bfd
110+
fi
111+
prop: |
112+
s/--disable-warnings-as-errors/--with-conf-name=release/
113+
/--with-version-opt/d
114+
/--with-version-pre/d
115+
/--with-harfbuzz/d
116+
/--with-lcms/d
117+
/--with-libjpeg/d
118+
/--with-libpng/d
119+
/--disable-hotspot-gtest/d
120+
/--with-jvm-features/d
121+
s/--with-version-build/--with-build-number/
122+
/--with-vendor-version-string/d
123+
if: ^8
90124
- bash configure $ARGS
91125
--with-boot-jdk="$BOOT_JDK_DIR"
92-
--with-version-build=$(echo {{version.raw}} | grep -o '[0-9]\+$')
93-
--with-vendor-version-string="pkgx@$(pkgx --version | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')"
94126
--with-extra-cflags="$CFLAGS"
95127
--with-extra-cxxflags="$CXXFLAGS"
96128
--with-extra-ldflags="$LDFLAGS"
@@ -143,7 +175,7 @@ build:
143175
# https://github.com/adoptium/temurin11-binaries/releases
144176
BOOT_JDK11_VERSION: 11.0.22+7
145177
# https://github.com/adoptium/temurin8-binaries/releases
146-
BOOT_JDK8_VERSION: 8u452b09
178+
BOOT_JDK8_VERSION: 8u452-b09
147179

148180
ARGS:
149181
- --disable-warnings-as-errors
@@ -162,6 +194,8 @@ build:
162194
- --with-libjpeg=system
163195
- --with-libpng=system
164196
- --with-zlib=system
197+
- --with-version-build=$(echo {{version.raw}} | grep -o '[0-9]\+$')
198+
- --with-vendor-version-string="pkgx@$(pkgx --version | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')"
165199

166200
provides:
167201
# TODO: https://github.com/pkgxdev/libpkgx/issues/68

0 commit comments

Comments
 (0)