diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-java/gcj-jdk | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/gcj-jdk')
-rw-r--r-- | dev-java/gcj-jdk/Manifest | 3 | ||||
-rw-r--r-- | dev-java/gcj-jdk/files/javac.in | 57 | ||||
-rw-r--r-- | dev-java/gcj-jdk/gcj-jdk-5.4.0-r1.ebuild | 107 | ||||
-rw-r--r-- | dev-java/gcj-jdk/metadata.xml | 20 |
4 files changed, 187 insertions, 0 deletions
diff --git a/dev-java/gcj-jdk/Manifest b/dev-java/gcj-jdk/Manifest new file mode 100644 index 000000000000..c88809112acf --- /dev/null +++ b/dev-java/gcj-jdk/Manifest @@ -0,0 +1,3 @@ +AUX javac.in 1739 BLAKE2B ff167bfba594dbfb71dd1d09e41ce502ebfcc598fbcef0794cb967c00894745f8b16412adc7b4afbd167878defa29351e99b30a71b4377987c5c8a692f404e30 SHA512 65170b747012e114b072cd28a688089cdf2f54ddd151ba0cea92241b9b75fd0c7c410bfa4186cf9d233af4328bf962e13e8838a0cc09a1fbf2c28d29b13e36cb +EBUILD gcj-jdk-5.4.0-r1.ebuild 3712 BLAKE2B 1bb67b0f28281f8d213111ff6e3e362199ccf05ae56587b20dcd8975479f284bc0c0aa6850a85a4418b04d9fb7be491ab3c12e174c7680e997e7e3bdda130278 SHA512 1f26adc24f66091ed51890a6fb748f48340670b359be609bb34c55038add83aedf6c060503e232cb5e0749d60685e4b5ef71fba7d0863ef942f9cbab429660ee +MISC metadata.xml 716 BLAKE2B 1467e6d569030367c7983485d8a2159105c2d69e067878e0fce02e33e6604739cf54f84da3a77852f6722d71d060b2d56745b22f0818d5ba958851e1a5dcff0c SHA512 ccd737b1118329a85ecd3f5b19548bec4a2e425b20955b578287d4f82dce165c31aa016019407e8a5b138a48718b61089ca7f9678c549d29d0bb27cdd9c48e68 diff --git a/dev-java/gcj-jdk/files/javac.in b/dev-java/gcj-jdk/files/javac.in new file mode 100644 index 000000000000..8eeda68c7a5e --- /dev/null +++ b/dev-java/gcj-jdk/files/javac.in @@ -0,0 +1,57 @@ +#!/usr/bin/perl -w +use strict; +use constant NO_DUP_ARGS => qw(-source -target -d -encoding); +use constant STRIP_ARGS => qw(-Werror -implicit:none -J-Xbootclasspath/p:); + +my $ECJ_WARNINGS="-nowarn"; + +my ( @bcoption, @source15, @target15, @cp ); +push @bcoption, '-bootclasspath', '@RT_JAR@:@TOOLS_JAR@' + unless grep {$_ eq '-bootclasspath'} @ARGV; +push @source15, '-source', '1.5' + unless grep {$_ eq '-source'} @ARGV; +push @target15, '-target', '1.5' + unless grep {$_ eq '-target'} @ARGV; +push @cp, '-cp', '.' + unless grep {$_ =~ '\-c(p|lasspath)'} @ARGV or $ENV{CLASSPATH}; +my @ecj_parms = ($ECJ_WARNINGS, @bcoption, @source15, @target15, @cp); + +# Work around ecj's inability to handle duplicate command-line +# options and unknown javac options. +sub gen_ecj_opts +{ + my @new_args = @{$_[0]}; + + for my $opt (NO_DUP_ARGS) + { + my @indices = reverse grep {$new_args[$_] eq $opt} 0..$#new_args; + if (@indices > 1) { + shift @indices; # keep last instance only + splice @new_args, $_, 2 for @indices; + } + } + + for my $opt (STRIP_ARGS) + { + my @indices = reverse grep {$new_args[$_] eq $opt} 0..$#new_args; + splice @new_args, $_, 1 for @indices; + } + + return \@new_args; +} + +sub split_vm_args +{ + my @new_args = @{$_[0]}; + + my @vm_args = map { substr $_, 2 } grep $_ =~ /^-J/, @new_args; + my @javac_args = grep $_ !~ /^-J/, @new_args; + + return (\@vm_args, \@javac_args); +} + +my ($vm_args, $javac_args) = split_vm_args (gen_ecj_opts( \@ARGV )); +my @CLASSPATH = ('@ECJ_JAR@'); +push @CLASSPATH, split /:/, $ENV{"CLASSPATH"} if exists $ENV{"CLASSPATH"}; +$ENV{"CLASSPATH"} = join ':', @CLASSPATH; +exec '@JAVA@', @$vm_args, 'org.eclipse.jdt.internal.compiler.batch.Main', @ecj_parms, @$javac_args; diff --git a/dev-java/gcj-jdk/gcj-jdk-5.4.0-r1.ebuild b/dev-java/gcj-jdk/gcj-jdk-5.4.0-r1.ebuild new file mode 100644 index 000000000000..c56dd496f7c1 --- /dev/null +++ b/dev-java/gcj-jdk/gcj-jdk-5.4.0-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit java-vm-2 + +DESCRIPTION="Java wrappers around GCJ" +HOMEPAGE="https://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~x86-linux" +SLOT="0" +IUSE="awt" + +API_DIFF_PV="4.9.2" + +# perl is needed for javac wrapper +RDEPEND=" + dev-java/ecj-gcj:* + dev-lang/perl + ~sys-devel/gcc-${PV}[awt?,gcj]" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +src_install() { + # jre lib paths ... + local libarch="$(get_system_arch)" + local gcc_version=${PV} + local gccbin=$(gcc-config -B ${gcc_version}) + gccbin=${gccbin#"${EPREFIX}"} + local gcclib=$(gcc-config -L ${gcc_version} | cut -d':' -f1) + gcclib=${gcclib#"${EPREFIX}"} + local gcjhome="/usr/$(get_libdir)/${P}" + local gcjprefix="${EPREFIX}${gcjhome}" + local gccchost="${CHOST}" + local gcjlibdir=$(echo "${EPREFIX}"/usr/$(get_libdir)/gcj-${gcc_version}-*) + gcjlibdir=${gcjlibdir#"${EPREFIX}"} + + # links + dodir ${gcjhome}/bin + dodir ${gcjhome}/jre/bin + dosym ${gccbin}/gij ${gcjhome}/bin/java + dosym ${gccbin}/gij ${gcjhome}/jre/bin/java + dosym ${gccbin}/gjar ${gcjhome}/bin/jar + dosym ${gccbin}/gjdoc ${gcjhome}/bin/javadoc + dosym ${gccbin}/grmic ${gcjhome}/bin/rmic + dosym ${gccbin}/gjavah ${gcjhome}/bin/javah + dosym ${gccbin}/jcf-dump ${gcjhome}/bin/javap + dosym ${gccbin}/gappletviewer ${gcjhome}/bin/appletviewer + dosym ${gccbin}/gjarsigner ${gcjhome}/bin/jarsigner + dosym ${gccbin}/grmiregistry ${gcjhome}/bin/rmiregistry + dosym ${gccbin}/grmiregistry ${gcjhome}/jre/bin/rmiregistry + dosym ${gccbin}/gkeytool ${gcjhome}/bin/keytool + dosym ${gccbin}/gkeytool ${gcjhome}/jre/bin/keytool + dosym ${gccbin}/gnative2ascii ${gcjhome}/bin/native2ascii + dosym ${gccbin}/gorbd ${gcjhome}/bin/orbd + dosym ${gccbin}/gorbd ${gcjhome}/jre/bin/orbd + dosym ${gccbin}/grmid ${gcjhome}/bin/rmid + dosym ${gccbin}/grmid ${gcjhome}/jre/bin/rmid + dosym ${gccbin}/gserialver ${gcjhome}/bin/serialver + dosym ${gccbin}/gtnameserv ${gcjhome}/bin/tnameserv + dosym ${gccbin}/gtnameserv ${gcjhome}/jre/bin/tnameserv + + dodir ${gcjhome}/jre/lib/${libarch}/client + dodir ${gcjhome}/jre/lib/${libarch}/server + dosym ${gcjlibdir}/libjvm.so ${gcjhome}/jre/lib/${libarch}/client/libjvm.so + dosym ${gcjlibdir}/libjvm.so ${gcjhome}/jre/lib/${libarch}/server/libjvm.so + use awt && dosym ${gcjlibdir}/libjawt.so ${gcjhome}/jre/lib/${libarch}/libjawt.so + + dosym /usr/share/gcc-data/${gccchost}/${gcc_version}/java/libgcj-${gcc_version/_/-}.jar \ + ${gcjhome}/jre/lib/rt.jar + dodir ${gcjhome}/lib + dosym /usr/share/gcc-data/${gccchost}/${gcc_version}/java/libgcj-tools-${gcc_version/_/-}.jar \ + ${gcjhome}/lib/tools.jar + dosym ${gcclib}/include ${gcjhome}/include + + exeinto ${gcjhome}/bin + sed -e "s#@JAVA@#${gcjprefix}/bin/java#" \ + -e "s#@ECJ_JAR@#${EPREFIX}/usr/share/eclipse-ecj/ecj.jar#" \ + -e "s#@RT_JAR@#${gcjprefix}/jre/lib/rt.jar#" \ + -e "s#@TOOLS_JAR@#${gcjprefix}/lib/tools.jar#" \ + "${FILESDIR}"/javac.in \ + | newexe - javac + assert + + java-vm_install-env +} + +pkg_postinst() { + # Do not set as system VM (see below) + # java-vm-2_pkg_postinst + + ewarn "gcj does not currently provide all the 1.5 or 1.6 APIs." + ewarn "See http://fuseyism.com/japi/ibmjdk15-libgcj-${API_DIFF_PV}.html" + ewarn "and http://fuseyism.com/japi/icedtea6-libgcj-${API_DIFF_PV}.html" + ewarn "Check for existing bugs relating to missing APIs and file" + ewarn "new ones at https://gcc.gnu.org/bugzilla/" + ewarn + ewarn "Due to this and limited manpower, we currently cannot support" + ewarn "using gcj-jdk as a system VM. Its main purpose is to bootstrap" + ewarn "IcedTea without prior binary VM installation. To do that, execute:" + ewarn + ewarn "emerge -o icedtea && emerge icedtea" +} diff --git a/dev-java/gcj-jdk/metadata.xml b/dev-java/gcj-jdk/metadata.xml new file mode 100644 index 000000000000..45bb61f874f0 --- /dev/null +++ b/dev-java/gcj-jdk/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gnu_andrew@member.fsf.org</email> + <name>Andrew John Hughes</name> + </maintainer> + <maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription>This provides a JDK wrapper for GCJ, in the style of gcj-java-compat in other distributions.</longdescription> + <use> + <flag name="awt">Install AWT libraries, needed by some GUIs (not needed to build icedtea)</flag> + </use> +</pkgmetadata> |