aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2018-08-15 02:50:39 +0800
committermi <mi@FreeBSD.org>2018-08-15 02:50:39 +0800
commit7d2ff4d3ba58ca16a633b7b279683af7ad95fcb1 (patch)
treea3b19ff9249760e7c7051408f3fd77bc713d35d0 /games
parent0af560dac752ba7278eff88987c1a9f00cff394b (diff)
downloadfreebsd-ports-gnome-7d2ff4d3ba58ca16a633b7b279683af7ad95fcb1.tar.gz
freebsd-ports-gnome-7d2ff4d3ba58ca16a633b7b279683af7ad95fcb1.tar.zst
freebsd-ports-gnome-7d2ff4d3ba58ca16a633b7b279683af7ad95fcb1.zip
Switch from installing pre-built JARs to building
from source. Use the modern bsh provided by lang/beanshell instead of the ancient bundled version. Claim maintainership. Approved by: nivit (whilom maintainer)
Diffstat (limited to 'games')
-rw-r--r--games/jin/Makefile41
-rw-r--r--games/jin/distinfo5
-rw-r--r--games/jin/files/jin.in4
-rw-r--r--games/jin/files/patch-build.xml22
-rw-r--r--games/jin/files/patch-new-bsh34
-rw-r--r--games/jin/pkg-plist5
6 files changed, 83 insertions, 28 deletions
diff --git a/games/jin/Makefile b/games/jin/Makefile
index 5c74f46ebbbc..0cf7b2f40588 100644
--- a/games/jin/Makefile
+++ b/games/jin/Makefile
@@ -3,40 +3,43 @@
PORTNAME= jin
PORTVERSION= 2.14.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= games java
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
-DISTNAME= ${PORTNAME}-${PORTVERSION}-unix
+DISTNAME= ${PORTNAME}-${PORTVERSION}-source
-MAINTAINER= nivit@FreeBSD.org
+MAINTAINER= mi@aldan.algebra.com
COMMENT= Graphical client for chess servers
-NO_BUILD= yes
+LICENSE= GPLv2+
+LICENSE_FILE= ${WRKSRC}/src/free/jin/legal/copyright.txt
+
+RUN_DEPENDS= ${JAVAJARDIR}/bsh.jar:lang/bsh
+BUILD_DEPENDS= ${RUN_DEPENDS}
+
+USES= dos2unix
+DOS2UNIX_GLOB= *.java *.txt
USE_JAVA= yes
-JAVA_VERSION= 1.6+
+USE_ANT= yes
+
+MAKE_ARGS+= -lib ${JAVAJARDIR}/bsh.jar
SUB_FILES= ${PORTNAME}
-SUB_LIST= JINJAR=${JINJAR}
+SUB_LIST= JINJAR=${JINJAR:Q} JAVA_VERSION=${JAVA_PORT_VERSION:R}
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
+EXTRACT_AFTER_ARGS= --exclude 'bsh*.jar' \
+ --exclude os-specific/unix/jin \
+ --exclude jgoodies-windows.jar
+
JINJAR= ${PORTNAME}.jar
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-FIND_DIRS= . -type d
-FIND_DATA= . -type f
-RM_FILES= ${PORTNAME} README changelog.txt gpl.txt
-
-post-extract:
-.for f in ${RM_FILES}
- @${RM} ${WRKSRC}/${f}
-.endfor
-
do-install:
- @${MKDIR} ${STAGEDIR}${DATADIR}
- @cd ${WRKSRC} && ${FIND} ${FIND_DIRS} -exec ${MKDIR} ${STAGEDIR}${DATADIR}/{} ";"
- @cd ${WRKSRC} && ${FIND} ${FIND_DATA} -exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/{} ";"
- @${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ ${FIND} ${WRKSRC} -empty -delete
+ cd ${WRKSRC}/build && ${COPYTREE_BIN} . ${STAGEDIR}${DATADIR}
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.include <bsd.port.mk>
diff --git a/games/jin/distinfo b/games/jin/distinfo
index e79cb4b02e95..718099c70914 100644
--- a/games/jin/distinfo
+++ b/games/jin/distinfo
@@ -1,2 +1,3 @@
-SHA256 (jin-2.14.1-unix.tar.gz) = 07652a896ec36f037ba9fd0af0d714a24aaf478926c9adb3677d45b5bfb08544
-SIZE (jin-2.14.1-unix.tar.gz) = 17579169
+TIMESTAMP = 1534015381
+SHA256 (jin-2.14.1-source.tar.gz) = 7f3c346d42dffbeee07a1a0db2bb2ce4f3174b82fa8b9a581c0933df153671d6
+SIZE (jin-2.14.1-source.tar.gz) = 17854073
diff --git a/games/jin/files/jin.in b/games/jin/files/jin.in
index c75be0744b7b..34a379b72b3d 100644
--- a/games/jin/files/jin.in
+++ b/games/jin/files/jin.in
@@ -1,5 +1,5 @@
#!/bin/sh
# $FreeBSD$
cd %%DATADIR%%
-JAVA_VERSION="%%JAVA_VERSION%%" \
-exec "%%LOCALBASE%%/bin/java" -jar %%DATADIR%%/%%JINJAR%% "$@"
+export JAVA_VERSION="%%JAVA_VERSION%%+"
+exec "%%LOCALBASE%%/bin/java" -cp %%JAVAJARDIR%%/bsh.jar:%%JINJAR%% free.jin.JinApplication "$@"
diff --git a/games/jin/files/patch-build.xml b/games/jin/files/patch-build.xml
new file mode 100644
index 000000000000..8cf5c33ec506
--- /dev/null
+++ b/games/jin/files/patch-build.xml
@@ -0,0 +1,22 @@
+--- build.xml 2007-03-04 19:55:00 -0500
++++ build.xml 2018-08-11 17:06:49 -0400
+@@ -21,5 +21,4 @@
+ <property name="build.dir" value="build" />
+ <property name="build.compiler" value="modern" />
+- <property name="build.target" value="${java.specification.version}" />
+ <property name="build.compress" value="no" />
+ <property name="build.manifest" value="manifest.txt" />
+@@ -60,6 +59,4 @@
+ includes="**"
+ classpathref="compile.class.path">
+- <compilerarg compiler="modern" line="-target ${build.target}" />
+- <compilerarg compiler="modern" line="-source 1.2" />
+ </javac>
+ </target>
+@@ -72,6 +69,4 @@
+ includes="**"
+ classpath="${classes.dir}">
+- <compilerarg compiler="modern" line="-target ${build.target}" />
+- <compilerarg compiler="modern" line="-source 1.2" />
+ </javac>
+ </target>
diff --git a/games/jin/files/patch-new-bsh b/games/jin/files/patch-new-bsh
new file mode 100644
index 000000000000..9075dd0df057
--- /dev/null
+++ b/games/jin/files/patch-new-bsh
@@ -0,0 +1,34 @@
+The Beanshell API has evolved since 2007, when Jin was last released...
+
+ -mi
+
+--- src/free/jin/gamelogger/LoggingRule.java 2007-03-04 19:55:00 EDT
++++ src/free/jin/gamelogger/LoggingRule.java 2018-08-11 15:50:42 EDT
+@@ -24,4 +24,5 @@
+ import bsh.Interpreter;
+ import bsh.EvalError;
++import bsh.ParseException;
+
+
+@@ -105,5 +106,5 @@
+ Object val = bsh.eval(condition);
+ if (!(val instanceof Boolean))
+- throw new EvalError("Not a boolean expression");
++ throw new ParseException(condition + ": Not a boolean expression");
+
+ this.condition = condition;
+--- src/free/jin/scripter/CommandsScriptDialog.java 2007-03-04 19:54:59 EDT
++++ src/free/jin/scripter/CommandsScriptDialog.java 2018-08-11 15:55:06 EDT
+@@ -32,4 +32,5 @@
+
+ import bsh.EvalError;
++import bsh.ParseException;
+ import bsh.Interpreter;
+ import free.jin.I18n;
+@@ -176,5 +177,5 @@
+ Object val = bsh.eval(condition);
+ if (!(val instanceof Boolean))
+- throw new EvalError("Not a boolean expression");
++ throw new ParseException(condition + ": Not a boolean expression");
+ } catch (EvalError e){
+ I18n i18n = I18n.get(CommandsScriptDialog.class);
diff --git a/games/jin/pkg-plist b/games/jin/pkg-plist
index 253264ff4e3a..d3522d46e11e 100644
--- a/games/jin/pkg-plist
+++ b/games/jin/pkg-plist
@@ -3,11 +3,8 @@ bin/jin
%%DATADIR%%/actions/getserverhelp.jar
%%DATADIR%%/actions/seek.jar
%%DATADIR%%/chess.jar
-%%DATADIR%%/copyright.txt
-%%DATADIR%%/icon.png
%%DATADIR%%/jin.jar
%%DATADIR%%/libs/board.jar
-%%DATADIR%%/libs/bsh-core-1.2b7.jar
%%DATADIR%%/libs/console.jar
%%DATADIR%%/libs/fics/timesealing.jar
%%DATADIR%%/libs/icc/timestamping.jar
@@ -77,5 +74,3 @@ bin/jin
%%DATADIR%%/servers/chessclub.jar
%%DATADIR%%/servers/freechess.jar
%%DATADIR%%/util.jar
-@dir %%DATADIR%%/actions/fics
-@dir %%DATADIR%%/actions/icc