summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog10
-rw-r--r--debian/control1
-rw-r--r--debian/patches/honor-sysconfdir.diff10
-rw-r--r--debian/patches/man-pages.patch22
-rw-r--r--debian/patches/readline-libs.patch31
-rw-r--r--debian/patches/remove-AM_GNU_GETTEXT_VERSION.patch10
-rw-r--r--debian/patches/replace-ac-check-file.patch25
-rw-r--r--debian/patches/series3
-rwxr-xr-xdebian/rules27
9 files changed, 97 insertions, 42 deletions
diff --git a/debian/changelog b/debian/changelog
index 444c134..20a2cd9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+gnucobol4 (4.0~early~20221111.svn.4819-0pin1) unstable; urgency=medium
+
+ * New upstream snapshot.
+ * Update patches.
+ * Add readline-libs.patch.
+ * Add remove-AM_GNU_GETTEXT_VERSION.patch
+ * Remove replace-ac-check-file.patch (applied upstream).
+
+ -- Igor Pashev <pashev.igor@gmail.com> Sat, 12 Nov 2022 20:39:04 +0200
+
gnucobol4 (4.0~early~20200606-6) unstable; urgency=medium
* debian/control: bump standard to 4.6.0 (no changes)
diff --git a/debian/control b/debian/control
index 2bb9717..dc3ffec 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends:
, libgmp-dev
, libdb-dev
, libncurses5-dev
+ , libreadline-dev
, texinfo
, texlive
, help2man
diff --git a/debian/patches/honor-sysconfdir.diff b/debian/patches/honor-sysconfdir.diff
index ca8ecce..d3d59db 100644
--- a/debian/patches/honor-sysconfdir.diff
+++ b/debian/patches/honor-sysconfdir.diff
@@ -2,12 +2,12 @@ Description: configure script read the sysconfdir option
Author: Ludwin Janvier <lud.janvier@gmail.com>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: gnucobol-4.0-early-20200606/configure.ac
+Index: gnucobol4-debian/configure.ac
===================================================================
---- gnucobol-4.0-early-20200606.orig/configure.ac
-+++ gnucobol-4.0-early-20200606/configure.ac
-@@ -1931,6 +1931,10 @@ elif test "$COB_USES_GCC" = "yes" && tes
- fi
+--- gnucobol4-debian.orig/configure.ac
++++ gnucobol4-debian/configure.ac
+@@ -2453,6 +2453,10 @@ elif test "$COB_USES_GCC" = "yes" && tes
+ CFLAGS="$CFLAGS -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k"
fi
+if test -n "$sysconfdir"; then
diff --git a/debian/patches/man-pages.patch b/debian/patches/man-pages.patch
index 54b85fb..e984f6b 100644
--- a/debian/patches/man-pages.patch
+++ b/debian/patches/man-pages.patch
@@ -1,22 +1,22 @@
Description: add some fields to the man page
-Index: gnucobol-4.0-early-20200606/bin/Makefile.am
+Index: gnucobol4-debian/bin/Makefile.am
===================================================================
---- gnucobol-4.0-early-20200606.orig/bin/Makefile.am
-+++ gnucobol-4.0-early-20200606/bin/Makefile.am
-@@ -41,7 +41,7 @@ CODE_COVERAGE_LCOV_OPTIONS = --no-exter
- MAINTAINERCLEANFILES = cobcrun.1
+--- gnucobol4-debian.orig/bin/Makefile.am
++++ gnucobol4-debian/bin/Makefile.am
+@@ -50,7 +50,7 @@ MAINTAINERCLEANFILES = cobcrun.1
- HELPSOURCES = cobcrun.c $(top_srcdir)/configure.ac
+ HELPSOURCES_COBCRUN = cobcrun.c $(top_srcdir)/configure.ac
+ HELPSOURCES_COBCONFIG = cob-config.in $(top_srcdir)/configure.ac
-HELP2MAN_OPTS = --info-page=$(PACKAGE)
+HELP2MAN_OPTS = --section=1 --name="GnuCOBOL module loader" --info-page=$(PACKAGE)
if MAKE_HAS_PREREQ_ONLY
- cobcrun.1: $(HELPSOURCES) | $(COBCRUN)
-Index: gnucobol-4.0-early-20200606/cobc/Makefile.am
+ cobcrun.1: $(HELPSOURCES_COBCRUN) | $(COBCRUN)
+Index: gnucobol4-debian/cobc/Makefile.am
===================================================================
---- gnucobol-4.0-early-20200606.orig/cobc/Makefile.am
-+++ gnucobol-4.0-early-20200606/cobc/Makefile.am
-@@ -49,7 +49,7 @@ CODE_COVERAGE_BRANCH_COVERAGE=1
+--- gnucobol4-debian.orig/cobc/Makefile.am
++++ gnucobol4-debian/cobc/Makefile.am
+@@ -54,7 +54,7 @@ CODE_COVERAGE_BRANCH_COVERAGE=1
CODE_COVERAGE_LCOV_OPTIONS = --no-external
HELPSOURCES = help.c config.def flag.def warning.def $(top_srcdir)/configure.ac
diff --git a/debian/patches/readline-libs.patch b/debian/patches/readline-libs.patch
new file mode 100644
index 0000000..1792f59
--- /dev/null
+++ b/debian/patches/readline-libs.patch
@@ -0,0 +1,31 @@
+--- gnucobol4-4.0~2022.11.11.svn.4819.orig/bin/Makefile.am
++++ gnucobol4-4.0~2022.11.11.svn.4819/bin/Makefile.am
+@@ -35,7 +35,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_bu
+ AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
+ cobcrun_LDADD = $(COMMON_LIBS)
+ gcdiff_LDADD = $(COMMON_LIBS)
+-cobfile_LDADD =$(COMMON_LIBS)
++cobfile_LDADD = $(COMMON_LIBS) $(READLINE_LIBS)
+
+ # Add rules for code-coverage testing, as provided AX_CODE_COVERAGE
+ include $(top_srcdir)/aminclude_static.am
+--- gnucobol4-4.0~2022.11.11.svn.4819.orig/configure.ac
++++ gnucobol4-4.0~2022.11.11.svn.4819/configure.ac
+@@ -857,7 +857,8 @@ AC_CHECK_LIB([$USE_MATH], [__gmp_get_mem
+
+ AC_CHECK_LIB([readline], [readline],
+ [AC_DEFINE([HAVE_READLINE], [1])
+- LIBCOB_LIBS="$LIBCOB_LIBS -lreadline" ], [], [])
++ LIBCOB_LIBS="$LIBCOB_LIBS -lreadline"
++ READLINE_LIBS="-lreadline" ], [], [])
+
+ dnl
+ dnl Configure options part II (needing compilation)
+@@ -2646,6 +2647,7 @@ AC_SUBST([QUOTE_INCLUDE_FLAG])
+ AC_SUBST([COBC_CPPFLAGS])
+ AC_SUBST([PROGRAMS_LIBS])
+ AC_SUBST([LIBCOB_LIBS])
++AC_SUBST([READLINE_LIBS])
+ AC_SUBST([LIBCOB_CPPFLAGS])
+ AC_SUBST([LIBCOB_VER])
+ AC_SUBST([CISAM_LIBS])
diff --git a/debian/patches/remove-AM_GNU_GETTEXT_VERSION.patch b/debian/patches/remove-AM_GNU_GETTEXT_VERSION.patch
new file mode 100644
index 0000000..ad4f940
--- /dev/null
+++ b/debian/patches/remove-AM_GNU_GETTEXT_VERSION.patch
@@ -0,0 +1,10 @@
+--- gnucobol4-4.0~2022.11.11.svn.4819.orig/configure.ac
++++ gnucobol4-4.0~2022.11.11.svn.4819/configure.ac
+@@ -2100,7 +2100,6 @@ dnl AC_MSG_RESULT([yes])],
+ dnl [AC_MSG_RESULT([no])])
+
+ AM_GNU_GETTEXT([external])
+-AM_GNU_GETTEXT_VERSION([0.19.8])
+ if test "x$LTLIBINTL" != x; then
+ if test "x$PROGRAMS_LIBS" != x; then
+ PROGRAMS_LIBS="$PROGRAMS_LIBS $LTLIBINTL"
diff --git a/debian/patches/replace-ac-check-file.patch b/debian/patches/replace-ac-check-file.patch
deleted file mode 100644
index 4ce7976..0000000
--- a/debian/patches/replace-ac-check-file.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Description: gnucobol3 fails to cross build from source, because it abuses
- AC_CHECK_FILE. The macro is meant to check for files on the host system,
- but it is used to check for files inside the build tree.
-Author: Helmut Grohne <helmut@subdivi.de>
---- gnucobol4-4.0~early~20200606.orig/configure.ac
-+++ gnucobol4-4.0~early~20200606/configure.ac
-@@ -590,7 +590,7 @@
- AC_MSG_NOTICE([Checks for local cJSON ...])
- curr_libs="$LIBS"; curr_cppflags="$CPPFLAGS"
- with_cjson_local=no
-- AC_CHECK_FILE([./libcob/cJSON.c],
-+ AS_IF([test -e ./libcob/cJSON.c],
- [AC_MSG_CHECKING([if linking of ./libcob/cJSON.c works])
- CPPFLAGS="$curr_cppflags -I./libcob"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cJSON.c"]],
-@@ -601,7 +601,7 @@
- )]
- )
- if test "$with_cjson_local" = "no"; then
-- AC_CHECK_FILE([$srcdir/libcob/cJSON.c],
-+ AS_IF([test -e "$srcdir/libcob/cJSON.c"],
- [AC_MSG_CHECKING([if linking of $srcdir/libcob/cJSON.c works])
- CPPFLAGS="$curr_cppflags -I$srcdir/libcob"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cJSON.c"]],
-
diff --git a/debian/patches/series b/debian/patches/series
index cfe77e0..86093d3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
honor-sysconfdir.diff
man-pages.patch
-replace-ac-check-file.patch
+readline-libs.patch
+remove-AM_GNU_GETTEXT_VERSION.patch
diff --git a/debian/rules b/debian/rules
index 4344e23..bf310d9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,6 +21,7 @@ override_dh_auto_configure:
# but disable optimisations by default
#maybe needed again: CFLAGS='-g -O2 -finline-functions -U_FORTIFY_SOURCE' dh_auto_configure -- --enable-debug
CFLAGS='-g -O2 -finline-functions -D_FORTIFY_SOURCE=2' dh_auto_configure -- --enable-debug
+ make tarstamp.h
# Clean generated files
override_dh_clean:
@@ -42,3 +43,29 @@ override_dh_auto_install:
# remove some uneeded files
rm -f debian/tmp/usr/lib/*/gnucobol/CBL_OC_DUMP.so
rm -f debian/tmp/usr/lib/*/libcob.la
+ rm -f debian/tmp/usr/lib/*/libcobdb.la
+
+PACKAGE := gnucobol4
+SVN_REPO := https://svn.code.sf.net/p/gnucobol/code/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 := \
+ build_windows
+.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 COB_TAR_DATE \"`LC_ALL=C date -u +'%b %d %Y %T'` UTC\""; \
+ echo "#define COB_NUM_TAR_DATE ` LC_ALL=C date -u +'%Y%m%d'`"; \
+ echo "#define COB_NUM_TAR_TIME ` LC_ALL=C date -u +'%H%M%S'`"; \
+ } > tarstamp.h
+ 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"
+