commit: 7f237355078dc8c5552ed8492b1073e6bf6a9ee0 Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net> AuthorDate: Fri May 2 17:08:04 2025 +0000 Commit: Nowa Ammerlaan <nowa <AT> gentoo <DOT> org> CommitDate: Mon May 5 18:22:43 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f237355
sci-physics/thepeg: allow Java higher than 1.8 This commit lifts a fixed javac -source value from 1.4 to 1.8 so that the package can be built vith higher Java versions including 25. It also adds javac -source and -target options both presently with values pinned to 1.8 which allows running this package with older java versions starting from 1.8. Leaves 2 todo items in thepeg-1.8.3-java.patch. Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net> Part-of: https://github.com/gentoo/gentoo/pull/41851 Closes: https://github.com/gentoo/gentoo/pull/41851 Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org> sci-physics/thepeg/files/thepeg-1.8.3-java.patch | 36 ++++++++++++++++++++-- ...epeg-2.2.2-r1.ebuild => thepeg-2.2.2-r2.ebuild} | 24 ++++++++++----- ...epeg-2.2.3-r1.ebuild => thepeg-2.2.3-r2.ebuild} | 24 ++++++++++----- ...{thepeg-2.3.0.ebuild => thepeg-2.3.0-r1.ebuild} | 24 +++++++++------ 4 files changed, 80 insertions(+), 28 deletions(-) diff --git a/sci-physics/thepeg/files/thepeg-1.8.3-java.patch b/sci-physics/thepeg/files/thepeg-1.8.3-java.patch index 305207ef779f..0d9eb8601842 100644 --- a/sci-physics/thepeg/files/thepeg-1.8.3-java.patch +++ b/sci-physics/thepeg/files/thepeg-1.8.3-java.patch @@ -1,6 +1,29 @@ + +We are changing the javac -soure value from 1.4 to 1.8 which is supported by all +Java versions presently available in ::gentoo. + +TODO: configure.ac +Replace '1.8' with a variable to be set with $(java-pkg_get-source) in the ebuild. + +TODO java/Makefile.am +Replace fixed values in + $(JAVAC) -source 1.8 -target 1.8 `for file in $(JAVASOURCES); do echo ThePEG/$$file; done` +with values from java-pkg_get-source and java-pkg_get-target + +--- a/configure.ac ++++ b/configure.ac +@@ -123,7 +123,7 @@ AC_ARG_WITH(javagui, + [ --with-javagui Compile and install the java-based GUI.]) + + if test "x$with_javagui" != "xno"; then +- THEPEG_HAS_JAVA([1.4], [], [with_javagui=no; AC_MSG_NOTICE([Java GUI disabled])]) ++ THEPEG_HAS_JAVA([1.8], [], [with_javagui=no; AC_MSG_NOTICE([Java GUI disabled])]) + fi + + AM_CONDITIONAL([JAVAGUI], [test "x$with_javagui" != "xno"]) --- a/java/Makefile.am +++ b/java/Makefile.am -@@ -11,8 +12,7 @@ +@@ -11,8 +12,7 @@ JAVASOURCES = SetupThePEG.java ObjectFrame.java \ CLEANFILES = ThePEG.jar thepeg.sh @@ -10,7 +33,16 @@ dist_noinst_DATA = $(JAVASOURCES) jar-manifest -@@ -34,7 +34,7 @@ +@@ -27,14 +27,14 @@ clean-local: + ThePEG: + mkdir -p ThePEG + for file in $(JAVASOURCES) jar-manifest; do \ +- cd ThePEG; $(LN_S) ../$(srcdir)/$$file $$file; cd ..; done ++ cd ThePEG; cp ../$(srcdir)/$$file $$file; cd ..; done + + ThePEG.jar: ThePEG $(JAVASOURCES) +- $(JAVAC) `for file in $(JAVASOURCES); do echo ThePEG/$$file; done` ++ $(JAVAC) -source 1.8 -target 1.8 `for file in $(JAVASOURCES); do echo ThePEG/$$file; done` $(JAR) cmf ThePEG/jar-manifest ThePEG.jar ThePEG/*.class thepeg.sh: thepeg.install Makefile diff --git a/sci-physics/thepeg/thepeg-2.2.2-r1.ebuild b/sci-physics/thepeg/thepeg-2.2.2-r2.ebuild similarity index 74% rename from sci-physics/thepeg/thepeg-2.2.2-r1.ebuild rename to sci-physics/thepeg/thepeg-2.2.2-r2.ebuild index d01ade252d4f..d4519b451d91 100644 --- a/sci-physics/thepeg/thepeg-2.2.2-r1.ebuild +++ b/sci-physics/thepeg/thepeg-2.2.2-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -8,10 +8,10 @@ inherit autotools elisp-common java-pkg-opt-2 MY_P=ThePEG-${PV} DESCRIPTION="Toolkit for High Energy Physics Event Generation" -HOMEPAGE="http://home.thep.lu.se/ThePEG/" +HOMEPAGE="https://thepeg.hepforge.org/" -TEST_URI="https://www.hepforge.org/archive/lhapdf/pdfsets/current" -SRC_URI="https://www.hepforge.org/archive/thepeg/${MY_P}.tar.bz2 +TEST_URI="https://www.hepforge.org/downloads/lhapdf/pdfsets/current" +SRC_URI="https://www.hepforge.org/downloads/thepeg/${MY_P}.tar.bz2 test? ( hepmc? ( ${TEST_URI}/cteq6ll.LHpdf ${TEST_URI}/cteq5l.LHgrid @@ -22,7 +22,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="GPL-3" SLOT="0/20" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="emacs fastjet hepmc java lhapdf static-libs test zlib" +IUSE="emacs fastjet hepmc lhapdf static-libs test zlib" RESTRICT="!test? ( test )" CDEPEND=" @@ -33,13 +33,14 @@ CDEPEND=" lhapdf? ( >=sci-physics/lhapdf-6.0:0= ) zlib? ( sys-libs/zlib:0= )" DEPEND="${CDEPEND} - java? ( virtual/jdk:1.8 ) + java? ( >=virtual/jdk-1.8:*[-headless-awt] ) test? ( sys-process/time )" RDEPEND="${CDEPEND} - java? ( virtual/jre:1.8 )" + java? ( >=virtual/jre-1.8:* ) +" PATCHES=( - "${FILESDIR}"/${PN}-1.8.3-java.patch + "${FILESDIR}"/${PN}-1.8.3-java.patch # there are todo items in the patch "${FILESDIR}"/${PN}-2.0.4-gcc6.patch ) @@ -57,6 +58,13 @@ src_prepare() { } src_configure() { + if use java; then + local -x JAVAC="$(java-pkg_get-javac)" + local -x JAVA="$(java-config -J)" + local -x JAR="$(java-config -j)" + local -x JAVAC_SOURCE="$(java-pkg_get-source)" + local -x JAVAC_TARGET="$(java-pkg_get-target)" + fi econf \ $(use_enable static-libs static) \ $(use_with fastjet fastjet "${EPREFIX}"/usr) \ diff --git a/sci-physics/thepeg/thepeg-2.2.3-r1.ebuild b/sci-physics/thepeg/thepeg-2.2.3-r2.ebuild similarity index 75% rename from sci-physics/thepeg/thepeg-2.2.3-r1.ebuild rename to sci-physics/thepeg/thepeg-2.2.3-r2.ebuild index c84a2d6c96e3..6a755cf443ef 100644 --- a/sci-physics/thepeg/thepeg-2.2.3-r1.ebuild +++ b/sci-physics/thepeg/thepeg-2.2.3-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -8,10 +8,10 @@ inherit autotools elisp-common java-pkg-opt-2 MY_P=ThePEG-${PV} DESCRIPTION="Toolkit for High Energy Physics Event Generation" -HOMEPAGE="http://home.thep.lu.se/ThePEG/" +HOMEPAGE="https://thepeg.hepforge.org/" -TEST_URI="https://www.hepforge.org/archive/lhapdf/pdfsets/current" -SRC_URI="https://www.hepforge.org/archive/thepeg/${MY_P}.tar.bz2 +TEST_URI="https://www.hepforge.org/downloads/lhapdf/pdfsets/current" +SRC_URI="https://www.hepforge.org/downloads/thepeg/${MY_P}.tar.bz2 test? ( hepmc3? ( ${TEST_URI}/cteq6ll.LHpdf ${TEST_URI}/cteq5l.LHgrid @@ -22,7 +22,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="GPL-3" SLOT="0/30" KEYWORDS="~amd64 ~x86" -IUSE="emacs fastjet +hepmc3 java lhapdf static-libs test zlib" +IUSE="emacs fastjet +hepmc3 lhapdf static-libs test zlib" RESTRICT="!test? ( test )" CDEPEND=" @@ -33,16 +33,17 @@ CDEPEND=" lhapdf? ( >=sci-physics/lhapdf-6.0:0= ) zlib? ( sys-libs/zlib:0= )" DEPEND="${CDEPEND} - java? ( virtual/jdk:1.8 ) + java? ( >=virtual/jdk-1.8:*[-headless-awt] ) test? ( sys-process/time dev-libs/boost )" RDEPEND="${CDEPEND} - java? ( virtual/jre:1.8 )" + java? ( >=virtual/jre-1.8:* ) +" PATCHES=( - "${FILESDIR}"/${PN}-1.8.3-java.patch + "${FILESDIR}"/${PN}-1.8.3-java.patch # there are todo items in the patch "${FILESDIR}"/${PN}-2.0.4-gcc6.patch ) @@ -60,6 +61,13 @@ src_prepare() { } src_configure() { + if use java; then + local -x JAVAC="$(java-pkg_get-javac)" + local -x JAVA="$(java-config -J)" + local -x JAR="$(java-config -j)" + local -x JAVAC_SOURCE="$(java-pkg_get-source)" + local -x JAVAC_TARGET="$(java-pkg_get-target)" + fi econf \ $(use_enable static-libs static) \ $(use_with fastjet fastjet "${EPREFIX}"/usr) \ diff --git a/sci-physics/thepeg/thepeg-2.3.0.ebuild b/sci-physics/thepeg/thepeg-2.3.0-r1.ebuild similarity index 79% rename from sci-physics/thepeg/thepeg-2.3.0.ebuild rename to sci-physics/thepeg/thepeg-2.3.0-r1.ebuild index 19e2855c35cb..aea0dd86a4bf 100644 --- a/sci-physics/thepeg/thepeg-2.3.0.ebuild +++ b/sci-physics/thepeg/thepeg-2.3.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -8,13 +8,10 @@ inherit autotools elisp-common java-pkg-opt-2 MY_P=ThePEG-${PV} DESCRIPTION="Toolkit for High Energy Physics Event Generation" -HOMEPAGE=" - http://home.thep.lu.se/ThePEG/ - https://thepeg.hepforge.org/ -" +HOMEPAGE="https://thepeg.hepforge.org/" -TEST_URI="https://www.hepforge.org/archive/lhapdf/pdfsets/current" -SRC_URI="https://www.hepforge.org/archive/thepeg/${MY_P}.tar.bz2 +TEST_URI="https://www.hepforge.org/downloads/lhapdf/pdfsets/current" +SRC_URI="https://www.hepforge.org/downloads/thepeg/${MY_P}.tar.bz2 test? ( hepmc3? ( ${TEST_URI}/cteq6ll.LHpdf @@ -40,17 +37,17 @@ CDEPEND=" zlib? ( sys-libs/zlib:0= )" DEPEND="${CDEPEND} sci-libs/gsl:= - java? ( virtual/jdk:1.8 ) + java? ( >=virtual/jdk-1.8:*[-headless-awt] ) test? ( sys-process/time dev-libs/boost )" RDEPEND="${CDEPEND} - java? ( virtual/jre:1.8 ) + java? ( >=virtual/jre-1.8:* ) " PATCHES=( - "${FILESDIR}"/${PN}-1.8.3-java.patch + "${FILESDIR}"/${PN}-1.8.3-java.patch # there are todo items in the patch "${FILESDIR}"/${PN}-2.0.4-gcc6.patch "${FILESDIR}"/${PN}-2.3.0-rivet.patch # properly support rivet/yoda weights in thepeg, reported to upstream by mail. "${FILESDIR}"/${PN}-2.3.0-functional.patch # https://bugs.gentoo.org/941477 @@ -71,6 +68,13 @@ src_prepare() { src_configure() { local -x CONFIG_SHELL=/bin/bash + if use java; then + local -x JAVAC="$(java-pkg_get-javac)" + local -x JAVA="$(java-config -J)" + local -x JAR="$(java-config -j)" + local -x JAVAC_SOURCE="$(java-pkg_get-source)" + local -x JAVAC_TARGET="$(java-pkg_get-target)" + fi econf \ $(use_enable static-libs static) \ $(use_with fastjet fastjet "${ESYSROOT}"/usr) \
