summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Wulf C. Krueger <philantrop@exherbo.org> 2016-07-23 18:14:02 +0200
committerAvatar Wulf C. Krueger <philantrop@exherbo.org> 2016-07-23 18:14:19 +0200
commit8213ba03970e8901ea83cde0184f5ebca807fc1e (patch)
treeda42f1c547d22120d65279d75207055596d2fa3f
parentb696ece8a2fa924e4bdddeca4aa750926c5548a7 (diff)
downloadjava-8213ba03970e8901ea83cde0184f5ebca807fc1e.tar.gz
java-8213ba03970e8901ea83cde0184f5ebca807fc1e.tar.xz
Initial exheres for icedtea8-3.0.1
-rw-r--r--exlibs/icedtea.exlib39
-rw-r--r--packages/dev-lang/icedtea8/files/0001-Drop-bogus-toolchain-checks.patch107
-rw-r--r--packages/dev-lang/icedtea8/files/generate-cacerts.pl358
-rw-r--r--packages/dev-lang/icedtea8/icedtea8-3.0.1.exheres-031
-rw-r--r--packages/dev-lang/icedtea8/icedtea8.exlib149
5 files changed, 675 insertions, 9 deletions
diff --git a/exlibs/icedtea.exlib b/exlibs/icedtea.exlib
index 84b61ca..75bd8d2 100644
--- a/exlibs/icedtea.exlib
+++ b/exlibs/icedtea.exlib
@@ -1,4 +1,4 @@
-# Copyright 2011-2015 Wulf C. Krueger <philantrop@exherbo.org>
+# Copyright 2011-2016 Wulf C. Krueger <philantrop@exherbo.org>
# Distributed under the terms of the GNU General Public License v2
require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 1.13 1.12 1.11 1.10 ] ] \
@@ -56,7 +56,6 @@ DEPENDENCIES="
x11-libs/libXt
x11-libs/libXtst
x11-libs/pango
- javascript? ( dev-java/rhino )
providers:ijg-jpeg? ( media-libs/jpeg:=[>=7] )
providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
suggestion:
@@ -64,16 +63,34 @@ DEPENDENCIES="
"
# shark? ( dev-lang/llvm )
+if ! ever at_least 3.0 ; then
+ DEPENDENCIES+="
+ build+run:
+ javascript? ( dev-java/rhino )
+ "
+fi
+
MYOPTIONS="
- bootstrap [[ description = [ Bootstrap ${PN} with a pre-compiled binary rather than an already
- installed ${PN}. ] requires = [ -javascript ] ]]
doc
examples
- javascript [[ description = [ Build the JavaScript 1.5 compatible Rhino engine ] ]]
( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
( platform: amd64 x86 )
"
+if ! ever at_least 3.0 ; then
+ MYOPTIONS+="
+ bootstrap [[ description = [ Bootstrap ${PN} with a pre-compiled binary rather than an already
+ installed ${PN}. ] requires = [ -javascript ] ]]
+ javascript [[ description = [ Build the JavaScript 1.5 compatible Rhino engine ] ]]
+ "
+else
+ MYOPTIONS+="
+ bootstrap [[ description = [ Bootstrap ${PN} with a pre-compiled binary rather than an already
+ installed ${PN}. ] ]]
+ "
+fi
+
+
# cacao [[ description = [ Build CACAO, a HotSpot VM replacement which works on more CPU
# architectures ] ]]
# zero [[ description = [ Enable Zero, a no-assembler, purely interpreted build of the
@@ -156,11 +173,15 @@ icedtea_src_install() {
# everything manually.
edo cd "${build_target}"
- # Install some extra docs.
- if option doc ; then
- dodoc -r docs/*
+ if ! ever at_least 3.0 ; then
+ # Install some extra docs.
+ if option doc ; then
+ dodoc -r docs/*
+ fi
+ edo cd "${build_target}"/j2sdk-image
+ else
+ edo cd "${build_target}"/images/j2sdk-image
fi
- edo cd "${build_target}"/j2sdk-image
# The minimal set of standard docs.
dodoc ASSEMBLY_EXCEPTION THIRD_PARTY_README
diff --git a/packages/dev-lang/icedtea8/files/0001-Drop-bogus-toolchain-checks.patch b/packages/dev-lang/icedtea8/files/0001-Drop-bogus-toolchain-checks.patch
new file mode 100644
index 0000000..189ae08
--- /dev/null
+++ b/packages/dev-lang/icedtea8/files/0001-Drop-bogus-toolchain-checks.patch
@@ -0,0 +1,107 @@
+From 34bab0267696f398a2d4af4ff8a1832d2166fdc4 Mon Sep 17 00:00:00 2001
+From: "Wulf C. Krueger" <philantrop@exherbo.org>
+Date: Sat, 23 Jul 2016 17:14:53 +0200
+Subject: [PATCH] Drop bogus toolchain checks
+
+---
+ patches/0001-Drop-bogus-toolchain-checks.patch | 88 ++++++++++++++++++++++++++
+ 1 file changed, 88 insertions(+)
+ create mode 100644 patches/0001-Drop-bogus-toolchain-checks.patch
+
+diff --git a/patches/0001-Drop-bogus-toolchain-checks.patch b/patches/0001-Drop-bogus-toolchain-checks.patch
+new file mode 100644
+index 0000000..81b5388
+--- /dev/null
++++ b/patches/0001-Drop-bogus-toolchain-checks.patch
+@@ -0,0 +1,88 @@
++From 3c86b7fbb4ba0dd7b9c3e661de797a271e5ae0bf Mon Sep 17 00:00:00 2001
++From: "Wulf C. Krueger" <philantrop@exherbo.org>
++Date: Sat, 23 Jul 2016 17:13:34 +0200
++Subject: [PATCH] Drop bogus toolchain checks
++
++---
++ openjdk/common/autoconf/generated-configure.sh | 34 --------------------------
++ openjdk/common/autoconf/toolchain.m4 | 12 ---------
++ 2 files changed, 46 deletions(-)
++
++diff --git a/openjdk/common/autoconf/generated-configure.sh b/openjdk/common/autoconf/generated-configure.sh
++index bf628de..fcd4a4d 100644
++--- openjdk/common/autoconf/generated-configure.sh
+++++ openjdk/common/autoconf/generated-configure.sh
++@@ -20032,23 +20032,6 @@ $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\
++ COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
++ # Check that this is GCC or the compatible distcc.
++ $COMPILER --version 2>&1 | $GREP -E "^(gcc|g\+\+|distcc)" >&5 2>&1
++- if test $? -ne 0; then
++- { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler." >&5
++-$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler." >&6;}
++- { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
++-$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
++- $COMPILER --version 2>&1 | $GREP "clang" >&5 2>&1
++- if test $? -ne 0 ; then
++- { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either." >&5
++-$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either." >&6;}
++- { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
++-$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
++- as_fn_error $? "GCC or Clang compiler is required. Try setting --with-tools-dir." "$LINENO" 5
++- else
++- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Clang compiler detected. The GCC compiler is recommended." >&5
++-$as_echo "$as_me: WARNING: Clang compiler detected. The GCC compiler is recommended." >&2;}
++- fi
++- fi
++
++ # First line typically looks something like:
++ # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
++@@ -21213,23 +21196,6 @@ $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\
++ COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
++ # Check that this is GCC or the compatible distcc.
++ $COMPILER --version 2>&1 | $GREP -E "^(gcc|g\+\+|distcc)" >&5 2>&1
++- if test $? -ne 0; then
++- { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler." >&5
++-$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler." >&6;}
++- { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
++-$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
++- $COMPILER --version 2>&1 | $GREP "clang" >&5 2>&1
++- if test $? -ne 0 ; then
++- { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either." >&5
++-$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either." >&6;}
++- { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
++-$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
++- as_fn_error $? "GCC or Clang compiler is required. Try setting --with-tools-dir." "$LINENO" 5
++- else
++- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Clang compiler detected. The GCC compiler is recommended." >&5
++-$as_echo "$as_me: WARNING: Clang compiler detected. The GCC compiler is recommended." >&2;}
++- fi
++- fi
++
++ # First line typically looks something like:
++ # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
++diff --git a/openjdk/common/autoconf/toolchain.m4 b/openjdk/common/autoconf/toolchain.m4
++index c0fbf73..f1f501f 100644
++--- openjdk/common/autoconf/toolchain.m4
+++++ openjdk/common/autoconf/toolchain.m4
++@@ -73,18 +73,6 @@ AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
++ COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
++ # Check that this is GCC or the compatible distcc.
++ $COMPILER --version 2>&1 | $GREP -E "^(gcc|g\+\+|distcc)" >&AS_MESSAGE_LOG_FD 2>&1
++- if test $? -ne 0; then
++- AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler.])
++- AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"])
++- $COMPILER --version 2>&1 | $GREP "clang" >&AS_MESSAGE_LOG_FD 2>&1
++- if test $? -ne 0 ; then
++- AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either.])
++- AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"])
++- AC_MSG_ERROR([GCC or Clang compiler is required. Try setting --with-tools-dir.])
++- else
++- AC_MSG_WARN([Clang compiler detected. The GCC compiler is recommended.])
++- fi
++- fi
++
++ # First line typically looks something like:
++ # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
++--
++2.9.2
++
+--
+2.9.2
+
diff --git a/packages/dev-lang/icedtea8/files/generate-cacerts.pl b/packages/dev-lang/icedtea8/files/generate-cacerts.pl
new file mode 100644
index 0000000..17d29b3
--- /dev/null
+++ b/packages/dev-lang/icedtea8/files/generate-cacerts.pl
@@ -0,0 +1,358 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# generate-cacerts.pl generates a JKS keystore named 'cacerts' from
+# OpenSSL's certificate bundle using OpenJDK's keytool.
+
+# First extract each of OpenSSL's bundled certificates into its own
+# aliased filename.
+
+# Downloaded from http://cvs.fedoraproject.org/viewvc/rpms/ca-certificates/F-12/generate-cacerts.pl?revision=1.2
+# Check and prevention of duplicate aliases added by Vlastimil Babka <caster@gentoo.org>
+
+$file = $ARGV[1];
+open(CERTS, $file);
+@certs = <CERTS>;
+close(CERTS);
+
+$pem_file_count = 0;
+$in_cert_block = 0;
+$write_current_cert = 1;
+foreach $cert (@certs)
+{
+ if ($cert =~ /Issuer: /)
+ {
+ $_ = $cert;
+ if ($cert =~ /personal-freemail/)
+ {
+ $cert_alias = "thawtepersonalfreemailca";
+ }
+ elsif ($cert =~ /personal-basic/)
+ {
+ $cert_alias = "thawtepersonalbasicca";
+ }
+ elsif ($cert =~ /personal-premium/)
+ {
+ $cert_alias = "thawtepersonalpremiumca";
+ }
+ elsif ($cert =~ /server-certs/)
+ {
+ $cert_alias = "thawteserverca";
+ }
+ elsif ($cert =~ /premium-server/)
+ {
+ $cert_alias = "thawtepremiumserverca";
+ }
+ elsif ($cert =~ /Class 1 Public Primary Certification Authority$/)
+ {
+ $cert_alias = "verisignclass1ca";
+ }
+ elsif ($cert =~ /Class 1 Public Primary Certification Authority - G2/)
+ {
+ $cert_alias = "verisignclass1g2ca";
+ }
+ elsif ($cert =~
+ /VeriSign Class 1 Public Primary Certification Authority - G3/)
+ {
+ $cert_alias = "verisignclass1g3ca";
+ }
+ elsif ($cert =~ /Class 2 Public Primary Certification Authority$/)
+ {
+ $cert_alias = "verisignclass2ca";
+ }
+ elsif ($cert =~ /Class 2 Public Primary Certification Authority - G2/)
+ {
+ $cert_alias = "verisignclass2g2ca";
+ }
+ elsif ($cert =~
+ /VeriSign Class 2 Public Primary Certification Authority - G3/)
+ {
+ $cert_alias = "verisignclass2g3ca";
+ }
+ elsif ($cert =~ /Class 3 Public Primary Certification Authority$/)
+ {
+ $cert_alias = "verisignclass3ca";
+ }
+ # Version 1 of Class 3 Public Primary Certification Authority
+ # - G2 is added. Version 3 is excluded. See below.
+ elsif ($cert =~
+ /VeriSign Class 3 Public Primary Certification Authority - G3/)
+ {
+ $cert_alias = "verisignclass3g3ca";
+ }
+ elsif ($cert =~
+ /RSA Data Security.*Secure Server Certification Authority/)
+ {
+ $cert_alias = "verisignserverca";
+ }
+ elsif ($cert =~ /GTE CyberTrust Global Root/)
+ {
+ $cert_alias = "gtecybertrustglobalca";
+ }
+ elsif ($cert =~ /Baltimore CyberTrust Root/)
+ {
+ $cert_alias = "baltimorecybertrustca";
+ }
+ elsif ($cert =~ /www.entrust.net\/Client_CA_Info\/CPS/)
+ {
+ $cert_alias = "entrustclientca";
+ }
+ elsif ($cert =~ /www.entrust.net\/GCCA_CPS/)
+ {
+ $cert_alias = "entrustglobalclientca";
+ }
+ elsif ($cert =~ /www.entrust.net\/CPS_2048/)
+ {
+ $cert_alias = "entrust2048ca";
+ }
+ elsif ($cert =~ /www.entrust.net\/CPS /)
+ {
+ $cert_alias = "entrustsslca";
+ }
+ elsif ($cert =~ /www.entrust.net\/SSL_CPS/)
+ {
+ $cert_alias = "entrustgsslca";
+ }
+ elsif ($cert =~ /The Go Daddy Group/)
+ {
+ $cert_alias = "godaddyclass2ca";
+ }
+ elsif ($cert =~ /Starfield Class 2 Certification Authority/)
+ {
+ $cert_alias = "starfieldclass2ca";
+ }
+ elsif ($cert =~ /ValiCert Class 2 Policy Validation Authority/)
+ {
+ $cert_alias = "valicertclass2ca";
+ }
+ elsif ($cert =~ /GeoTrust Global CA$/)
+ {
+ $cert_alias = "geotrustglobalca";
+ }
+ elsif ($cert =~ /Equifax Secure Certificate Authority/)
+ {
+ $cert_alias = "equifaxsecureca";
+ }
+ elsif ($cert =~ /Equifax Secure eBusiness CA-1/)
+ {
+ $cert_alias = "equifaxsecureebusinessca1";
+ }
+ elsif ($cert =~ /Equifax Secure eBusiness CA-2/)
+ {
+ $cert_alias = "equifaxsecureebusinessca2";
+ }
+ elsif ($cert =~ /Equifax Secure Global eBusiness CA-1/)
+ {
+ $cert_alias = "equifaxsecureglobalebusinessca1";
+ }
+ elsif ($cert =~ /Sonera Class1 CA/)
+ {
+ $cert_alias = "soneraclass1ca";
+ }
+ elsif ($cert =~ /Sonera Class2 CA/)
+ {
+ $cert_alias = "soneraclass2ca";
+ }
+ elsif ($cert =~ /AAA Certificate Services/)
+ {
+ $cert_alias = "comodoaaaca";
+ }
+ elsif ($cert =~ /AddTrust Class 1 CA Root/)
+ {
+ $cert_alias = "addtrustclass1ca";
+ }
+ elsif ($cert =~ /AddTrust External CA Root/)
+ {
+ $cert_alias = "addtrustexternalca";
+ }
+ elsif ($cert =~ /AddTrust Qualified CA Root/)
+ {
+ $cert_alias = "addtrustqualifiedca";
+ }
+ elsif ($cert =~ /UTN-USERFirst-Hardware/)
+ {
+ $cert_alias = "utnuserfirsthardwareca";
+ }
+ elsif ($cert =~ /UTN-USERFirst-Client Authentication and Email/)
+ {
+ $cert_alias = "utnuserfirstclientauthemailca";
+ }
+ elsif ($cert =~ /UTN - DATACorp SGC/)
+ {
+ $cert_alias = "utndatacorpsgcca";
+ }
+ elsif ($cert =~ /UTN-USERFirst-Object/)
+ {
+ $cert_alias = "utnuserfirstobjectca";
+ }
+ elsif ($cert =~ /America Online Root Certification Authority 1/)
+ {
+ $cert_alias = "aolrootca1";
+ }
+ elsif ($cert =~ /DigiCert Assured ID Root CA/)
+ {
+ $cert_alias = "digicertassuredidrootca";
+ }
+ elsif ($cert =~ /DigiCert Global Root CA/)
+ {
+ $cert_alias = "digicertglobalrootca";
+ }
+ elsif ($cert =~ /DigiCert High Assurance EV Root CA/)
+ {
+ $cert_alias = "digicerthighassuranceevrootca";
+ }
+ elsif ($cert =~ /GlobalSign Root CA$/)
+ {
+ $cert_alias = "globalsignca";
+ }
+ elsif ($cert =~ /GlobalSign Root CA - R2/)
+ {
+ $cert_alias = "globalsignr2ca";
+ }
+ elsif ($cert =~ /Elektronik.*Kas.*2005/)
+ {
+ $cert_alias = "extra-elektronikkas2005";
+ }
+ elsif ($cert =~ /Elektronik/)
+ {
+ $cert_alias = "extra-elektronik2005";
+ }
+ # Mozilla does not provide these certificates:
+ # baltimorecodesigningca
+ # gtecybertrust5ca
+ # trustcenterclass2caii
+ # trustcenterclass4caii
+ # trustcenteruniversalcai
+ else
+ {
+ # Generate an alias using the OU and CN attributes of the
+ # Issuer field if both are present, otherwise use only the
+ # CN attribute. The Issuer field must have either the OU
+ # or the CN attribute.
+ $_ = $cert;
+ if ($cert =~ /OU=/)
+ {
+ s/Issuer:.*?OU=//;
+ # Remove other occurrences of OU=.
+ s/OU=.*CN=//;
+ # Remove CN= if there were not other occurrences of OU=.
+ s/CN=//;
+ s/\/emailAddress.*//;
+ s/Certificate Authority/ca/g;
+ s/Certification Authority/ca/g;
+ }
+ elsif ($cert =~ /CN=/)
+ {
+ s/Issuer:.*CN=//;
+ s/\/emailAddress.*//;
+ s/Certificate Authority/ca/g;
+ s/Certification Authority/ca/g;
+ }
+ s/\W//g;
+ tr/A-Z/a-z/;
+ $cert_alias = "extra-$_";
+
+ }
+ while (-e "$cert_alias.pem")
+ {
+ $cert_alias = "$cert_alias" . "_";
+ }
+ }
+ # When it attempts to parse:
+ #
+ # Class 3 Public Primary Certification Authority - G2, Version 3
+ #
+ # keytool says:
+ #
+ # #2: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
+ # Unparseable AuthorityInfoAccess extension due to
+ # java.io.IOException: Invalid encoding of URI
+ #
+ # If we do not exclude this file
+ # openjdk/jdk/test/lib/security/cacerts/VerifyCACerts.java fails
+ # on this cert, printing:
+ #
+ # Couldn't verify: java.security.SignatureException: Signature
+ # does not match.
+ #
+ elsif ($cert =~
+ /A6:0F:34:C8:62:6C:81:F6:8B:F7:7D:A9:F6:67:58:8A:90:3F:7D:36/)
+ {
+ $write_current_cert = 0;
+ $pem_file_count--;
+ }
+ elsif ($cert eq "-----BEGIN CERTIFICATE-----\n")
+ {
+ if ($in_cert_block != 0)
+ {
+ die "$file is malformed.";
+ }
+ $in_cert_block = 1;
+ if ($write_current_cert == 1)
+ {
+ $pem_file_count++;
+ if (-e "$cert_alias.pem")
+ {
+ print "$cert_alias";
+ die "already exists"
+ }
+ open(PEM, ">$cert_alias.pem");
+ print PEM $cert;
+ }
+ }
+ elsif ($cert eq "-----END CERTIFICATE-----\n")
+ {
+ $in_cert_block = 0;
+ if ($write_current_cert == 1)
+ {
+ print PEM $cert;
+ close(PEM);
+ }
+ $write_current_cert = 1
+ }
+ else
+ {
+ if ($in_cert_block == 1 && $write_current_cert == 1)
+ {
+ print PEM $cert;
+ }
+ }
+}
+
+# Check that the correct number of .pem files were produced.
+@pem_files = <*.pem>;
+if (@pem_files != $pem_file_count)
+{
+ print "$pem_file_count";
+ die "Number of .pem files produced does not match".
+ " number of certs read from $file.";
+}
+
+# Now store each cert in the 'cacerts' file using keytool.
+$certs_written_count = 0;
+foreach $pem_file (@pem_files)
+{
+ system "$ARGV[0] -noprompt -import".
+ " -alias `basename $pem_file .pem`".
+ " -keystore cacerts -storepass 'changeit' -file $pem_file";
+ unlink($pem_file);
+ $certs_written_count++;
+}
+
+# Check that the correct number of certs were added to the keystore.
+if ($certs_written_count != $pem_file_count)
+{
+ die "Number of certs added to keystore does not match".
+ " number of certs read from $file.";
+}
diff --git a/packages/dev-lang/icedtea8/icedtea8-3.0.1.exheres-0 b/packages/dev-lang/icedtea8/icedtea8-3.0.1.exheres-0
new file mode 100644
index 0000000..9454e30
--- /dev/null
+++ b/packages/dev-lang/icedtea8/icedtea8-3.0.1.exheres-0
@@ -0,0 +1,31 @@
+# Copyright 2016 Wulf C. Krueger <philantrop@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+REVISION=""
+BOOTSTRAP_VERSION="2.5.4"
+BOOTSTRAP_ANT_VERSION="1.8.2"
+
+require icedtea8
+
+PLATFORMS="~amd64 ~x86"
+
+# The vast majority of tests succeed but still too many fail. See src_test in
+# icedtea.exlib for details.
+RESTRICT="test"
+
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/0001-Drop-bogus-toolchain-checks.patch
+)
+
+# DISTRIBUTION_PATCHES as used in the Makefile is *NOT* an array so we can't
+# magically make it one here. It only worked by fluke so far because there only
+# ever was *one* patch - till now.
+DISTRIBUTION_PATCHES="patches/0001-Drop-bogus-toolchain-checks.patch"
+
+src_prepare() {
+ # This check comes too early, kill it.
+ edo sed -i -e '/^IT_FIND_TOOLS.*FASTJAR/d' configure.ac
+
+ autotools_src_prepare
+}
+
diff --git a/packages/dev-lang/icedtea8/icedtea8.exlib b/packages/dev-lang/icedtea8/icedtea8.exlib
new file mode 100644
index 0000000..1ef2403
--- /dev/null
+++ b/packages/dev-lang/icedtea8/icedtea8.exlib
@@ -0,0 +1,149 @@
+# Copyright 2009 Sterling X. Winter <replica@exherbo.org>
+# Copyright 2009-2016 Wulf C. Krueger <philantrop@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+SLOT="1.8"
+
+require icedtea
+export_exlib_phases src_configure src_compile
+
+WORK=${WORKBASE}/${PN/8}-${PV/_pre1/pre}
+
+if [[ -n ${REVISION} ]]; then
+ BASE_URI="http://icedtea.classpath.org/hg/${PN}-forest"
+else
+ BASE_URI="http://icedtea.wildebeest.org/download/drops/${PN}/$(ever range 1-3)"
+fi
+
+DOWNLOADS="
+ ${BASE_URI}/openjdk.tar.xz -> openjdk-8-${PV}.tar.xz
+ ${BASE_URI}/corba.tar.xz -> corba-${PV}.tar.xz
+ ${BASE_URI}/jaxp.tar.xz -> jaxp-${PV}.tar.xz
+ ${BASE_URI}/jaxws.tar.xz -> jaxws-${PV}.tar.xz
+ ${BASE_URI}/jdk.tar.xz -> jdk-${PV}.tar.xz
+ ${BASE_URI}/langtools.tar.xz -> langtools-${PV}.tar.xz
+ ${BASE_URI}/nashorn.tar.xz -> nashorn-${PV}.tar.xz
+ ${BASE_URI}/hotspot.tar.xz -> hotspot-${PV}.tar.xz
+
+ bootstrap? (
+ platform:amd64? (
+ http://dev.exherbo.org/~philantrop/distfiles/${PN/8/7}-bin-${BOOTSTRAP_VERSION}-amd64.tar.xz -> ${PN}-bin-${BOOTSTRAP_VERSION}-amd64.tar.xz
+ http://dev.exherbo.org/~philantrop/distfiles/apache-ant-bin-${BOOTSTRAP_ANT_VERSION}-amd64.tar.bz2
+ )
+ platform:x86? (
+ http://dev.exherbo.org/~philantrop/distfiles/${PN/8/7}-bin-${BOOTSTRAP_VERSION}-x86.tar.xz -> ${PN}-bin-${BOOTSTRAP_VERSION}-x86.tar.xz
+ http://dev.exherbo.org/~philantrop/distfiles/apache-ant-bin-${BOOTSTRAP_ANT_VERSION}-x86.tar.bz2
+ )
+ )
+"
+# ${HOMEPAGE}/download/drops/hotspot/${HOTSPOT_TARBALL} -> openjdk-hotspot-${HOTSPOT_TARBALL}
+# cacao? ( http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-0.99.4/${CACAO_TARBALL} )
+
+if [[ -n ${REVISION} ]]; then
+ DOWNLOADS+="http://dev.exherbo.org/~philantrop/distfiles/${PNV}-${REVISION}.tar.xz"
+ WORK=${WORKBASE}/${PNV}-${REVISION}
+#elif ever at_least 2.4.2 ; then
+# DOWNLOADS+="http://icedtea.wildebeest.org/download/source/${PN/8}-${PV/_pre1/pre}.tar.xz -> ${PNV}.tar.xz"
+else
+ DOWNLOADS+="${HOMEPAGE}/download/source/${PN/8}-${PV/_pre1/pre}.tar.xz -> ${PNV}.tar.xz"
+fi
+
+DEPENDENCIES+="
+ build+run:
+ media-libs/lcms2[>=2.5]
+ suggestion:
+ dev-lang/icedtea-sound[>=1.0.1]
+"
+
+icedtea8_src_configure() {
+ local myconf=(
+ --enable-nss
+ --enable-optimizations
+ --enable-system-lcms
+# Having a bootstrap option but hard-disabling bootstrapping may look strange but
+# we're using a pre-compiled icedtea for bootstrapping whereas *this* bootstrap
+# switch is meant for using gcc[java]/gcj-jdk, iow: classpath, for bootstrapping
+# which we don't support anymore as it was a nightmare.
+ --disable-bootstrap
+ --disable-hg
+ --with-hotspot-src-zip="${FETCHEDDIR}"/hotspot-${PV}.tar.xz
+ --with-corba-src-zip="${FETCHEDDIR}"/corba-${PV}.tar.xz
+ --with-jaxp-src-zip="${FETCHEDDIR}"/jaxp-${PV}.tar.xz
+ --with-jaxws-src-zip="${FETCHEDDIR}"/jaxws-${PV}.tar.xz
+ --with-jdk-src-zip="${FETCHEDDIR}"/jdk-${PV}.tar.xz
+ --with-langtools-src-zip="${FETCHEDDIR}"/langtools-${PV}.tar.xz
+ --with-nashorn-src-zip="${FETCHEDDIR}"/nashorn-${PV}.tar.xz
+ --with-openjdk-src-zip="${FETCHEDDIR}"/openjdk-8-${PV}.tar.xz
+ --with-parallel-jobs=${EXJOBS:-1}
+ --with-pkgversion="Exherbo"
+ )
+
+ # We used to unset the Java variables here. This can cause build failures, though.
+ # Instead, we're only doing it now during bootstrapping during which no existing
+ # JDK should be used.
+ # We do NOT export the Java variables here in case the user knows what he's
+ # doing and has modified them.
+ export ANT_RESPECT_JAVA_HOME=TRUE
+
+ if option bootstrap ; then
+ # Unset the Java variables in order to make sure no existing JDK gets picked
+ # up. We DO have to set JAVAC explicitly, though, or ecj.jar (which we don't
+ # usually provide) will be required.
+ unset JAVA_HOME CLASSPATH JAVAC JAVACMD
+ export ANT_HOME=${WORKBASE}/apache-ant-bin-${BOOTSTRAP_ANT_VERSION}/usr/share/ant
+ export ANT=${WORKBASE}/apache-ant-bin-${BOOTSTRAP_ANT_VERSION}/usr/share/ant/bin/ant
+ export JAVAC=${WORKBASE}/${PN}-${BOOTSTRAP_VERSION}/bin/javac
+ export PATH=${WORKBASE}/${PN}-bin-${BOOTSTRAP_VERSION}/bin:${PATH}
+ myconf+=(
+ --with-jdk-home=${WORKBASE}/${PN/8/7}-${BOOTSTRAP_VERSION}
+ --with-javac=${WORKBASE}/${PN/8/7}-${BOOTSTRAP_VERSION}/bin/javac
+ --with-javah=${WORKBASE}/${PN/8/7}-${BOOTSTRAP_VERSION}/bin/javah
+ --with-jar=${WORKBASE}/${PN/8/7}-${BOOTSTRAP_VERSION}/bin/jar
+ --with-rmic=${WORKBASE}/${PN/8/7}-${BOOTSTRAP_VERSION}/bin/rmic
+ )
+ else
+ if has_version dev-lang/icedtea6 ; then
+ myconf+=( --with-jdk-home=/usr/$(exhost --target)/lib/icedtea6 )
+ elif has_version dev-lang/icedtea7 ; then
+ myconf+=( --with-jdk-home=/usr/$(exhost --target)/lib/icedtea7 )
+ fi
+ fi
+
+# if option cacao ; then
+# myconf+=" --with-cacao-home=/usr"
+# else
+# myconf+=" --without-cacao-home"
+# fi
+
+ myconf+=( $(_icedtea_option doc docs) )
+# cacao
+# shark
+# zero
+
+ # For some reason, icedtea8 really hates -march=native on x86.
+ option platform:x86 && filter-flags -march=native
+
+ econf ${myconf[@]}
+}
+
+icedtea8_src_compile() {
+ unset JAVA_HOME CLASSPATH JAVAC JAVACMD
+
+ # unset _JAVA_OPTIONS to avoid failures due to Java spouting crap:
+ #
+ # configure: Found potential Boot JDK using configure arguments
+ # configure: Potential Boot JDK found at /var/tmp/paludis/build/dev-lang-icedtea8-3.0.1/work/icedtea-3.0.1/bootstrap/jdk1.7.0 is incorrect JDK version (Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true); ignoring
+ # configure: (Your Boot JDK must be version 7 or 8)
+ # configure: error: The path given by --with-boot-jdk does not contain a valid Boot JDK
+ unset _JAVA_OPTIONS
+
+ # The build system needs this dir but doesn't create it.
+ edo mkdir -p "${WORK}"/bootstrap/boot/jre/lib
+
+ # The icedtea8 build system uses the OPTIONS variable for setting defines.
+ env -u OPTIONS emake DISTRIBUTION_PATCHES="${DISTRIBUTION_PATCHES[@]}" \
+ ALT_OBJCOPY="/usr/$(exhost --target)/bin/$(exhost --tool-prefix)objcopy" \
+ CXX=${CXX} NM=${NM} AR=${AR} READELF=$(exhost --tool-prefix)readelf \
+ DISABLE_HOTSPOT_OS_VERSION_CHECK=ok
+}
+