diff options
author | Timo Teras <timo.teras@iki.fi> | 2011-03-26 22:13:20 +0000 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2011-03-26 22:15:51 +0000 |
commit | 01781c2e944c0ae23f641f7def9b0ab94f865ad4 (patch) | |
tree | 12b72e5f17ee85d9757a4cd6614b17f739b99efb | |
parent | a31fe528bf0fd9b02f1c4850a183096f99d33c73 (diff) | |
download | aports-01781c2e944c0ae23f641f7def9b0ab94f865ad4.tar.bz2 aports-01781c2e944c0ae23f641f7def9b0ab94f865ad4.tar.xz |
testing/java-gcj-compat: new aport
provide a Java SDK like environment using gcc java. this
might be worth moving to main gcc package as subpackage at
some point.
-rw-r--r-- | testing/java-gcj-compat/APKBUILD | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/testing/java-gcj-compat/APKBUILD b/testing/java-gcj-compat/APKBUILD new file mode 100644 index 000000000..bf0985496 --- /dev/null +++ b/testing/java-gcj-compat/APKBUILD @@ -0,0 +1,65 @@ +# Contributor: Timo Teras <timo.teras@iki.fi> +# Maintainer: Timo Teras <timo.teras@iki.fi> + +gccver=`(. ../../main/gcc/APKBUILD ; echo "$pkgver")` +gccpkgrel=`(. ../../main/gcc/APKBUILD ; echo "$pkgrel")` + +pkgname=java-gcj-compat +pkgver=$gccver +_mypkgrel=0 +pkgrel=$(( $_mypkgrel + $gccpkgrel )) +pkgdesc="JDK like environment using GCJ" +url="http://git.alpinelinux.org/aports.git" +arch="all" +license="GPL" +depends="fastjar gcc-java=$gccver-r$gccpkgrel java-common" +makedepends="gcc-java=$gccver-r$gccpkgrel" +install="" +subpackages="" +source="" + +_builddir="$srcdir/$pkgname-$pkgver" + +build() { + mkdir -p $_builddir + cd $_builddir + gcj -Wl,-Bsymbolic -findirect-dispatch -o ecj \ + --main=org.eclipse.jdt.internal.compiler.batch.Main \ + /usr/share/java/ecj.jar +} + +package() { + JVM_DIR=$pkgdir/usr/lib/jvm + JDK_DIR=$JVM_DIR/java-1.5-gcj + JDK_BIN_DIR=$JDK_DIR/bin + JRE_DIR=$JDK_DIR/jre + JRE_BIN_DIR=$JRE_DIR/bin + JRE_LIB_DIR=$JRE_DIR/lib + + CPU=$(uname -m | sed -e 's/i.86/i386/g') + + mkdir -p $JDK_BIN_DIR + ln -sf ../../../../bin/gij $JDK_BIN_DIR/java + ln -sf ../../../../bin/fastjar $JDK_BIN_DIR/fastjar + ln -sf ../../../../bin/sinjdoc $JDK_BIN_DIR/javadoc + ln -sf ../../../../bin/grmic $JDK_BIN_DIR/rmic + ln -sf ../../../../bin/gjavah $JDK_BIN_DIR/javah + install -s $_builddir/ecj $JDK_BIN_DIR/javac + ln -sf ../../../../bin/gappletviewer $JDK_BIN_DIR/appletviewer + ln -sf ../../../../bin/gjarsigner $JDK_BIN_DIR/jarsigner + ln -sf ../../../../bin/grmiregistry $JDK_BIN_DIR/rmiregistry + ln -sf ../../../../bin/gkeytool $JDK_BIN_DIR/keytool + + gcjrel=`ls -d /usr/lib/gcj-$gccver-* | cut -d '-' -f 3` + + mkdir -p $JRE_BIN_DIR $JRE_LIB_DIR/$CPU + ln -sf ../../../../../bin/gij $JRE_BIN_DIR/java + ln -sf ../../../../../bin/grmiregistry $JRE_BIN_DIR/rmiregistry + ln -sf ../../../../../bin/gkeytool $JRE_BIN_DIR/keytool + ln -sf ../../../../../share/java/libgcj-$gccver.jar $JRE_LIB_DIR/rt.jar + ln -sf ../../../../../share/java/libgcj-tools-$gccver.jar $JRE_LIB_DIR/tools.jar + ln -sf ../../../../../../lib/gcj-$gccver-$gcjrel/libjvm.so $JRE_LIB_DIR/$CPU + ln -sf ../../../../../../lib/gcj-$gccver-$gcjrel/libjavamath.so $JRE_LIB_DIR/$CPU + ln -sf ../../../../../../lib/gcj-$gccver-$gcjrel/classmap.db $JRE_LIB_DIR/$CPU +} + |