aboutsummaryrefslogtreecommitdiffstats
path: root/community/openjdk7
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-04-30 13:22:54 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-05-02 18:42:44 +0000
commit3890b6f8262cc217a37bb84d54e66e3eece8e9bd (patch)
tree658191afd4e964ea49b05acb1f7286bc0ebdfa09 /community/openjdk7
parentc20463c66bd46d7af14441b60694c42d839c7144 (diff)
downloadaports-3890b6f8262cc217a37bb84d54e66e3eece8e9bd.tar.bz2
aports-3890b6f8262cc217a37bb84d54e66e3eece8e9bd.tar.xz
community/openjdk7: fix messed indentation, global vars and modernize it
Diffstat (limited to 'community/openjdk7')
-rw-r--r--community/openjdk7/APKBUILD89
1 files changed, 46 insertions, 43 deletions
diff --git a/community/openjdk7/APKBUILD b/community/openjdk7/APKBUILD
index 528b0fa201..910e97083e 100644
--- a/community/openjdk7/APKBUILD
+++ b/community/openjdk7/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=openjdk7
_icedteaver=2.6.3
# pkgver is <JDK version>.<JDK update>
# check icedtea JDK when updating
pkgver=7.91.$_icedteaver
-pkgrel=1
+pkgrel=2
pkgdesc="Sun OpenJDK 7 via IcedTea"
url="http://icedtea.classpath.org/"
arch="all"
@@ -13,12 +14,12 @@ license="GPL2 with Classpath"
depends="$pkgname-jre"
options="sover-namecheck"
makedepends="bash findutils tar zip file paxmark gawk util-linux libxslt
- autoconf automake linux-headers
- 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
+ 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=""
# upstream binary versions
@@ -43,7 +44,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-doc:doc"
if [ "$BOOTSTRAP" != "no" ]; then
makedepends="$makedepends java-gcj-compat"
@@ -79,7 +80,7 @@ source="http://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz
# icedtea6-1.9.7-generate_cacerts-1.patch
-_builddir="$srcdir/icedtea-$_icedteaver"
+builddir="$srcdir/icedtea-$_icedteaver"
unpack() {
if [ -z "$force" ]; then
@@ -94,28 +95,28 @@ unpack() {
}
prepare() {
- cd "$_builddir"
+ cd "$builddir"
- # Busybox sha256 does not support longopts
- sed -e "s/--check/-c/g" -i Makefile.am
+ # Busybox sha256 does not support longopts
+ sed -e "s/--check/-c/g" -i Makefile.am
- for patch in $source; do
- case $patch in
+ for patch in $source; do
+ case $patch in
icedtea-*.patch)
cp ../$patch patches
;;
- *.patch)
- msg "Applying patch $patch"
- patch -p1 -i "$srcdir"/$patch || return 1
- ;;
- esac
- done
+ *.patch)
+ msg "Applying patch $patch"
+ patch -p1 -i "$srcdir"/$patch || return 1
+ ;;
+ esac
+ done
./autogen.sh
}
build() {
- [ -z "$JOBS" ] && export JOBS=`echo $MAKEFLAGS | sed -n -e 's/.*-j\([0-9]\+\).*/\1/p'`
+ [ -z "$JOBS" ] && export JOBS=$(echo $MAKEFLAGS | sed -n -e 's/.*-j\([0-9]\+\).*/\1/p')
export ALT_PARALLEL_COMPILE_JOBS="${JOBS:-2}"
export HOTSPOT_BUILD_JOBS="${JOBS:-2}"
@@ -133,7 +134,7 @@ build() {
done
echo "icedtea patches: $DISTRIBUTION_PATCHES"
- cd "$_builddir"
+ cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -162,16 +163,15 @@ build() {
make -j1 icedtea-boot || return 1
msg "Icedtea boot done"
make || return 1
-
}
package() {
mkdir -p "$pkgdir"/$INSTALL_BASE
- cp -a "$_builddir"/openjdk.build/j2sdk-image/* "$pkgdir"/$INSTALL_BASE
+ cp -a "$builddir"/openjdk.build/j2sdk-image/* "$pkgdir"/$INSTALL_BASE || return 1
rm "$pkgdir"/$INSTALL_BASE/src.zip
# pax mark again (due to fakeroot xattr handling bug)
- $_builddir/pax-mark-vm "$pkgdir"/$INSTALL_BASE
+ "$builddir"/pax-mark-vm "$pkgdir"/$INSTALL_BASE
}
jrelib() {
@@ -179,12 +179,13 @@ jrelib() {
arch="noarch"
depends=""
- for A in jre/lib/zi 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/zi 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
}
@@ -194,16 +195,16 @@ 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 again (due to fakeroot xattr handling bug)
- $_builddir/pax-mark-vm "$subpkgdir"/$INSTALL_BASE
+ "$builddir"/pax-mark-vm "$subpkgdir"/$INSTALL_BASE
}
jre() {
@@ -212,18 +213,19 @@ jre() {
depends="so:openjdk7:libjvm.so=0"
mkdir -p "$subpkgdir"
- for A in jre/bin/policytool \
- bin/appletviewer \
- bin/policytool \
- jre/lib/$_jarch/xawt \
- jre/lib/$_jarch/libsplashscreen.so ; do
- dirname=${A%/*}
+ local A; for A in jre/bin/policytool \
+ bin/appletviewer \
+ bin/policytool \
+ jre/lib/$_jarch/xawt \
+ 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 again (due to fakeroot xattr handling bug)
- $_builddir/pax-mark-vm "$subpkgdir"/$INSTALL_BASE
+ "$builddir"/pax-mark-vm "$subpkgdir"/$INSTALL_BASE
}
doc() {
@@ -232,6 +234,7 @@ doc() {
mkdir -p "$subpkgdir"/$INSTALL_BASE/
mv "$pkgdir"/$INSTALL_BASE/man "$subpkgdir"/$INSTALL_BASE/
}
+
md5sums="7bbc8dc603bf5abc87fe8c7ffcafeabe icedtea-2.6.3.tar.gz
be68af0132b4d6ff4faa089dbd92d840 openjdk-2.6.3.tar.bz2
a637ba113153688c3f1d04abd2062f3b corba-2.6.3.tar.bz2