summaryrefslogtreecommitdiff
path: root/dev-java/gcj-jdk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-java/gcj-jdk
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-java/gcj-jdk')
-rw-r--r--dev-java/gcj-jdk/Manifest6
-rw-r--r--dev-java/gcj-jdk/files/gcj-jdk.env.sh17
-rw-r--r--dev-java/gcj-jdk/files/javac.in57
-rw-r--r--dev-java/gcj-jdk/gcj-jdk-5.4.0-r1.ebuild107
-rw-r--r--dev-java/gcj-jdk/metadata.xml20
5 files changed, 207 insertions, 0 deletions
diff --git a/dev-java/gcj-jdk/Manifest b/dev-java/gcj-jdk/Manifest
new file mode 100644
index 000000000000..2b13aba4a931
--- /dev/null
+++ b/dev-java/gcj-jdk/Manifest
@@ -0,0 +1,6 @@
+AUX gcj-jdk.env.sh 571 SHA256 ebc87751e2f16e433d609bb7c6e2261a6523d5f37348c9dc0176ed60607193e2 SHA512 375f295da5eb6847345a4c3cc01bcd2b2d55f455b182f0cb235be8ed51a1520d6e50f7ca9d076da5ab27bc59878ce4c49a67b9e37c34a74c5b675439655ffb2b WHIRLPOOL cf212979950d4b2ed325addc04be83865af410df8247abe613009c94409c778b2733fea6cfcba7b3b37f6ea224508f27a6108cde17946824eccf4074e04023c2
+AUX javac.in 1739 SHA256 3bb23cff0a6e5a7a820e19cce4b9b0f51a7b84ee9e0eeb048b463a5f3e996db0 SHA512 65170b747012e114b072cd28a688089cdf2f54ddd151ba0cea92241b9b75fd0c7c410bfa4186cf9d233af4328bf962e13e8838a0cc09a1fbf2c28d29b13e36cb WHIRLPOOL 2237edd6abffdfb762d178e611768396f0b93a38f8a70f83c986049b60e26bb7084e3a38b70ed29c09df739091cdbfbfdd688e5eccee6ca4ea4006c23cf2b7d8
+EBUILD gcj-jdk-5.4.0-r1.ebuild 3712 SHA256 78c7e0f0d9b2660b4fedb12e5dc8ba79188da05060b6847eaf2c073a7022bc3e SHA512 1f26adc24f66091ed51890a6fb748f48340670b359be609bb34c55038add83aedf6c060503e232cb5e0749d60685e4b5ef71fba7d0863ef942f9cbab429660ee WHIRLPOOL c8b705b725a51c6cb3e474f8edd6d4e404b095d428f2323c930d985bc7789f16d2fb02604c6185186090202fd790f8983204f09a4bfee11432da5509ec02fa38
+MISC ChangeLog 4100 SHA256 7ebedd8e5cb9573ecc501d7511a14ba3e28c89476ac07cbffa7adc8575fcd997 SHA512 840738ec6e5b3a7556d7b6f9dd1cdb7ae5ad97fe756cfdcf20ae318339052cf571b699208242cd7309632063a4b1b1bc57403ffba20f3ad85f155ea17e919782 WHIRLPOOL 8b5e2b6baef74b824d95b8d34bed216da23d4d657bb73fedd8886181ba580c10c1f80f3207a28165cb0874f80c810f98c4fb366240c6d247549a57228b3adad0
+MISC ChangeLog-2015 5701 SHA256 76df37b27adf8ed9f0c803c16fa8f174a26dda5fd9916a58bbdb75f075a527e0 SHA512 4cb81aeea312050bdbb2538b495b886070136bee436050b7a7bc5b574a230afb53c5a6e3194f68aa0f1e6e728b0b5c52c038c24be9e7761405700bd9fd2374d2 WHIRLPOOL fd3ca14edbf2a8e77d5b5a469e1efd37d383934cd83b67fd68434f6d0dfb00eb73aded6514505a383ee6493e338d0a182a92ad484f0cebdbccb20d06bcb91609
+MISC metadata.xml 716 SHA256 f1e5a6f41f9e6855a708faac39035a6b8334f1631027c111d6cf8b28f2e38b43 SHA512 ccd737b1118329a85ecd3f5b19548bec4a2e425b20955b578287d4f82dce165c31aa016019407e8a5b138a48718b61089ca7f9678c549d29d0bb27cdd9c48e68 WHIRLPOOL 65b4550f5bce3f3a50dde219d7e467d3adf3902187af69591dda36f9bf63b7b5503e5a82499de6fdeb19866001cd0318a7cdbdcbfbb34cf2de5d55e9075695f9
diff --git a/dev-java/gcj-jdk/files/gcj-jdk.env.sh b/dev-java/gcj-jdk/files/gcj-jdk.env.sh
new file mode 100644
index 000000000000..ff967fa2c1c7
--- /dev/null
+++ b/dev-java/gcj-jdk/files/gcj-jdk.env.sh
@@ -0,0 +1,17 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+VERSION="GCJ ${PV}"
+JAVA_HOME="${EPREFIX}/usr/$(get_libdir)/${P}"
+JDK_HOME="${EPREFIX}/usr/$(get_libdir)/${P}"
+JAVAC="\${JAVA_HOME}/bin/javac"
+PATH="\${JAVA_HOME}/bin"
+ROOTPATH="\${JAVA_HOME}/bin"
+LDPATH="\${JAVA_HOME}/lib"
+INFOPATH="\${JAVA_HOME}/info"
+MANPATH="\${JAVA_HOME}/man"
+PROVIDES_TYPE="JDK JRE"
+PROVIDES_VERSION="1.5"
+BOOTCLASSPATH="\${JAVA_HOME}/jre/lib/rt.jar"
+GENERATION="2"
+ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH INFOPATH MANPATH"
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>