commit:     1fcfb0a871880d7a30b08ec85c33707220da11d1
Author:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
AuthorDate: Fri Feb 16 21:07:46 2024 +0000
Commit:     Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> 
de>
CommitDate: Thu Jun 27 14:35:27 2024 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=1fcfb0a8

sci-mathematics/Oid: Fix java, update URLs

Co-authored-by: Andrew Nowa Ammerlaan <andrewammerlaan <AT> gentoo.org>
Closes: https://github.com/gentoo/sci/pull/1240
Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de>

 .../Oid/{Oid-4.0.ebuild => Oid-4.0-r1.ebuild}      | 26 +++++++++++++++-------
 sci-mathematics/Oid/files/Oid-4.0-bezier.patch     | 11 +++++++++
 2 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/sci-mathematics/Oid/Oid-4.0.ebuild 
b/sci-mathematics/Oid/Oid-4.0-r1.ebuild
similarity index 55%
rename from sci-mathematics/Oid/Oid-4.0.ebuild
rename to sci-mathematics/Oid/Oid-4.0-r1.ebuild
index ce967fd46..2c02ef51b 100644
--- a/sci-mathematics/Oid/Oid-4.0.ebuild
+++ b/sci-mathematics/Oid/Oid-4.0-r1.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit java-pkg-2
 
@@ -9,28 +9,38 @@ MY_PV="${PV//./-}"
 MY_P="${PN}${MY_PV}"
 
 DESCRIPTION="An interactive, extensible software system for experimenting with 
matroids"
-HOMEPAGE="https://sites.google.com/site/wwwmatroids/";
+HOMEPAGE="http://userhome.brooklyn.cuny.edu/skingan/matroids/software.html";
 SRC_URI="
-       https://sites.google.com/site/wwwmatroids/${MY_P}.tar.gz -> ${P}.tar.gz
-       https://sites.google.com/site/wwwmatroids/${PN}UserManual${MY_PV}.pdf
+       http://userhome.brooklyn.cuny.edu/skingan/matroids/${MY_P}.tar.gz -> 
${P}.tar.gz
+       
http://userhome.brooklyn.cuny.edu/skingan/matroids/${PN}UserManual${MY_PV}.pdf
 "
 
 KEYWORDS="~amd64 ~x86"
 SLOT="0"
 LICENSE="GPL-2"
 
-DEPEND=">=virtual/jdk-1.4:*"
-RDEPEND=">=virtual/jre-1.4:*"
+DEPEND=">=virtual/jdk-1.7:*"
+RDEPEND=">=virtual/jre-1.7:*"
 
 # The source uses 'enum' as an identifier, therefore:
-JAVA_PKG_WANT_SOURCE="1.4"
+JAVA_PKG_WANT_SOURCE="1.7"
+JAVA_PKG_WANT_TARGET="1.7"
 S="${WORKDIR}"
 
+PATCHES=(
+       "${FILESDIR}/${P}-bezier.patch"
+)
+
 src_prepare () {
        mkdir classes || die
 
        # change path names
        sed -i -e 's:NAME = ":NAME = "/usr/share/Oid/:' MatroidToolkit.java || 
die
+       # replace all enum, since after 1.4 java it is a keywords
+       sed -i -e 's:enum:enum_as_a_key_is_no_longer_allowed:g' \
+               Oid/PGFactory.java  \
+               DisplayGeom.java \
+               VisRank3ModularCuts.java || die
 
        default
 }
@@ -45,7 +55,7 @@ src_install () {
 
        java-pkg_dojar Oid.jar
        java-pkg_dolauncher
-       dodoc "${DISTDIR}"/OidUserManual4-0.pdf
+       dodoc "${DISTDIR}"/${PN}UserManual${MY_PV}.pdf
 
        insinto /usr/share/Oid
        doins matroid*.txt

diff --git a/sci-mathematics/Oid/files/Oid-4.0-bezier.patch 
b/sci-mathematics/Oid/files/Oid-4.0-bezier.patch
new file mode 100644
index 000000000..56dd64a99
--- /dev/null
+++ b/sci-mathematics/Oid/files/Oid-4.0-bezier.patch
@@ -0,0 +1,11 @@
+--- a/DisplayGeom.java 2024-02-16 22:01:22.213390949 +0100
++++ b/DisplayGeom.java 2024-02-16 22:01:26.106781457 +0100
+@@ -7844,7 +7844,7 @@
+                          // are c1 and c2. The tangent of the curve at p1 is 
determined
+                          // by the line between p1 and c1. Likewise, the 
tangent at p2 
+                          // is determined by a line from p2 to c2. These 
curves are also
+-                         // called B�zier curves.
++                         // called Bezier curves.
+                             
+                         //permStorage.removeAllElements();
+                         //finalStorage.removeAllElements();

Reply via email to