On 2019-12-30 3:02 PM, Brian Callahan wrote:
Hi ports --
I submitted this some time ago without any response. Updated to
account for new ports changes.
OK?
~Brian
Ping. I know APL isn't a particularly popular language, but it would be
nice to get this update in.
Diff attached here. Added debug packages too; this takes just long
enough to build on my machine that it seems worth it.
~Brian
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/apl/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile 12 Jul 2019 20:47:16 -0000 1.4
+++ Makefile 23 Jan 2020 22:12:14 -0000
@@ -1,35 +1,46 @@
# $OpenBSD: Makefile,v 1.4 2019/07/12 20:47:16 sthen Exp $
COMMENT = interpreter for the programming language APL
-DISTNAME = apl-1.7
+DISTNAME = apl-1.8
CATEGORIES = lang
-REVISION = 1
SHARED_LIBS += _sql 0.0 # 0.0
-SHARED_LIBS += _template_F0 0.0 # 0.0
-SHARED_LIBS += _template_F12 0.0 # 0.0
-SHARED_LIBS += _template_OP1 0.0 # 0.0
-SHARED_LIBS += _template_OP2 0.0 # 0.0
-SHARED_LIBS += emacs 0.0 # 0.0
+SHARED_LIBS += emacs 0.1 # 0.1
HOMEPAGE = https://www.gnu.org/software/apl/
-MAINTAINER = Giuseppe Cocomazzi <sbude...@gmail.com>
+MAINTAINER = Brian Callahan <bcal...@openbsd.org>
# GPLv3+
PERMIT_PACKAGE = Yes
-WANTLIB += c m curses pthread ${COMPILER_LIBCXX}
+WANTLIB += ${COMPILER_LIBCXX} X11 Xcomposite Xcursor Xdamage Xext
+WANTLIB += Xfixes Xi Xinerama Xrandr Xrender atk-1.0 atk-bridge-2.0
+WANTLIB += c cairo cairo-gobject curses epoxy execinfo expat ffi
+WANTLIB += fftw3 fontconfig freetype fribidi gdk-3 gdk_pixbuf-2.0
+WANTLIB += gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0 graphite2
+WANTLIB += gtk-3 harfbuzz iconv intl m pango-1.0 pangocairo-1.0
+WANTLIB += pangoft2-1.0 pcre pcre2-32 pixman-1 png xcb xcb-render
+WANTLIB += xcb-shm z
-COMPILER = base-clang ports-gcc base-gcc
+DEBUG_PACKAGES = ${BUILD_PACKAGES}
+
+COMPILER = base-clang ports-gcc
MASTER_SITES = ${MASTER_SITE_GNU:=apl/}
+LIB_DEPENDS = devel/libexecinfo \
+ devel/pcre2 \
+ math/fftw3 \
+ x11/gtk+3
+
RUN_DEPENDS = fonts/apl-fonts
CONFIGURE_STYLE = gnu
CONFIGURE_ARGS += --without-sqlite3 \
--without-postgresql
-CONFIGURE_ENV += CXX_WERROR=no
+CONFIGURE_ENV += CXX_WERROR=no \
+ CXXFLAGS="${CXXFLAGS} -I${LOCALBASE}/include" \
+ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
USE_GMAKE = Yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/apl/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 11 Sep 2017 23:44:11 -0000 1.1.1.1
+++ distinfo 23 Jan 2020 22:12:14 -0000
@@ -1,2 +1,2 @@
-SHA256 (apl-1.7.tar.gz) = j/biglbXo836ncYCXjkFMSMQsnpDZF711hf9SltDuB8=
-SIZE (apl-1.7.tar.gz) = 3080318
+SHA256 (apl-1.8.tar.gz) = FE9MhYoNQwzo8ovpCjWSDdjglR5Wl2y4C1UFP6DYu8s=
+SIZE (apl-1.8.tar.gz) = 3565018
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure 11 Sep 2017 23:44:11 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-configure,v 1.1.1.1 2017/09/11 23:44:11 bcallah Exp $
---- configure.orig Fri Mar 17 16:03:06 2017
-+++ configure Mon Jul 17 17:11:15 2017
-@@ -21413,7 +21413,7 @@ echo
- #
- echo "configure: creating $srcdir/src//buildtag.hh"
- rm -f $srcdir/src/buildtag.hh
--cd $srcdir/src ; source ./buildtag ; cd ..
-+cd $srcdir/src ; . ./buildtag ; cd ..
-
- # create src/makefile.h
- #
Index: patches/patch-doc_Makefile_in
===================================================================
RCS file: /cvs/ports/lang/apl/patches/patch-doc_Makefile_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-doc_Makefile_in
--- patches/patch-doc_Makefile_in 11 Sep 2017 23:44:11 -0000 1.1.1.1
+++ patches/patch-doc_Makefile_in 23 Jan 2020 22:12:14 -0000
@@ -1,15 +1,15 @@
$OpenBSD: patch-doc_Makefile_in,v 1.1.1.1 2017/09/11 23:44:11 bcallah Exp $
---- doc/Makefile.in.orig Fri Jul 21 10:19:37 2017
-+++ doc/Makefile.in Fri Jul 21 10:19:58 2017
-@@ -342,11 +342,9 @@ man1_MANS = apl.1
+Index: doc/Makefile.in
+--- doc/Makefile.in.orig
++++ doc/Makefile.in
+@@ -354,10 +354,8 @@ man1_MANS = apl.1
dist_doc_DATA = \
apl.1 \
apl.texi \
- apl.info \
apl.html \
- APL-on-Macintosh.pdf \
libapl.texi \
- libapl.info \
+ PLOT_circle.png \
+ PLOT_zigzag.png \
libapl.html
-
- all: all-am
Index: patches/patch-gnu-apl_d_preferences_in
===================================================================
RCS file: /cvs/ports/lang/apl/patches/patch-gnu-apl_d_preferences_in,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-gnu-apl_d_preferences_in
--- patches/patch-gnu-apl_d_preferences_in 11 Sep 2017 23:44:11 -0000 1.1.1.1
+++ patches/patch-gnu-apl_d_preferences_in 23 Jan 2020 22:12:14 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-gnu-apl_d_preferences_in,v 1.1.1.1 2017/09/11 23:44:11 bcallah Exp $
---- gnu-apl.d/preferences.in.orig Fri Mar 17 15:46:54 2017
-+++ gnu-apl.d/preferences.in Fri Jul 21 12:27:36 2017
-@@ -61,9 +61,9 @@
+Index: gnu-apl.d/preferences.in
+--- gnu-apl.d/preferences.in.orig
++++ gnu-apl.d/preferences.in
+@@ -65,9 +65,9 @@
# requires that certain environment variables (e.g. TERM) are set properly
# and that your terminfo database contains the terminal you use.
#
@@ -13,7 +14,7 @@ $OpenBSD: patch-gnu-apl_d_preferences_in
#
# If you want to disable coloring initially, but switch to curses if the
# command ]COLOR (or the equivalent but now obsolete command ]XTERM)
-@@ -236,8 +236,8 @@
+@@ -241,8 +241,8 @@
#
# The corresponding command line options are --SV and --noSV
#
@@ -24,7 +25,7 @@ $OpenBSD: patch-gnu-apl_d_preferences_in
###############################################################################
-@@ -350,7 +350,7 @@ BACKUP_BEFORE_SAVE yes
+@@ -356,7 +356,7 @@ BACKUP_BEFORE_SAVE yes
# a (small) positive number below. Note thsat the interpreter will always
# exit if a large number of ^Ds (or EOFs) are read within a short while.
#
Index: patches/patch-src_Common_cc
===================================================================
RCS file: patches/patch-src_Common_cc
diff -N patches/patch-src_Common_cc
--- patches/patch-src_Common_cc 11 Sep 2017 23:44:11 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_Common_cc,v 1.1.1.1 2017/09/11 23:44:11 bcallah Exp $
---- src/Common.cc.orig Fri Mar 17 15:46:53 2017
-+++ src/Common.cc Mon Jul 17 16:37:56 2017
-@@ -81,6 +81,11 @@ void
- init_1(const char * argv0, bool log_startup)
- {
- rlimit rl;
-+
-+#ifndef RLIMIT_AS
-+# define RLIMIT_AS RLIMIT_DATA
-+#endif
-+
- getrlimit(RLIMIT_AS, &rl);
- total_memory = rl.rlim_cur;
-
Index: patches/patch-src_Common_hh
===================================================================
RCS file: patches/patch-src_Common_hh
diff -N patches/patch-src_Common_hh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Common_hh 23 Jan 2020 22:12:14 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+
+Index: src/Common.hh
+--- src/Common.hh.orig
++++ src/Common.hh
+@@ -23,6 +23,7 @@
+
+ #include "../config.h" // for xxx_WANTED and other macros from ./configure
+
++#include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <sys/un.h>
+ #include <sys/stat.h>
+@@ -41,6 +42,7 @@ enum { MAX_RANK = MAX_RANK_WANTED };
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <sys/resource.h>
+ #include <sys/time.h>
+
Index: patches/patch-src_Output_cc
===================================================================
RCS file: patches/patch-src_Output_cc
diff -N patches/patch-src_Output_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Output_cc 23 Jan 2020 22:12:14 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Fix for startup segfault.
+http://svn.savannah.gnu.org/viewvc/apl?view=revision&revision=1180
+
+Index: src/Output.cc
+--- src/Output.cc.orig
++++ src/Output.cc
+@@ -89,8 +89,6 @@ int Output::color_UERR_background = 8;
+ /// a filebuf for CERR
+ ErrOut CERR_filebuf;
+
+-bool ErrOut::used = false;
+-
+ DiffOut DOUT_filebuf(false);
+ DiffOut UERR_filebuf(true);
+
Index: patches/patch-src_Performance_def
===================================================================
RCS file: patches/patch-src_Performance_def
diff -N patches/patch-src_Performance_def
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Performance_def 23 Jan 2020 22:12:14 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+http://svn.savannah.gnu.org/viewvc/apl/trunk/src/Performance.def?r1=1090&r2=1178
+
+Index: src/Performance.def
+--- src/Performance.def.orig
++++ src/Performance.def
+@@ -1,3 +1,12 @@
++// windows seems to #define _B and/or _AB. We therefore #undef it just in case
++//
++#ifdef _B
++# undef _B
++#endif
++
++#ifdef _AB
++# undef _AB
++#endif
+
+ perfo_1(F12_PLUS , _B, " + B", 8888888888888888888ULL)
+ perfo_1(F12_MINUS , _B, " - B", 8888888888888888888ULL)
Index: patches/patch-src_Quad_GTK_cc
===================================================================
RCS file: patches/patch-src_Quad_GTK_cc
diff -N patches/patch-src_Quad_GTK_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Quad_GTK_cc 23 Jan 2020 22:12:14 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: src/Quad_GTK.cc
+--- src/Quad_GTK.cc.orig
++++ src/Quad_GTK.cc
+@@ -387,7 +387,7 @@ pollfd fds[count];
+ loop(w, count)
+ {
+ fds[w].fd = open_windows[w].fd;
+- fds[w].events = POLLIN | POLLRDHUP;
++ fds[w].events = POLLIN | POLLHUP;
+ fds[w].revents = 0;
+ }
+
+@@ -414,7 +414,7 @@ again:
+
+ pollfd pfd;
+ pfd.fd = fd;
+- pfd.events = POLLIN | POLLRDHUP;
++ pfd.events = POLLIN | POLLHUP;
+ pfd.revents = 0;
+
+ const int ready = poll(&pfd, 1, 0);
Index: patches/patch-src_Workspace_cc
===================================================================
RCS file: patches/patch-src_Workspace_cc
diff -N patches/patch-src_Workspace_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Workspace_cc 23 Jan 2020 22:12:14 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Fix for startup segfault.
+http://svn.savannah.gnu.org/viewvc/apl?view=revision&revision=1180
+
+Index: src/Workspace.cc
+--- src/Workspace.cc.orig
++++ src/Workspace.cc
+@@ -61,6 +61,13 @@ Workspace::Workspace()
+ distinguished_names.add_function(q, ID_ ## x, x::fun); }
+
+ #include "SystemVariable.def"
++
++ // (re-) instantiate ⎕CR, ⎕EC, and ⎕ES needed by macros...
++ // This is (in theory) not needed, but may be for some compilers
++ //
++ new (&Quad_CR::_fun) Quad_CR; Quad_CR::fun = &Quad_CR ::_fun;
++ new (&Quad_EC::_fun) Quad_EC; Quad_EC::fun = &Quad_EC ::_fun;
++ new (&Quad_ES::_fun) Quad_ES; Quad_ES::fun = &Quad_ES ::_fun;
+ }
+ //-----------------------------------------------------------------------------
+ void
Index: patches/patch-src_buildtag
===================================================================
RCS file: /cvs/ports/lang/apl/patches/patch-src_buildtag,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-src_buildtag
--- patches/patch-src_buildtag 11 Sep 2017 23:44:11 -0000 1.1.1.1
+++ patches/patch-src_buildtag 23 Jan 2020 22:12:14 -0000
@@ -1,7 +1,8 @@
$OpenBSD: patch-src_buildtag,v 1.1.1.1 2017/09/11 23:44:11 bcallah Exp $
---- src/buildtag.orig Fri Mar 17 15:46:53 2017
-+++ src/buildtag Mon Jul 17 16:37:56 2017
-@@ -5,10 +5,9 @@
+Index: src/buildtag
+--- src/buildtag.orig
++++ src/buildtag
+@@ -5,10 +5,10 @@
PACKAGE_NAME=$1
PACKAGE_VERSION=$2
@@ -11,6 +12,7 @@ $OpenBSD: patch-src_buildtag,v 1.1.1.1 2
-ARCHIVE_SVNINFO=`svn info Archive.cc | grep "Last Changed Rev" \
- | awk -F : '{print $2;}'`
+ARCHIVE_SVNINFO=""
-
- CONFIGURE_OPTS="unknown configure options"
- if [ -x ./config.status ]
++
+ CONFIGURE_OPTS="unknown ./configure options (no config.status)"
+ if [ -x ../config.status ]
+ then
Index: patches/patch-src_emacs_mode_TcpListener_cc
===================================================================
RCS file: /cvs/ports/lang/apl/patches/patch-src_emacs_mode_TcpListener_cc,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_emacs_mode_TcpListener_cc
--- patches/patch-src_emacs_mode_TcpListener_cc 9 Apr 2018 17:26:54 -0000 1.1
+++ patches/patch-src_emacs_mode_TcpListener_cc 23 Jan 2020 22:12:14 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-src_emacs_mode_TcpListen
Index: src/emacs_mode/TcpListener.cc
--- src/emacs_mode/TcpListener.cc.orig
+++ src/emacs_mode/TcpListener.cc
-@@ -77,7 +77,7 @@ std::string TcpListener::start( void )
+@@ -78,7 +78,7 @@ std::string TcpListener::start( void )
DOMAIN_ERROR;
}
Index: patches/patch-src_static_Objects_cc
===================================================================
RCS file: patches/patch-src_static_Objects_cc
diff -N patches/patch-src_static_Objects_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_static_Objects_cc 23 Jan 2020 22:12:14 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Fix for startup segfault.
+http://svn.savannah.gnu.org/viewvc/apl?view=revision&revision=1180
+
+Index: src/static_Objects.cc
+--- src/static_Objects.cc.orig
++++ src/static_Objects.cc
+@@ -22,6 +22,7 @@
+ #include <iostream>
+
+ #include "Common.hh"
++#include "DiffOut.hh"
+ #include "DynamicObject.hh"
+ #include "Logging.hh"
+ #include "Macro.hh"
+@@ -53,6 +54,9 @@ static_Objects::~static_Objects()
+ #define INFO(m, l) DO_INFO(#m, l)
+ #define DO_INFO(m, l) extern static_Objects info_ ## l; \
+ static_Objects info_ ## l (LOC, m);
++
++INFO(ErrOut::used, __LINE__)
++bool ErrOut::used = false;
+
+ // prerequisites for Workspace::the_workspace...
+
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/apl/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST 11 Sep 2017 23:44:11 -0000 1.1.1.1
+++ pkg/PLIST 23 Jan 2020 22:12:14 -0000
@@ -2,35 +2,38 @@
@bin bin/AP100
@bin bin/AP210
@bin bin/APserver
+@bin bin/Gtk_server
@bin bin/apl
@info info/apl.info
@info info/libapl.info
lib/apl/
-lib/apl/lib_file_io.a
+@static-lib lib/apl/lib_file_io.a
lib/apl/lib_file_io.la
-lib/apl/lib_file_io.so
-lib/apl/lib_sql.a
+@so lib/apl/lib_file_io.so
+@static-lib lib/apl/lib_sql.a
lib/apl/lib_sql.la
@lib lib/apl/lib_sql.so.${LIB_sql_VERSION}
-lib/apl/lib_template_F0.a
+@static-lib lib/apl/lib_template_F0.a
lib/apl/lib_template_F0.la
-@lib lib/apl/lib_template_F0.so.${LIB_template_F0_VERSION}
-lib/apl/lib_template_F12.a
+@so lib/apl/lib_template_F0.so
+@static-lib lib/apl/lib_template_F12.a
lib/apl/lib_template_F12.la
-@lib lib/apl/lib_template_F12.so.${LIB_template_F12_VERSION}
-lib/apl/lib_template_OP1.a
+@so lib/apl/lib_template_F12.so
+@static-lib lib/apl/lib_template_OP1.a
lib/apl/lib_template_OP1.la
-@lib lib/apl/lib_template_OP1.so.${LIB_template_OP1_VERSION}
-lib/apl/lib_template_OP2.a
+@so lib/apl/lib_template_OP1.so
+@static-lib lib/apl/lib_template_OP2.a
lib/apl/lib_template_OP2.la
-@lib lib/apl/lib_template_OP2.so.${LIB_template_OP2_VERSION}
-lib/apl/libemacs.a
+@so lib/apl/lib_template_OP2.so
+@static-lib lib/apl/libemacs.a
lib/apl/libemacs.la
@lib lib/apl/libemacs.so.${LIBemacs_VERSION}
lib/apl/workspaces/
lib/apl/workspaces/APL_CGI.apl
+lib/apl/workspaces/RUBIK.apl
lib/apl/workspaces/SCRIPT.apl
lib/apl/workspaces/ScalarBenchmark.apl
+lib/apl/workspaces/gnuplot.apl
lib/apl/wslib3/
lib/apl/wslib3/meta.apl
lib/apl/wslib4/
@@ -59,9 +62,17 @@ lib/apl/wslib5/iso-apl-cf/perf.apl
lib/apl/wslib5/iso-apl-cf/test.apl
@man man/man1/apl.1
share/doc/apl/
+share/doc/apl/APL-Communication-Cookbook.html
share/doc/apl/APL-on-Macintosh.pdf
+share/doc/apl/APL_keyboard.html
+share/doc/apl/APL_keyboard2.html
+share/doc/apl/GNU-APL-Memory-Management.html
+share/doc/apl/PLOT_circle.png
+share/doc/apl/PLOT_zigzag.png
+share/doc/apl/Quad-GTK.html
share/doc/apl/README
share/doc/apl/README-1-prerequisites
+share/doc/apl/README-10-python
share/doc/apl/README-2-configure
share/doc/apl/README-3-keyboard
share/doc/apl/README-4-compliance
@@ -69,12 +80,21 @@ share/doc/apl/README-5-WINDOWS
share/doc/apl/README-6-porting
share/doc/apl/README-7-more-info
share/doc/apl/README-8-parallel
+share/doc/apl/README-9-post-installation
share/doc/apl/SQL.apl
share/doc/apl/apl.1
share/doc/apl/apl.html
share/doc/apl/apl.texi
+share/doc/apl/apl_js.apache2
+share/doc/apl/apl_js.html
+share/doc/apl/glade-0.png
+share/doc/apl/glade-1.png
+share/doc/apl/glade-2.png
+share/doc/apl/glade-3.png
+share/doc/apl/glade-4.png
share/doc/apl/libapl.html
share/doc/apl/libapl.texi
+share/doc/apl/wsock.js
share/examples/apl/
share/examples/apl/gnu-apl.d/
@sample ${SYSCONFDIR}/gnu-apl.d/