summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/apl-apserver.install3
-rw-r--r--debian/apl-doc.install1
-rw-r--r--debian/apl-erlang.docs2
-rw-r--r--debian/apl-erlang.install1
-rw-r--r--debian/apl-gtkserver.install1
-rw-r--r--debian/apl-server.substvars2
-rw-r--r--debian/apl-workspaces.install2
-rw-r--r--debian/apl.install4
-rw-r--r--debian/changelog5
-rw-r--r--debian/control89
-rw-r--r--debian/patches/build-all.patch42
-rw-r--r--debian/patches/debian.patch30
-rw-r--r--debian/patches/erlang.patch39
-rw-r--r--debian/patches/libapl.patch40
-rw-r--r--debian/patches/series5
-rw-r--r--debian/patches/use-xcb-plot.patch50
-rwxr-xr-xdebian/rules52
-rw-r--r--debian/source/format1
18 files changed, 369 insertions, 0 deletions
diff --git a/debian/apl-apserver.install b/debian/apl-apserver.install
new file mode 100644
index 0000000..9704cf3
--- /dev/null
+++ b/debian/apl-apserver.install
@@ -0,0 +1,3 @@
+usr/bin/AP100
+usr/bin/AP210
+usr/bin/APserver
diff --git a/debian/apl-doc.install b/debian/apl-doc.install
new file mode 100644
index 0000000..0974ac4
--- /dev/null
+++ b/debian/apl-doc.install
@@ -0,0 +1 @@
+usr/share/doc/apl
diff --git a/debian/apl-erlang.docs b/debian/apl-erlang.docs
new file mode 100644
index 0000000..2f0dbd9
--- /dev/null
+++ b/debian/apl-erlang.docs
@@ -0,0 +1,2 @@
+erlang/README
+erlang/*.erl
diff --git a/debian/apl-erlang.install b/debian/apl-erlang.install
new file mode 100644
index 0000000..1c26fd9
--- /dev/null
+++ b/debian/apl-erlang.install
@@ -0,0 +1 @@
+usr/lib/apl/liberlang_APL_nif.so
diff --git a/debian/apl-gtkserver.install b/debian/apl-gtkserver.install
new file mode 100644
index 0000000..871eb16
--- /dev/null
+++ b/debian/apl-gtkserver.install
@@ -0,0 +1 @@
+usr/bin/Gtk_server
diff --git a/debian/apl-server.substvars b/debian/apl-server.substvars
new file mode 100644
index 0000000..978fc8b
--- /dev/null
+++ b/debian/apl-server.substvars
@@ -0,0 +1,2 @@
+misc:Depends=
+misc:Pre-Depends=
diff --git a/debian/apl-workspaces.install b/debian/apl-workspaces.install
new file mode 100644
index 0000000..3eb9389
--- /dev/null
+++ b/debian/apl-workspaces.install
@@ -0,0 +1,2 @@
+usr/lib/apl/wslib*
+usr/lib/apl/workspaces
diff --git a/debian/apl.install b/debian/apl.install
new file mode 100644
index 0000000..a59655d
--- /dev/null
+++ b/debian/apl.install
@@ -0,0 +1,4 @@
+etc/gnu-apl.d
+usr/bin/apl
+usr/share/info/apl.info
+usr/share/man/man1/apl.1
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..e2336eb
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+apl (1.8+2022.10.25.svn.1615-0pin1) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Igor Pashev <pashev.igor@gmail.com> Wed, 26 Oct 2022 21:31:25 +0200
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..8b43a49
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,89 @@
+Source: apl
+Maintainer: Igor Pashev <pashev.igor@gmail.com>
+Standards-Version: 4.6.1.0
+Section: interpreters
+Priority: optional
+Vcs-Git: https://git.pashev.ru/debian/apl-debian
+Vcs-Browser: https://git.pashev.ru/debian/apl-debian
+Build-Depends: debhelper-compat (= 13),
+ erlang-dev, libgtk-3-dev, libpcre2-dev, libpq-dev, libpython3-dev, libsqlite3-dev
+
+
+Package: apl
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: apl-apserver
+Suggests: apl-doc, apl-workspaces, apl-gtkserver
+Description: GNU APL
+ GNU APL is a free version of the programming language APL and
+ is intended to be a full implementation of what is known as
+ "Programming Language APL, Extended", "APL with nested arrays",
+ or "ISO/IEC13751".
+
+
+Package: apl-apserver
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Enhances: apl
+Description: GNU APL auxiliary processors server
+ GNU APL is a free version of the programming language APL and
+ is intended to be a full implementation of what is known as
+ "Programming Language APL, Extended", "APL with nested arrays",
+ or "ISO/IEC13751".
+ .
+ This package includes APserver (a shared variable server).
+
+
+Package: apl-gtkserver
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Enhances: apl
+Description: GNU APL Gtk server
+ GNU APL is a free version of the programming language APL and
+ is intended to be a full implementation of what is known as
+ "Programming Language APL, Extended", "APL with nested arrays",
+ or "ISO/IEC13751".
+ .
+ This package includes Gtk_server which allows an APL program to
+ create and control a graphical user interface.
+
+
+Package: apl-erlang
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: GNU APL Erlang interface
+ GNU APL is a free version of the programming language APL and
+ is intended to be a full implementation of what is known as
+ "Programming Language APL, Extended", "APL with nested arrays",
+ or "ISO/IEC13751".
+ .
+ This package includes APL interface for Erlang which allows The
+ GNU APL interpreter to be called directly from Erlang programs.
+
+
+Package: apl-doc
+Architecture: all
+Depends: ${misc:Depends}
+Description: GNU APL documentation
+ GNU APL is a free version of the programming language APL and
+ is intended to be a full implementation of what is known as
+ "Programming Language APL, Extended", "APL with nested arrays",
+ or "ISO/IEC13751".
+ .
+ This package includes GNU APL documentation.
+
+
+Package: apl-workspaces
+Architecture: all
+Depends: ${misc:Depends}
+Enhances: apl
+Description: GNU APL workspaces
+ GNU APL is a free version of the programming language APL and
+ is intended to be a full implementation of what is known as
+ "Programming Language APL, Extended", "APL with nested arrays",
+ or "ISO/IEC13751".
+ .
+ This package includes small workspaces or libraries for various
+ purposes (mostly demonstrating the use of some non-standard GNU
+ APL features).
+
diff --git a/debian/patches/build-all.patch b/debian/patches/build-all.patch
new file mode 100644
index 0000000..0d1a4c8
--- /dev/null
+++ b/debian/patches/build-all.patch
@@ -0,0 +1,42 @@
+Index: apl/src/Makefile.am
+===================================================================
+--- apl.orig/src/Makefile.am
++++ apl/src/Makefile.am
+@@ -37,7 +37,7 @@ common_CXXFLAGS += $(GTK_CFLAGS) $(GTK_L
+ common_CXXFLAGS += $(PYTHON_CFLAGS)
+ common_LDFLAGS = -export-dynamic $(GTK_LDFLAGS)
+
+-common_SOURCES = $(plot_SOURCES)
++common_SOURCES = $(plot_SOURCES)
+ common_SOURCES += ../buildtag.hh
+ common_SOURCES += ../config.h
+ common_SOURCES += APL_Float_as_class.hh
+@@ -206,8 +206,8 @@ libapl_la_LDFLAGS += -avoid-version
+ # libapl_la_LDFLAGS += -export-dynamic
+ libapl_la_CXXFLAGS = $(common_CXXFLAGS)
+ libapl_la_CXXFLAGS += $(GCOV_WANTED) $(GPROF_WANTED) $(CXX_RDYNAMIC)
++endif
+
+-else
+ if apl_TARGET_PYTHON
+
+ pkglib_LTLIBRARIES += lib_gnu_apl.la
+@@ -224,8 +224,7 @@ lib_gnu_apl_la_CXXFLAGS += -fstack-prote
+ lib_gnu_apl_la_CXXFLAGS += --param=ssp-buffer-size=4
+ lib_gnu_apl_la_CXXFLAGS += -I/usr/include/python3.6m # server68
+ lib_gnu_apl_la_CXXFLAGS += -I/usr/include/python3.8 # server58
+-
+-else
++endif
+
+ bin_PROGRAMS = apl
+ apl_SOURCES = main.cc $(common_SOURCES)
+@@ -233,8 +232,6 @@ apl_CXXFLAGS = $(common_CXXFLAGS)
+ apl_CXXFLAGS += $(GCOV_WANTED) $(GPROF_WANTED) $(CXX_RDYNAMIC)
+ apl_LDFLAGS = $(common_LDFLAGS)
+
+-endif
+-endif
+
+ # normally we would say:
+ #
diff --git a/debian/patches/debian.patch b/debian/patches/debian.patch
new file mode 100644
index 0000000..c9bdf73
--- /dev/null
+++ b/debian/patches/debian.patch
@@ -0,0 +1,30 @@
+Index: apl/Makefile.am
+===================================================================
+--- apl.orig/Makefile.am
++++ apl/Makefile.am
+@@ -3,9 +3,9 @@ ACLOCAL_AMFLAGS = -I m4
+
+ APL_DIRS = workspaces wslib3 wslib4 wslib5
+ SUBDIRS = $(APL_DIRS)
+-SUBDIRS += build doc erlang gnu-apl.d HOWTOs
++SUBDIRS += doc erlang gnu-apl.d HOWTOs
+ SUBDIRS += src support-files tools websock
+-DIST_SUBDIRS = $(SUBDIRS) rpm debian
++DIST_SUBDIRS = $(SUBDIRS) rpm
+
+ dist_noinst_SCRIPTS = buildtag.sh
+
+Index: apl/configure.ac
+===================================================================
+--- apl.orig/configure.ac
++++ apl/configure.ac
+@@ -436,9 +436,6 @@ AC_MSG_RESULT([$user_wants_ctrlD_del])
+ m4_include(m4/apl_TARGETs.m4)
+
+ AC_CONFIG_FILES([Makefile
+- build/Makefile
+- debian/Makefile
+- debian/source/Makefile
+ doc/Makefile
+ doc/DALY/Makefile
+ erlang/Makefile
diff --git a/debian/patches/erlang.patch b/debian/patches/erlang.patch
new file mode 100644
index 0000000..9d45561
--- /dev/null
+++ b/debian/patches/erlang.patch
@@ -0,0 +1,39 @@
+Index: apl-1.8+20220707+r1580/erlang/Makefile.am
+===================================================================
+--- apl-1.8+20220707+r1580.orig/erlang/Makefile.am
++++ apl-1.8+20220707+r1580/erlang/Makefile.am
+@@ -8,7 +8,7 @@ endif # if DEVELOP
+ pkglib_LTLIBRARIES = liberlang_APL_nif.la
+ liberlang_APL_nif_la_SOURCES = erlang_APL_nif.c README apl_example.erl
+ EXTRA_liberlang_APL_nif_la_SOURCES = apl.erl apl_example.erl
+-liberlang_APL_nif_la_CFLAGS = $(AM_CFLAGS) -I $(abs_top_srcdir) -fpic -shared
++liberlang_APL_nif_la_CFLAGS = $(AM_CFLAGS) -I $(abs_top_srcdir)/src -fpic -shared
+ liberlang_APL_nif_la_CFLAGS += -I $(pkgincludedir) # e.g. /usr/local/include/apl
+ liberlang_APL_nif_la_CFLAGS += -I $(pkgincludedir)/.. # e.g. /usr/local/include
+ liberlang_APL_nif_la_LDFLAGS = -avoid-version -export-dynamic -E
+Index: apl-1.8+20220707+r1580/erlang/erlang_APL_nif.c
+===================================================================
+--- apl-1.8+20220707+r1580.orig/erlang/erlang_APL_nif.c
++++ apl-1.8+20220707+r1580/erlang/erlang_APL_nif.c
+@@ -25,7 +25,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <erl_nif.h>
+-#include <apl/libapl.h>
++#include "libapl.h"
+
+ #if ERL_NIF_MAJOR_VERSION == 2 && ERL_NIF_MINOR_VERSION >= 7 /* see erl_nif.c:3277 */
+ # define HAVE_DIRTY
+Index: apl-1.8+20220707+r1580/erlang/apl.erl.in
+===================================================================
+--- apl-1.8+20220707+r1580.orig/erlang/apl.erl.in
++++ apl-1.8+20220707+r1580/erlang/apl.erl.in
+@@ -36,7 +36,7 @@
+ fix_function_ucs/1, set_variable/3,
+ eval_mux/5, e2c/1, e2a/1]).
+
+-init() -> erlang:load_nif("@prefix@/lib/@PACKAGE@/erlang_APL_nif", 0).
++init() -> erlang:load_nif("@libdir@/@PACKAGE@/erlang_APL_nif", 0).
+
+ % dummy implementations for the functions defined in erlang_APL_nif.c...
+ %
diff --git a/debian/patches/libapl.patch b/debian/patches/libapl.patch
new file mode 100644
index 0000000..4e1666a
--- /dev/null
+++ b/debian/patches/libapl.patch
@@ -0,0 +1,40 @@
+Index: apl/src/libapl.h
+===================================================================
+--- apl.orig/src/libapl.h
++++ apl/src/libapl.h
+@@ -51,11 +51,11 @@ enum C_CellType
+ };
+
+ // errors codes
+-enum LIBAPL_error
++typedef enum LIBAPL_error
+ {
+ #define err_def(c, _txt, major, minor) LAE_ ## c = (major << 16 | minor),
+ #include "Error.def"
+-};
++} LIBAPL_error;
+
+ #ifdef __cplusplus
+
+@@ -72,7 +72,7 @@ struct Value;
+ typedef struct Value * APL_value;
+
+ struct Function;
+-typedef struct const Function * APL_function;
++typedef const struct Function * APL_function;
+
+ #endif
+
+Index: apl/src/Workspace.hh
+===================================================================
+--- apl.orig/src/Workspace.hh
++++ apl/src/Workspace.hh
+@@ -209,7 +209,7 @@ public:
+ static StateIndicator * SI_top_fun();
+
+ /// the topmost SI with an error, maybe require ⎕L, ⎕R, or ⎕X.
+- static StateIndicator * SI_top_error(bool quad_LRX);
++ static StateIndicator * SI_top_error(bool quad_LRX = false);
+
+ /// lookup an existing name (user defined or ⎕xx, var or function).
+ /// return 0 if not found.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..fa3ec35
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+debian.patch
+erlang.patch
+libapl.patch
+build-all.patch
+use-xcb-plot.patch
diff --git a/debian/patches/use-xcb-plot.patch b/debian/patches/use-xcb-plot.patch
new file mode 100644
index 0000000..c7c2910
--- /dev/null
+++ b/debian/patches/use-xcb-plot.patch
@@ -0,0 +1,50 @@
+Index: apl/src/Makefile.am
+===================================================================
+--- apl.orig/src/Makefile.am
++++ apl/src/Makefile.am
+@@ -33,11 +33,10 @@ host_os = @host_os@
+ # common means common to the apl and libapl builds
+ #
+ common_CXXFLAGS = -Wall $(plot_CXXFLAGS) -I sql -I $(abs_top_srcdir) $(CXX_WERROR)
+-common_CXXFLAGS += $(GTK_CFLAGS) $(GTK_LIBS)
+ common_CXXFLAGS += $(PYTHON_CFLAGS)
+ common_LDFLAGS = -export-dynamic $(GTK_LDFLAGS)
+
+-common_SOURCES = $(plot_SOURCES)
++common_SOURCES = Plot_xcb.cc
+ common_SOURCES += ../buildtag.hh
+ common_SOURCES += ../config.h
+ common_SOURCES += APL_Float_as_class.hh
+Index: apl/src/Quad_PLOT.cc
+===================================================================
+--- apl.orig/src/Quad_PLOT.cc
++++ apl/src/Quad_PLOT.cc
+@@ -40,6 +40,7 @@
+ # define MISSING1 " libX11.so"
+ #endif // HAVE_LIBX11
+
++#undef apl_GTK3
+ #if apl_GTK3 // ======== GTK based ⎕PLOT ========
+
+ # if defined( HAVE_LIBGTK_3 )
+@@ -613,7 +614,7 @@ Quad_PLOT::setup_data_3D(const Value & B
+ for Y (height):
+
+ X Y Z
+- ↓ ↓
++ ↓ ↓
+ ┌───────────────┬───────────────┐
+ │ X-coordinates │ Y-coordinates │
+ └───────────────┴───────────────┘
+Index: apl/src/Quad_PNG.cc
+===================================================================
+--- apl.orig/src/Quad_PNG.cc
++++ apl/src/Quad_PNG.cc
+@@ -28,6 +28,7 @@
+ Quad_PNG Quad_PNG::_fun;
+ Quad_PNG * Quad_PNG::fun = &Quad_PNG::_fun;
+
++#undef apl_GTK3
+ #if defined( apl_GTK3 ) && \
+ defined( HAVE_LIBGTK_3 ) && \
+ defined( HAVE_LIBZ ) && \
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..258a059
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,52 @@
+#!/usr/bin/make -f
+
+APL_CONFIGURE_FULL = \
+ --with-erlang \
+ --with-gtk3 \
+ --with-libapl \
+ --with-pcre \
+ --without-python \
+ --without-postgresql \
+ --without-sqlite3 \
+
+%:
+ dh $@
+
+override_dh_auto_configure:
+ dh_auto_configure -- $(APL_CONFIGURE_FULL) --libdir=/usr/lib
+
+override_dh_missing:
+ dh_missing --list-missing
+
+override_dh_auto_clean:
+ dh_auto_clean
+ rm -f \
+ makefile.h \
+ src/Gtk/Gtk_events1.asciidoc \
+ src/Gtk/Gtk_events2.asciidoc \
+ src/Gtk/Gtk_functions.asciidoc \
+ workspaces/Makefile
+
+PACKAGE := apl
+SVN_REPO := http://svn.savannah.gnu.org/svn/apl/trunk
+DEBIAN_PATH := $(abspath $(dir $(firstword $(MAKEFILE_LIST))))
+SRC_VERSION := $(shell dpkg-parsechangelog -l$(DEBIAN_PATH)/changelog | awk '/^Version:/ {sub(/-[^-]*/, "", $$2); print $$2}')
+SVN_REVISION := $(shell echo $(SRC_VERSION) | sed -r 's,.+svn\.([0-9]+).*,\1,')
+TARBALL := $(PACKAGE)_$(SRC_VERSION).orig.tar.xz
+DELETE := \
+ aclocal.m4 autom4te.cache build config.guess config.h \
+ config.rpath config.status config.sub configure debian depcomp \
+ libtool ltmain.sh Makefile missing stamp-h1
+.PHONY: get-orig-source
+get-orig-source:
+ rm -rf get-orig-source $(TARBALL) && mkdir get-orig-source
+ svn export -r $(SVN_REVISION) $(SVN_REPO) get-orig-source/$(PACKAGE)-$(SRC_VERSION)
+ find get-orig-source/$(PACKAGE)-$(SRC_VERSION) -name '.*' -print0 | xargs -0 --no-run-if-empty rm -rfv
+ cd get-orig-source/$(PACKAGE)-$(SRC_VERSION) && \
+ rm -rfv $(DELETE) && \
+ echo '#define BUILDTAG PACKAGE_NAME, "$(SRC_VERSION)"' > buildtag.hh && \
+ echo '#define ARCHIVE_SVN "$(SVN_REVISION)"' >> buildtag.hh
+ tar cJf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION)
+ rm -rf get-orig-source
+ @echo " "$(TARBALL)" created; move it to the right destination to build the package"
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)