# Maintainer: Daniele Cocca pkgname=('openjdk' 'openjdk-src') pkgbase='openjdk' _icedtea_release="2.2.1" _icedtea_jdkver="7" _pkgver="7u5" pkgver="${_pkgver}_${_icedtea_release}" pkgrel=2 pkgdesc="An open-source implementation of the seventh edition of the Java SE Platform." arch=('i686' 'x86_64') url="http://icedtea.classpath.org/" license=('GPL2 with Classpath exception') makedepends=('java-environment=7' 'apache-ant>=1.6.5' 'zip' 'unzip' 'fastjar' 'cpio' 'cups' 'orbit2' 'gtk2' 'coreutils' 'wget' 'gzip' 'alsa-lib' 'libpulse>=-.9.11' 'zlib' 'libjpeg' 'libpng' 'giflib' 'lcms2' 'freetype2' 'rhino' 'nss' 'libxt' 'libxtst' 'libxp' 'libxrender' 'ca-certificates-java') _hg_url="http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2" _corba_changeset="38deb372c569" _hotspot_changeset="889dffcf4a54" _jaxp_changeset="335fb0b059b7" _jaxws_changeset="5471e01ef43b" _jdk_changeset="6c3b742b735d" _langtools_changeset="beea46c7086b" _openjdk_changeset="0b776ef59474" _jvmdir="/usr/lib/jvm/java-${_icedtea_jdkver}-openjdk" source=("http://icedtea.classpath.org/download/source/icedtea-${_icedtea_release}.tar.gz" "${_hg_url}/archive/${_openjdk_changeset}.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}/hotspot/archive/${_hotspot_changeset}.tar.gz" 'archlinux-disable_Werror.diff' '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=('0f5ba163904f7c50374ab345216dd1b66c077fc431592eb3d4801f7ecda200b6' '15a6eab62f5108efbf7937b1de7697bd789971886fc1fc08ee8199e16a5c10fe' 'b892b0db6f3e4f89fd480d46ecb7c9ce5c71a884ae5bfe953b4bda9eedf7ea93' 'ff4ab3710fe316b7adc4e57d4d21ff967ca20e2ccc5267ac26b93cd22db8b3fd' '1ef055749ee46ebf7a5be94403b461d8d32e95c98906da459aeb217a0784ff1d' '48a513d18c919ec08d44cffdc12ae65f1e8942924c6cfcca5c1ffa8ca38afd0e' '17055cf1490fab1cccc57bf3aa5b32d655c408859790c7f671bfde180ddf70cb' 'b29a8929bb4aadbc033e99dca6a381ca6342f0373b9c3f67827bfc025187ba41' '557910dc4e5e9b551641db129c3910abe572aba8744a83cc4bcbc1314c1d8386' '9ad943ceb3dbcdf45d72974fc3667886a7ed65c69ab9abc17be5412827551a7f' '7b2db65bfb9d5014e1522178d65cabf05dfa85e0926cde5648b5a338db376479' 'bd19edc12831b09834fbdbe60fd65577884a6bd9f175d21228ae75a84bd88f3a' 'fd615f476ef17853ae55b7aee3c92b6738f9ea584e915749b1caa7fdc5ff9ca4' '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 *.diff "${srcdir}/icedtea-${_icedtea_release}/patches" export DISTRIBUTION_PATCHES="patches/archlinux-disable_Werror.diff 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}" # 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 \ --enable-nss \ --enable-pulse-java \ --enable-system-zlib \ --enable-system-jpeg \ --enable-system-png \ --enable-system-gif \ --enable-system-lcms \ --enable-system-gio \ --enable-system-fontconfig \ || return 1 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' 'libpng' 'freetype2' 'libpulse>=0.9.11' 'ca-certificates-java') optdepends=('icedtea-web: web browser plugin and Java Web Start support' 'gtk2: for the GTK+ Look And Feel') 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: