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>
# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
pkgname=openjdk9
_pkgver=9.0.4+12
pkgver=${_pkgver/+/.}
pkgver=9.0.4_p12
_pkgver=${pkgver/_p/+}
pkgrel=0
pkgdesc="Oracle OpenJDK 9"
url="https://hg.openjdk.java.net/jdk-updates/jdk9u"
......@@ -37,8 +37,9 @@ subpackages="$pkgname-jmods:_jmods:noarch
$pkgname-demos:_demos:noarch
$pkgname-doc:_doc:noarch
$pkgname-dbg:_dbg
$pkgname-jre-headless:_jre_headless
$pkgname-jre:_jre
$pkgname-src:_src
$pkgname-jre-headless:_jre_headless
$pkgname-jdk:_jdk
"
source="jdk-$_pkgver-root.tar.bz2::http://hg.openjdk.java.net/jdk-updates/jdk9u/archive/jdk-$_pkgver.tar.bz2
......@@ -90,8 +91,8 @@ unpack() {
done
}
build() {
cd "$builddir"
prepare() {
default_prepare
# update the config.sub file to detect alpine
cp $srcdir/2019-01-05_config.sub common/autoconf/build-aux/autoconf-config.sub
......@@ -101,6 +102,10 @@ build() {
#
# haven't found any way to disable this module so just remove it.
rm -r hotspot/src/jdk.hotspot.agent
}
build() {
cd "$builddir"
if [ $_run_jtreg -ne 0 ]; then
_with_jtreg="--with-jtreg=/usr/share/java/jtreg"
......@@ -108,6 +113,12 @@ build() {
_with_jtreg="--with-jtreg=no"
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= \
bash ./configure \
--openjdk-target=$CHOST \
......@@ -227,6 +238,32 @@ _dbg() {
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() {
pkgdesc="Oracle OpenJDK 9 (JRE headless)"
depends="java-common java-cacerts"
......@@ -236,18 +273,6 @@ _jre_headless() {
mkdir -p "$_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"
for i in appletviewer \
idlj \
......@@ -281,23 +306,6 @@ _jre_headless() {
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() {
pkgdesc="Oracle OpenJDK 9 (JDK)"
depends="$pkgname-jre"
......@@ -305,7 +313,6 @@ _jdk() {
_toroot="$subpkgdir/$_java_home"
mkdir -p "$_toroot"
mv "$_fromroot/lib" "$_toroot"
mv "$_fromroot/bin" "$_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