Commit 4143ac14 authored by Natanael Copa's avatar Natanael Copa

testing/openjdk9: reorder subpkg split and add -src

parent 356b47d2
# Contributor: Simon Frankenberger <simon-alpine@fraho.eu> # Contributor: Simon Frankenberger <simon-alpine@fraho.eu>
# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu> # Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
pkgname=openjdk9 pkgname=openjdk9
_pkgver=9.0.4+12 pkgver=9.0.4_p12
pkgver=${_pkgver/+/.} _pkgver=${pkgver/_p/+}
pkgrel=0 pkgrel=0
pkgdesc="Oracle OpenJDK 9" pkgdesc="Oracle OpenJDK 9"
url="https://hg.openjdk.java.net/jdk-updates/jdk9u" url="https://hg.openjdk.java.net/jdk-updates/jdk9u"
...@@ -37,8 +37,9 @@ subpackages="$pkgname-jmods:_jmods:noarch ...@@ -37,8 +37,9 @@ subpackages="$pkgname-jmods:_jmods:noarch
$pkgname-demos:_demos:noarch $pkgname-demos:_demos:noarch
$pkgname-doc:_doc:noarch $pkgname-doc:_doc:noarch
$pkgname-dbg:_dbg $pkgname-dbg:_dbg
$pkgname-jre-headless:_jre_headless
$pkgname-jre:_jre $pkgname-jre:_jre
$pkgname-src:_src
$pkgname-jre-headless:_jre_headless
$pkgname-jdk:_jdk $pkgname-jdk:_jdk
" "
source="jdk-$_pkgver-root.tar.bz2::http://hg.openjdk.java.net/jdk-updates/jdk9u/archive/jdk-$_pkgver.tar.bz2 source="jdk-$_pkgver-root.tar.bz2::http://hg.openjdk.java.net/jdk-updates/jdk9u/archive/jdk-$_pkgver.tar.bz2
...@@ -90,8 +91,8 @@ unpack() { ...@@ -90,8 +91,8 @@ unpack() {
done done
} }
build() { prepare() {
cd "$builddir" default_prepare
# update the config.sub file to detect alpine # update the config.sub file to detect alpine
cp $srcdir/2019-01-05_config.sub common/autoconf/build-aux/autoconf-config.sub cp $srcdir/2019-01-05_config.sub common/autoconf/build-aux/autoconf-config.sub
...@@ -101,6 +102,10 @@ build() { ...@@ -101,6 +102,10 @@ build() {
# #
# haven't found any way to disable this module so just remove it. # haven't found any way to disable this module so just remove it.
rm -r hotspot/src/jdk.hotspot.agent rm -r hotspot/src/jdk.hotspot.agent
}
build() {
cd "$builddir"
if [ $_run_jtreg -ne 0 ]; then if [ $_run_jtreg -ne 0 ]; then
_with_jtreg="--with-jtreg=/usr/share/java/jtreg" _with_jtreg="--with-jtreg=/usr/share/java/jtreg"
...@@ -108,6 +113,12 @@ build() { ...@@ -108,6 +113,12 @@ build() {
_with_jtreg="--with-jtreg=no" _with_jtreg="--with-jtreg=no"
fi fi
# CFLAGS, CXXFLAGS and LDFLAGS are ignored as shown by a warning
# in the output of ./configure unless used like such:
# --with-extra-cflags="${CFLAGS}"
# --with-extra-cxxflags="${CXXFLAGS}"
# --with-extra-ldflags="${LDFLAGS}"
# See also paragraph "Configure Control Variables from "jdk9-${_hg_tag}/common/doc/building.md
CFLAGS= CXXFLAGS= LDFLAGS= \ CFLAGS= CXXFLAGS= LDFLAGS= \
bash ./configure \ bash ./configure \
--openjdk-target=$CHOST \ --openjdk-target=$CHOST \
...@@ -137,7 +148,7 @@ build() { ...@@ -137,7 +148,7 @@ build() {
--with-version-opt=alpine-r${pkgrel} \ --with-version-opt=alpine-r${pkgrel} \
--with-version-build=${_pkgver#*+} --with-version-build=${_pkgver#*+}
MAKEFLAGS= make jdk-image MAKEFLAGS= make jdk-image
} }
check() { check() {
...@@ -227,6 +238,32 @@ _dbg() { ...@@ -227,6 +238,32 @@ _dbg() {
mv "$_fromroot"/lib/*.debuginfo "$_toroot"/lib mv "$_fromroot"/lib/*.debuginfo "$_toroot"/lib
} }
_jre() {
pkgdesc="Oracle OpenJDK 9 (JRE)"
depends="$pkgname-jre-headless"
_fromroot="$pkgdir/$_java_home"
_toroot="$subpkgdir/$_java_home"
mkdir -p "$_toroot/lib"
mv "$_fromroot/lib/libawt_xawt.so" \
"$_fromroot/lib/libfontmanager.so" \
"$_fromroot/lib/libjavajpeg.so" \
"$_fromroot/lib/libjawt.so" \
"$_fromroot/lib/libjsoundalsa.so" \
"$_fromroot/lib/liblcms.so" \
"$_fromroot/lib/libsplashscreen.so" \
"$_toroot/lib"
}
_src() {
pkgdesc="OpenJDK $_majorver Source Bundle"
depends="$pkgname-jre-headless"
mkdir -p "$subpkgdir/$_java_home"/lib
mv "$pkgdir"/$_java_home/lib/src.zip \
"$subpkgdir"/$_java_home/lib/
}
_jre_headless() { _jre_headless() {
pkgdesc="Oracle OpenJDK 9 (JRE headless)" pkgdesc="Oracle OpenJDK 9 (JRE headless)"
depends="java-common java-cacerts" depends="java-common java-cacerts"
...@@ -236,18 +273,6 @@ _jre_headless() { ...@@ -236,18 +273,6 @@ _jre_headless() {
mkdir -p "$_toroot" mkdir -p "$_toroot"
mv "$_fromroot/lib" "$_toroot" mv "$_fromroot/lib" "$_toroot"
# move back unwanted libs
mkdir -p "$_fromroot/lib"
mv "$_toroot/lib/src.zip" \
"$_toroot/lib/libawt_xawt.so" \
"$_toroot/lib/libfontmanager.so" \
"$_toroot/lib/libjavajpeg.so" \
"$_toroot/lib/libjawt.so" \
"$_toroot/lib/libjsoundalsa.so" \
"$_toroot/lib/liblcms.so" \
"$_toroot/lib/libsplashscreen.so" \
"$_fromroot/lib"
mkdir -p "$_toroot/bin" mkdir -p "$_toroot/bin"
for i in appletviewer \ for i in appletviewer \
idlj \ idlj \
...@@ -281,23 +306,6 @@ _jre_headless() { ...@@ -281,23 +306,6 @@ _jre_headless() {
ln -sf . "$_toroot/jre" ln -sf . "$_toroot/jre"
} }
_jre() {
pkgdesc="Oracle OpenJDK 9 (JRE)"
depends="$pkgname-jre-headless"
_fromroot="$pkgdir/$_java_home"
_toroot="$subpkgdir/$_java_home"
mkdir -p "$_toroot/lib"
mv "$_fromroot/lib/libawt_xawt.so" \
"$_fromroot/lib/libfontmanager.so" \
"$_fromroot/lib/libjavajpeg.so" \
"$_fromroot/lib/libjawt.so" \
"$_fromroot/lib/libjsoundalsa.so" \
"$_fromroot/lib/liblcms.so" \
"$_fromroot/lib/libsplashscreen.so" \
"$_toroot/lib"
}
_jdk() { _jdk() {
pkgdesc="Oracle OpenJDK 9 (JDK)" pkgdesc="Oracle OpenJDK 9 (JDK)"
depends="$pkgname-jre" depends="$pkgname-jre"
...@@ -305,7 +313,6 @@ _jdk() { ...@@ -305,7 +313,6 @@ _jdk() {
_toroot="$subpkgdir/$_java_home" _toroot="$subpkgdir/$_java_home"
mkdir -p "$_toroot" mkdir -p "$_toroot"
mv "$_fromroot/lib" "$_toroot"
mv "$_fromroot/bin" "$_toroot" mv "$_fromroot/bin" "$_toroot"
mv "$_fromroot/include" "$_toroot" mv "$_fromroot/include" "$_toroot"
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment