diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-10-15 17:26:31 -0400 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-10-15 17:26:31 -0400 |
commit | 4067bf0d7cf41767213fe99480fab64ec02c434b (patch) | |
tree | d6d7e3f9f17f0fbb541f8e812166d4688ddce2d4 /dev-java/openj9-openjdk | |
parent | 0aaeeffcabad9f10fb6112b5486a7f0671107e16 (diff) | |
download | gentoo-overlay-4067bf0d7cf41767213fe99480fab64ec02c434b.tar.xz gentoo-overlay-4067bf0d7cf41767213fe99480fab64ec02c434b.zip |
dev-java/openj9-openjdk: 15.0.22.0
Diffstat (limited to 'dev-java/openj9-openjdk')
-rw-r--r-- | dev-java/openj9-openjdk/Manifest | 3 | ||||
-rw-r--r-- | dev-java/openj9-openjdk/openj9-openjdk-15.0.22.0.ebuild | 299 |
2 files changed, 302 insertions, 0 deletions
diff --git a/dev-java/openj9-openjdk/Manifest b/dev-java/openj9-openjdk/Manifest index a97ce7d..b19bf74 100644 --- a/dev-java/openj9-openjdk/Manifest +++ b/dev-java/openj9-openjdk/Manifest @@ -1,4 +1,7 @@ DIST openj9-0.21.0.tar.gz 16216102 BLAKE2B 7536e61b742562b7782239d600b78bfa4c00850589cc80bbe8820d97842db55cc001bfbdbb81eb1da534c250a4315ce772fdbe1bcdd1e26863df1fb548618853 SHA512 8137318d9cde6a6383539d2b1a0535951cab178d4f31ccd83260460bdf2b57569e784d205d2fd6e17e0fbc04b6e4aa5a57b81fe46112d38eb0fc5b374b55cf16 +DIST openj9-0.22.0.tar.gz 16298417 BLAKE2B 0c6b0ef3b9adafca2502f18de069acdf2cd7056a166b171816bf86d61bfc4d09703c80bac9a680bd9d28c17b423de5cf534c70adbf2ddfdf7aac24e3a73f8de8 SHA512 d49d21971e877e86ca41ad3098266cd73b8dd2ccae8de95da8aadb2d6acaeb717caad9ed796974cb07ee3654e1bf291cd27d9737b0d874de4f1c5701755a5bd4 DIST openj9-omr-0.21.0.tar.gz 7704671 BLAKE2B e97b4bd8b975814af74c569f71a4aa35df373eb8c583d21a44065e2db140eca3649b674b5347fd031831c10701ccdb2a263eeeacf19bd4831c1e63ab18398f65 SHA512 7eed6eb68d251934291be859f061801b41b95abc481d3e3d059fc4f3eee94ba2b31143aa00b9abd39dc2325540ed0a4f16e075396e34741f57e36fe69d376b0f +DIST openj9-omr-0.22.0.tar.gz 7734527 BLAKE2B 72e83980c9b64ce6122c123d9f38c65fdcf0bc38d2e81d6eed7e2c84d19eb8501a182e0c1fa2c70018fbd155af08f6548089d87032e2dc25abc12cdc5de20f01 SHA512 90c54a574105db2a26126d5bddc5dce5425d70268c2ae7255e32d883b95f2d0f2ed0f80711731499532a1a4d82e867593edc1823e53463d236dadba2ad19863c DIST openj9-openjdk-jdk11-openj9-0.21.0.tar.gz 104216281 BLAKE2B 21716b92b07a72be19b53f926dc1248e633ba01a82f0ad841883eed325d3caaa887c6ea87c8f2e13aff9f230d981418d2b7ff6bd6fb99cf0ff6dcda948c6a3dc SHA512 2b915c88b62b04c0549037d6be42428ba9f99b51f00d364c0ba9c9c7340d1b67da99f583a2623b04d8708703f789ef680ea70b8259e8557af34da830a136a0d8 DIST openj9-openjdk-jdk14-openj9-0.21.0.tar.gz 95491120 BLAKE2B b4d17dadda4d209f04126520ec5a86fc38bfab6af75d9ce2047555c8cec0dca28205b1a056b7294c111947cafa2eaaadebb2851ec8958367626e9c4b0940ad57 SHA512 83b08fc63dfc06e97583720ccfb4643f07398700b93d8328a5fd730764bba9665cde57e7f149024f11e752aa04f6450114dd3cecf5e589e24991c3340292c009 +DIST openj9-openjdk-jdk15-openj9-0.22.0.tar.gz 88578780 BLAKE2B ce8c243fae1110fcce1d51fda42df64b571f0790bb088511033af2505b992bd80a61c39832237d5638a5d22d50a11c7a03c0de4e2e0155790d1336b5b8e6c278 SHA512 4635c08dbfa41e499854b6b9a4dd6a92d527996c9917a45324f3ab9afb5cc764ca9ae938e6dd7724e284287c93782660ff09bd2d208bc4a7053a3b871cacac52 diff --git a/dev-java/openj9-openjdk/openj9-openjdk-15.0.22.0.ebuild b/dev-java/openj9-openjdk/openj9-openjdk-15.0.22.0.ebuild new file mode 100644 index 0000000..350e2f3 --- /dev/null +++ b/dev-java/openj9-openjdk/openj9-openjdk-15.0.22.0.ebuild @@ -0,0 +1,299 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs versionator + +SLOT="$(get_major_version)" +OPENJ9_PV="$(get_version_component_range 2-4)" +OPENJ9_P=openj9-${OPENJ9_PV} +FREEMARKER_PV=2.3.30 + +DESCRIPTION="Open source implementation of the Java programming language" +HOMEPAGE="https://openjdk.java.net" +if [[ ${OPENJ9_PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}.git" + OPENJ9_EGIT_REPO_URI="https://github.com/eclipse/openj9.git" + OPENJ9_OMR_EGIT_REPO_URI="https://github.com/eclipse/openj9-omr.git" +else + SRC_URI=" + https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}/archive/${OPENJ9_P}.tar.gz -> openj9-openjdk-jdk${SLOT}-${OPENJ9_P}.tar.gz + https://github.com/eclipse/openj9/archive/${OPENJ9_P}.tar.gz -> ${OPENJ9_P}.tar.gz + https://github.com/eclipse/openj9-omr/archive/${OPENJ9_P}.tar.gz -> openj9-omr-${OPENJ9_PV}.tar.gz + " +fi + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE="alsa cups ddr debug doc examples gentoo-vm headless-awt javafx +jbootstrap large-heap +pch selinux source systemtap" + +COMMON_DEPEND=" + media-libs/freetype:2= + media-libs/giflib:0/7 + media-libs/libpng:0= + media-libs/lcms:2= + sys-libs/zlib + virtual/jpeg:0= + systemtap? ( dev-util/systemtap ) + + dev-libs/elfutils + dev-libs/libdwarf + sys-process/numactl +" + +# Many libs are required to build, but not to run, make is possible to remove +# by listing conditionally in RDEPEND unconditionally in DEPEND +RDEPEND=" + ${COMMON_DEPEND} + >=sys-apps/baselayout-java-0.1.0-r1 + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXt + x11-libs/libXtst + ) + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + selinux? ( sec-policy/selinux-java ) +" + +DEPEND=" + ${COMMON_DEPEND} + app-arch/zip + dev-lang/nasm + media-libs/alsa-lib + net-print/cups + x11-base/xorg-proto + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXt + x11-libs/libXtst + javafx? ( dev-java/openjfx:${SLOT}= ) + || ( + virtual/jdk:${SLOT} + virtual/jdk:$((SLOT-1)) + ) + || ( + dev-java/freemarker-bin + dev-java/freemarker + ) +" + +REQUIRED_USE="javafx? ( alsa !headless-awt )" + +if [[ ${OPENJ9_PV} == 9999 ]]; then + S="${WORKDIR}/openj9-openjdk-jdk${SLOT}" +else + S="${WORKDIR}/openj9-openjdk-jdk${SLOT}-${OPENJ9_P}" +fi + +# The space required to build varies wildly depending on USE flags, +# ranging from 3GB to 16GB. This function is certainly not exact but +# should be close enough to be useful. +openjdk_check_requirements() { + local M + M=3192 + M=$(( $(usex jbootstrap 2 1) * $M )) + M=$(( $(usex debug 3 1) * $M )) + M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M )) + + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} +} + +pkg_pretend() { + openjdk_check_requirements + if [[ ${MERGE_TYPE} != binary ]]; then + has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}" + fi +} + +pkg_setup() { + openjdk_check_requirements + java-vm-2_pkg_setup + java-pkg-2_pkg_setup +} + +src_unpack() { + if [[ ${OPENJ9_PV} == 9999 ]]; then + EGIT_CHECKOUT_DIR=openj9 EGIT_REPO_URI=${OPENJ9_EGIT_REPO_URI} git-r3_src_unpack + EGIT_CHECKOUT_DIR=openj9-omr EGIT_REPO_URI=${OPENJ9_OMR_EGIT_REPO_URI} git-r3_src_unpack + # unpack openjdk last to save correct EGIT_VERSION + EGIT_CHECKOUT_DIR=${S} git-r3_src_unpack + else + default + fi +} + +src_prepare() { + if [[ ${OPENJ9_PV} == 9999 ]]; then + ln -s ../openj9 openj9 || die + ln -s ../openj9-omr omr || die + else + ln -s ../openj9-${OPENJ9_P} openj9 || die + ln -s ../openj9-omr-${OPENJ9_P} omr || die + fi + + default + + eapply -d omr -- "${FILESDIR}/omr-omrstr-iconv-failure-overflow.patch" + eapply -d omr -- "${FILESDIR}/omr-fam.patch" + + if [[ ${OPENJ9_PV} != 9999 ]]; then + sed -i -e '/^OPENJ9_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ + -e '/^OPENJ9_TAG :=/s/:=.*/:= '${OPENJ9_P}/ \ + -e '/^OPENJ9OMR_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ + closed/OpenJ9.gmk + fi + + chmod +x configure || die +} + +src_configure() { + # Work around stack alignment issue, bug #647954. in case we ever have x86 + use x86 && append-flags -mincoming-stack-boundary=2 + + if has_version dev-java/freemarker; then + local freemarker=freemarker + else + local freemarker=freemarker-bin + fi + + # Enabling full docs appears to break doc building. If not + # explicitly disabled, the flag will get auto-enabled if pandoc and + # graphviz are detected. pandoc has loads of dependencies anyway. + + local myconf=( + --disable-ccache + --enable-full-docs=no + --with-boot-jdk="${JDK_HOME}" + --with-extra-cflags="${CFLAGS}" + --with-extra-cxxflags="${CXXFLAGS}" + --with-extra-ldflags="${LDFLAGS}" + --with-stdc++lib=dynamic + --with-giflib=system + --with-lcms=system + --with-libjpeg=system + --with-libpng=system + --with-native-debug-symbols=$(usex debug internal none) + --with-vendor-name="Gentoo" + --with-vendor-url="https://gentoo.org" + --with-vendor-bug-url="https://bugs.gentoo.org" + --with-vendor-vm-bug-url="https://bugs.openjdk.java.net" + --with-vendor-version-string="${PVR}" + --with-version-pre="" + --with-version-opt="" + --with-zlib=system + --enable-dtrace=$(usex systemtap yes no) + --enable-headless-only=$(usex headless-awt yes no) + + --with-freemarker-jar=$(java-pkg_getjar --build-only $freemarker freemarker.jar) + --disable-warnings-as-errors{,-omr,-openj9} + $(use_enable ddr) + $(use_with large-heap noncompressedrefs) + ) + + if use javafx; then + local zip="${EROOT%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip" + if [[ -r ${zip} ]]; then + myconf+=( --with-import-modules="${zip}" ) + else + die "${zip} not found or not readable" + fi + fi + + # PaX breaks pch, bug #601016 + if use pch && ! host-is-pax; then + myconf+=( --enable-precompiled-headers ) + else + myconf+=( --disable-precompiled-headers ) + fi + + ( + unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS + CFLAGS= CXXFLAGS= LDFLAGS= \ + CONFIG_SITE=/dev/null \ + econf "${myconf[@]}" + ) +} + +src_compile() { + local myemakeargs=( + JOBS=$(makeopts_jobs) + # https://github.com/ibmruntimes/openj9-openjdk-jdk14/issues/72 + #LOG=debug + $(usex doc docs '') + $(usex jbootstrap bootcycle-images product-images) + ) + emake "${myemakeargs[@]}" -j1 #nowarn +} + +src_install() { + local dest="/usr/$(get_libdir)/${PN}-${SLOT}" + local ddest="${ED}${dest#/}" + + cd "${S}"/build/*-release/images/jdk || die + + # Create files used as storage for system preferences. + mkdir .systemPrefs || die + touch .systemPrefs/.system.lock || die + touch .systemPrefs/.systemRootModFile || die + + # Oracle and IcedTea have libjsoundalsa.so depending on + # libasound.so.2 but OpenJDK only has libjsound.so. Weird. + if ! use alsa ; then + rm -v lib/libjsound.* || die + fi + + if ! use examples ; then + rm -vr demo/ || die + fi + + if ! use source ; then + rm -v lib/src.zip || die + fi + + rm -v lib/security/cacerts || die + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + dosym ../../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts + + # must be done before running itself + java-vm_set-pax-markings "${ddest}" + + use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}.env.sh + java-vm_revdep-mask + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter + + if use doc ; then + docinto html + dodoc -r "${S}"/build/*-release/images/docs/* + dosym ../../../usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}" + fi +} + +pkg_postinst() { + java-vm-2_pkg_postinst + + if use gentoo-vm ; then + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK" + ewarn "recognised by the system. This will almost certainly break" + ewarn "many java ebuilds as they are not ready for openjdk-11" + else + ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK" + ewarn "will not be recognised by the system. For example, simply calling" + ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo" + ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}." + fi +} |