mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
gnucobol: update to 3.2, enable cross
This commit is contained in:
parent
d5ab218f6a
commit
fe6cf0cc00
4 changed files with 106 additions and 8 deletions
15
srcpkgs/gnucobol/patches/cross.patch
Normal file
15
srcpkgs/gnucobol/patches/cross.patch
Normal file
|
@ -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
|
26
srcpkgs/gnucobol/patches/errno.patch
Normal file
26
srcpkgs/gnucobol/patches/errno.patch
Normal file
|
@ -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 ();
|
||||||
|
}
|
29
srcpkgs/gnucobol/patches/move-packed-decimal.patch
Normal file
29
srcpkgs/gnucobol/patches/move-packed-decimal.patch
Normal file
|
@ -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;
|
|
@ -1,19 +1,47 @@
|
||||||
# Template file for 'gnucobol'
|
# Template file for 'gnucobol'
|
||||||
pkgname=gnucobol
|
pkgname=gnucobol
|
||||||
version=3.1.2
|
version=3.2
|
||||||
revision=1
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
make_check_target="test"
|
build_helper=qemu
|
||||||
makedepends="gmp-devel db-devel"
|
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}"
|
depends="gnucobol-libs>=${version}_${revision}"
|
||||||
checkdepends="curl perl wget which"
|
checkdepends="curl perl which"
|
||||||
short_desc="GnuCOBOL (formerly OpenCOBOL) is a free COBOL compiler"
|
short_desc="GnuCOBOL (formerly OpenCOBOL) is a free COBOL compiler"
|
||||||
maintainer="Cthulhux <git@tuxproject.de>"
|
maintainer="Cthulhux <git@tuxproject.de>"
|
||||||
license="GPL-3.0-or-later"
|
license="GPL-3.0-or-later"
|
||||||
homepage="https://sourceforge.net/projects/open-cobol/"
|
homepage="https://www.gnu.org/software/gnucobol/"
|
||||||
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
|
distfiles="${GNU_SITE}/gnucobol/gnucobol-${version}.tar.xz"
|
||||||
checksum=f38c60b38a9e404bcba709b61b46f2bafa146b5f3dd90a94b2a70f5cea2f6297
|
checksum=3bb48af46ced4779facf41fdc2ee60e4ccb86eaa99d010b36685315df39c2ee2
|
||||||
nocross="https://build.voidlinux.org/builders/armv7l-musl_builder/builds/7152/steps/shell_3/logs/stdio"
|
|
||||||
|
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() {
|
gnucobol-libs_package() {
|
||||||
short_desc+=" - runtime libraries"
|
short_desc+=" - runtime libraries"
|
||||||
|
|
Loading…
Add table
Reference in a new issue