1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

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)
This commit is contained in:
Mikhail Teterin 2018-08-14 18:50:39 +00:00
parent 1a19dd5cee
commit 2412385153
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=477194
6 changed files with 83 additions and 28 deletions

View File

@ -3,40 +3,43 @@
PORTNAME= jin PORTNAME= jin
PORTVERSION= 2.14.1 PORTVERSION= 2.14.1
PORTREVISION= 2 PORTREVISION= 3
CATEGORIES= games java CATEGORIES= games java
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} 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 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 USE_JAVA= yes
JAVA_VERSION= 1.6+ USE_ANT= yes
MAKE_ARGS+= -lib ${JAVAJARDIR}/bsh.jar
SUB_FILES= ${PORTNAME} SUB_FILES= ${PORTNAME}
SUB_LIST= JINJAR=${JINJAR} SUB_LIST= JINJAR=${JINJAR:Q} JAVA_VERSION=${JAVA_PORT_VERSION:R}
DATADIR= ${JAVASHAREDIR}/${PORTNAME} DATADIR= ${JAVASHAREDIR}/${PORTNAME}
EXTRACT_AFTER_ARGS= --exclude 'bsh*.jar' \
--exclude os-specific/unix/jin \
--exclude jgoodies-windows.jar
JINJAR= ${PORTNAME}.jar JINJAR= ${PORTNAME}.jar
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} 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: do-install:
@${MKDIR} ${STAGEDIR}${DATADIR} ${FIND} ${WRKSRC} -empty -delete
@cd ${WRKSRC} && ${FIND} ${FIND_DIRS} -exec ${MKDIR} ${STAGEDIR}${DATADIR}/{} ";" cd ${WRKSRC}/build && ${COPYTREE_BIN} . ${STAGEDIR}${DATADIR}
@cd ${WRKSRC} && ${FIND} ${FIND_DATA} -exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/{} ";" ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (jin-2.14.1-unix.tar.gz) = 07652a896ec36f037ba9fd0af0d714a24aaf478926c9adb3677d45b5bfb08544 TIMESTAMP = 1534015381
SIZE (jin-2.14.1-unix.tar.gz) = 17579169 SHA256 (jin-2.14.1-source.tar.gz) = 7f3c346d42dffbeee07a1a0db2bb2ce4f3174b82fa8b9a581c0933df153671d6
SIZE (jin-2.14.1-source.tar.gz) = 17854073

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $FreeBSD$ # $FreeBSD$
cd %%DATADIR%% cd %%DATADIR%%
JAVA_VERSION="%%JAVA_VERSION%%" \ export JAVA_VERSION="%%JAVA_VERSION%%+"
exec "%%LOCALBASE%%/bin/java" -jar %%DATADIR%%/%%JINJAR%% "$@" exec "%%LOCALBASE%%/bin/java" -cp %%JAVAJARDIR%%/bsh.jar:%%JINJAR%% free.jin.JinApplication "$@"

View File

@ -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>

View File

@ -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);

View File

@ -3,11 +3,8 @@ bin/jin
%%DATADIR%%/actions/getserverhelp.jar %%DATADIR%%/actions/getserverhelp.jar
%%DATADIR%%/actions/seek.jar %%DATADIR%%/actions/seek.jar
%%DATADIR%%/chess.jar %%DATADIR%%/chess.jar
%%DATADIR%%/copyright.txt
%%DATADIR%%/icon.png
%%DATADIR%%/jin.jar %%DATADIR%%/jin.jar
%%DATADIR%%/libs/board.jar %%DATADIR%%/libs/board.jar
%%DATADIR%%/libs/bsh-core-1.2b7.jar
%%DATADIR%%/libs/console.jar %%DATADIR%%/libs/console.jar
%%DATADIR%%/libs/fics/timesealing.jar %%DATADIR%%/libs/fics/timesealing.jar
%%DATADIR%%/libs/icc/timestamping.jar %%DATADIR%%/libs/icc/timestamping.jar
@ -77,5 +74,3 @@ bin/jin
%%DATADIR%%/servers/chessclub.jar %%DATADIR%%/servers/chessclub.jar
%%DATADIR%%/servers/freechess.jar %%DATADIR%%/servers/freechess.jar
%%DATADIR%%/util.jar %%DATADIR%%/util.jar
@dir %%DATADIR%%/actions/fics
@dir %%DATADIR%%/actions/icc