# Maintainer: Daniele Cocca pkgname=('openjdk' 'openjdk-src') pkgbase='openjdk' _icedtea_release="2.3.2" _icedtea_jdkver="7" _openjdk_build="b30" _pkgver="7u7" pkgver="${_pkgver}_${_openjdk_build}_${_icedtea_release}" pkgrel=2 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.6.5' 'zip' 'unzip' 'fastjar' 'cpio' 'cups' 'orbit2' 'gtk2' 'coreutils' 'wget' 'gzip' 'alsa-lib' 'pulseaudio' '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="7fae6a3a68c7" _jaxp_changeset="ee4bd94136ec" _jaxws_changeset="c89c6ac953e7" _jdk_changeset="f78eb7e08ee1" _langtools_changeset="867d5041bee6" _openjdk_changeset="acba2d30209d" _hotspot_changeset="ea39d76b3bde" _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=('d7e87de527934fcbb06c162e0e119d9b118069f3f52a1420d303fe19c5d74ef2' '8d94e9b594e4ae0eff6899cb4ff899ce66db3b4d6ef158e019b7be96e193ec0f' '26991edc468b7599a332753a60ff861fde78af439d0a5b87d0e5b389d5e53fb5' 'a411bdde270bb0451b74fc9ba890159ed1f7070bc25f21b3ebd17b79b42805f8' '74cd8b7c7ed1d80dd4cfa45565584ec1c24cfd5e10a32fc026b92f0ce27ff224' 'ded69ccf2baea82b7baf9050c64160733ff45c10c0a363de80d795618c494707' 'ae63f88590d4aa82de82322e6bb61b31157e49617a4f8c310fc4c4ab4690f528' '25733b44590c950adc42a2e9c366b8a3992803c06dedcc16d2bf0d50fed54844' '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-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 \ --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' 'pulseaudio' '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') 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: