# Maintainer: Daniele Cocca pkgname=('openjdk' 'openjdk-src') pkgbase='openjdk' _icedtea_release="2.4.3" _icedtea_jdkver="7" _openjdk_build="b31" _pkgver="7u45" pkgver="${_pkgver}_${_openjdk_build}_${_icedtea_release}" pkgrel=1 pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform." arch=('x86_64') url="http://icedtea.classpath.org/" license=('GPL2 with Classpath exception') makedepends=('java-environment=7' 'apache-ant>=1.8.1' 'zip' 'unzip' 'fastjar' 'cpio' 'cups' 'orbit2' 'gtk2' 'coreutils' 'wget' 'gzip' 'alsa-lib' 'libpulse' 'zlib' 'libjpeg-turbo' 'libpng' 'giflib' 'lcms2' 'freetype2' 'rhino' 'nss' 'libxt' 'libxtst' 'libxp' 'libxrender' 'ca-certificates-java') _hg_url="http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3" _corba_changeset="8ed5df839fbc" _jaxp_changeset="8f220f7b51c7" _jaxws_changeset="652eb396f959" _jdk_changeset="7958751eb9ef" _langtools_changeset="3c8eb52a32ea" _openjdk_changeset="e2f5917da3c1" _hotspot_changeset="b59e02d9e72b" _jvmdir="/usr/lib/jvm/java-${_icedtea_jdkver}-openjdk" 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" "${_hg_url}/archive/${_openjdk_changeset}.tar.gz" "${_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' 'openjdk.profile.sh' 'openjdk.profile.csh') sha256sums=('15b1acc1fb43b83ca08d531491261c5eeaea4cad3598300074692acea93bdd3d' '7fab9af64ffcdf635a6fed5abf78cffd1f64be1f3827a1aaf3a0e5e1fdbc599c' 'cec41aebd42f4c8caba9c24c306ba78e8cf5da3d23da1604b98753340a2719ca' 'fb9c22e92c2a056917b7b5dce6905a01ab2e904cbc3c1c6badcc470d22136518' '4df06346d197180bbb9d182e3ebc9ab6386562199d9898d057d0df75566349fe' '462ad61fd34708c90362f9e3d3c432b9246833ea8ff0d8a14955ae386bce4a91' '75a18abd117e3295c6de4d3450f0094a9abc08f2168e2911bce25d1e153107b9' 'b7d7e01d7ab9e49b68aa29b55355a019d71f9ae5cabb4ea7378b55855a07df57' '9ad943ceb3dbcdf45d72974fc3667886a7ed65c69ab9abc17be5412827551a7f' 'd57754ff320475023688bd7c7af38a9ea37e27ed8c1edd3b1572e4d8b41b78d3' '10465784f111b62c9543421fe0644f98f5eff16b00dcc78ed914ad68cdb7a13d' '56b919ababb13bd6afdcdaceb112b529b6e82539255f2dae9a7e5eb91645164b' '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 cp ${srcdir}/*.diff ${srcdir}/icedtea-${_icedtea_release}/patches 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" rm -rf build cp -r "icedtea-${_icedtea_release}" \ "${srcdir}/build" cd "${srcdir}/build" [ -f /etc/profile.d/openjdk.sh ] && source /etc/profile.d/openjdk.sh [ -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}" export COMPILER_WARNINGS_FATAL="false" # Unset harmful variables #unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS # 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 \ --disable-system-gtk \ --disable-downloading \ --disable-Werror \ --enable-nss \ --enable-pulse-java make } package_openjdk() { pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform." install="openjdk.install" conflicts=('java-environment' 'java-runtime' 'openjdk6' 'openjdk7') provides=("java-environment=${_icedtea_jdkver}" "java-runtime=${_icedtea_jdkver}") replaces=('openjdk6' 'openjdk7') depends=('alsa-lib' 'libpulse' 'giflib' 'libjpeg-turbo' 'libpng' 'freetype2' 'ca-certificates-java') optdepends=('icedtea-web: web browser plugin and Java Web Start support' 'gtk2: for the GTK+ Look And Feel') backup=(etc/profile.d/openjdk.sh etc/profile.d/openjdk.csh) cd "${srcdir}/build" # Copy the built OpenJDK image to the target directory install -d -m755 "${pkgdir}/${_jvmdir%/*}" cp -r "openjdk.build/j2sdk-image" \ "${pkgdir}/${_jvmdir#/}" # Remove the .zip file which is going to be inside openjdk-src rm "${pkgdir}/${_jvmdir#/}/src.zip" # Symlink the binaries into /usr/bin install -d -m755 "${pkgdir}/usr/bin" pushd "${pkgdir}/${_jvmdir#/}/bin" >/dev/null for executable in *; do ln -s "${_jvmdir}/bin/${executable}" \ "${pkgdir}/usr/bin" done popd >/dev/null # Move the manual pages in the right place install -d -m755 "${pkgdir}/usr/share" mv "${pkgdir}/${_jvmdir#/}/man" \ "${pkgdir}/usr/share/man" rm "${pkgdir}/usr/share/man/ja" # avoid conflicts with man-db # 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" # Setup the shell profile dropin configuration 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" # Install the license file install -D -m644 "openjdk/LICENSE" \ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } package_openjdk-src() { pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform. (Source package)" arch=('any') depends=("openjdk=${pkgver}") cd "${srcdir}/build" # Install the source package install -D -m644 "openjdk.build/j2sdk-image/src.zip" \ "${pkgdir}/${_jvmdir#/}/src.zip" # 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" } # vim:set ts=2 sw=2 et: