[email protected] (Timo Myyrä) writes:

> Hi,
>
> Here's updated port for kawa.
> Added dependency on print/texinfo so the kawa info packages compile. Info 
> files
> are great to have when working with Emacs.
>
> I'm not sure if the JAVA_TOOL_OPTIONS is the right way of fixing:
> `unmappable character for encoding ASCII' errors but it seems to work.
>
> Timo
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/kawa/Makefile,v
> retrieving revision 1.10
> diff -u -p -r1.10 Makefile
> --- Makefile  6 Dec 2015 20:01:33 -0000       1.10
> +++ Makefile  28 Mar 2017 04:11:02 -0000
> @@ -4,7 +4,7 @@ BROKEN-i386= java
>  
>  COMMENT=             Scheme and language framework for the Java platform
>  
> -DISTNAME=            kawa-2.1
> +DISTNAME=            kawa-2.3
>  CATEGORIES=          lang java
>  
>  HOMEPAGE=            https://www.gnu.org/software/kawa/
> @@ -17,28 +17,40 @@ MASTER_SITES=             ${MASTER_SITE_GNU:=kawa/}
>  MODULES=             java
>  MODJAVA_VER=         1.7+
>  
> -TEST_DEPENDS=                ${BUILD_DEPENDS}
> -
>  USE_GMAKE=           Yes
>  
> -WANTLIB += c ncurses readline
> +BUILD_DEPENDS=               print/texinfo \
> +                     devel/autoconf/2.69 \
> +                     devel/automake/1.15
> +TEST_DEPENDS=                ${BUILD_DEPENDS}
> +
> +WANTLIB+=            c ncurses readline
>  
>  CONFIGURE_STYLE=     gnu
>  CONFIGURE_ARGS+=     --enable-kawa-frontend
> -CONFIGURE_ENV=               JAVAC=${JAVA_HOME}/bin/javac \
> -                     JAVA=${JAVA_HOME}/bin/java
> +CONFIGURE_ENV+=              AUTOMAKE=/usr/local/bin/automake-1.15 \
> +                     AUTOCONF=/usr/local/bin/autoconf-2.69
> +                     
> +MAKE_FLAGS=          JAVAC=${JAVA_HOME}/bin/javac \
> +                     JAVA=${JAVA_HOME}/bin/java \
> +                     MAKEINFO=/usr/local/bin/gmakeinfo \
> +                     AUTOCONF_VERSION=2.69
>  
>  .include <bsd.port.arch.mk>
>  # fails with this on i386, fails without this on amd64, unsure about
>  # other arch but lp64 is probably not a bad indicator.
>  .if ${PROPERTIES:Mlp64}
> -MAKE_ENV=            SLIB_JAVAFLAGS=-Xmx1200M
> +MAKE_ENV+=           SLIB_JAVAFLAGS=-Xmx1200M
>  .else
> -MAKE_ENV=            SLIB_JAVAFLAGS=-Xmx800M
> +MAKE_ENV+=           SLIB_JAVAFLAGS=-Xmx800M
>  .endif
>  
> +# use UTF-8 encoding to avoid following errors:
> +# unmappable character for encoding ASCII
> +MAKE_ENV+=           JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
> +
>  pre-patch:
>       find ${WRKSRC} -type f | \
> -             xargs perl -pi -e 's,^JAR =.*,JAR = ${JAVA_HOME}/bin/jar,g'
> +             xargs sed -i 's,^JAR =.*,JAR = ${JAVA_HOME}/bin/jar,g'
>  
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/lang/kawa/distinfo,v
> retrieving revision 1.3
> diff -u -p -r1.3 distinfo
> --- distinfo  6 Dec 2015 20:01:33 -0000       1.3
> +++ distinfo  28 Mar 2017 04:11:02 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (kawa-2.1.tar.gz) = yvjrAfvv6C8+RLWtCNQ1buVjNdp5SZ2cyityD30E/Tk=
> -SIZE (kawa-2.1.tar.gz) = 3015953
> +SHA256 (kawa-2.3.tar.gz) = 7N2ysUnkH3wWFMMAkThVa5VOjMajE1qVPrl+fobcR/4=
> +SIZE (kawa-2.3.tar.gz) = 3273722
> Index: patches/patch-doc_Makefile_am
> ===================================================================
> RCS file: patches/patch-doc_Makefile_am
> diff -N patches/patch-doc_Makefile_am
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-doc_Makefile_am     28 Mar 2017 04:11:02 -0000
> @@ -0,0 +1,19 @@
> +$OpenBSD$
> +--- doc/Makefile.am.orig     Sat Mar 25 12:33:43 2017
> ++++ doc/Makefile.am  Sat Mar 25 12:34:24 2017
> +@@ -29,12 +29,11 @@ TEXI2PDF = texi2pdf
> + 
> + man_MANS = kawa.1 qexo.1
> + kawa.1: $(srcdir)/kawa.man
> +-    nroff -man $(srcdir)/kawa.man > tpm-kawa.1
> +-    mv tpm-kawa.1 kawa.1
> ++    cp $(srcdir)/kawa.man kawa.1
> + 
> ++
> + qexo.1: $(srcdir)/qexo.man
> +-    nroff -man $(srcdir)/qexo.man > tpm-qexo1
> +-    mv tpm-qexo1 qexo.1
> ++    cp $(srcdir)/qexo.man qexo.1
> + 
> + ../kawa-doc-$(VERSION).tar.gz: kawa.info $(KAWA_HTMLDIR)/index.html kawa.pdf
> +     tar cf - $(KAWA_HTMLDIR)/*.html kawa.pdf|gzip -c --best >$@
> Index: patches/patch-doc_Makefile_in
> ===================================================================
> RCS file: patches/patch-doc_Makefile_in
> diff -N patches/patch-doc_Makefile_in
> --- patches/patch-doc_Makefile_in     6 Dec 2015 20:01:33 -0000       1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,45 +0,0 @@
> -$OpenBSD: patch-doc_Makefile_in,v 1.3 2015/12/06 20:01:33 jasper Exp $
> -
> -our makeinfo(1) is too old, so don't install .info files
> -kawa.texi:5: warning: unrecognized encoding name `UTF-8'.
> -kawa.texi:10: Unknown command `codequoteundirected'.
> -kawa.texi:11: Unknown command `codequotebacktick'.
> -kawa.texi:1847: Unknown command `part'.
> -kawa.texi:3009: Unknown command `backslashchar'.
> -kawa.texi:3009: Misplaced {.
> -
> ---- doc/Makefile.in.orig     Sun Dec  6 20:50:27 2015
> -+++ doc/Makefile.in  Sun Dec  6 20:50:28 2015
> -@@ -573,7 +573,7 @@ distdir: $(DISTFILES)
> -       dist-info
> - check-am: all-am
> - check: check-am
> --all-am: Makefile $(INFO_DEPS) $(MANS)
> -+all-am: Makefile $(MANS)
> - installdirs:
> -     for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
> -       test -z "$$dir" || $(MKDIR_P) "$$dir"; \
> -@@ -627,7 +627,7 @@ info: info-am
> - 
> - info-am: $(INFO_DEPS)
> - 
> --install-data-am: install-info-am install-man
> -+install-data-am: install-man
> - 
> - install-dvi: install-dvi-am
> - 
> -@@ -801,12 +801,10 @@ html: $(KAWA_HTMLS)
> -     TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
> -       MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2PDF) -E $<
> - kawa.1: $(srcdir)/kawa.man
> --    nroff -man $(srcdir)/kawa.man > tpm-kawa.1
> --    mv tpm-kawa.1 kawa.1
> -+    cp $(srcdir)/kawa.man kawa.1
> - 
> - qexo.1: $(srcdir)/qexo.man
> --    nroff -man $(srcdir)/qexo.man > tpm-qexo1
> --    mv tpm-qexo1 qexo.1
> -+    cp $(srcdir)/qexo.man qexo.1
> - 
> - ../kawa-doc-$(VERSION).tar.gz: kawa.info $(KAWA_HTMLDIR)/index.html kawa.pdf
> -     tar cf - $(KAWA_HTMLDIR)/*.html kawa.pdf|gzip -c --best >$@
> Index: patches/patch-gnu_kawa_slib_Makefile_in
> ===================================================================
> RCS file: /cvs/ports/lang/kawa/patches/patch-gnu_kawa_slib_Makefile_in,v
> retrieving revision 1.4
> diff -u -p -r1.4 patch-gnu_kawa_slib_Makefile_in
> --- patches/patch-gnu_kawa_slib_Makefile_in   6 Dec 2015 20:01:33 -0000       
> 1.4
> +++ patches/patch-gnu_kawa_slib_Makefile_in   28 Mar 2017 04:11:02 -0000
> @@ -2,9 +2,9 @@ $OpenBSD: patch-gnu_kawa_slib_Makefile_i
>  
>  Fails to compile swing.scm with defaults on some arch.
>  
> ---- gnu/kawa/slib/Makefile.in.orig   Sun Dec  6 20:50:27 2015
> -+++ gnu/kawa/slib/Makefile.in        Sun Dec  6 20:50:28 2015
> -@@ -138,7 +138,7 @@ INSTALL_DATA = @INSTALL_DATA@
> +--- gnu/kawa/slib/Makefile.in.orig   Thu Feb  9 21:03:27 2017
> ++++ gnu/kawa/slib/Makefile.in        Thu Feb  9 21:03:41 2017
> +@@ -140,7 +140,7 @@ INSTALL_DATA = @INSTALL_DATA@
>   INSTALL_PROGRAM = @INSTALL_PROGRAM@
>   INSTALL_SCRIPT = @INSTALL_SCRIPT@
>   INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/lang/kawa/pkg/PLIST,v
> retrieving revision 1.4
> diff -u -p -r1.4 PLIST
> --- pkg/PLIST 6 Dec 2015 20:01:33 -0000       1.4
> +++ pkg/PLIST 28 Mar 2017 04:11:02 -0000
> @@ -1,8 +1,15 @@
>  @comment $OpenBSD: PLIST,v 1.4 2015/12/06 20:01:33 jasper Exp $
>  @bin bin/kawa
> -bin/qexo
> +@bin bin/qexo
> +info/kawa.info
> +info/kawa.info-1
> +info/kawa.info-2
> +info/kawa.info-3
> +info/kawa.info-4
>  @man man/man1/kawa.1
>  @man man/man1/qexo.1
> -share/java/
> -share/java/kawa-2.1.jar
> -share/java/kawa.jar
> +share/kawa/
> +share/kawa/bin/
> +share/kawa/bin/kawa
> +share/kawa/lib/
> +share/kawa/lib/kawa.jar

This is not ready yet as it has few issues still but I've got few fixes already
for it but I can't run the testsuite from ports framework as they stop in
following:

rm -rf tmp?
../bin/kawa.sh --r5rs -e '(load "testing.zip")' --no-full-tailcalls \
  -e '(define this-file-name "./test.scm")' \
  -e "(set! symbol-read-case 'D)" --no-warn-undefined-variable \
  -f ./test.scm -e '(test-report)'
failed to exec /usr/local/jdk-1.7.0/bin/java: No such file or directory
gmake[2]: *** [Makefile:592: check-scm] Error 255

This is a bit odd as the file exists. I can run the testsuite from console with
"gmake check" so I guess its some test environment issue but I haven't found the
cause yet. Any ideas what is causing it?

Timo

Reply via email to