Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] gnucobol: update to 3.2
@ 2023-08-17  2:50 cinerea0
  2023-08-17  3:17 ` [PR PATCH] [Updated] " cinerea0
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: cinerea0 @ 2023-08-17  2:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

There is a new pull request by cinerea0 against master on the void-packages repository

https://github.com/cinerea0/void-packages cobol
https://github.com/void-linux/void-packages/pull/45629

gnucobol: update to 3.2
#### Testing the changes
- I tested the changes in this PR: **briefly**

I am reaching out to a more experienced user of this package for testing. Closes #45612.

A patch file from https://github.com/void-linux/void-packages/pull/45629.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cobol-45629.patch --]
[-- Type: text/x-diff, Size: 1665 bytes --]

From 5b0d10c973ad1d3895ea48ee7f4f59a57c3d9ce4 Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Wed, 16 Aug 2023 22:47:54 -0400
Subject: [PATCH] gnucobol: update to 3.2

---
 srcpkgs/gnucobol/template | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/gnucobol/template b/srcpkgs/gnucobol/template
index 4519ea7867249..f3c835d9e6b36 100644
--- a/srcpkgs/gnucobol/template
+++ b/srcpkgs/gnucobol/template
@@ -1,19 +1,20 @@
 # Template file for 'gnucobol'
 pkgname=gnucobol
-version=3.1.2
+version=3.2
 revision=1
 build_style=gnu-configure
 make_check_target="test"
-makedepends="gmp-devel db-devel"
+hostmakedepends="gettext pkg-config"
+makedepends="db-devel gmp-devel json-c-devel libxml2-devel ncurses-devel"
 depends="gnucobol-libs>=${version}_${revision}"
 checkdepends="curl perl wget which"
 short_desc="GnuCOBOL (formerly OpenCOBOL) is a free COBOL compiler"
 maintainer="Cthulhux <git@tuxproject.de>"
 license="GPL-3.0-or-later"
-homepage="https://sourceforge.net/projects/open-cobol/"
-distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f38c60b38a9e404bcba709b61b46f2bafa146b5f3dd90a94b2a70f5cea2f6297
-nocross="https://build.voidlinux.org/builders/armv7l-musl_builder/builds/7152/steps/shell_3/logs/stdio"
+homepage="https://www.gnu.org/software/gnucobol/"
+distfiles="${GNU_SITE}/gnucobol/gnucobol-${version}.tar.xz"
+checksum=3bb48af46ced4779facf41fdc2ee60e4ccb86eaa99d010b36685315df39c2ee2
+#nocross="https://build.voidlinux.org/builders/armv7l-musl_builder/builds/7152/steps/shell_3/logs/stdio"
 
 gnucobol-libs_package() {
 	short_desc+=" - runtime libraries"

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PR PATCH] [Updated] gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
@ 2023-08-17  3:17 ` cinerea0
  2023-08-17  3:28 ` cinerea0
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cinerea0 @ 2023-08-17  3:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

There is an updated pull request by cinerea0 against master on the void-packages repository

https://github.com/cinerea0/void-packages cobol
https://github.com/void-linux/void-packages/pull/45629

gnucobol: update to 3.2
#### Testing the changes
- I tested the changes in this PR: **briefly**

I am reaching out to a more experienced user of this package for testing. Closes #45612.

A patch file from https://github.com/void-linux/void-packages/pull/45629.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cobol-45629.patch --]
[-- Type: text/x-diff, Size: 1621 bytes --]

From 5dafa5a259349cfa3dd539f85ef080164fa7d556 Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Wed, 16 Aug 2023 23:17:40 -0400
Subject: [PATCH] gnucobol: update to 3.2

---
 srcpkgs/gnucobol/template | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/gnucobol/template b/srcpkgs/gnucobol/template
index 4519ea7867249..3294a4c0f1384 100644
--- a/srcpkgs/gnucobol/template
+++ b/srcpkgs/gnucobol/template
@@ -1,19 +1,23 @@
 # Template file for 'gnucobol'
 pkgname=gnucobol
-version=3.1.2
+version=3.2
 revision=1
 build_style=gnu-configure
 make_check_target="test"
-makedepends="gmp-devel db-devel"
+hostmakedepends="automake gettext libtool pkg-config"
+makedepends="db-devel gmp-devel json-c-devel libxml2-devel ncurses-devel"
 depends="gnucobol-libs>=${version}_${revision}"
 checkdepends="curl perl wget which"
 short_desc="GnuCOBOL (formerly OpenCOBOL) is a free COBOL compiler"
 maintainer="Cthulhux <git@tuxproject.de>"
 license="GPL-3.0-or-later"
-homepage="https://sourceforge.net/projects/open-cobol/"
-distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f38c60b38a9e404bcba709b61b46f2bafa146b5f3dd90a94b2a70f5cea2f6297
-nocross="https://build.voidlinux.org/builders/armv7l-musl_builder/builds/7152/steps/shell_3/logs/stdio"
+homepage="https://www.gnu.org/software/gnucobol/"
+distfiles="${GNU_SITE}/gnucobol/gnucobol-${version}.tar.xz"
+checksum=3bb48af46ced4779facf41fdc2ee60e4ccb86eaa99d010b36685315df39c2ee2
+
+pre_configure() {
+	autoreconf -fi
+}
 
 gnucobol-libs_package() {
 	short_desc+=" - runtime libraries"

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PR PATCH] [Updated] gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
  2023-08-17  3:17 ` [PR PATCH] [Updated] " cinerea0
@ 2023-08-17  3:28 ` cinerea0
  2023-08-17 20:03 ` GitMensch
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cinerea0 @ 2023-08-17  3:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

There is an updated pull request by cinerea0 against master on the void-packages repository

https://github.com/cinerea0/void-packages cobol
https://github.com/void-linux/void-packages/pull/45629

gnucobol: update to 3.2
#### Testing the changes
- I tested the changes in this PR: **briefly**

I am reaching out to a more experienced user of this package for testing. Closes #45612.

A patch file from https://github.com/void-linux/void-packages/pull/45629.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cobol-45629.patch --]
[-- Type: text/x-diff, Size: 1633 bytes --]

From c26900befca8ddb3fc06fd5cd8f7ccb67f6761cd Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Wed, 16 Aug 2023 23:27:48 -0400
Subject: [PATCH] gnucobol: update to 3.2

---
 srcpkgs/gnucobol/template | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/gnucobol/template b/srcpkgs/gnucobol/template
index 4519ea7867249..bc28dd3c5371e 100644
--- a/srcpkgs/gnucobol/template
+++ b/srcpkgs/gnucobol/template
@@ -1,19 +1,23 @@
 # Template file for 'gnucobol'
 pkgname=gnucobol
-version=3.1.2
+version=3.2
 revision=1
 build_style=gnu-configure
 make_check_target="test"
-makedepends="gmp-devel db-devel"
+hostmakedepends="automake gettext-devel-tools libtool pkg-config"
+makedepends="db-devel gmp-devel json-c-devel libxml2-devel ncurses-devel"
 depends="gnucobol-libs>=${version}_${revision}"
 checkdepends="curl perl wget which"
 short_desc="GnuCOBOL (formerly OpenCOBOL) is a free COBOL compiler"
 maintainer="Cthulhux <git@tuxproject.de>"
 license="GPL-3.0-or-later"
-homepage="https://sourceforge.net/projects/open-cobol/"
-distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f38c60b38a9e404bcba709b61b46f2bafa146b5f3dd90a94b2a70f5cea2f6297
-nocross="https://build.voidlinux.org/builders/armv7l-musl_builder/builds/7152/steps/shell_3/logs/stdio"
+homepage="https://www.gnu.org/software/gnucobol/"
+distfiles="${GNU_SITE}/gnucobol/gnucobol-${version}.tar.xz"
+checksum=3bb48af46ced4779facf41fdc2ee60e4ccb86eaa99d010b36685315df39c2ee2
+
+pre_configure() {
+	autoreconf -fi
+}
 
 gnucobol-libs_package() {
 	short_desc+=" - runtime libraries"

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
  2023-08-17  3:17 ` [PR PATCH] [Updated] " cinerea0
  2023-08-17  3:28 ` cinerea0
@ 2023-08-17 20:03 ` GitMensch
  2023-08-17 20:39 ` cinerea0
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: GitMensch @ 2023-08-17 20:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

New comment by GitMensch on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1682901700

Comment:
Why is that auto-reconfigured? Apart from needing more tools (`automake gettext-devel-tools libtool` would not be necessary otherwise) this won't use the versions of the tools that were tested when doing the boostrap upstream, so there normally should be a good reason for that [some distros _always_ do that _for , but most don't].

There is a lot of output because of configure ending in "mixed" harding options.
I'd suggest to explicit configure with either `--enable-hardening` (obviously making the binary a bit slower) or `--disable-hardening` to fix that, or configure with explicit specifying `CFLAGS=-O -g`.

To ensure that the dependencies that are noted are indeed used it is useful to drop the "guessing" part in configure by making that explicit `--with-db --with-curses=ncursesw --with-json=json-c --with-xml2`.

So you may want to add something like `configure_args="--disable-hardening --with-db --with-curses=ncursesw --with-json=json-c --with-xml2"`

Note for `checkdepends`: only one of wget or curl is needed, the second one is preferred.
Currently only `make test` is run for the test (which uses an external testsuite, therefore those curl).

I'd suggest to do this with `make checkall` instead as this will first run the internal testsuite, then the external one.

The cross-builds fail during "install", it looks like this is happening during "vmove" but as I don't know what they do for whatever reason and if they should work, I cannot comment on those.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (2 preceding siblings ...)
  2023-08-17 20:03 ` GitMensch
@ 2023-08-17 20:39 ` cinerea0
  2023-08-17 20:42 ` GitMensch
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cinerea0 @ 2023-08-17 20:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1682945850

Comment:
> Why is that auto-reconfigured?

That can sometimes solve crossbuilding install issues. Obviously in this case it did not.

> There is a lot of output because of configure ending in "mixed" hardening options.

Void's packaging philosophy is to leave things as "vanilla" from upstream as possible. Unless there is a specific configuration recommended by upstream, we generally leave it be.

> I'd suggest to do this with make checkall instead as this will first run the internal testsuite, then the external one.

As I mentioned before, the vast majority of the tests from the `check` target fail in Void's build environment.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (3 preceding siblings ...)
  2023-08-17 20:39 ` cinerea0
@ 2023-08-17 20:42 ` GitMensch
  2023-08-18  2:23 ` cinerea0
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: GitMensch @ 2023-08-17 20:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

New comment by GitMensch on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1682949524

Comment:
> > I'd suggest to do this with make checkall instead as this will first run the internal testsuite, then the external one.
> 
> As I mentioned before, the vast majority of the tests from the `check` target fail in Void's build environment.

That should be solved when adding one of the configure options `--enable-hardening` or `disable-hardening`, especially as the external testsuite passes completely.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (4 preceding siblings ...)
  2023-08-17 20:42 ` GitMensch
@ 2023-08-18  2:23 ` cinerea0
  2023-08-18  3:10 ` cinerea0
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cinerea0 @ 2023-08-18  2:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1683237764

Comment:
The test cases have been fixed by disabling hardening and defining a custom check step; this will appear in the next push.

I did some investigating and found out what's causing the install failure on cross-compile. Only when cross-compiling, the file `/usr/lib/gnucobol/CBL_OC_DUMP.so` is not generated, this is what gets moved over in that second `vmove` line. Is this file necessary for gnucobol to function?

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (5 preceding siblings ...)
  2023-08-18  2:23 ` cinerea0
@ 2023-08-18  3:10 ` cinerea0
  2023-08-18  5:14 ` GitMensch
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cinerea0 @ 2023-08-18  3:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1683237764

Comment:
The test cases have been fixed by disabling hardening and defining a custom check step; this will appear in the next push.

I did some investigating and found out what's causing the install failure on cross-compile. Only when cross-compiling, the file `/usr/lib/gnucobol/CBL_OC_DUMP.so` is not generated, this is what gets moved over in that second `vmove` line. Is this file necessary for gnucobol to function?

EDIT: I found the lines that may be causing this, but I'm not sure how to fix it. From `configure.ac`:

```
# Generate the output

AM_CONDITIONAL([COB_MAKE_IX], [test "$COB_HAS_ISAM" != no])
AM_CONDITIONAL([COB_MAKE_RUN_BINARIES], [test "$cross_compiling" != yes])
dnl FIXME: Should be tested as the system may can actually run these
dnl        for example x86/x64 cross, GNU/Linux with Wine, Bash on Windows, ...
```

From `extras/Makefile.am` (where `CBL_OC_DUMP.so` would be compiled):

```
if COB_MAKE_RUN_BINARIES
extras_DATA = CBL_OC_DUMP.$(COB_MODULE_EXT)
endif
```

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (6 preceding siblings ...)
  2023-08-18  3:10 ` cinerea0
@ 2023-08-18  5:14 ` GitMensch
  2023-08-22 23:24 ` [PR PATCH] [Updated] " cinerea0
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: GitMensch @ 2023-08-18  5:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

New comment by GitMensch on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1683363850

Comment:
Ah, the extras directory and cross compile!

No, it is not necessary and it can be created on the target system after install. It may be possible to create a post install step to do so.

Background: extras contains COBOL sources which are compiled by the generated cobc.

The following options exist to handle that:
* ignore those files (currently there is only one)
* create and install them on the target system manually, if needed
* create and install them via the package manager as post install step on the target system
* have a host version of the same GnuCOBOL version installed and use that to do the compile and link with cross-compile options

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PR PATCH] [Updated] gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (7 preceding siblings ...)
  2023-08-18  5:14 ` GitMensch
@ 2023-08-22 23:24 ` cinerea0
  2023-08-22 23:26 ` cinerea0
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cinerea0 @ 2023-08-22 23:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

There is an updated pull request by cinerea0 against master on the void-packages repository

https://github.com/cinerea0/void-packages cobol
https://github.com/void-linux/void-packages/pull/45629

gnucobol: update to 3.2
#### Testing the changes
- I tested the changes in this PR: **briefly**

I am reaching out to a more experienced user of this package for testing. Closes #45612.

A patch file from https://github.com/void-linux/void-packages/pull/45629.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cobol-45629.patch --]
[-- Type: text/x-diff, Size: 2897 bytes --]

From 97c93425873dcc7d7f578f7ba73b1dde7e9ce66d Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Tue, 22 Aug 2023 19:24:38 -0400
Subject: [PATCH] gnucobol: update to 3.2

---
 srcpkgs/gnucobol/patches/cross.patch | 14 ++++++++++
 srcpkgs/gnucobol/template            | 40 ++++++++++++++++++++++------
 2 files changed, 46 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/gnucobol/patches/cross.patch

diff --git a/srcpkgs/gnucobol/patches/cross.patch b/srcpkgs/gnucobol/patches/cross.patch
new file mode 100644
index 0000000000000..5ce3109885fc3
--- /dev/null
+++ b/srcpkgs/gnucobol/patches/cross.patch
@@ -0,0 +1,14 @@
+diff --git a/extras/Makefile.am b/extras/Makefile.am
+index d3a800f49a..324575ad4d 100644
+--- a/extras/Makefile.am
++++ b/extras/Makefile.am
+@@ -20,9 +20,7 @@
+ # along with GnuCOBOL.  If not, see <https://www.gnu.org/licenses/>.
+ 
+ extrasdir = @COB_LIBRARY_PATH@
+-if COB_MAKE_RUN_BINARIES
+ extras_DATA = CBL_OC_DUMP.$(COB_MODULE_EXT)
+-endif
+ COBC = cobc$(EXEEXT)
+ 
+ EXTRA_DIST = CBL_OC_DUMP.cob
diff --git a/srcpkgs/gnucobol/template b/srcpkgs/gnucobol/template
index 4519ea7867249..bc07075f47698 100644
--- a/srcpkgs/gnucobol/template
+++ b/srcpkgs/gnucobol/template
@@ -1,19 +1,43 @@
 # Template file for 'gnucobol'
 pkgname=gnucobol
-version=3.1.2
+version=3.2
 revision=1
 build_style=gnu-configure
-make_check_target="test"
-makedepends="gmp-devel db-devel"
+build_helper=qemu
+configure_args="--disable-hardening"
+hostmakedepends="automake gettext-devel-tools libtool pkg-config"
+makedepends="db-devel gmp-devel json-c-devel libxml2-devel ncurses-devel"
 depends="gnucobol-libs>=${version}_${revision}"
-checkdepends="curl perl wget which"
+checkdepends="curl perl which"
 short_desc="GnuCOBOL (formerly OpenCOBOL) is a free COBOL compiler"
 maintainer="Cthulhux <git@tuxproject.de>"
 license="GPL-3.0-or-later"
-homepage="https://sourceforge.net/projects/open-cobol/"
-distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f38c60b38a9e404bcba709b61b46f2bafa146b5f3dd90a94b2a70f5cea2f6297
-nocross="https://build.voidlinux.org/builders/armv7l-musl_builder/builds/7152/steps/shell_3/logs/stdio"
+homepage="https://www.gnu.org/software/gnucobol/"
+distfiles="${GNU_SITE}/gnucobol/gnucobol-${version}.tar.xz"
+checksum=3bb48af46ced4779facf41fdc2ee60e4ccb86eaa99d010b36685315df39c2ee2
+
+pre_configure() {
+	autoreconf -fi
+}
+
+post_configure() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i libtool \
+			-e 's|exec \\"\\$progdir/\\$program\\"|exec /usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static \\"\\$progdir/\\$program\\"|'
+	fi
+}
+
+post_build() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i "bin/cob-config" \
+			-e "s|-I${XBPS_CROSS_BASE}/usr/include|-I/usr/include|"
+	fi 
+}
+
+do_check() {
+	TERM=xterm make check
+	make test
+}
 
 gnucobol-libs_package() {
 	short_desc+=" - runtime libraries"

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PR PATCH] [Updated] gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (8 preceding siblings ...)
  2023-08-22 23:24 ` [PR PATCH] [Updated] " cinerea0
@ 2023-08-22 23:26 ` cinerea0
  2023-08-23  5:12 ` GitMensch
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cinerea0 @ 2023-08-22 23:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

There is an updated pull request by cinerea0 against master on the void-packages repository

https://github.com/cinerea0/void-packages cobol
https://github.com/void-linux/void-packages/pull/45629

gnucobol: update to 3.2
#### Testing the changes
- I tested the changes in this PR: **briefly**

I am reaching out to a more experienced user of this package for testing. Closes #45612.

A patch file from https://github.com/void-linux/void-packages/pull/45629.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cobol-45629.patch --]
[-- Type: text/x-diff, Size: 2896 bytes --]

From 97ced9d246c0a74cf9422b4b243979edee5db16b Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Tue, 22 Aug 2023 19:26:11 -0400
Subject: [PATCH] gnucobol: update to 3.2

---
 srcpkgs/gnucobol/patches/cross.patch | 14 ++++++++++
 srcpkgs/gnucobol/template            | 40 ++++++++++++++++++++++------
 2 files changed, 46 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/gnucobol/patches/cross.patch

diff --git a/srcpkgs/gnucobol/patches/cross.patch b/srcpkgs/gnucobol/patches/cross.patch
new file mode 100644
index 0000000000000..5ce3109885fc3
--- /dev/null
+++ b/srcpkgs/gnucobol/patches/cross.patch
@@ -0,0 +1,14 @@
+diff --git a/extras/Makefile.am b/extras/Makefile.am
+index d3a800f49a..324575ad4d 100644
+--- a/extras/Makefile.am
++++ b/extras/Makefile.am
+@@ -20,9 +20,7 @@
+ # along with GnuCOBOL.  If not, see <https://www.gnu.org/licenses/>.
+ 
+ extrasdir = @COB_LIBRARY_PATH@
+-if COB_MAKE_RUN_BINARIES
+ extras_DATA = CBL_OC_DUMP.$(COB_MODULE_EXT)
+-endif
+ COBC = cobc$(EXEEXT)
+ 
+ EXTRA_DIST = CBL_OC_DUMP.cob
diff --git a/srcpkgs/gnucobol/template b/srcpkgs/gnucobol/template
index 4519ea7867249..de09c2f074692 100644
--- a/srcpkgs/gnucobol/template
+++ b/srcpkgs/gnucobol/template
@@ -1,19 +1,43 @@
 # Template file for 'gnucobol'
 pkgname=gnucobol
-version=3.1.2
+version=3.2
 revision=1
 build_style=gnu-configure
-make_check_target="test"
-makedepends="gmp-devel db-devel"
+build_helper=qemu
+configure_args="--disable-hardening"
+hostmakedepends="automake gettext-devel-tools libtool pkg-config"
+makedepends="db-devel gmp-devel json-c-devel libxml2-devel ncurses-devel"
 depends="gnucobol-libs>=${version}_${revision}"
-checkdepends="curl perl wget which"
+checkdepends="curl perl which"
 short_desc="GnuCOBOL (formerly OpenCOBOL) is a free COBOL compiler"
 maintainer="Cthulhux <git@tuxproject.de>"
 license="GPL-3.0-or-later"
-homepage="https://sourceforge.net/projects/open-cobol/"
-distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f38c60b38a9e404bcba709b61b46f2bafa146b5f3dd90a94b2a70f5cea2f6297
-nocross="https://build.voidlinux.org/builders/armv7l-musl_builder/builds/7152/steps/shell_3/logs/stdio"
+homepage="https://www.gnu.org/software/gnucobol/"
+distfiles="${GNU_SITE}/gnucobol/gnucobol-${version}.tar.xz"
+checksum=3bb48af46ced4779facf41fdc2ee60e4ccb86eaa99d010b36685315df39c2ee2
+
+pre_configure() {
+	autoreconf -fi
+}
+
+post_configure() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i libtool \
+			-e 's|exec \\"\\$progdir/\\$program\\"|exec /usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static \\"\\$progdir/\\$program\\"|'
+	fi
+}
+
+post_build() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i "bin/cob-config" \
+			-e "s|-I${XBPS_CROSS_BASE}/usr/include|-I/usr/include|"
+	fi
+}
+
+do_check() {
+	TERM=xterm make check
+	make test
+}
 
 gnucobol-libs_package() {
 	short_desc+=" - runtime libraries"

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (9 preceding siblings ...)
  2023-08-22 23:26 ` cinerea0
@ 2023-08-23  5:12 ` GitMensch
  2023-08-23  5:35 ` GitMensch
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: GitMensch @ 2023-08-23  5:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

New comment by GitMensch on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1689292116

Comment:
The currently failing test 488 on musl is a bug "not clean handling" in GnuCOBOL. You may want to use the official (not yet upstream) patch found in https://git.adelielinux.org/adelie/packages/-/commit/21fe3ef399c25f030d6657e83cc635335f3a9f40 (0002-errno) [and may also take a fix for a regression (0001-move) live].

The failing in test 818 on musl is "known" from the Adélie CI; if you can provide any insights that would be useful, otherwise you may consider to drop that test for now by running `sed -i tests/testsuite -e "/^818;/d";`.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (10 preceding siblings ...)
  2023-08-23  5:12 ` GitMensch
@ 2023-08-23  5:35 ` GitMensch
  2023-08-23  7:00 ` GitMensch
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: GitMensch @ 2023-08-23  5:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 766 bytes --]

New comment by GitMensch on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1689292116

Comment:
The currently failing test 488 on musl is a bug "not clean handling" in GnuCOBOL. You may want to use the official (not yet upstream) patch found in https://git.adelielinux.org/adelie/packages/-/commit/21fe3ef399c25f030d6657e83cc635335f3a9f40 (0002-errno) [and may also take a fix for a regression (0001-move) live].

The failing in test 818 on musl is "known" from the Adélie CI; if you can provide any insights that would be useful, otherwise you may consider to drop that test for now by running `sed -i tests/testsuite -e "/^818;/d";`. That issue is tracked upstream as https://sourceforge.net/p/gnucobol/bugs/906/.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (11 preceding siblings ...)
  2023-08-23  5:35 ` GitMensch
@ 2023-08-23  7:00 ` GitMensch
  2023-08-25  5:24 ` GitMensch
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: GitMensch @ 2023-08-23  7:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 917 bytes --]

New comment by GitMensch on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1689292116

Comment:
The currently failing test 488 on musl is a bug "not clean handling" in GnuCOBOL. You may want to use the official (not yet upstream) patch found in https://git.adelielinux.org/adelie/packages/-/commit/21fe3ef399c25f030d6657e83cc635335f3a9f40 (0002-errno) [and may also take a fix for a regression (0001-move) live].

The failing in test 818 on musl is "known" from the Adélie CI; the issue is that musl _never_ unloads "by design":
https://wiki.musl-libc.org/functional-differences-from-glibc.html#Unloading_libraries

libcob likely _can_ work around this, but that's likely a bunch of work. That issue is tracked upstream as https://sourceforge.net/p/gnucobol/bugs/906/.
You may consider to drop that test for now by running `sed -i tests/testsuite -e "/^818;/d";`

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (12 preceding siblings ...)
  2023-08-23  7:00 ` GitMensch
@ 2023-08-25  5:24 ` GitMensch
  2023-08-26 18:02 ` [PR PATCH] [Updated] " cinerea0
  2023-09-23 13:32 ` [PR PATCH] [Merged]: " Duncaen
  15 siblings, 0 replies; 17+ messages in thread
From: GitMensch @ 2023-08-25  5:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

New comment by GitMensch on void-packages repository

https://github.com/void-linux/void-packages/pull/45629#issuecomment-1692778592

Comment:
As noted, I suggest to consider adding the one patch from Adélie and (at least on musl or general) disable one test that is known to not work on musl via the sed command provided.
That should get all builds passing, so this PR may be merged.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PR PATCH] [Updated] gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (13 preceding siblings ...)
  2023-08-25  5:24 ` GitMensch
@ 2023-08-26 18:02 ` cinerea0
  2023-09-23 13:32 ` [PR PATCH] [Merged]: " Duncaen
  15 siblings, 0 replies; 17+ messages in thread
From: cinerea0 @ 2023-08-26 18:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

There is an updated pull request by cinerea0 against master on the void-packages repository

https://github.com/cinerea0/void-packages cobol
https://github.com/void-linux/void-packages/pull/45629

gnucobol: update to 3.2
#### Testing the changes
- I tested the changes in this PR: **briefly**

I am reaching out to a more experienced user of this package for testing. Closes #45612.

A patch file from https://github.com/void-linux/void-packages/pull/45629.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cobol-45629.patch --]
[-- Type: text/x-diff, Size: 5811 bytes --]

From 7497536abe66b8bfc288c5892dd3f5750c1708a5 Mon Sep 17 00:00:00 2001
From: cinerea0 <cinerea0@disroot.org>
Date: Sat, 26 Aug 2023 13:38:17 -0400
Subject: [PATCH] gnucobol: update to 3.2, enable cross

---
 srcpkgs/gnucobol/patches/cross.patch          | 15 +++++++
 srcpkgs/gnucobol/patches/errno.patch          | 26 +++++++++++
 .../patches/move-packed-decimal.patch         | 29 ++++++++++++
 srcpkgs/gnucobol/template                     | 44 +++++++++++++++----
 4 files changed, 106 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/gnucobol/patches/cross.patch
 create mode 100644 srcpkgs/gnucobol/patches/errno.patch
 create mode 100644 srcpkgs/gnucobol/patches/move-packed-decimal.patch

diff --git a/srcpkgs/gnucobol/patches/cross.patch b/srcpkgs/gnucobol/patches/cross.patch
new file mode 100644
index 0000000000000..ffbc3063c7373
--- /dev/null
+++ b/srcpkgs/gnucobol/patches/cross.patch
@@ -0,0 +1,15 @@
+# Removes check on crossbuild-dependent variable set in toplevel configure.ac
+diff --git a/extras/Makefile.am b/extras/Makefile.am
+index d3a800f49a..324575ad4d 100644
+--- a/extras/Makefile.am
++++ b/extras/Makefile.am
+@@ -20,9 +20,7 @@
+ # along with GnuCOBOL.  If not, see <https://www.gnu.org/licenses/>.
+ 
+ extrasdir = @COB_LIBRARY_PATH@
+-if COB_MAKE_RUN_BINARIES
+ extras_DATA = CBL_OC_DUMP.$(COB_MODULE_EXT)
+-endif
+ COBC = cobc$(EXEEXT)
+ 
+ EXTRA_DIST = CBL_OC_DUMP.cob
diff --git a/srcpkgs/gnucobol/patches/errno.patch b/srcpkgs/gnucobol/patches/errno.patch
new file mode 100644
index 0000000000000..29218aa33e0c6
--- /dev/null
+++ b/srcpkgs/gnucobol/patches/errno.patch
@@ -0,0 +1,26 @@
+# Taken from: https://git.adelielinux.org/adelie/packages/-/commit/21fe3ef399c25f030d6657e83cc635335f3a9f40
+# Fixes failing test 488 for musl
+diff --git a/cobc/cobc.c b/cobc/cobc.c
+index b3a52303c5..f591be3a2e 100644
+--- a/cobc/cobc.c
++++ b/cobc/cobc.c
+@@ -2358,6 +2358,10 @@ set_listing_date (void)
+ DECLNORET static void COB_A_NORETURN
+ cobc_terminate (const char *str)
+ {
++	/* must be executed before anything that may adjust errno, ...
++	   like the listing code below. */
++	const char *errno_str = cb_get_strerror ();
++
+ 	if (cb_src_list_file) {
+ 		set_listing_date ();
+ 		set_standard_title ();
+@@ -2365,7 +2369,7 @@ cobc_terminate (const char *str)
+ 		cobc_elided_strcpy (cb_listing_filename, str, sizeof (cb_listing_filename), 0);
+ 		print_program_header ();
+ 	}
+-	cb_perror (0, "cobc: %s: %s", str, cb_get_strerror ());
++	cb_perror (0, "cobc: %s: %s", str, errno_str);
+ 	if (cb_src_list_file) {
+ 		print_program_trailer ();
+ 	}
diff --git a/srcpkgs/gnucobol/patches/move-packed-decimal.patch b/srcpkgs/gnucobol/patches/move-packed-decimal.patch
new file mode 100644
index 0000000000000..c327e97b54bd6
--- /dev/null
+++ b/srcpkgs/gnucobol/patches/move-packed-decimal.patch
@@ -0,0 +1,29 @@
+# Taken from: https://git.adelielinux.org/adelie/packages/-/commit/21fe3ef399c25f030d6657e83cc635335f3a9f40
+# Tracked upstream: https://sourceforge.net/p/gnucobol/bugs/904/
+diff --git a/libcob/numeric.c b/libcob/numeric.c
+index 9a8ec889f2..c9c47fd017 100644
+--- a/libcob/numeric.c
++++ b/libcob/numeric.c
+@@ -2739,17 +2739,12 @@ cob_move_bcd (cob_field *f1, cob_field *f2)
+ 		}
+ 	} else {
+ 		unsigned char *pos = fld2 + fld2_size - 1;
+-		if (COB_FIELD_HAVE_SIGN (f2)) {
+-			if (!fld1_sign) {
+-				*pos &= 0xF0;
+-				*pos |= 0x0C;
+-			} else {
+-				*pos &= 0xF0;
+-				*pos |= fld1_sign;
+-			}
+-		} else {
+-			*pos &= 0xF0;
++		if (!COB_FIELD_HAVE_SIGN (f2)) {
+ 			*pos |= 0x0F;
++		} else if (fld1_sign == 0x0D) {
++			*pos = (*pos & 0xF0) | 0x0D;
++		} else {
++			*pos = (*pos & 0xF0) | 0x0C;
+ 		}
+ 		if (!(COB_FIELD_DIGITS (f2) & 1) /* -> digits % 2 == 0 */) {
+ 			*fld2 &= 0x0F;
diff --git a/srcpkgs/gnucobol/template b/srcpkgs/gnucobol/template
index 4519ea7867249..ca7b40db3a157 100644
--- a/srcpkgs/gnucobol/template
+++ b/srcpkgs/gnucobol/template
@@ -1,19 +1,47 @@
 # Template file for 'gnucobol'
 pkgname=gnucobol
-version=3.1.2
+version=3.2
 revision=1
 build_style=gnu-configure
-make_check_target="test"
-makedepends="gmp-devel db-devel"
+build_helper=qemu
+configure_args="--disable-hardening"
+hostmakedepends="automake gettext-devel-tools libtool pkg-config"
+makedepends="db-devel gmp-devel json-c-devel libxml2-devel ncurses-devel"
 depends="gnucobol-libs>=${version}_${revision}"
-checkdepends="curl perl wget which"
+checkdepends="curl perl which"
 short_desc="GnuCOBOL (formerly OpenCOBOL) is a free COBOL compiler"
 maintainer="Cthulhux <git@tuxproject.de>"
 license="GPL-3.0-or-later"
-homepage="https://sourceforge.net/projects/open-cobol/"
-distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=f38c60b38a9e404bcba709b61b46f2bafa146b5f3dd90a94b2a70f5cea2f6297
-nocross="https://build.voidlinux.org/builders/armv7l-musl_builder/builds/7152/steps/shell_3/logs/stdio"
+homepage="https://www.gnu.org/software/gnucobol/"
+distfiles="${GNU_SITE}/gnucobol/gnucobol-${version}.tar.xz"
+checksum=3bb48af46ced4779facf41fdc2ee60e4ccb86eaa99d010b36685315df39c2ee2
+
+pre_configure() {
+	autoreconf -fi
+}
+
+post_configure() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i libtool \
+			-e 's|exec \\"\\$progdir/\\$program\\"|exec /usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static \\"\\$progdir/\\$program\\"|'
+	fi
+}
+
+post_build() {
+	if [ "${CROSS_BUILD}" ]; then
+		vsed -i bin/cob-config \
+			-e "s|-I${XBPS_CROSS_BASE}/usr/include|-I/usr/include|"
+	fi
+}
+
+do_check() {
+	# Test fails because musl does not unload libraries, tracked upstream at https://sourceforge.net/p/gnucobol/bugs/906/
+	if [ "${XBPS_TARGET_LIBC}" = "musl" ]; then
+		vsed -i tests/testsuite -e "/^818;/d"
+	fi
+	TERM=xterm make check
+	make test
+}
 
 gnucobol-libs_package() {
 	short_desc+=" - runtime libraries"

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PR PATCH] [Merged]: gnucobol: update to 3.2
  2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
                   ` (14 preceding siblings ...)
  2023-08-26 18:02 ` [PR PATCH] [Updated] " cinerea0
@ 2023-09-23 13:32 ` Duncaen
  15 siblings, 0 replies; 17+ messages in thread
From: Duncaen @ 2023-09-23 13:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

There's a merged pull request on the void-packages repository

gnucobol: update to 3.2
https://github.com/void-linux/void-packages/pull/45629

Description:
#### Testing the changes
- I tested the changes in this PR: **briefly**

I am reaching out to a more experienced user of this package for testing. Closes #45612.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-09-23 13:32 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17  2:50 [PR PATCH] gnucobol: update to 3.2 cinerea0
2023-08-17  3:17 ` [PR PATCH] [Updated] " cinerea0
2023-08-17  3:28 ` cinerea0
2023-08-17 20:03 ` GitMensch
2023-08-17 20:39 ` cinerea0
2023-08-17 20:42 ` GitMensch
2023-08-18  2:23 ` cinerea0
2023-08-18  3:10 ` cinerea0
2023-08-18  5:14 ` GitMensch
2023-08-22 23:24 ` [PR PATCH] [Updated] " cinerea0
2023-08-22 23:26 ` cinerea0
2023-08-23  5:12 ` GitMensch
2023-08-23  5:35 ` GitMensch
2023-08-23  7:00 ` GitMensch
2023-08-25  5:24 ` GitMensch
2023-08-26 18:02 ` [PR PATCH] [Updated] " cinerea0
2023-09-23 13:32 ` [PR PATCH] [Merged]: " Duncaen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).