summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-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
6 files changed, 206 insertions, 0 deletions
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 ) && \