mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-09 18:47:16 -08:00
dev-java/gcj-jdk: treeclean
Closes: https://bugs.gentoo.org/531900 Closes: https://bugs.gentoo.org/465572 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
#!/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;
|
||||
@@ -1,107 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit java-vm-2
|
||||
|
||||
DESCRIPTION="Java wrappers around GCJ"
|
||||
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
|
||||
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"
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<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" proxied="proxy">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="awt">Install AWT libraries, needed by some GUIs (not needed to build icedtea)</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
@@ -319,7 +319,6 @@ dev-java/spin
|
||||
# Unused java libraries. Removal in 30 days.
|
||||
dev-java/boot-bin
|
||||
dev-java/eclipsito
|
||||
dev-java/gcj-jdk
|
||||
|
||||
# David Seifert <soap@gentoo.org> (2022-04-17)
|
||||
# Dead library, part of >=sys-fs/e2fsprogs-1.46.5 now, bug #806875,
|
||||
|
||||
Reference in New Issue
Block a user