From 51de7d7f0f3fa043be33f182554969a86d087001 Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Fri, 10 Jul 2020 17:36:26 +0200 Subject: [PATCH 1/4] Fixed GnuCOBOL 3.1-rc1 * pkgrel 1 needed a "manual dependency" libxml2 before (because the build system has it, configure found it and linked it) --> made it explict * explicit note all "optional" dependecies in the configure step to ensure nothing unexpected gets in / is missing * let cjson be included (statically linked) by configure, after manual download (there's no package for cJSON yet) * added `make check`and `make test` (including its source + a patch to ignore line breaks); currently without a hard exit --- .../002-gnucobol-3.1-rc1-cobol85_crdiff.patch | 40 +++++++++++++++++++ mingw-w64-gnucobol/PKGBUILD | 34 +++++++++++++--- 2 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 mingw-w64-gnucobol/002-gnucobol-3.1-rc1-cobol85_crdiff.patch diff --git a/mingw-w64-gnucobol/002-gnucobol-3.1-rc1-cobol85_crdiff.patch b/mingw-w64-gnucobol/002-gnucobol-3.1-rc1-cobol85_crdiff.patch new file mode 100644 index 0000000000..74dac7f4ef --- /dev/null +++ b/mingw-w64-gnucobol/002-gnucobol-3.1-rc1-cobol85_crdiff.patch @@ -0,0 +1,40 @@ +diff -Naur ../gnucobol-3.1-rc1/tests/cobol85/Makefile.in ./tests/cobol85/Makefile.in +--- ../gnucobol-3.1-rc1/tests/cobol85/Makefile.in 2020-07-01 02:22:04.000000000 +0200 ++++ ./tests/cobol85/Makefile.in 2020-07-10 14:58:01.823387000 +0200 +@@ -721,6 +721,7 @@ + @export CBL_LIST="`ls $@/*.CBL | cut -b4- | tr "\n" " "`" && \ + $(SED) -e 's/##MODULE##/'"$@"'/' \ + -e 's|##COB85DIR##|'"$(COB85DIR)"'|' \ ++ -e 's|##DIFF_FLAGS##|'"$(DIFF_FLAGS)"'|' \ + -e 's|##TESTS##|'"` echo $$CBL_LIST | $(SED) -e 's/\.CBL//g'`"'|' \ + -e 's|##TESTS_LOCAL##|'"`echo $$CBL_LIST | $(SED) -e 's/\.CBL/-local/g'`"'|' \ + $(srcdir)/Makefile.module.in > $@/Makefile +diff -Naur ../gnucobol-3.1-rc1/tests/cobol85/Makefile.module.in ./tests/cobol85/Makefile.module.in +--- ../gnucobol-3.1-rc1/tests/cobol85/Makefile.module.in 2020-07-01 02:22:04.000000000 +0200 ++++ ./tests/cobol85/Makefile.module.in 2020-07-10 14:54:51.994885400 +0200 +@@ -1,7 +1,7 @@ + # + # Makefile gnucobol/tests/cobol85/##MODULE## + # +-# Copyright (C) 2003-2012, 2015-2019 Free Software Foundation, Inc. ++# Copyright (C) 2003-2012, 2015-2020 Free Software Foundation, Inc. + # Written by Keisuke Nishida, Roger While, Simon Sobisch + # + # This file is part of GnuCOBOL. +@@ -23,6 +23,7 @@ + TESTS_LOCAL = ##TESTS_LOCAL## + + RM = rm -rf ++DIFF_FLAGS = ##DIFF_FLAGS## + + # targets that are only logical targets instead of files + .PHONY: test test-local diff test-O test-O-local lib lib-local $\ +@@ -46,7 +47,7 @@ + diff: report.txt + @echo + @echo "Comparing test results for module directory ##MODULE##" +- diff ##COB85DIR##/##MODULE##.txt report.txt || true ++ @diff $(DIFF_FLAGS) ##COB85DIR##/##MODULE##.txt report.txt || true + + test-O: + @. ../../atconfig && . ../../atlocal NIST-##MODULE##-O_$@ && $(MAKE) $@-local diff --git a/mingw-w64-gnucobol/PKGBUILD b/mingw-w64-gnucobol/PKGBUILD index b51fa290a2..6ec8900630 100644 --- a/mingw-w64-gnucobol/PKGBUILD +++ b/mingw-w64-gnucobol/PKGBUILD @@ -7,7 +7,7 @@ pkgbase=mingw-w64-${_realname} pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} pkgver=3.1rc1 pkgver_real=3.1-rc1 -pkgrel=1 +pkgrel=2 pkgdesc="GnuCOBOL, a free and modern COBOL compiler (mingw-w64)" conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-gnu-cobol-svn") replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-gnu-cobol-svn") @@ -20,26 +20,46 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gmp" "${MINGW_PACKAGE_PREFIX}-gettext" "${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-db") + # the optional depencies cannot be used for creating the binary packages, moved to depends #optdepends=("${MINGW_PACKAGE_PREFIX}-gettext: support for internationalization" # "${MINGW_PACKAGE_PREFIX}-ncurses: support for extended screenio" -# "${MINGW_PACKAGE_PREFIX}-pdcurses: support for screenio") +# "${MINGW_PACKAGE_PREFIX}-pdcurses: support for screenio" +# "${MINGW_PACKAGE_PREFIX}-libxml2: support for XML GENERATE") +makedepends=("${MINGW_PACKAGE_PREFIX}-pkg-config") +checkdepends=("${MINGW_PACKAGE_PREFIX}-curl" "${MINGW_PACKAGE_PREFIX}-perl") + +# local definitions +CJSON_RELEASE_URL="https://raw.githubusercontent.com/DaveGamble/cJSON/v1.7.13" #source=("https://ftp.gnu.org/gnu/${_realname}/${_realname}-${pkgver}.tar.xz"{,.sig} source=("https://alpha.gnu.org/gnu/${_realname}/${_realname}-${pkgver_real}.tar.xz"{,.sig} "001-mingw-gnucobol-2.2-fixformatwarnings.patch" - "cobenv.sh" "cobenv.cmd") + "002-gnucobol-3.1-rc1-cobol85_crdiff.patch" + "${CJSON_RELEASE_URL}/cJSON.c" + "${CJSON_RELEASE_URL}/cJSON.h" + "cobenv.sh" "cobenv.cmd" + "https://www.itl.nist.gov/div897/ctg/suites/newcob.val.Z") sha256sums=('C2E41C2BA520681A67C570D7246D25C31F7F55C8A145AAEC3F6273A500A93A76' SKIP '3FBFDAF61EB6EC125258DE62B404C97BF6DCCF39BD3B9152510F794B5383CA33' + 'A80E1284D45EC2069E8DCE76FAB0D2CC86AB497024C09514D95319DF659566BB' + 'CD0489D1B68894434E1301F183CD915F67A25BB993ABD506A9DBD7EB1FD9EE46' + 'A2A312B4AAA74BE3AE0BEF9775CBD98E26F46CFE05FF5268227E330B243582E9' 'EEDFC170CFD6606527DD701C3CF6BBA2029C33CE694F697F8B7EE527B4ED7F1C' - '225F7F6E17FC125AF6348028FDB86278C990BEAB07D230A158D9B9373CD58506') + '225F7F6E17FC125AF6348028FDB86278C990BEAB07D230A158D9B9373CD58506' + '1E9A92DDBD5D730CBEB764281F7810C22B18E0163985B09675393AB22BBD61F9') validpgpkeys=('B9459D0CA8A740B323235CDF13E96B53C005604E') prepare() { cd "${_realname}-${pkgver_real}" # disabled patch for now, doesn't seem useful any moe # patch -Np1 -i ${srcdir}/001-mingw-gnucobol-2.2-fixformatwarnings.patch + patch -Np1 -i ${srcdir}/002-gnucobol-3.1-rc1-cobol85_crdiff.patch + # include cjson to let configure setup the static link into libcob + cp ${srcdir}/cJSON.* libcob/ + cp ${srcdir}/newcob.val.Z tests/cobol85/ } build() { @@ -49,6 +69,8 @@ build() { cd ${srcdir}/build-${CARCH} ./configure \ CPPLAGS="-D__USE_MINGW_ANSI_STDIO=1" \ + --with-db --without-vbisam --without-disam --without-cisam \ + --with-xml2 --with-cjson=local --with-curses=ncursesw \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -62,7 +84,6 @@ build() { # all generated COBOL modules would be GPLed (and big)... # ... and only work when all linked together - #make -j1 make "--jobs=$(($(nproc)+1))" } @@ -70,7 +91,8 @@ check() { cd ${srcdir}/build-${CARCH} # note: strangely multiple tests seem to halt the complete package creation #make check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" - make check + make check || echo "warning, not all internal tests passed" + make "--jobs=$(($(nproc)+1))" test || echo "warning, not all NIST tests passed" } package() { From 0ba2f3aea1931e79e972eb103f6d32f0420a96c9 Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Thu, 22 Oct 2020 15:26:40 +0200 Subject: [PATCH 2/4] GnuCOBOL 3.1rc1.3 Explicit dependencies, including the new cJSON package, dropped flags that should (and can be) used from MAKEFLAGS. --- mingw-w64-gnucobol/PKGBUILD | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mingw-w64-gnucobol/PKGBUILD b/mingw-w64-gnucobol/PKGBUILD index 6ec8900630..798c0f0374 100644 --- a/mingw-w64-gnucobol/PKGBUILD +++ b/mingw-w64-gnucobol/PKGBUILD @@ -7,7 +7,7 @@ pkgbase=mingw-w64-${_realname} pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} pkgver=3.1rc1 pkgver_real=3.1-rc1 -pkgrel=2 +pkgrel=3 pkgdesc="GnuCOBOL, a free and modern COBOL compiler (mingw-w64)" conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-gnu-cobol-svn") replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-gnu-cobol-svn") @@ -20,6 +20,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gmp" "${MINGW_PACKAGE_PREFIX}-gettext" "${MINGW_PACKAGE_PREFIX}-ncurses" + "${MINGW_PACKAGE_PREFIX}-cjson" "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-db") @@ -27,6 +28,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc" #optdepends=("${MINGW_PACKAGE_PREFIX}-gettext: support for internationalization" # "${MINGW_PACKAGE_PREFIX}-ncurses: support for extended screenio" # "${MINGW_PACKAGE_PREFIX}-pdcurses: support for screenio" +# "${MINGW_PACKAGE_PREFIX}-cjson: support for JSON GENERATE" # "${MINGW_PACKAGE_PREFIX}-libxml2: support for XML GENERATE") makedepends=("${MINGW_PACKAGE_PREFIX}-pkg-config") checkdepends=("${MINGW_PACKAGE_PREFIX}-curl" "${MINGW_PACKAGE_PREFIX}-perl") @@ -37,16 +39,12 @@ CJSON_RELEASE_URL="https://raw.githubusercontent.com/DaveGamble/cJSON/v1.7.13" source=("https://alpha.gnu.org/gnu/${_realname}/${_realname}-${pkgver_real}.tar.xz"{,.sig} "001-mingw-gnucobol-2.2-fixformatwarnings.patch" "002-gnucobol-3.1-rc1-cobol85_crdiff.patch" - "${CJSON_RELEASE_URL}/cJSON.c" - "${CJSON_RELEASE_URL}/cJSON.h" "cobenv.sh" "cobenv.cmd" "https://www.itl.nist.gov/div897/ctg/suites/newcob.val.Z") sha256sums=('C2E41C2BA520681A67C570D7246D25C31F7F55C8A145AAEC3F6273A500A93A76' SKIP '3FBFDAF61EB6EC125258DE62B404C97BF6DCCF39BD3B9152510F794B5383CA33' 'A80E1284D45EC2069E8DCE76FAB0D2CC86AB497024C09514D95319DF659566BB' - 'CD0489D1B68894434E1301F183CD915F67A25BB993ABD506A9DBD7EB1FD9EE46' - 'A2A312B4AAA74BE3AE0BEF9775CBD98E26F46CFE05FF5268227E330B243582E9' 'EEDFC170CFD6606527DD701C3CF6BBA2029C33CE694F697F8B7EE527B4ED7F1C' '225F7F6E17FC125AF6348028FDB86278C990BEAB07D230A158D9B9373CD58506' '1E9A92DDBD5D730CBEB764281F7810C22B18E0163985B09675393AB22BBD61F9') @@ -57,8 +55,6 @@ prepare() { # disabled patch for now, doesn't seem useful any moe # patch -Np1 -i ${srcdir}/001-mingw-gnucobol-2.2-fixformatwarnings.patch patch -Np1 -i ${srcdir}/002-gnucobol-3.1-rc1-cobol85_crdiff.patch - # include cjson to let configure setup the static link into libcob - cp ${srcdir}/cJSON.* libcob/ cp ${srcdir}/newcob.val.Z tests/cobol85/ } @@ -70,7 +66,7 @@ build() { ./configure \ CPPLAGS="-D__USE_MINGW_ANSI_STDIO=1" \ --with-db --without-vbisam --without-disam --without-cisam \ - --with-xml2 --with-cjson=local --with-curses=ncursesw \ + --with-xml2 --with-cjson --with-curses=ncursesw \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ --target=${MINGW_CHOST} \ @@ -84,7 +80,7 @@ build() { # all generated COBOL modules would be GPLed (and big)... # ... and only work when all linked together - make "--jobs=$(($(nproc)+1))" + make } check() { @@ -92,7 +88,7 @@ check() { # note: strangely multiple tests seem to halt the complete package creation #make check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" make check || echo "warning, not all internal tests passed" - make "--jobs=$(($(nproc)+1))" test || echo "warning, not all NIST tests passed" + make test || echo "warning, not all NIST tests passed" } package() { From e82b570cbea4da6b6e3a9ad50f3938c32c260467 Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Thu, 22 Oct 2020 15:38:56 +0200 Subject: [PATCH 3/4] GnuCOBOL 3.1rc1.3 pkgrel2 was already public available... --- mingw-w64-gnucobol/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-gnucobol/PKGBUILD b/mingw-w64-gnucobol/PKGBUILD index 1f0003f7c4..d8c0f083e6 100644 --- a/mingw-w64-gnucobol/PKGBUILD +++ b/mingw-w64-gnucobol/PKGBUILD @@ -7,7 +7,7 @@ pkgbase=mingw-w64-${_realname} pkgname=${MINGW_PACKAGE_PREFIX}-${_realname} pkgver=3.1rc1 pkgver_real=3.1-rc1 -pkgrel=2 +pkgrel=3 pkgdesc="GnuCOBOL, a free and modern COBOL compiler (mingw-w64)" conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-gnu-cobol-svn") replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn" "${MINGW_PACKAGE_PREFIX}-gnu-cobol-svn") From 21a7959a39261886a3da717479a3eab0230eb852 Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Thu, 22 Oct 2020 17:10:37 +0200 Subject: [PATCH 4/4] cjson starts with pkgrel2 to allow its use early (in gnucobol) --- mingw-w64-cjson/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-cjson/PKGBUILD b/mingw-w64-cjson/PKGBUILD index 7a2ac52263..b7add3bb6d 100644 --- a/mingw-w64-cjson/PKGBUILD +++ b/mingw-w64-cjson/PKGBUILD @@ -4,7 +4,7 @@ _realname=cjson pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") pkgver=1.7.12 -pkgrel=1 +pkgrel=2 pkgdesc="Ultralightweight JSON parser in ANSI C (mingw-w64)" arch=(any) url="https://github.com/DaveGamble/cJSON"