Hi,

Working on updating the abcl port to latest release. This seems to be
work as expected once I removed old customizations from my .abclrc file.

I bumped the MODJAVA_VER to 11 so it matches the jna packages version.
ABCL uses jna for foreign functions and I got java version errors when
they did not match.

The following diff enables the java junit tests. I'm not sure if these
are useful for bulk builds, ant seems to return success irregardless of
the test outcome. Also the running of tests requires a bit of work on
patching and setup before they work.

ABCL has following targets for running tests:
  abcl.test
    --  Run all available tests.
  abcl.test.java
    --  Run the ABCL junit Java tests under ${basedir}/test/src/
  abcl.test.lisp
    --  Run the 'test.ansi.compiled', 'test.abcl', 'test.cl-bench' targets
  test.ansi.compiled
    --  Run the compiled version of the ANSI test suite
  test.abcl
    --  Run the Lisp RT tests collected in ${basedir}/test/lisp/abcl/
  test.cl-bench 
    --  Run the cl-bench test suite.

Java Junit tests require Junit and Maven installations which is
implemented currently. ANSI test suite requires the downloading the full
test suite before running tests and I don't think ABCL still passess it.
test.abcl target has some lisp tests which require setting up
*user-cache* directory for _pbuild user where the FASL files stored.
This requires a bit of patching for build.xml.
The cl-bench runs common lisp tests against all available common lisp
systems from quicklisp so it is not expected to complete successfully.

What do you think? Skip all tests as was done before or patch in some of
the tests?

Timo

diff fa25a47aa4e844fb29f93cb52cae81fdcf98ad16 /usr/ports
blob - 821f1c92c6f3b82b2e43d6327452fb9cffb0a742
file + lang/abcl/Makefile
--- lang/abcl/Makefile
+++ lang/abcl/Makefile
@@ -1,10 +1,12 @@
 COMMENT =              Common Lisp dialect for the Java Virtual Machine
-V =                    1.8.0
+V =                    1.9.0
 DISTNAME =             abcl-src-${V}
 PKGNAME =              abcl-${V}
 PKG_ARCH =             *
-REVISION =             0
 
+MAVEN_V =              3.3.9
+JUNIT_V =              4.8.1
+
 CATEGORIES =           lang
 
 HOMEPAGE =             https://abcl.org/
@@ -15,22 +17,28 @@ MAINTAINER =                Timo Myyra 
<[email protected]>
 PERMIT_PACKAGE =       Yes
 
 MASTER_SITES =         ${HOMEPAGE}/releases/${V}/
+MASTER_SITES1 =                
https://repo1.maven.org/maven2/junit/junit/${JUNIT_V}/
+MASTER_SITES2 =                
https://www.apache.org/dist/maven/maven-3/${MAVEN_V}/binaries/
 
 DISTFILES =            ${DISTNAME}${EXTRACT_SUFX}
+SUPDISTFILES+=         junit-${JUNIT_V}.jar:1
+SUPDISTFILES+=         apache-maven-${MAVEN_V}-bin.zip:2
+
 EXTRACT_ONLY =         ${DISTNAME}${EXTRACT_SUFX}
 
 MODULES =              java
-MODJAVA_VER =          1.8+
+MODJAVA_VER =          11
 MODJAVA_BUILD =                ant
 MODJAVA_BUILD_TARGET_NAME =    abcl.jar
 
 RUN_DEPENDS =          java/javaPathHelper \
                        misc/rlwrap
 
-NO_TEST =              Yes
-
 ABCL_HOME =            ${PREFIX}/abcl
 
+pre-configure:
+       ${INSTALL_DATA} ${FILESDIR}/abcl.properties ${WRKSRC}/abcl.properties
+
 do-install:
        ${INSTALL_DATA_DIR} ${ABCL_HOME}
        ${INSTALL_DATA} ${WRKSRC}/dist/abcl.jar ${ABCL_HOME}
@@ -40,6 +48,18 @@ do-install:
        chown -R ${SHAREOWN}:${SHAREGRP} ${ABCL_HOME}/src
        ${INSTALL_DATA} ${FILESDIR}/abcl_completions ${ABCL_HOME}
 
+pre-test:
+       ${INSTALL_DATA_DIR} ${WRKDIR}/.cache
+
+do-test:
+       ${INSTALL_DATA_DIR} ${WRKSRC}/ext
+       cp ${DISTDIR}/junit-${JUNIT_V}.jar ${WRKSRC}/ext/
+       cp ${DISTDIR}/apache-maven-${MAVEN_V}-bin.zip ${WRKSRC}/ext/
+       cd ${MODJAVA_BUILD_DIR} && \
+               ${SETENV} ${MAKE_ENV} ${LOCALBASE}/bin/ant \
+               -buildfile ${MODJAVA_BUILD_FILE} abcl.test.java
+
+
 # maintainer target to generate completions file
 completions: install
        ${LOCALBASE}/bin/abcl --noinit --load ${FILESDIR}/gen-completions.lisp
blob - 9dd1aa6f45939c8b6cbca890d519245d8047f544
file + lang/abcl/distinfo
--- lang/abcl/distinfo
+++ lang/abcl/distinfo
@@ -1,2 +1,6 @@
-SHA256 (abcl-src-1.8.0.tar.gz) = HYce4va8+ZHVpu/36lEF74CGENuIJgTU3wQR6XGtJX8=
-SIZE (abcl-src-1.8.0.tar.gz) = 2613411
+SHA256 (abcl-src-1.9.0.tar.gz) = oStchPKINL2Yjjra4K0q1MxsRR2eRPPAhT0AcVjBmGk=
+SHA256 (apache-maven-3.3.9-bin.zip) = 
uzcUamfQZwaXVMd1ucnwO1LalTJhmBc43pYwVwI82jo=
+SHA256 (junit-4.8.1.jar) = 79jPk7V9Aej1++++HxeuOebiJVNhWSbgCm7vwwfaIeY=
+SIZE (abcl-src-1.9.0.tar.gz) = 2470791
+SIZE (apache-maven-3.3.9-bin.zip) = 8617253
+SIZE (junit-4.8.1.jar) = 237047
blob - /dev/null
file + lang/abcl/files/abcl.properties
--- /dev/null
+++ lang/abcl/files/abcl.properties
@@ -0,0 +1,101 @@
+## Ant based build process and runtime settings
+
+## A file named 'abcl.properties' controls settings for the ABCL
+## build.  This is the prototype for its contents.
+
+# Attempt to perform incremental compilation? 
+abcl.build.incremental=true
+
+## javac compiler options for ABCL build
+# generate class files for this target JVM
+ant.build.javac.target=1.8
+# specify Java source compatiblity level
+ant.build.javac.source=1.8
+
+## Additional site specific startup code to be merged in 'system.lisp' at 
build time
+#abcl.startup.file=${basedir}/startup.lisp
+
+## java.options sets the invoking JVM options in the abcl wrapper script
+
+# Base JVM settings that work on all supported platforms
+# <> java.options 
+java.options=-XshowSettings:vm -Dfile.encoding=UTF-8 -XX:+UseG1GC 
-XX:+AggressiveOpts -XX:CompileThreshold=10
+
+## N.b. Ant properties can only be set once, so lines like
+##    java.options=${java.options} further options
+## will NOT work.  Instead one has to "manually" create lines
+
+#<>
+# <java/runtime> ( openjdk11, openjdk13, openjdk14 ) ;
+#
+#java.options=-XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Xmx<size> -Xlog:gc
+
+#<>
+#  <java/runtime> openjdk11 ;
+#  rdfs:seeAlso 
<https://blog.gceasy.io/2020/03/18/7-jvm-arguments-of-highly-effective-applications/>
 ;
+#java.options=-XX:CompileThreshold=10
+
+#<>
+#  <java/runtime> openjdk8 ;
+#java.options=-XX:+UseG1GC -XX:+AggressiveOpts -XX:CompileThreshold=10
+
+#<> 
+#  rdfs:comment "openjdk7 with 64bit optimizations" ;
+#  <java/runtime> openjdk7 ;
+#java.options=-d64 -XX:+UseG1GC 
+
+#<>
+#  rdfs:comment "openjdk6 is the minimum supported runtime"
+#  <java/runtime> openjdk6 ;
+#java.options=-d64 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1g 
-XX:+UseConcMarkSweepGC
+
+# Comprehensive documentation for JVM options does not really exist:
+# per the usual entropy of long projects, the only true source of
+# truth is the source of the specific openjdk.
+#
+# As of 2020, decent online compendiums are
+# <https://chriswhocodes.com/> and <http://jvm-options.tech.xebia.fr/#>
+#
+# ORCL's documentation 
<http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html>
+
+## Various historical option settings
+
+# Java7 on 64bit optimizations
+#java.options=-d64 -Xmx16g -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2g
+
+# Set the JVM to use a maximum of 1GB of RAM (only works for 64bit JVMs)
+#java.options=-d64 -Xmx1g
+
+# Use the G1 garbage collector stablized with jdk1.7.0_04, printing GC details
+#java.options=-d64 -Xmx4g -XX:+UseG1GC 
+
+# Use a separate concurrent GC thread (java-1.6_14 or later)
+#java.options=-d64 -Xmx8g -XX:+UseConcMarkSweepGC
+
+# Verbose garbage collection
+#java.options=-verbos:gc -XX:+PrintGCDetails
+
+# Java 5 era (???) flag to GC class definitions
+#java.options=-XX:+CMSPermGenSweepingEnabled
+
+# The unloading of class definitions is a per jvm policy.  For 
+# implementations which run out of permgen space, the following should
+# help things out.
+#java.options=-d64 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1g
+
+# Enable assertions specified via the JVM contract
+# TODO move all use of org.armedbear.lisp.Debug assertions to this interface.
+#java.options=-ea
+
+## ABCL Development
+
+# skips the compilation of Lisp sources in Netbeans 
+# (for debugging compiler-pass1.lisp and subsequent passes)
+#abcl.compile.lisp.skip=true
+
+# JVM option to execute when debugging the Lisp compilation via 
'abcl.compile.lisp.debug'
+# Debug the compilation by connecting a JVM debugger to localhost:6789 via 
JDWP.
+#abcl.compile.lisp.debug.jvmarg=-agentlib:jdwp=transport=dt_socket,server=y,address=6789,suspend=y
+
+
+
blob - a41cb1e432aad256f439a9ad0ff2721415b3d25e
file + lang/abcl/files/abcl_completions
--- lang/abcl/files/abcl_completions
+++ lang/abcl/files/abcl_completions
@@ -50,6 +50,7 @@ array-rank
 array-row-major-index
 array-total-size
 arrayp
+as-jar-pathname-archive
 ash
 asin
 asinh
@@ -128,7 +129,6 @@ cdddr
 cddr
 cdr
 ceiling
-cell-error-name
 cerror
 change-class
 char
@@ -284,7 +284,6 @@ ffloor
 fifth
 file-author
 file-directory-p
-file-error-pathname
 file-length
 file-namestring
 file-position
@@ -1816,7 +1815,6 @@ os-oldmac-p
 os-unix-p
 os-windows-p
 output-stream-p
-package-error-package
 package-local-nicknames
 package-locally-nicknamed-by-list
 package-name
@@ -2377,7 +2375,6 @@ system:case-body
 system:case-body-aux
 system:case-body-error
 system:casify
-system:cfp-output-file-default
 system:check-declaration-type
 system:check-disjoint
 system:check-for-circularity
@@ -2867,6 +2864,7 @@ system:read-evaluated-form
 system:read-feature
 system:read-list
 system:read-quote
+system:read-random-state
 system:read-right-paren
 system:read-string
 system:read-vector-unsigned-byte-8
@@ -3313,3 +3311,7 @@ xp:xp-structure-p
 y-or-n-p
 yes-or-no-p
 zerop
+-structure-p
+y-or-n-p
+yes-or-no-p
+zerop
blob - /dev/null
file + lang/abcl/patches/patch-build_xml
--- /dev/null
+++ lang/abcl/patches/patch-build_xml
@@ -0,0 +1,20 @@
+Index: build.xml
+--- build.xml.orig
++++ build.xml
+@@ -1056,7 +1056,7 @@ ${basedir}/../cl-bench
+       <javac destdir="${abcl.test.classes.dir}"
+              classpathref="abcl.test.compile.classpath"
+              debug="true"
+-             target="1.5">
++             target="8">
+         <src path="${abcl.test.src.dir}"/>
+         <patternset refid="abcl.test.source.java"/>
+       </javac>
+@@ -1077,7 +1077,6 @@ ${basedir}/../cl-bench
+         <arg value="org.armedbear.lisp.PathnameTest"/>
+         <arg value="org.armedbear.lisp.StreamTest"/>
+         <arg value="org.armedbear.lisp.SeekableStringWriterTest"/>
+-        <arg value="org.armedbear.lisp.UtilitiesTest"/>
+         <arg value="org.armedbear.lisp.serialization.SerializationTest"/>
+               <!-- currently hangs(!) the running process
+         <arg value="org.armedbear.lisp.util.HttpHeadTest"/>
blob - 53f21721432307466ac4b90381a0ce858dffd7e2
file + lang/abcl/pkg/PLIST
--- lang/abcl/pkg/PLIST
+++ lang/abcl/pkg/PLIST
@@ -295,7 +295,6 @@ abcl/src/org/armedbear/lisp/fasl-concat.lisp
 abcl/src/org/armedbear/lisp/fdefinition.lisp
 abcl/src/org/armedbear/lisp/featurep.lisp
 abcl/src/org/armedbear/lisp/file_author.java
-abcl/src/org/armedbear/lisp/file_error_pathname.java
 abcl/src/org/armedbear/lisp/file_length.java
 abcl/src/org/armedbear/lisp/file_string_length.java
 abcl/src/org/armedbear/lisp/file_write_date.java
@@ -387,7 +386,6 @@ abcl/src/org/armedbear/lisp/open_stream_p.java
 abcl/src/org/armedbear/lisp/or.lisp
 abcl/src/org/armedbear/lisp/output_stream_p.java
 abcl/src/org/armedbear/lisp/package.lisp
-abcl/src/org/armedbear/lisp/package_error_package.java
 abcl/src/org/armedbear/lisp/parse-integer.lisp
 abcl/src/org/armedbear/lisp/parse-lambda-list.lisp
 abcl/src/org/armedbear/lisp/pathnames.lisp
blob - fec0ad5c724e4f7a62d3d05281393d7ee87c10bc
file + lang/abcl/pkg/README
--- lang/abcl/pkg/README
+++ lang/abcl/pkg/README
@@ -1,2 +1,2 @@
-In order to use CFFI to access foreign libraries the jna package needs
-to be installed. 
+Use of foreign function interface from ABCL requires the `jna' package
+to be installed. This can be done simply with 'pkg_add jna'.

Reply via email to