diff --git a/dev-java/oraclejdk-bin/Manifest b/dev-java/oraclejdk-bin/Manifest index 83fc0d38b1..7a234002dc 100644 --- a/dev-java/oraclejdk-bin/Manifest +++ b/dev-java/oraclejdk-bin/Manifest @@ -1 +1,2 @@ +DIST jdk-21.0.1_linux-x64_bin.tar.gz 197226694 BLAKE2B ba5f9adeccb2c594f23055940c441eeb71a82babe1a377ba533ff54c9ea8f6ee0b5d6099158233ad81e06b3d08f5f501501fa506ed65ca6d9569ba066360d20f SHA512 1ba6329cad9ae5a4b0fcc6baf0b68df72a4a4fdc31a54de064e842339613624315e172f405c54e185e03b1d6b5d2b95e482b4d6eb9a3d161f08440f645680650 DIST jdk-8u391-linux-x64.tar.gz 141887242 BLAKE2B ea1e25d5ac83a845e3537908b9d35711ec25aaeccdf03ac35c3e2c2283cb174a6006eb8ac285c28eed0c3c1d0d44c60f248d7f84bb56a8fe28b96b0d5aee1f56 SHA512 2df6223286bcd90fcda436e8ba3020782433b3b749f3113dc0f7dcedc53e091886b784626e1be08d234356294b3c5048ed0da7064ba7714a9bf25f4f2b034c2e diff --git a/dev-java/oraclejdk-bin/files/oraclejdk-bin-21.env.sh b/dev-java/oraclejdk-bin/files/oraclejdk-bin-21.env.sh new file mode 100644 index 0000000000..b46c169aa7 --- /dev/null +++ b/dev-java/oraclejdk-bin/files/oraclejdk-bin-21.env.sh @@ -0,0 +1,13 @@ +VERSION="Oracle JDK ${PV}" +JAVA_HOME="${EPREFIX}/opt/${P}" +JDK_HOME="${EPREFIX}/opt/${P}" +JAVAC="\${JAVA_HOME}/bin/javac" +PATH="\${JAVA_HOME}/bin" +ROOTPATH="\${JAVA_HOME}/bin" +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" +MANPATH="" +PROVIDES_TYPE="JDK JRE" +PROVIDES_VERSION="${SLOT}" +BOOTCLASSPATH="" +GENERATION="2" +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" diff --git a/dev-java/oraclejdk-bin/metadata.xml b/dev-java/oraclejdk-bin/metadata.xml index 426d93398c..a78099d729 100644 --- a/dev-java/oraclejdk-bin/metadata.xml +++ b/dev-java/oraclejdk-bin/metadata.xml @@ -11,7 +11,8 @@ Don't install the X backend for AWT, needed by some GUIs (used to be X flag) - Install JVM (and optionally JavaFX) sources + Install JVM sources Install JavaFX libraries + Install features requiring a commercial license for production use diff --git a/dev-java/oraclejdk-bin/oraclejdk-bin-21.0.1.ebuild b/dev-java/oraclejdk-bin/oraclejdk-bin-21.0.1.ebuild new file mode 100644 index 0000000000..68e542589b --- /dev/null +++ b/dev-java/oraclejdk-bin/oraclejdk-bin-21.0.1.ebuild @@ -0,0 +1,68 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit java-vm-2 + +DESCRIPTION="Oracle's Java SE Development Kit" +HOMEPAGE="https://www.oracle.com/java" +SRC_URI="https://download.oracle.com/java/21/archive/jdk-${PV}_linux-x64_bin.tar.gz" +S="${WORKDIR}/jdk-${PV}" +SLOT="21" +LICENSE="NFTC" +KEYWORDS="~amd64" +IUSE="alsa +commercial cups headless-awt +source" +RESTRICT="bindist mirror preserve-libs strip" +QA_PREBUILT="*" + +RDEPEND="( + alsa? ( media-libs/alsa-lib ) + media-libs/fontconfig:1.0 + media-libs/freetype:2 + media-libs/harfbuzz + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + ) + cups? ( net-print/cups ) +)" +src_install() { + local dest="/opt/${P}" + local ddest="${ED}/${dest#/}" + rm LICENSE README release || die + # Create files used as storage for system preferences. + mkdir .systemPrefs || die + touch .systemPrefs/.system.lock || die + touch .systemPrefs/.systemRootModFile || die + # Seems like that we do not need alsa anymore + if ! use alsa ; then + rm -v lib/libjsound.so || die + fi + + if ! use commercial ; then + rm -vfr bin/jfr jmods/*.jfr.* lib/jfr* legal/*.jfr || die + fi + + if use headless-awt ; then + rm -vf lib/lib*{[jx]awt,splashscreen}* || die + fi + + if ! use source ; then + rm -v lib/src.zip || die + fi + + rm -v lib/security/cacerts || die + dosym -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + java-vm_install-env "${FILESDIR}"/"${PN}"-"${SLOT}".env.sh + java-vm_set-pax-markings "${ddest}" + java-vm_revdep-mask + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter +} diff --git a/licenses/NFTC b/licenses/NFTC new file mode 100644 index 0000000000..ee860d38bb --- /dev/null +++ b/licenses/NFTC @@ -0,0 +1,118 @@ +Your use of this Program is governed by the No-Fee Terms and Conditions set +forth below, unless you have received this Program (alone or as part of another +Oracle product) under an Oracle license agreement (including but not limited to +the Oracle Master Agreement), in which case your use of this Program is governed +solely by such license agreement with Oracle. + +Oracle No-Fee Terms and Conditions (NFTC) + +Definitions + +"Oracle" refers to Oracle America, Inc. "You" and "Your" refers to (a) a company +or organization (each an "Entity") accessing the Programs, if use of the +Programs will be on behalf of such Entity; or (b) an individual accessing the +Programs, if use of the Programs will not be on behalf of an Entity. +"Program(s)" refers to Oracle software provided by Oracle pursuant to the +following terms and any updates, error corrections, and/or Program Documentation +provided by Oracle. "Program Documentation" refers to Program user manuals and +Program installation manuals, if any. If available, Program Documentation may be +delivered with the Programs and/or may be accessed from +www.oracle.com/documentation. "Separate Terms" refers to separate license terms +that are specified in the Program Documentation, readmes or notice files and +that apply to Separately Licensed Technology. "Separately Licensed Technology" +refers to Oracle or third party technology that is licensed under Separate Terms +and not under the terms of this license. + +Separately Licensed Technology + +Oracle may provide certain notices to You in Program Documentation, readmes or +notice files in connection with Oracle or third party technology provided as or +with the Programs. If specified in the Program Documentation, readmes or notice +files, such technology will be licensed to You under Separate Terms. Your rights +to use Separately Licensed Technology under Separate Terms are not restricted in +any way by the terms herein. For clarity, notwithstanding the existence of a +notice, third party technology that is not Separately Licensed Technology shall +be deemed part of the Programs licensed to You under the terms of this license. + +Source Code for Open Source Software + +For software that You receive from Oracle in binary form that is licensed under +an open source license that gives You the right to receive the source code for +that binary, You can obtain a copy of the applicable source code from +https://oss.oracle.com/sources/ or http://www.oracle.com/goto/opensourcecode. If +the source code for such software was not provided to You with the binary, You +can also receive a copy of the source code on physical media by submitting a +written request pursuant to the instructions in the "Written Offer for Source +Code" section of the latter website. + +------------------------------------------------------------------------------- + +The following license terms apply to those Programs that are not provided to You +under Separate Terms. + +License Rights and Restrictions + +Oracle grants to You, as a recipient of this Program, subject to the conditions +stated herein, a nonexclusive, nontransferable, limited license to: + +(a) internally use the unmodified Programs for the purposes of developing, +testing, prototyping and demonstrating your applications, and running the +Program for Your own personal use or internal business operations; and + +(b) redistribute the unmodified Program and Program Documentation, under the +terms of this License, provided that You do not charge Your licensees any fees +associated with such distribution or use of the Program, including, without +limitation, fees for products that include or are bundled with a copy of the +Program or for services that involve the use of the distributed Program. + +You may make copies of the Programs to the extent reasonably necessary for +exercising the license rights granted herein and for backup purposes. You are +granted the right to use the Programs to provide third party training in the use +of the Programs and associated Separately Licensed Technology only if there is +express authorization of such use by Oracle on the Program's download page or in +the Program Documentation. + +Your license is contingent on compliance with the following conditions: + +- You do not remove markings or notices of either Oracle's or a licensor's + proprietary rights from the Programs or Program Documentation; + +- You comply with all U.S. and applicable export control and economic sanctions + laws and regulations that govern Your use of the Programs (including technical + data); + +- You do not cause or permit reverse engineering, disassembly or decompilation + of the Programs (except as allowed by law) by You nor allow an associated + party to do so. + +For clarity, any source code that may be included in the distribution with the +Programs is provided solely for reference purposes and may not be modified, +unless such source code is under Separate Terms permitting modification. + +Ownership + +Oracle or its licensors retain all ownership and intellectual property rights to +the Programs. + +Information Collection + +The Programs' installation and/or auto-update processes, if any, may transmit a +limited amount of data to Oracle or its service provider about those processes +to help Oracle understand and optimize them. Oracle does not associate the data +with personally identifiable information. Refer to Oracle's Privacy Policy at +www.oracle.com/privacy. + +Disclaimer of Warranties; Limitation of Liability + +THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER +DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +NONINFRINGEMENT. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ORACLE BE LIABLE TO YOU FOR +DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT +LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES.