summaryrefslogtreecommitdiffstats
path: root/source.local/pasture
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2013-04-06 19:43:55 +0200
committer Eric Hameleers <alien@slackware.com>2013-04-06 19:43:55 +0200
commit55bce4decbbdde684c63507f88f4f33694579f4f (patch)
tree409994b26efea8c2a9f65206de616bed4f931d25 /source.local/pasture
parentb100c7c57e8a1363adfffe22f68b6429b9576dd3 (diff)
downloadalienarm-55bce4decbbdde684c63507f88f4f33694579f4f.tar.gz
alienarm-55bce4decbbdde684c63507f88f4f33694579f4f.tar.xz
Update to Alien's ARM which allows XFCE to run on an ARM ChromeBook.
This large update brings Alien's ARM repository almost to the same level of package versions in slackware-current. THese updates were needed to make it possible to start a functional XFCE session on Samsung's ARM ChromeBook (XE303C12).
Diffstat (limited to 'source.local/pasture')
-rw-r--r--source.local/pasture/openjdk/README.txt108
-rw-r--r--source.local/pasture/openjdk/create_gcj_jvm.sh95
-rw-r--r--source.local/pasture/openjdk/doinst.sh.gzbin0 -> 408 bytes
-rw-r--r--source.local/pasture/openjdk/fix_seamonkey_pkgconfig.sh48
-rwxr-xr-xsource.local/pasture/openjdk/openjdk.SlackBuild319
-rw-r--r--source.local/pasture/openjdk/patches/icedtea,zero_debuginfo.patch53
-rw-r--r--source.local/pasture/openjdk/patches/openjdk.arm_fixes.patch44
-rwxr-xr-xsource.local/pasture/openjdk/profile.d/openjdk.csh4
-rwxr-xr-xsource.local/pasture/openjdk/profile.d/openjdk.sh4
-rwxr-xr-xsource.local/pasture/openjdk/profile.d/openjre.csh4
-rwxr-xr-xsource.local/pasture/openjdk/profile.d/openjre.sh4
-rw-r--r--source.local/pasture/openjdk/scripts/generate-cacerts.pl349
-rw-r--r--source.local/pasture/openjdk/slack-desc.jdk18
-rw-r--r--source.local/pasture/openjdk/slack-desc.jre18
14 files changed, 1068 insertions, 0 deletions
diff --git a/source.local/pasture/openjdk/README.txt b/source.local/pasture/openjdk/README.txt
new file mode 100644
index 0000000..dff6308
--- /dev/null
+++ b/source.local/pasture/openjdk/README.txt
@@ -0,0 +1,108 @@
+Creating an OpenJDK (and OpenJRE) package for Slackware
+=======================================================
+
+In this directory you will find everything I used to create packages
+for OpenJDK's JRE and JDK as an alternative to Oracle's binary-only releases
+of Java. Oracle no longer allows these binaries to be included with OS
+distributions, so Slackware will no longer provide updates for them.
+Build instructions for OpenJDK are provided further down in this README.
+
+Or, you can just install my pre-compiled packages which I *also* provide!
+
+If you want to install and just use my pre-built packages, then all you
+really need are "rhino" which is the JavaScript engine, "icedtea-web"
+which is the browser plugin, and one of "openjdk" or "openjre" packages,
+depending of course on whether you need the full Java compiler suite or
+only the Java Runtime Environment.
+
+You will also need packages for apache-ant, xalan, xerces if you want to
+compile OpenJDK yourself.
+
+
+Compiling OpenJDK from source
+=============================
+
+Compiling OpenJDK can be done in two ways. The first way is called
+"bootstrapping", which means compiling OpenJDK when there is no version of
+the OpenJDK installed yet. The SlackBuild uses the gcc java compiler for this
+bootstrap (which means you have to have the "gcc-java" package installed).
+The second way is to compile OpenJDK using an already installed version of
+OpenJDK. Such a pre-installed OpenJDK must have the same version (meaning,
+OpenJDK 7 can only be compiled by another OpenJDK 7) and must have been
+created with the help of "IcedTea" like my own openjdk,SlackBuild does.
+
+The variable "BOOTSTRAP" inside the openjdk.SlackBuild determines which java
+compiler will be used to compile OpenJDK. If you want to use gcc's java, then
+the command will be:
+
+ # BOOTSTRAP=YES ./openjdk.SlackBuild
+
+If you already have OpenJDK installed then you would start the compilation with:
+
+ # BOOTSTRAP=NO ./openjdk.SlackBuild
+
+By default, the variable in the script is set to "NO" which means that if
+you run the openjdk.SlackBuild script without any parameters, it will use
+a pre-esisting OpenJDK to compile the new package.
+
+This SlackBuild script creates _two_ packages, the "openjdk" and the "openjre".
+If you only need a Java Runtime then all you should install is the openjre
+package - it is much smaller than the openjdk package. The "openjdk" package
+contains the Java compiler and SDK.
+
+
+Java Web Plugin for OpenJDK
+===========================
+
+Suns's binary distribution of Java (taken over by Oracle) contains a Java web
+plugin for mozilla-compatible browsers. This plugin was not open sourced,
+so OpenJDK needs a different solution in order to provide a web plugin for Java.
+To this purpose, you have to (build and) install the "icedtea-web" package.
+First compile and install OpenJDK (you need the openjdk package for this, not
+the JRE), then compile icedtea-web. The SlackBuild script plus sources are
+in a separate directory. Note that the icedtea-web plugin is not as mature
+as the plugin which is shipped with Oracle's binaries.
+
+
+Build-time requirements for OpenJDK and icedtea-web
+===================================================
+
+A word of caution. All stable Slackware versions including "13.37" are
+not able to compile OpenJDK "out of the box". You have to enhance two core
+packages: "gcc" and "seamonkey" so that they become capable of compiling
+OpenJDK. Use the following instructions to fix-up gcc and seamonkey.
+Either alternative is OK but running the shell scripts (the "b" options)
+is a *lot* faster than recompiling these big packages. These core Slackware
+packages have be fixed in slackware-current.
+
+1) Choose one of these two alternatives for gcc:
+ a) rebuild gcc with "--enable-java-home". You can use the gcc.SlackBuild
+ of Slackware-current which was modified accordingly.
+ b) or run the script "create_gcj_jvm.sh" to achieve the same result you
+ would get by rebuilding gcc: which is to create a directory structure
+ of symlinks, which emulates the presence of a Sun JDK but for the
+ GCC Java compiler.
+2) Choose one of these two alternatives for seamonkey:
+ a) rebuild seamonkey using the seamonkey.SlackBuild of Slackware-current
+ which was modified accordingly.
+ b) or run the script "fix_seamonkey_pkgconfig.sh" which does two things:
+ add a pkgconfig file "libxul.pc" and modify an existing pkgconfig
+ file, "seamonkey-plugin.pc"
+
+Furthermore, you will need to have the following Apache Ant related packages
+installed before starting the compilation of OpenJDK.
+* apache-ant
+* rhino
+* xalan
+* xerces
+
+Please note that after installing apache-ant you will have to logout and
+login again to initialize the ANT_HOME environment variable.
+
+Only the "rhino" package has to remain on your system in order to *run* OpenJDK.
+The other three (apache-ant, xalan and xerces) are only needed during the
+compilation and can optionally be removed afterwards (but why should you).
+
+
+==============================================================================
+Eric Hameleers <alien at slackware.com>, 25-feb-2012
diff --git a/source.local/pasture/openjdk/create_gcj_jvm.sh b/source.local/pasture/openjdk/create_gcj_jvm.sh
new file mode 100644
index 0000000..08f3e4a
--- /dev/null
+++ b/source.local/pasture/openjdk/create_gcj_jvm.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+# ---------------------------------------------------------------------------
+# This script creates a directory structure below /usr/lib/jvm and populates
+# it with symlinks to GCC binaries.
+# This will work as a compatibility layer to emulate an Oracle JDK/JRE.
+# This emulation is required in order to compile OpenJDK using GNU java.
+#
+# The same can automatically be achieved in Slackware's gcc packages if
+# the 'configure' command is called with the following additional parameters:
+# --enable-java-home \
+# --with-java-home=/usr/lib$LIBDIRSUFFIX/jvm/jre \
+# --with-jvm-root-dir=/usr/lib$LIBDIRSUFFIX/jvm \
+# --with-jvm-jar-dir=/usr/lib$LIBDIRSUFFIX/jvm/jvm-exports \
+# --with-arch-directory=$LIB_ARCH \
+#
+# Author: Eric Hameleers <alien@slackware.com> December 2011
+# ---------------------------------------------------------------------------
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ LIB_ARCH=amd64
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=$ARCH
+fi
+
+# Where does the OpenJDK SlackBuild expect the GNU java compatibility symlinks:
+JVM=${1:-/usr/lib${LIBDIRSUFFIX}/jvm}
+BINDIR=/usr/bin
+
+# What version of GCC do we have installed:
+GCJVER=$(gcj -dumpversion)
+
+# First, remove the old set of symlinks if they should exist:
+rm -fr $JVM
+
+# Create a JDK compatible directory structure for GNU java:
+mkdir -p $JVM
+mkdir -p $JVM/bin
+mkdir -p $JVM/jre/bin
+mkdir -p $JVM/jre/lib/${LIB_ARCH}/client
+mkdir -p $JVM/jre/lib/${LIB_ARCH}/server
+mkdir -p $JVM/lib
+
+ln -sf $BINDIR/gjar $JVM/bin/jar
+ln -sf $BINDIR/grmic $JVM/bin/rmic
+ln -sf $BINDIR/gjavah $JVM/bin/javah
+ln -sf $BINDIR/jcf-dump $JVM/bin/javap
+ln -sf $BINDIR/gappletviewer $JVM/bin/appletviewer
+ln -sf $BINDIR/grmiregistry $JVM/bin/rmiregistry
+ln -sf $BINDIR/grmiregistry $JVM/jre/bin/rmiregistry
+ln -sf $BINDIR/gkeytool $JVM/bin/keytool
+ln -sf $BINDIR/gkeytool $JVM/jre/bin/keytool
+ln -sf $BINDIR/gij $JVM/bin/java
+ln -sf $BINDIR/ecj $JVM/bin/javac
+ln -sf /usr/lib/gcj-${GCJVER}-11/libjvm.so $JVM/jre/lib/${LIB_ARCH}/client/libjvm.so
+ln -sf /usr/lib/gcj-${GCJVER}-11/libjvm.so $JVM/jre/lib/${LIB_ARCH}/server/libjvm.so
+ln -sf /usr/lib/gcj-${GCJVER}-11/libjawt.so $JVM/jre/lib/${LIB_ARCH}/libjawt.so
+ln -sf /usr/share/java/libgcj-${GCJVER}.jar $JVM/jre/lib/rt.jar
+ln -sf /usr/share/java/libgcj-tools-${GCJVER}.jar $JVM/lib/tools.jar
+ln -sf /usr/include/c++/${GCJVER}/gnu/java $JVM/include
+
+# Add a Eclipse Java Compiler wrapper which is required
+# for bootstrapping OpenJDK using GNU java:
+cat <<EOT > /usr/bin/ecj
+#!/bin/sh
+
+CLASSPATH=/usr/share/java/ecj.jar\${CLASSPATH:+:}\$CLASSPATH \
+ java org.eclipse.jdt.internal.compiler.batch.Main "\$@"
+
+EOT
+chmod 755 /usr/bin/ecj
+
+
diff --git a/source.local/pasture/openjdk/doinst.sh.gz b/source.local/pasture/openjdk/doinst.sh.gz
new file mode 100644
index 0000000..1a8f9de
--- /dev/null
+++ b/source.local/pasture/openjdk/doinst.sh.gz
Binary files differ
diff --git a/source.local/pasture/openjdk/fix_seamonkey_pkgconfig.sh b/source.local/pasture/openjdk/fix_seamonkey_pkgconfig.sh
new file mode 100644
index 0000000..671d227
--- /dev/null
+++ b/source.local/pasture/openjdk/fix_seamonkey_pkgconfig.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# ---------------------------------------------------------------------------
+# This script fixes the seamonkye-plugin.pc file and adds libxul.pc.
+# These changes enable the compilation of OpenJDK and its browser plugin.
+# It will probably also be beneficial to the compilation of browser plugins
+# in general.
+#
+# Author: Eric Hameleers <alien@slackware.com> December 2011
+# ---------------------------------------------------------------------------
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Fix the seamonkey-plugin.pc file:
+sed -i -e '/^Cflags: /s, -I${includedir}/java -I${includedir}/plugin, -I${includedir} -DXP_UNIX,' /usr/lib${LIBDIRSUFFIX}/pkgconfig/seamonkey-plugin.pc
+
+# Add a libxul.pc file if needed:
+if [ ! -f /usr/lib${LIBDIRSUFFIX}/pkgconfig/libxul.pc ]; then
+ SEAMONKEY=$(echo /usr/lib${LIBDIRSUFFIX}/seamonkey-* | tail -1 | cut -f2 -d-)
+ cat <<EOT > /usr/lib${LIBDIRSUFFIX}/pkgconfig/libxul.pc
+prefix=/usr
+libdir=/usr/lib${LIBDIRSUFFIX}/seamonkey-$SEAMONKEY
+includedir=/usr/include/seamonkey-$SEAMONKEY
+idldir=/usr/share/idl/seamonkey-$SEAMONKEY
+
+Name: libxul
+Description: The Mozilla Runtime and Embedding Engine
+Version: $SEAMONKEY
+Requires: seamonkey-nspr >= 4.7.1
+Libs: -L\${libdir} -lxul -lxpcom
+Cflags: -I\${includedir} -fshort-wchar
+EOT
+fi
+
diff --git a/source.local/pasture/openjdk/openjdk.SlackBuild b/source.local/pasture/openjdk/openjdk.SlackBuild
new file mode 100755
index 0000000..9338ea4
--- /dev/null
+++ b/source.local/pasture/openjdk/openjdk.SlackBuild
@@ -0,0 +1,319 @@
+#!/bin/sh
+
+# Copyright 2011, 2012 Eric Hameleers, Eindhoven, The Netherlands
+# Copyright 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM1=openjdk
+PKGNAM2=openjre
+JAVAVER=7u3
+JAVABLD=b03
+ICEDTEA=2.1
+
+VERSION="${JAVAVER}_${JAVABLD}"
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:--j6}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG1=$TMP/package-$PKGNAM1
+PKG2=$TMP/package-$PKGNAM2
+
+# If BOOTSTRAP is set to "YES" then we bootstrap the build using GCC's
+# java compiler (gcj) instead of a depending on a pre-installed version
+# of OpenJDK to build OpenJDK.
+BOOTSTRAP=${BOOTSTRAP:-"NO"}
+
+# Sources the script requires. Note that the Makefile contains SHA256SUM values
+# for all of these tarballs; if the tarball does not verify then it will be
+# downloaded again:
+SRC_CACAO=cacao-a567bcb7f589.tar.gz
+SRC_CORBA=corba.tar.gz
+SRC_HOTSPOT=hotspot.tar.gz
+SRC_ICEWEB=icedtea-web-1.1.4.tar.gz
+SRC_JAXP=jaxp.tar.gz
+SRC_JAXWS=jaxws.tar.gz
+SRC_JDK=jdk.tar.gz
+SRC_LANGTOOLS=langtools.tar.gz
+SRC_OPENJDK=openjdk.tar.gz
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+ ARCH_OPTS=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+ ARCH_OPTS=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ LIB_ARCH=amd64
+ ARCH_OPTS=""
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=$ARCH
+ ARCH_OPTS="--enable-cacao --with-cacao-src-zip=$CWD/sources/${SRC_CACAO}"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=$ARCH
+ ARCH_OPTS="--enable-cacao --with-cacao-src-zip=$CWD/sources/${SRC_CACAO}"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=$ARCH
+ ARCH_OPTS=""
+fi
+
+case "ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG1 $PKG2
+mkdir -p $TMP $PKG1 $PKG2
+cd $TMP
+rm -rf icedtea-$ICEDTEA
+tar xvf $CWD/sources/icedtea-$ICEDTEA.tar.?z* || exit 1
+cd icedtea-$ICEDTEA || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# We start with creating a proper build environment.
+
+# Prevent an error which aborts the build:
+mkdir -p bootstrap/boot/jre/lib
+
+unset CLASSPATH
+unset JAVA_HOME
+unset MAKEFLAGS
+
+if [ "$BOOTSTRAP" = "YES" -o "$BOOTSTRAP" = "yes" ]; then
+ # Use gcc's java compiler:
+ export JVMDIR=/usr/lib${LIBDIRSUFFIX}/jvm
+ export ALT_BOOTDIR=/usr/lib${LIBDIRSUFFIX}/jvm
+ export ECJJAR=/usr/share/java/ecj.jar
+ export RTJAR=$TMP/icedtea-$ICEDTEA/bootstrap/boot/jre/lib/rt.jar
+ ! echo $PATH | grep -q jvm/bin && export PATH=/usr/lib${LIBDIRSUFFIX}/jvm/bin:$PATH
+ EXTRA_OPTS="--enable-bootstrap --with-gcj=/usr/bin/gcj"
+ # Bootstrap without cacao:
+ ARCH_OPTS=""
+else
+ # Use a pre-installed OpenJDK:
+ export JVMDIR=/usr/lib${LIBDIRSUFFIX}/java
+ EXTRA_OPTS="--disable-bootstrap"
+fi
+
+export ANT_HOME=/usr/share/ant
+export ALT_FREETYPE_LIB_PATH=/usr/lib${LIBDIRSUFFIX}
+export ALT_PARALLEL_COMPILE_JOBS="${NUMJOBS/-j}"
+export BUILD_NUMBER=$JAVABLD
+export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
+export LANG=C
+export OS_VARIANT_NAME="Slackware"
+export OS_VARIANT_VERSION=$(cat /etc/slackware-version | cut -f2 -d' ')
+
+cp $CWD/patches/*.patch $TMP/icedtea-$ICEDTEA/patches/
+export DISTRIBUTION_BOOT_PATCHES="patches/openjdk.arm_fixes.patch patches/icedtea,zero_debuginfo.patch"
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --with-abs-install-dir=/usr/lib${LIBDIRSUFFIX}/java \
+ --with-pkgversion=Slackware \
+ --with-parallel-jobs=${HOTSPOT_BUILD_JOBS} \
+ --with-corba-src-zip=$CWD/sources/${SRC_CORBA} \
+ --with-hotspot-src-zip=$CWD/sources/${SRC_HOTSPOT} \
+ --with-jaxp-src-zip=$CWD/sources/${SRC_JAXP} \
+ --with-jaxws-src-zip=$CWD/sources/${SRC_JAXWS} \
+ --with-jdk-src-zip=$CWD/sources/${SRC_JDK} \
+ --with-langtools-src-zip=$CWD/sources/${SRC_LANGTOOLS} \
+ --with-openjdk-src-zip=$CWD/sources/${SRC_OPENJDK} \
+ --with-jdk-home=${JVMDIR} \
+ --disable-docs \
+ --disable-jamvm \
+ --disable-jdk-tests \
+ --disable-langtools-tests \
+ --disable-system-lcms \
+ --enable-nss \
+ $ARCH_OPTS \
+ $EXTRA_OPTS \
+ --build=$TARGET
+ #--with-javac=${JVMDIR}/bin/javac \
+
+make VERBOSE=TRUE || exit 1
+
+# Move the generated jre and sdk images to the respective packages:
+mkdir -p $PKG1/usr/lib${LIBDIRSUFFIX} $PKG2/usr/lib${LIBDIRSUFFIX}/java
+cp -a openjdk.build/j2sdk-image \
+ $PKG1/usr/lib${LIBDIRSUFFIX}/java
+cp -a openjdk.build/j2re-image \
+ $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre
+
+# Generate a cacerts file from the certificates installed through our
+# ca-certificates package - the "cacerts" in the OpenJDK sources is empty.
+# This will only work if we already have a proper JDK/JRE installed:
+if which keytool 1>/dev/null 2>&1 ; then
+ mkdir certgen
+ ( cd certgen
+ cp $CWD/scripts/generate-cacerts.pl .
+ for cert in /usr/share/ca-certificates/*/*.crt; do
+ openssl x509 -text -in "${cert}" >> all.crt
+ done
+ perl generate-cacerts.pl keytool all.crt
+ install -p -m0644 cacerts $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security
+ install -p -m0644 cacerts $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security
+ )
+fi
+
+# Pick a selection of fontconfig files:
+cp -a $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/fontconfig.{Ubuntu,}.properties.src
+cp -a $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/fontconfig.{Ubuntu,}.bfc
+cp -a $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre/lib/fontconfig.{Ubuntu,}.properties.src
+cp -a $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre/lib/fontconfig.{Ubuntu,}.bfc
+
+# Symlinks are present in Slackware historically:
+( cd $PKG1/usr/lib${LIBDIRSUFFIX}
+ ln -sf java jdk${VERSION}
+) || exit 1
+( cd $PKG2/usr/lib${LIBDIRSUFFIX}/java
+ ln -sf jre jre${VERSION}
+) || exit 1
+
+# Add the profile scripts:
+mkdir -p $PKG1/etc/profile.d $PKG2/etc/profile.d
+for file in $(ls $CWD/profile.d/openjdk*) ; do
+ cat $file | sed -e "s#lib/java#lib${LIBDIRSUFFIX}/java#" \
+ > $PKG1/etc/profile.d/$(basename $file)
+done
+for file in $(ls $CWD/profile.d/openjre*) ; do
+ cat $file | sed -e "s#lib/java#lib${LIBDIRSUFFIX}/java#" \
+ > $PKG2/etc/profile.d/$(basename $file)
+done
+chmod 755 $PKG1/etc/profile.d/* $PKG2/etc/profile.d/*
+
+# Add menu entries and icons:
+for i in 16 24 32 48 ; do
+ mkdir -p ${PKG1}/usr/share/icons/hicolor/${i}x${i}/apps
+ install -m644 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${i}.png \
+ ${PKG1}/usr/share/icons/hicolor/${i}x${i}/apps/java.png
+ mkdir -p ${PKG2}/usr/share/icons/hicolor/${i}x${i}/apps
+ install -m644 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${i}.png \
+ ${PKG2}/usr/share/icons/hicolor/${i}x${i}/apps/java.png
+done
+mkdir -p ${PKG1}/usr/share/applications
+install -m644 *.desktop ${PKG1}/usr/share/applications/
+mkdir -p ${PKG2}/usr/share/applications
+install -m644 *.desktop ${PKG2}/usr/share/applications/
+
+# User-modifiable configuration files go to /etc :
+mkdir -p $PKG1/etc/java $PKG2/etc/java
+mv $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/jvm.cfg $PKG1/etc/java/jvm.cfg.new
+ln -sf /etc/java/jvm.cfg $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/jvm.cfg
+mv $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/java.policy $PKG1/etc/java/java.policy.new
+ln -sf /etc/java/java.policy $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/java.policy
+mv $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/java.security $PKG1/etc/java/java.security.new
+ln -sf /etc/java/java.security $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/java.security
+cat $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/nss.cfg | sed -e 's/seamonkey-.*$/seamonkey/' > $PKG1/etc/java/nss.cfg.new
+ln -sf /etc/java/nss.cfg $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/nss.cfg
+# And the jre package:
+mv $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/jvm.cfg $PKG2/etc/java/jvm.cfg.new
+ln -sf /etc/java/jvm.cfg $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/jvm.cfg
+mv $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/java.policy $PKG2/etc/java/java.policy.new
+ln -sf /etc/java/java.policy $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/java.policy
+mv $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/java.security $PKG2/etc/java/java.security.new
+ln -sf /etc/java/java.security $PKG2/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/java.security
+
+# NOTE:
+# The openjdk does not build a mozilla plugin: install icedtea-web instead.
+
+( cd $PKG1/usr/lib${LIBDIRSUFFIX}
+ ln -sf ./java/jre/lib/${LIB_ARCH}/server/libjvm.so .
+)
+
+( cd $PKG2/usr/lib${LIBDIRSUFFIX}
+ ln -sf ./java/jre/lib/${LIB_ARCH}/server/libjvm.so .
+)
+
+# Add package description and deal with the .new files:
+mkdir -p $PKG1/install $PKG2/install
+cat $CWD/slack-desc.jdk > $PKG1/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG1/install/doinst.sh
+# The openjre package does not have a nss.cfg:
+cat $CWD/slack-desc.jre > $PKG2/install/slack-desc
+zcat $CWD/doinst.sh.gz | grep -v nss.cfg.new > $PKG2/install/doinst.sh
+
+# Add documentation files:
+mkdir -p $PKG1/usr/doc/$PKGNAM1-$VERSION/icedtea
+mkdir -p $PKG2/usr/doc/$PKGNAM2-$VERSION/icedtea
+( cd openjdk
+ cp -a \
+ ASSEMBLY_EXCEPTION LICENSE README* THIRD_PARTY_README \
+ $PKG1/usr/doc/$PKGNAM1-$VERSION
+ cp -a \
+ ASSEMBLY_EXCEPTION LICENSE README* THIRD_PARTY_README \
+ $PKG2/usr/doc/$PKGNAM2-$VERSION
+)
+cp -a \
+ AUTHORS COPYING HACKING INSTALL NEWS README* THANKYOU \
+ $PKG1/usr/doc/$PKGNAM1-$VERSION/icedtea
+cp -a \
+ AUTHORS COPYING HACKING INSTALL NEWS README* THANKYOU \
+ $PKG2/usr/doc/$PKGNAM2-$VERSION/icedtea
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ for DOCSDIR in $(echo $PKG1/usr/doc/${PKGNAM1}-$VERSION) \
+ $(echo $PKG2/usr/doc/${PKGNAM2}-$VERSION)
+ do
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ done
+fi
+
+# Finally, create the two packages:
+cd $PKG1
+/sbin/makepkg -l y -c n $TMP/$PKGNAM1-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+cd $PKG2
+/sbin/makepkg -l y -c n $TMP/$PKGNAM2-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+
diff --git a/source.local/pasture/openjdk/patches/icedtea,zero_debuginfo.patch b/source.local/pasture/openjdk/patches/icedtea,zero_debuginfo.patch
new file mode 100644
index 0000000..68b0e44
--- /dev/null
+++ b/source.local/pasture/openjdk/patches/icedtea,zero_debuginfo.patch
@@ -0,0 +1,53 @@
+--- openjdk/hotspot/make/linux/makefiles/defs.make.orig 2012-02-15 09:26:53.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/defs.make 2012-03-18 23:22:09.000000000 +0100
+@@ -132,7 +132,7 @@
+ # Full Debug Symbols is supported on JDK7 or newer
+
+ # Default OBJCOPY comes from GNU Binutils on Linux:
+- DEF_OBJCOPY=/usr/bin/objcopy
++ DEF_OBJCOPY=feck
+ ifdef CROSS_COMPILE_ARCH
+ # don't try to generate .debuginfo files when cross compiling
+ _JUNK_ := $(shell \
+@@ -215,10 +215,10 @@
+ $(EXPORT_LIB_DIR)/sa-jdi.jar
+ ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
+ $(EXPORT_LIB_DIR)/sa-jdi.jar
+-ifneq ($(OBJCOPY),)
+- ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+- ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+-endif
++#ifneq ($(OBJCOPY),)
++# ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
++# ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
++#endif
+ ADD_SA_BINARIES/ppc =
+ ADD_SA_BINARIES/ia64 =
+ ADD_SA_BINARIES/arm =
+
+--- openjdk-boot/hotspot/make/linux/makefiles/defs.make.orig 2012-02-15 09:26:53.000000000 +0100
++++ openjdk-boot/hotspot/make/linux/makefiles/defs.make 2012-03-18 23:22:09.000000000 +0100
+@@ -132,7 +132,7 @@
+ # Full Debug Symbols is supported on JDK7 or newer
+
+ # Default OBJCOPY comes from GNU Binutils on Linux:
+- DEF_OBJCOPY=/usr/bin/objcopy
++ DEF_OBJCOPY=feck
+ ifdef CROSS_COMPILE_ARCH
+ # don't try to generate .debuginfo files when cross compiling
+ _JUNK_ := $(shell \
+@@ -215,10 +215,10 @@
+ $(EXPORT_LIB_DIR)/sa-jdi.jar
+ ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
+ $(EXPORT_LIB_DIR)/sa-jdi.jar
+-ifneq ($(OBJCOPY),)
+- ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+- ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+-endif
++#ifneq ($(OBJCOPY),)
++# ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
++# ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
++#endif
+ ADD_SA_BINARIES/ppc =
+ ADD_SA_BINARIES/ia64 =
+ ADD_SA_BINARIES/arm =
diff --git a/source.local/pasture/openjdk/patches/openjdk.arm_fixes.patch b/source.local/pasture/openjdk/patches/openjdk.arm_fixes.patch
new file mode 100644
index 0000000..47f28dc
--- /dev/null
+++ b/source.local/pasture/openjdk/patches/openjdk.arm_fixes.patch
@@ -0,0 +1,44 @@
+diff -up openjdk/jdk/make/common/shared/Sanity.gmk.sav openjdk/jdk/make/common/shared/Sanity.gmk
+--- openjdk/jdk/make/common/shared/Sanity.gmk.sav 2012-02-14 16:12:48.000000000 -0500
++++ openjdk/jdk/make/common/shared/Sanity.gmk 2012-03-07 17:31:26.153840755 -0500
+@@ -814,12 +814,12 @@ ifdef OPENJDK
+ @(($(CD) $(BUILDDIR)/tools/freetypecheck && $(MAKE)) || \
+ $(ECHO) "Failed to build freetypecheck." ) > $@
+
+- sane-freetype: $(TEMPDIR)/freetypeinfo
+- @if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \
+- $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \
+- " or higher is required. \n" \
+- "`$(CAT) $<` \n" >> $(ERROR_FILE) ; \
+- fi
++# sane-freetype: $(TEMPDIR)/freetypeinfo
++# @if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \
++# $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \
++# " or higher is required. \n" \
++# "`$(CAT) $<` \n" >> $(ERROR_FILE) ; \
++# fi
+ else
+ #do nothing (cross-compiling)
+ sane-freetype:
+diff -up openjdk/jdk/make/jdk_generic_profile.sh.sav openjdk/jdk/make/jdk_generic_profile.sh
+--- openjdk/jdk/make/jdk_generic_profile.sh.sav 2012-02-14 16:12:48.000000000 -0500
++++ openjdk/jdk/make/jdk_generic_profile.sh 2012-03-07 17:31:26.154840740 -0500
+@@ -280,7 +280,7 @@ if [ "${ZERO_BUILD}" = true ] ; then
+
+ # ZERO_ENDIANNESS is the endianness of the processor
+ case "${ZERO_LIBARCH}" in
+- i386|amd64|ia64)
++ i386|amd64|ia64|arm)
+ ZERO_ENDIANNESS=little
+ ;;
+ ppc*|s390*|sparc*|alpha)
+@@ -307,6 +307,9 @@ if [ "${ZERO_BUILD}" = true ] ; then
+ s390)
+ ZERO_ARCHFLAG="-m31"
+ ;;
++ arm)
++ ZERO_ARCHFLAG="-D_LITTLE_ENDIAN"
++ ;;
+ *)
+ ZERO_ARCHFLAG="-m${ARCH_DATA_MODEL}"
+ esac
diff --git a/source.local/pasture/openjdk/profile.d/openjdk.csh b/source.local/pasture/openjdk/profile.d/openjdk.csh
new file mode 100755
index 0000000..3a1ec7b
--- /dev/null
+++ b/source.local/pasture/openjdk/profile.d/openjdk.csh
@@ -0,0 +1,4 @@
+#!/bin/csh
+setenv JAVA_HOME /usr/lib/java
+setenv MANPATH ${MANPATH}:${JAVA_HOME}/man
+setenv PATH ${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin
diff --git a/source.local/pasture/openjdk/profile.d/openjdk.sh b/source.local/pasture/openjdk/profile.d/openjdk.sh
new file mode 100755
index 0000000..ed0bc73
--- /dev/null
+++ b/source.local/pasture/openjdk/profile.d/openjdk.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+export JAVA_HOME=/usr/lib/java
+export MANPATH="${MANPATH}:${JAVA_HOME}/man"
+export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
diff --git a/source.local/pasture/openjdk/profile.d/openjre.csh b/source.local/pasture/openjdk/profile.d/openjre.csh
new file mode 100755
index 0000000..47bc078
--- /dev/null
+++ b/source.local/pasture/openjdk/profile.d/openjre.csh
@@ -0,0 +1,4 @@
+#!/bin/csh
+setenv JAVA_HOME /usr/lib/java
+setenv MANPATH ${MANPATH}:${JAVA_HOME}/jre/man
+setenv PATH ${PATH}:${JAVA_HOME}/jre/bin
diff --git a/source.local/pasture/openjdk/profile.d/openjre.sh b/source.local/pasture/openjdk/profile.d/openjre.sh
new file mode 100755
index 0000000..98e9d13
--- /dev/null
+++ b/source.local/pasture/openjdk/profile.d/openjre.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+export JAVA_HOME=/usr/lib/java
+export MANPATH="${MANPATH}:${JAVA_HOME}/jre/man"
+export PATH="${PATH}:${JAVA_HOME}/jre/bin"
diff --git a/source.local/pasture/openjdk/scripts/generate-cacerts.pl b/source.local/pasture/openjdk/scripts/generate-cacerts.pl
new file mode 100644
index 0000000..0213fcd
--- /dev/null
+++ b/source.local/pasture/openjdk/scripts/generate-cacerts.pl
@@ -0,0 +1,349 @@
+#!/usr/bin/perl -w
+
+# Obtained from "http://pkgs.fedoraproject.org/gitweb/?p=ca-certificates.git;a=blob_plain;f=generate-cacerts.pl;hb=HEAD"
+
+use diagnostics;
+use Fcntl;
+
+# 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.
+$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 =~ "Certificate:\n")
+ {
+ print "New certificate...\n";
+ }
+ elsif ($cert =~ /Subject: /)
+ {
+ $_ = $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 =~ /Class 3 Public Primary Certification Authority - G2.*1998/)
+ {
+ $cert_alias = "verisignclass3g2ca";
+ }
+ elsif ($cert =~
+ /VeriSign Class 3 Public Primary Certification Authority - G3/)
+ {
+ $cert_alias = "verisignclass3g3ca";
+ }
+ elsif ($cert =~
+ /RSA Data Security.*Secure Server Certification Authority/)
+ {
+ $cert_alias = "rsaserverca";
+ }
+ 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 incorp /)
+ {
+ $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 =~ /Muntaner 244 Barcelona.*Firmaprofesional/)
+ {
+ $cert_alias = "extra-oldfirmaprofesional";
+ }
+ # Mozilla does not provide these certificates:
+ # baltimorecodesigningca
+ # gtecybertrust5ca
+ # trustcenterclass2caii
+ # trustcenterclass4caii
+ # trustcenteruniversalcai
+ else
+ {
+ # Generate an alias using the OU and CN attributes of the
+ # Subject field if both are present, otherwise use only the
+ # CN attribute. The Subject field must have either the OU
+ # or the CN attribute.
+ $_ = $cert;
+ if ($cert =~ /OU=/)
+ {
+ s/Subject:.*?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/Subject:.*CN=//;
+ s/\/emailAddress.*//;
+ s/Certificate Authority/ca/g;
+ s/Certification Authority/ca/g;
+ }
+ s/\W//g;
+ tr/A-Z/a-z/;
+ $cert_alias = "extra-$_";
+ }
+ print "$cert => alias $cert_alias\n";
+ }
+ elsif ($cert =~ "Signature Algorithm: ecdsa")
+ {
+ # Ignore ECC certs since keytool rejects them
+ $write_current_cert = 0;
+ print " => ignoring ECC certificate\n";
+ }
+ elsif ($cert eq "-----BEGIN CERTIFICATE-----\n")
+ {
+ if ($in_cert_block != 0)
+ {
+ die "FAIL: $file is malformed.";
+ }
+ $in_cert_block = 1;
+ if ($write_current_cert == 1)
+ {
+ $pem_file_count++;
+ if (!sysopen(PEM, "$cert_alias.pem", O_WRONLY|O_CREAT|O_EXCL)) {
+ $cert_alias = "$cert_alias.1";
+ sysopen(PEM, "$cert_alias.1.pem", O_WRONLY|O_CREAT|O_EXCL)
+ || die("FAIL: could not open file for $cert_alias.pem: $!");
+ }
+ print PEM $cert;
+ print " => writing $cert_alias.pem...\n";
+ }
+ }
+ 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 != ".@pem_files."\n";
+ die "FAIL: 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)
+{
+ print "+ Adding $pem_file...\n";
+ if (system("$ARGV[0] -import".
+ " -alias `basename $pem_file .pem`".
+ " -keystore cacerts -noprompt -storepass 'changeit' -file $pem_file") == 0) {
+ $certs_written_count++;
+ } else {
+ print "FAILED\n";
+ }
+}
+
+# Check that the correct number of certs were added to the keystore.
+if ($certs_written_count != $pem_file_count)
+{
+ die "FAIL: Number of certs added to keystore does not match".
+ " number of certs read from $file.";
+}
diff --git a/source.local/pasture/openjdk/slack-desc.jdk b/source.local/pasture/openjdk/slack-desc.jdk
new file mode 100644
index 0000000..2d38ace
--- /dev/null
+++ b/source.local/pasture/openjdk/slack-desc.jdk
@@ -0,0 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+ |-----handy-ruler------------------------------------------------------|
+openjdk: Java(TM) 2 Platform Standard Edition Development Kit.
+openjdk:
+openjdk: The Java 2 SDK software includes tools for developing, testing, and
+openjdk: running programs written in the Java programming language. This
+openjdk: package contains the Open Source version of the JDK, which holds
+openjdk: everything you need to run Java(TM).
+openjdk:
+openjdk: For additional information, refer to this web page:
+openjdk: http://openjdk.java.net/
+openjdk:
+openjdk:
diff --git a/source.local/pasture/openjdk/slack-desc.jre b/source.local/pasture/openjdk/slack-desc.jre
new file mode 100644
index 0000000..611233a
--- /dev/null
+++ b/source.local/pasture/openjdk/slack-desc.jre
@@ -0,0 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+ |-----handy-ruler------------------------------------------------------|
+openjre: Java(TM) 2 Platform Standard Edition Runtime Environment.
+openjre:
+openjre: The J2SE(TM) Runtime Environment (JRE) is intended for software
+openjre: developers and vendors to redistribute with their applications.
+openjre: It contains the Java virtual machine, runtime class libraries, and
+openjre: Java application launcher that are necessary to run programs written
+openjre: in the Java programming language.
+openjre:
+openjre: If you need development tools, obtain the jdk from /extra, or see the
+openjre: web page: http://openjdk.java.net/
+openjre: