2014-03-01 07:09:21 +08:00
|
|
|
# Maintainer: AlmAck <almack[at]chakra-project[dot]org>
|
|
|
|
# Contributor: Daniele Cocca <jmc@chakra-project.org>
|
2012-08-12 01:10:27 +08:00
|
|
|
|
2012-08-14 09:20:43 +08:00
|
|
|
pkgname=('openjdk' 'openjdk-src')
|
|
|
|
pkgbase='openjdk'
|
2014-03-01 07:09:21 +08:00
|
|
|
_icedtea_release="2.4.5"
|
2012-08-14 09:20:43 +08:00
|
|
|
_icedtea_jdkver="7"
|
2013-11-24 08:20:25 +08:00
|
|
|
_openjdk_build="b31"
|
2014-03-01 07:09:21 +08:00
|
|
|
_pkgver="7u51"
|
2012-09-01 01:48:08 +08:00
|
|
|
pkgver="${_pkgver}_${_openjdk_build}_${_icedtea_release}"
|
2014-06-15 07:10:23 +08:00
|
|
|
pkgrel=2
|
2012-08-12 01:10:27 +08:00
|
|
|
pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform."
|
2012-11-03 12:27:44 +08:00
|
|
|
arch=('x86_64')
|
2012-08-13 04:06:58 +08:00
|
|
|
url="http://icedtea.classpath.org/"
|
2012-08-12 01:10:27 +08:00
|
|
|
license=('GPL2 with Classpath exception')
|
2013-11-24 08:20:25 +08:00
|
|
|
makedepends=('java-environment=7' 'apache-ant>=1.8.1' 'zip' 'unzip'
|
2012-08-12 01:10:27 +08:00
|
|
|
'fastjar' 'cpio' 'cups' 'orbit2' 'gtk2' 'coreutils'
|
2013-06-25 03:01:19 +08:00
|
|
|
'wget' 'gzip' 'alsa-lib' 'libpulse' 'zlib' 'libjpeg-turbo'
|
2012-08-12 01:10:27 +08:00
|
|
|
'libpng' 'giflib' 'lcms2' 'freetype2' 'rhino' 'nss' 'libxt'
|
2014-03-01 07:09:21 +08:00
|
|
|
'libxtst' 'libxp' 'libxrender' 'ca-certificates-java' 'automake>=1.13')
|
2013-06-25 03:01:19 +08:00
|
|
|
|
2014-03-01 07:09:21 +08:00
|
|
|
_hg_url="http://icedtea.classpath.org/hg/release/icedtea7-forest-${_icedtea_release:0:3}"
|
|
|
|
_corba_changeset=3594dbde270d
|
|
|
|
_jaxp_changeset=8fe156ad49e2
|
|
|
|
_jaxws_changeset=32ea8b1ed91a
|
|
|
|
_jdk_changeset=9db88c18e114
|
|
|
|
_langtools_changeset=dabd37b7e295
|
|
|
|
_openjdk_changeset=410eb7fef869
|
|
|
|
_hotspot_changeset=2cb58882dac3
|
2012-08-14 09:20:43 +08:00
|
|
|
_jvmdir="/usr/lib/jvm/java-${_icedtea_jdkver}-openjdk"
|
2012-08-12 01:10:27 +08:00
|
|
|
|
|
|
|
source=("http://icedtea.classpath.org/download/source/icedtea-${_icedtea_release}.tar.gz"
|
|
|
|
"${_hg_url}/corba/archive/${_corba_changeset}.tar.gz"
|
|
|
|
"${_hg_url}/jaxp/archive/${_jaxp_changeset}.tar.gz"
|
|
|
|
"${_hg_url}/jaxws/archive/${_jaxws_changeset}.tar.gz"
|
|
|
|
"${_hg_url}/jdk/archive/${_jdk_changeset}.tar.gz"
|
|
|
|
"${_hg_url}/langtools/archive/${_langtools_changeset}.tar.gz"
|
2012-09-01 09:10:48 +08:00
|
|
|
"${_hg_url}/archive/${_openjdk_changeset}.tar.gz"
|
2012-08-12 01:10:27 +08:00
|
|
|
"${_hg_url}/hotspot/archive/${_hotspot_changeset}.tar.gz"
|
|
|
|
'archlinux-fontconfig-paths.diff'
|
|
|
|
'archlinux-fix_corba_cmds_path.diff'
|
|
|
|
'archlinux-openjdk7_fix_jdk_cmds_path.diff'
|
|
|
|
'archlinux-openjdk7_nonreparenting-wm.diff'
|
2012-08-14 09:20:43 +08:00
|
|
|
'openjdk.profile.sh'
|
|
|
|
'openjdk.profile.csh')
|
2014-03-01 07:09:21 +08:00
|
|
|
sha256sums=('10c08eeffaa0602b23cb957a2595a2ad3ab474cbe47b12743bbdd79037d5883d'
|
|
|
|
'd1f97e143fe94ae3a56b45bb5a90f8ab10ec2be4ff770a788f0a1ac677e27a7d'
|
|
|
|
'0a2a40186cedfbeb8f87b0bc86bea2830943943081d4289fc74f7a783b2e1af3'
|
|
|
|
'08a169b6b02883759ec7a412aa91aa3e37480761cb50b95d092dbcdb2fc9a3d0'
|
|
|
|
'285e5b8ccbb29f3f9f9ea9ea7856d1ed97465c57d091fbcd9b2e55a1ffbb543e'
|
|
|
|
'86cb370ce2084c4b699d8c002ebe6c026e86206ffa82a2f3d7906aadb94ed79f'
|
|
|
|
'2de151c7275d91ef082e63fcc0957c5f9290404ec6e20ecfa1e752e16bfab707'
|
|
|
|
'd8c1681ae76e660c1888065933cedbbc1309869c7a2fb98f07c424716d5ebaf9'
|
2012-08-12 01:10:27 +08:00
|
|
|
'9ad943ceb3dbcdf45d72974fc3667886a7ed65c69ab9abc17be5412827551a7f'
|
2013-06-25 03:01:19 +08:00
|
|
|
'd57754ff320475023688bd7c7af38a9ea37e27ed8c1edd3b1572e4d8b41b78d3'
|
2013-11-24 08:20:25 +08:00
|
|
|
'10465784f111b62c9543421fe0644f98f5eff16b00dcc78ed914ad68cdb7a13d'
|
|
|
|
'56b919ababb13bd6afdcdaceb112b529b6e82539255f2dae9a7e5eb91645164b'
|
2012-08-12 01:10:27 +08:00
|
|
|
'a6a083d4f3247a922c9d482f43341fa048ee4353d1cc42b54d1d0b5a6255bdd0'
|
|
|
|
'2120d72b19df6c46e35b87e0388afdfcb694843b55ef81ecaf104d78236e8c17')
|
|
|
|
noextract=("${_openjdk_changeset}.tar.gz"
|
|
|
|
"${_corba_changeset}.tar.gz"
|
|
|
|
"${_jaxp_changeset}.tar.gz"
|
|
|
|
"${_jaxws_changeset}.tar.gz"
|
|
|
|
"${_jdk_changeset}.tar.gz"
|
|
|
|
"${_langtools_changeset}.tar.gz"
|
|
|
|
"${_hotspot_changeset}.tar.gz")
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "${srcdir}"
|
|
|
|
|
|
|
|
# Prepare the patches
|
2013-11-24 08:20:25 +08:00
|
|
|
cp ${srcdir}/*.diff ${srcdir}/icedtea-${_icedtea_release}/patches
|
2013-06-25 03:01:19 +08:00
|
|
|
export DISTRIBUTION_PATCHES="patches/archlinux-fontconfig-paths.diff \
|
|
|
|
patches/archlinux-fix_corba_cmds_path.diff \
|
|
|
|
patches/archlinux-openjdk7_fix_jdk_cmds_path.diff \
|
|
|
|
patches/archlinux-openjdk7_nonreparenting-wm.diff"
|
2012-08-12 01:10:27 +08:00
|
|
|
|
|
|
|
rm -rf build
|
|
|
|
cp -r "icedtea-${_icedtea_release}" \
|
|
|
|
"${srcdir}/build"
|
|
|
|
|
|
|
|
cd "${srcdir}/build"
|
|
|
|
|
2012-08-14 09:20:43 +08:00
|
|
|
[ -f /etc/profile.d/openjdk.sh ] && source /etc/profile.d/openjdk.sh
|
2012-08-12 01:10:27 +08:00
|
|
|
[ -f /etc/profile.d/apache-ant.sh ] && source /etc/profile.d/apache-ant.sh
|
|
|
|
|
|
|
|
# Preserve the value of JAVA_HOME before unsetting it from the environment
|
|
|
|
local _java_home="${JAVA_HOME}"
|
|
|
|
|
|
|
|
# Setup the needed environmental variables
|
|
|
|
export USER="chakra-buildbot"
|
|
|
|
export ALT_BOOTDIR="${_java_home}"
|
|
|
|
export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
|
|
|
|
export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
|
2012-09-01 01:48:08 +08:00
|
|
|
export COMPILER_WARNINGS_FATAL="false"
|
2012-08-12 01:10:27 +08:00
|
|
|
|
|
|
|
# Unset harmful variables
|
2013-06-25 03:01:19 +08:00
|
|
|
#unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
|
2012-08-12 01:10:27 +08:00
|
|
|
|
|
|
|
# Start the configuration and build step
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--with-parallel-jobs="${MAKEFLAGS/-j}" \
|
|
|
|
--host="${CARCH}-unknown-linux-gnu" \
|
|
|
|
--with-rhino \
|
|
|
|
--with-jdk-home="${_java_home}" \
|
|
|
|
--with-abs-install-dir="${_jvmdir}" \
|
|
|
|
--with-openjdk-src-zip="${srcdir}/${_openjdk_changeset}.tar.gz" \
|
|
|
|
--with-hotspot-src-zip="${srcdir}/${_hotspot_changeset}.tar.gz" \
|
|
|
|
--with-corba-src-zip="${srcdir}/${_corba_changeset}.tar.gz" \
|
|
|
|
--with-jaxp-src-zip="${srcdir}/${_jaxp_changeset}.tar.gz" \
|
|
|
|
--with-jaxws-src-zip="${srcdir}/${_jaxws_changeset}.tar.gz" \
|
|
|
|
--with-jdk-src-zip="${srcdir}/${_jdk_changeset}.tar.gz" \
|
|
|
|
--with-langtools-src-zip="${srcdir}/${_langtools_changeset}.tar.gz" \
|
|
|
|
--with-pkgversion="Chakra Linux build ${pkgver}-${pkgrel}-${CARCH}" \
|
|
|
|
--disable-tests \
|
|
|
|
--disable-bootstrap \
|
2012-08-13 23:41:04 +08:00
|
|
|
--disable-system-gtk \
|
2013-11-24 08:20:25 +08:00
|
|
|
--disable-downloading \
|
|
|
|
--disable-Werror \
|
2012-08-12 01:10:27 +08:00
|
|
|
--enable-nss \
|
2013-11-24 08:20:25 +08:00
|
|
|
--enable-pulse-java
|
2012-08-12 01:10:27 +08:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
2012-08-14 09:20:43 +08:00
|
|
|
package_openjdk() {
|
2012-08-12 01:10:27 +08:00
|
|
|
pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform."
|
2012-08-14 09:20:43 +08:00
|
|
|
install="openjdk.install"
|
|
|
|
conflicts=('java-environment' 'java-runtime' 'openjdk6' 'openjdk7')
|
|
|
|
provides=("java-environment=${_icedtea_jdkver}" "java-runtime=${_icedtea_jdkver}")
|
|
|
|
replaces=('openjdk6' 'openjdk7')
|
2013-06-25 03:01:19 +08:00
|
|
|
depends=('alsa-lib' 'libpulse' 'giflib' 'libjpeg-turbo' 'libpng' 'freetype2'
|
2012-11-03 12:27:44 +08:00
|
|
|
'ca-certificates-java')
|
2012-08-12 02:58:47 +08:00
|
|
|
optdepends=('icedtea-web: web browser plugin and Java Web Start support'
|
|
|
|
'gtk2: for the GTK+ Look And Feel')
|
2013-11-24 08:20:25 +08:00
|
|
|
backup=(etc/profile.d/openjdk.sh
|
|
|
|
etc/profile.d/openjdk.csh)
|
2012-08-12 01:10:27 +08:00
|
|
|
|
|
|
|
cd "${srcdir}/build"
|
|
|
|
|
|
|
|
# Copy the built OpenJDK image to the target directory
|
2012-08-12 02:58:47 +08:00
|
|
|
install -d -m755 "${pkgdir}/${_jvmdir%/*}"
|
2012-08-12 01:10:27 +08:00
|
|
|
cp -r "openjdk.build/j2sdk-image" \
|
2012-08-12 02:58:47 +08:00
|
|
|
"${pkgdir}/${_jvmdir#/}"
|
2012-08-12 01:10:27 +08:00
|
|
|
|
2012-08-14 09:20:43 +08:00
|
|
|
# Remove the .zip file which is going to be inside openjdk-src
|
2012-08-12 02:58:47 +08:00
|
|
|
rm "${pkgdir}/${_jvmdir#/}/src.zip"
|
2012-08-12 01:10:27 +08:00
|
|
|
|
|
|
|
# Symlink the binaries into /usr/bin
|
|
|
|
install -d -m755 "${pkgdir}/usr/bin"
|
2012-08-12 02:58:47 +08:00
|
|
|
pushd "${pkgdir}/${_jvmdir#/}/bin" >/dev/null
|
2012-08-12 01:10:27 +08:00
|
|
|
for executable in *; do
|
2012-08-12 02:58:47 +08:00
|
|
|
ln -s "${_jvmdir}/bin/${executable}" \
|
2012-08-12 01:10:27 +08:00
|
|
|
"${pkgdir}/usr/bin"
|
|
|
|
done
|
|
|
|
popd >/dev/null
|
|
|
|
|
|
|
|
# Move the manual pages in the right place
|
|
|
|
install -d -m755 "${pkgdir}/usr/share"
|
2012-08-12 02:58:47 +08:00
|
|
|
mv "${pkgdir}/${_jvmdir#/}/man" \
|
2012-08-12 01:10:27 +08:00
|
|
|
"${pkgdir}/usr/share/man"
|
|
|
|
rm "${pkgdir}/usr/share/man/ja" # avoid conflicts with man-db
|
|
|
|
|
2012-08-12 02:58:47 +08:00
|
|
|
# link JKS keystore from ca-certificates-java
|
|
|
|
rm -f "${pkgdir}/${_jvmdir#/}/jre/lib/security/cacerts"
|
|
|
|
ln -s /etc/ssl/certs/java/cacerts \
|
|
|
|
"${pkgdir}/${_jvmdir#/}/jre/lib/security/cacerts"
|
|
|
|
|
2012-08-12 01:10:27 +08:00
|
|
|
# Setup the shell profile dropin configuration
|
2012-08-14 09:20:43 +08:00
|
|
|
install -D -m755 "${srcdir}/openjdk.profile.sh" \
|
|
|
|
"${pkgdir}/etc/profile.d/openjdk.sh"
|
|
|
|
install -D -m755 "${srcdir}/openjdk.profile.csh" \
|
|
|
|
"${pkgdir}/etc/profile.d/openjdk.csh"
|
2012-08-12 02:58:47 +08:00
|
|
|
|
|
|
|
# Install the license file
|
|
|
|
install -D -m644 "openjdk/LICENSE" \
|
|
|
|
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
2012-08-12 01:10:27 +08:00
|
|
|
}
|
|
|
|
|
2012-08-14 09:20:43 +08:00
|
|
|
package_openjdk-src() {
|
2012-08-12 01:10:27 +08:00
|
|
|
pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform. (Source package)"
|
|
|
|
arch=('any')
|
2012-08-14 09:20:43 +08:00
|
|
|
depends=("openjdk=${pkgver}")
|
2012-08-12 01:10:27 +08:00
|
|
|
|
|
|
|
cd "${srcdir}/build"
|
2012-08-14 09:20:43 +08:00
|
|
|
|
|
|
|
# Install the source package
|
2012-08-12 01:10:27 +08:00
|
|
|
install -D -m644 "openjdk.build/j2sdk-image/src.zip" \
|
2012-08-12 02:58:47 +08:00
|
|
|
"${pkgdir}/${_jvmdir#/}/src.zip"
|
2012-08-14 09:20:43 +08:00
|
|
|
|
2012-08-22 09:26:39 +08:00
|
|
|
# Not installing the license file anymore, since we depend on openjdk,
|
|
|
|
# which already provides it.
|
|
|
|
#
|
|
|
|
# install -D -m644 "openjdk/LICENSE" \
|
|
|
|
# "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
2012-08-12 01:10:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|