From 8df75f19c2f62e74b5229fb59ffa8b635b0494b2 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 8 Sep 2015 09:36:11 +0200 Subject: [PATCH] gcc: add gcc-gcj-jdk-compat subpackage --- srcpkgs/gcc/template | 48 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template index ff35ecd07d0..bfad7fa2256 100644 --- a/srcpkgs/gcc/template +++ b/srcpkgs/gcc/template @@ -2,13 +2,14 @@ pkgname=gcc _majorver=4.9 version=${_majorver}.3 -revision=1 +revision=2 short_desc="The GNU C Compiler" maintainer="Juan RP " homepage="http://gcc.gnu.org" license="GFDL-1.2, GPL-3, LGPL-2.1" distfiles="http://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-$version.tar.bz2" checksum=2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e +_gcjrel=15 lib32disabled=yes bootstrap=yes @@ -34,7 +35,7 @@ if [ -n "$CHROOT_READY" -a -z "$CROSS_BUILD" ]; then *) # Required by gcj hostmakedepends+=" zip unzip" - subpackages+=" gcc-go libgo-devel libgo gcc-gcj libgcj-devel libgcj" + subpackages+=" gcc-go libgo-devel libgo gcc-gcj libgcj-devel libgcj gcc-gcj-jdk-compat" ;; esac fi @@ -244,6 +245,47 @@ gcc-gcj_package() { touch ${PKGDESTDIR}/usr/share/info/dir } } +gcc-gcj-jdk-compat_package() { + lib32disabled=yes + depends="gcc-gcj fastjar" + short_desc+=" - JDK compatiblity layer" + pkg_install() { + local jvm_dir=$PKGDESTDIR/usr/lib/jvm + local jdk_dir=$jvm_dir/java-1.5-gcj + local jdk_bin_dir=$jdk_dir/bin + local jre_dir=$jdk_dir/jre + local jre_bin_dir=$jre_dir/bin + local jre_lib_dir=$jre_dir/lib + + local arch= + case "$XBPS_TARGET_MACHINE" in + i686*) arch=i386 ;; + x86_64*) arch=amd64 ;; + arm*) arch=arm ;; + esac + + mkdir -p $jdk_bin_dir + ln -sfr $PKGDESTDIR/usr/bin/gij $jdk_bin_dir/java + ln -sfr $PKGDESTDIR/usr/bin/fastjar $jdk_bin_dir/fastjar + ln -sfr $PKGDESTDIR/usr/bin/grmic $jdk_bin_dir/rmic + ln -sfr $PKGDESTDIR/usr/bin/gjavah $jdk_bin_dir/javah + ln -sfr $PKGDESTDIR/usr/bin/ecj1 $jdk_bin_dir/javac + ln -sfr $PKGDESTDIR/usr/bin/gappletviewer $jdk_bin_dir/appletviewer + ln -sfr $PKGDESTDIR/usr/bin/gjarsigner $jdk_bin_dir/jarsigner + ln -sfr $PKGDESTDIR/usr/bin/grmiregistry $jdk_bin_dir/rmiregistry + ln -sfr $PKGDESTDIR/usr/bin/gkeytool $jdk_bin_dir/keytool + + mkdir -p $jre_bin_dir $jre_lib_dir/$arch + ln -sfr $PKGDESTDIR/usr/bin/gij $jre_bin_dir/java + ln -sfr $PKGDESTDIR/usr/bin/grmiregistry $jre_bin_dir/rmiregistry + ln -sfr $PKGDESTDIR/usr/bin/gkeytool $jre_bin_dir/keytool + ln -sfr $PKGDESTDIR/usr/share/java/libgcj-$gccver.jar $jre_lib_dir/rt.jar + ln -sfr $PKGDESTDIR/usr/share/java/libgcj-tools-$gccver.jar $jre_lib_dir/tools.jar + ln -sfr $PKGDESTDIR/usr/lib/gcj-$version-$_gcjrel/libjvm.so $jre_lib_dir/$arch + ln -sfr $PKGDESTDIR/usr/lib/gcj-$version-$_gcjrel/libjavamath.so $jre_lib_dir/$arch + ln -sfr $PKGDESTDIR/usr/lib/gcj-$version-$_gcjrel/classmap.db $jre_lib_dir/$arch + } +} gcc-go_package() { lib32disabled=yes depends="gcc>=${_majorver} libgo-devel>=${_majorver}" @@ -313,7 +355,7 @@ libgcj_package() { pkg_install() { vmove "usr/lib/libgcj*.so*" vmove "usr/lib/libgij.so*" - vmove usr/lib/gcj-${version}-15 + vmove usr/lib/gcj-${version}-$_gcjrel vmove usr/lib/logging.properties vmove usr/lib/libgcj.spec vmove usr/lib/security/classpath.security