aboutsummaryrefslogtreecommitdiffstats
path: root/community/openjdk8
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-04-30 12:51:13 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-05-02 18:42:44 +0000
commitc20463c66bd46d7af14441b60694c42d839c7144 (patch)
tree15c31af25a5fad2f96fd68bf75a7fdeba6f53d20 /community/openjdk8
parent1d40a0754c1eb42b01b8f87938e30723e70f554c (diff)
downloadaports-c20463c66bd46d7af14441b60694c42d839c7144.tar.bz2
aports-c20463c66bd46d7af14441b60694c42d839c7144.tar.xz
community/openjdk8: fix messed indentation, global vars and modernize it
Diffstat (limited to 'community/openjdk8')
-rw-r--r--community/openjdk8/APKBUILD93
1 files changed, 49 insertions, 44 deletions
diff --git a/community/openjdk8/APKBUILD b/community/openjdk8/APKBUILD
index b4fb46bb75..15e0525a40 100644
--- a/community/openjdk8/APKBUILD
+++ b/community/openjdk8/APKBUILD
@@ -1,11 +1,12 @@
# Contributor: Timo Teras <timo.teras@iki.fi>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=openjdk8
_java_ver=8
_jdk_update=77
_jdk_build=03
pkgver=$_java_ver.$_jdk_update.$_jdk_build
-pkgrel=0
+pkgrel=1
pkgdesc="Sun OpenJDK 8"
url="http://openjdk.java.net"
arch="x86_64 x86"
@@ -13,12 +14,12 @@ license="custom"
depends="$pkgname-jre java-cacerts"
options="sover-namecheck"
makedepends="bash findutils tar zip file paxmark gawk util-linux libxslt
- autoconf automake linux-headers sed
- openjdk7 ca-certificates
- nss-dev cups-dev jpeg-dev giflib-dev libpng-dev libxt-dev
- lcms2-dev libxp-dev libxtst-dev libxinerama-dev zlib-dev
- libxrender-dev alsa-lib-dev freetype-dev fontconfig-dev
- gtk+2.0-dev krb5-dev attr-dev pcsc-lite-dev lksctp-tools-dev"
+ autoconf automake linux-headers sed
+ openjdk7 ca-certificates
+ nss-dev cups-dev jpeg-dev giflib-dev libpng-dev libxt-dev
+ lcms2-dev libxp-dev libxtst-dev libxinerama-dev zlib-dev
+ libxrender-dev alsa-lib-dev freetype-dev fontconfig-dev
+ gtk+2.0-dev krb5-dev attr-dev pcsc-lite-dev lksctp-tools-dev"
install=""
case $CARCH in
@@ -37,7 +38,7 @@ ldpath="$_jrelib:$_jrelib/native_threads:$_jrelib/headless:$_jrelib/server:$_jre
sonameprefix="$pkgname:"
subpackages="$pkgname-jre-lib:jrelib $pkgname-jre $pkgname-jre-base:jrebase
- $pkgname-doc:doc $pkgname-demos:demos"
+ $pkgname-doc:doc $pkgname-demos:demos"
_dropsurl=http://hg.openjdk.java.net/jdk8u/jdk8u
_dropsver=jdk${_java_ver}u${_jdk_update}-b${_jdk_build}
@@ -62,29 +63,29 @@ source="jdk8u-$_dropsver.tar.bz2::$_dropsurl/archive/${_dropsver}.tar.bz2
build-demo-ldflags.patch
"
-_builddir="$srcdir/jdk8u-$_dropsver"
+builddir="$srcdir/jdk8u-$_dropsver"
prepare() {
- cd "$_builddir"
+ cd "$builddir"
update_config_sub || return 1
local module
for module in corba hotspot jdk jaxws jaxp langtools nashorn; do
- ln -s ../${module}-${_dropsver} ${module}
+ ln -s ../${module}-${_dropsver} $module || return 1
done
- for patch in $source; do
- case $patch in
- *.patch)
- msg "Applying patch $patch"
- busybox patch -p1 < "$srcdir"/$patch || return 1
- ;;
- esac
- done
+ for patch in $source; do
+ case $patch in
+ *.patch)
+ msg "Applying patch $patch"
+ busybox patch -p1 < "$srcdir"/$patch || return 1
+ ;;
+ esac
+ done
}
build() {
- cd "$_builddir"
+ cd "$builddir"
unset JAVA_HOME
export MAKEFLAGS=${MAKEFLAGS/-j*}
sh ./configure \
@@ -121,22 +122,24 @@ build() {
}
list_paxables() {
- file "$@" 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//'
+ file "$@" 2> /dev/null \
+ | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//'
}
pax_mark_vm() {
local paxflags="-mp"
- [ "$CARCH" = "x86" ] && paxflags="-msp"
+ [ "$CARCH" = "x86" ] && paxflags="-msp"
+ local paxable
for paxable in $(list_paxables "${1}"/bin/* "${1}"/jre/bin/*); do
- echo "PaX mark $paxflags ${paxable}"
- paxmark $paxflags "${paxable}"
- done
+ echo "PaX mark $paxflags ${paxable}"
+ paxmark $paxflags "${paxable}"
+ done
}
package() {
mkdir -p "$pkgdir"/$INSTALL_BASE
- cp -a "$_builddir"/build/*/images/j2sdk-image/* "$pkgdir"/$INSTALL_BASE
+ cp -a "$builddir"/build/*/images/j2sdk-image/* "$pkgdir"/$INSTALL_BASE || return 1
rm "$pkgdir"/$INSTALL_BASE/src.zip
find "$pkgdir"/$INSTALL_BASE -iname "*.diz" -delete || return 1
@@ -157,12 +160,13 @@ jrelib() {
arch="noarch"
depends=""
- for A in jre/lib/images jre/lib/*.jar jre/lib/security \
- jre/lib/ext/*.jar jre/lib/cmm jre/ASSEMBLY_EXCEPTION \
- jre/THIRD_PARTY_README jre/LICENSE ; do
- dirname=${A%/*}
+ local A; for A in jre/lib/images jre/lib/*.jar jre/lib/security \
+ jre/lib/ext/*.jar jre/lib/cmm jre/ASSEMBLY_EXCEPTION \
+ jre/THIRD_PARTY_README jre/LICENSE; do
+
+ local dirname=${A%/*}
mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname
- mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname
+ mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname || return 1
done
}
@@ -172,13 +176,13 @@ jrebase() {
mkdir -p "$subpkgdir"/$INSTALL_BASE/bin
- for A in java orbd rmid servertool unpack200 keytool \
- pack200 rmiregistry tnameserv ; do
- mv "$pkgdir"/$INSTALL_BASE/bin/$A "$subpkgdir"/$INSTALL_BASE/bin
+ local A; for A in java orbd rmid servertool unpack200 keytool \
+ pack200 rmiregistry tnameserv; do
+ mv "$pkgdir"/$INSTALL_BASE/bin/$A "$subpkgdir"/$INSTALL_BASE/bin || return 1
done
# rest of the jre subdir (which were not taken by -jre subpkg)
- mv "$pkgdir"/$INSTALL_BASE/jre "$subpkgdir"/$INSTALL_BASE
+ mv "$pkgdir"/$INSTALL_BASE/jre "$subpkgdir"/$INSTALL_BASE || return 1
pax_mark_vm "$subpkgdir"/$INSTALL_BASE
}
@@ -187,16 +191,17 @@ jre() {
pkgdesc="OpenJDK 8 Java Runtime"
mkdir -p "$subpkgdir"
- for A in jre/bin/policytool \
- bin/appletviewer \
- bin/policytool \
- jre/lib/$_jarch/libawt_xawt.so \
- jre/lib/$_jarch/libfontmanager.so \
- jre/lib/$_jarch/libjawt.so \
- jre/lib/$_jarch/libsplashscreen.so ; do
- dirname=${A%/*}
+ local A; for A in jre/bin/policytool \
+ bin/appletviewer \
+ bin/policytool \
+ jre/lib/$_jarch/libawt_xawt.so \
+ jre/lib/$_jarch/libfontmanager.so \
+ jre/lib/$_jarch/libjawt.so \
+ jre/lib/$_jarch/libsplashscreen.so; do
+
+ local dirname=${A%/*}
mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname
- mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname
+ mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname || return 1
done
pax_mark_vm "$subpkgdir"/$INSTALL_BASE