summaryrefslogtreecommitdiff
path: root/sci-physics
diff options
context:
space:
mode:
authorAlexander Puck Neuwirth <apn-pucky@gentoo.org>2025-09-02 10:35:01 +0200
committerAlexander Puck Neuwirth <apn-pucky@gentoo.org>2025-09-10 15:48:59 +0200
commit4469d66676cfe9877bdc5947a3d59a9f17a4edba (patch)
treefd7d63209220457f2c1658197acacd650a373f5a /sci-physics
parent5e2827ed3ba4033ff265046c7d72b72c892afa50 (diff)
downloadgentoo-4469d66676cfe9877bdc5947a3d59a9f17a4edba.tar.gz
gentoo-4469d66676cfe9877bdc5947a3d59a9f17a4edba.tar.bz2
gentoo-4469d66676cfe9877bdc5947a3d59a9f17a4edba.zip
sci-physics/thepeg: substitute java source and target
Closes: https://bugs.gentoo.org/955476 Closes: https://bugs.gentoo.org/890784 Part-of: https://github.com/gentoo/gentoo/pull/43644 Closes: https://github.com/gentoo/gentoo/pull/43644 Signed-off-by: Alexander Puck Neuwirth <apn-pucky@gentoo.org>
Diffstat (limited to 'sci-physics')
-rw-r--r--sci-physics/thepeg/files/thepeg-2.2.3-java.patch61
-rw-r--r--sci-physics/thepeg/thepeg-2.2.3-r3.ebuild (renamed from sci-physics/thepeg/thepeg-2.2.3-r2.ebuild)9
-rw-r--r--sci-physics/thepeg/thepeg-2.3.0-r2.ebuild (renamed from sci-physics/thepeg/thepeg-2.3.0-r1.ebuild)6
3 files changed, 73 insertions, 3 deletions
diff --git a/sci-physics/thepeg/files/thepeg-2.2.3-java.patch b/sci-physics/thepeg/files/thepeg-2.2.3-java.patch
new file mode 100644
index 000000000000..88bd3c5acac0
--- /dev/null
+++ b/sci-physics/thepeg/files/thepeg-2.2.3-java.patch
@@ -0,0 +1,61 @@
+
+We are changing the javac -soure value from 1.4 to java-pkg_get-source
+and java-pkg_get-target which is supported by all Java versions presently
+available in ::gentoo.
+--- 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([JAVA_PKG_GET_SOURCE], [], [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 @@ JAVASOURCES = SetupThePEG.java ObjectFrame.java \
+
+ CLEANFILES = ThePEG.jar thepeg.sh
+
+-jardir = $(pkglibdir)
+-nodist_jar_DATA = ThePEG.jar
++noinst_DATA = ThePEG.jar
+
+ dist_noinst_DATA = $(JAVASOURCES) jar-manifest
+
+@@ -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 JAVA_PKG_GET_SOURCE -target JAVA_PKG_GET_TARGET `for file in $(JAVASOURCES); do echo ThePEG/$$file; done`
+ $(JAR) cmf ThePEG/jar-manifest ThePEG.jar ThePEG/*.class
+
+ thepeg.sh: thepeg.install Makefile
+- sed -e s:@pkglibdir[@]:$(pkglibdir):g \
++ sed -e s:@datadir[@]:$(datadir):g \
+ -e s:@bindir[@]:$(bindir):g \
+ -e s:@java[@]:$(JAVA):g $(srcdir)/thepeg.install > thepeg.sh
+ chmod +x thepeg.sh
+--- a/java/thepeg.install
++++ b/java/thepeg.install
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-pkglibdir=@pkglibdir@
++source @datadir@/thepeg/package.env
+ bindir=@bindir@
+
+ ThePEG_CMD="${bindir}/setupThePEG"
+@@ -19,4 +19,4 @@
+
+
+
+-exec @java@ ${HEADLESS} -jar ${pkglibdir}/ThePEG.jar ${ThePEG_CMD} "$@"
++exec @java@ ${HEADLESS} -jar ${CLASSPATH} ${ThePEG_CMD} "$@"
diff --git a/sci-physics/thepeg/thepeg-2.2.3-r2.ebuild b/sci-physics/thepeg/thepeg-2.2.3-r3.ebuild
index 6a755cf443ef..5e68e6570ed1 100644
--- a/sci-physics/thepeg/thepeg-2.2.3-r2.ebuild
+++ b/sci-physics/thepeg/thepeg-2.2.3-r3.ebuild
@@ -43,8 +43,8 @@ RDEPEND="${CDEPEND}
"
PATCHES=(
- "${FILESDIR}"/${PN}-1.8.3-java.patch # there are todo items in the patch
"${FILESDIR}"/${PN}-2.0.4-gcc6.patch
+ "${FILESDIR}"/${PN}-2.2.3-java.patch
)
src_prepare() {
@@ -56,11 +56,16 @@ src_prepare() {
-e '/dist_pkgdata_DATA = ThePEG.el/d' \
lib/Makefile.am || die
default
+ if use java; then
+ sed -i "s/JAVA_PKG_GET_SOURCE/$(java-pkg_get-source)/g" configure.ac java/Makefile.am || die
+ sed -i "s/JAVA_PKG_GET_TARGET/$(java-pkg_get-target)/g" configure.ac java/Makefile.am || die
+ fi
java-pkg-opt-2_src_prepare
eautoreconf
}
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)"
@@ -94,7 +99,7 @@ src_install() {
use emacs && elisp-install ${PN} lib/ThePEG.el{,c}
use java && java-pkg_newjar java/ThePEG.jar
- cat <<-EOF > "${T}"/50${PN}
+ cat <<-EOF > "${T}"/50${PN} || die
LDPATH="${EPREFIX}/usr/$(get_libdir)/ThePEG"
EOF
doenvd "${T}"/50${PN}
diff --git a/sci-physics/thepeg/thepeg-2.3.0-r1.ebuild b/sci-physics/thepeg/thepeg-2.3.0-r2.ebuild
index aea0dd86a4bf..c5bfd3c5b907 100644
--- a/sci-physics/thepeg/thepeg-2.3.0-r1.ebuild
+++ b/sci-physics/thepeg/thepeg-2.3.0-r2.ebuild
@@ -47,10 +47,10 @@ RDEPEND="${CDEPEND}
"
PATCHES=(
- "${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
+ "${FILESDIR}"/${PN}-2.2.3-java.patch
)
src_prepare() {
@@ -62,6 +62,10 @@ src_prepare() {
-e '/dist_pkgdata_DATA = ThePEG.el/d' \
lib/Makefile.am || die
default
+ if use java; then
+ sed -i "s/JAVA_PKG_GET_SOURCE/$(java-pkg_get-source)/g" configure.ac java/Makefile.am || die
+ sed -i "s/JAVA_PKG_GET_TARGET/$(java-pkg_get-target)/g" configure.ac java/Makefile.am || die
+ fi
java-pkg-opt-2_src_prepare
eautoreconf
}