From 154c077fa51c03f48dad133a53199ca1f25c249d4d374095aad441bcdf88a791 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 2 Dec 2024 19:25:58 +0000 Subject: [PATCH] - Add gnucobol-3.1.2-C99.diff to add missing includes of libxml/parser.h which cause GCC 14 to emit compiler error rather than a warning. - Add -Wno-error=incompatible-pointer-types to optflags so that GCC 14 can compile test 0987 without failing with an error. If the request is OK, please forward it to Factory soon-ish so that the package is ready when we switch the default compiler. For the reference, I have also looked at upgrading gnu-cobol to version 3.2 which would have avoided the need for the -Wno-error option but there are weird test failures on Aarch64 (and IIRC also ppc64le) so at least for now, I settled on fixing the version we have. OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/gnu-cobol?expand=0&rev=15 --- .gitattributes | 23 ++++++++ .gitignore | 1 + fix_test_698.patch | 13 +++++ gnu-cobol.changes | 75 +++++++++++++++++++++++++ gnu-cobol.spec | 113 ++++++++++++++++++++++++++++++++++++++ gnucobol-3.1.2-C99.diff | 24 ++++++++ gnucobol-3.1.2.tar.xz | 3 + gnucobol-3.1.2.tar.xz.sig | Bin 0 -> 566 bytes 8 files changed, 252 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 fix_test_698.patch create mode 100644 gnu-cobol.changes create mode 100644 gnu-cobol.spec create mode 100644 gnucobol-3.1.2-C99.diff create mode 100644 gnucobol-3.1.2.tar.xz create mode 100644 gnucobol-3.1.2.tar.xz.sig diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/fix_test_698.patch b/fix_test_698.patch new file mode 100644 index 0000000..bd2e679 --- /dev/null +++ b/fix_test_698.patch @@ -0,0 +1,13 @@ +Index: gnucobol-3.1.2/tests/testsuite.src/run_misc.at +=================================================================== +--- gnucobol-3.1.2.orig/tests/testsuite.src/run_misc.at ++++ gnucobol-3.1.2/tests/testsuite.src/run_misc.at +@@ -10402,7 +10402,7 @@ COB_EXT_EXPORT int + CAPI (void *p1, ...) + { + int k,nargs,type,digits,scale,size,sign,byvalue; +- cob_s64_t val; ++ cob_s64_t val = 0; + char *str; + char wrk[80],pic[30]; /* note: maxium _theoretical_ size */ + diff --git a/gnu-cobol.changes b/gnu-cobol.changes new file mode 100644 index 0000000..88b2c3a --- /dev/null +++ b/gnu-cobol.changes @@ -0,0 +1,75 @@ +------------------------------------------------------------------- +Wed Jul 24 13:48:02 UTC 2024 - Martin Jambor + +- Add gnucobol-3.1.2-C99.diff to add missing includes of + libxml/parser.h which cause GCC 14 to emit compiler error rather + than a warning. + +- Add -Wno-error=incompatible-pointer-types to optflags so that GCC 14 + can compile test 0987 without failing with an error. + +------------------------------------------------------------------- +Sat Jul 15 18:11:27 UTC 2023 - Sarah Kriesch + +- Move libcob-devel files to gnucobol.lang because libcob.h can not be found + (boo#1209438) + +------------------------------------------------------------------- +Wed Dec 23 17:43:58 UTC 2020 - Luigi Baldoni + +- Update to version 3.1.2 (see NEWS or ChangeLog for details) +- Drop gnucobol-CFLAGS.patch (no longer needed) +- Add fix_test_698.patch and enable hardening +- Add buildtime requirements for libjson-c and libxml2 +- Disable lto to avoid test failure + +------------------------------------------------------------------- +Fri Jul 27 09:14:34 UTC 2018 - jengelh@inai.de + +- Trim redundancies from description. + +------------------------------------------------------------------- +Sat May 12 05:05:29 UTC 2018 - aloisio@gmx.com + +- Enable parallel build and tests + +------------------------------------------------------------------- +Tue May 8 22:14:34 UTC 2018 - aloisio@gmx.com + +- Update to version 3.0rc1, stabler than 2.2 final + (see NEWS or ChangeLog for details) +- Refreshed gnucobol-CFLAGS.patch +- Switched source URL to sourceforge to get the latest tarball +- Fixed description +- Enabled tests + +------------------------------------------------------------------- +Thu Sep 7 19:42:36 UTC 2017 - aloisio@gmx.com + +- Update to version 2.2 (see NEWS or ChangeLog) +- Switched license to GPL-3.0+/LGPL-3.0+ +- Updated source URL and homepage on account of being accepted + into the GNU Project +- Added gnucobol-CFLAGS.patch +- Dropped types.diff (apparently no longer necessary) + +------------------------------------------------------------------- +Mon Apr 6 15:00:39 UTC 2015 - mpluskal@suse.com + +- Cleanup spec file with spec-cleaner +- Use url for source +- Update info dependencies +- Use macro for locale handling +- Do not create static library + +------------------------------------------------------------------- +Wed Jul 16 16:32:55 UTC 2014 - dvlaeev@suse.com + +- Fix SLE11 builds by defining buildroot + +------------------------------------------------------------------- +Wed Apr 30 00:00:00 UTC 2014 - MihailJP + +- First packaging + + diff --git a/gnu-cobol.spec b/gnu-cobol.spec new file mode 100644 index 0000000..2495352 --- /dev/null +++ b/gnu-cobol.spec @@ -0,0 +1,113 @@ +# +# spec file for package gnu-cobol +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define _lto_cflags %{nil} +%define sover 4 +%define _mver 3.1 +Name: gnu-cobol +Version: 3.1.2 +Release: 0 +Summary: A COBOL compiler +License: GPL-3.0-or-later AND LGPL-3.0-or-later +Group: Development/Languages/Other +URL: https://savannah.gnu.org/projects/gnucobol +Source0: https://sourceforge.net/projects/open-cobol/files/gnu-cobol/%{_mver}/gnucobol-%{version}.tar.xz +Source1: https://sourceforge.net/projects/open-cobol/files/gnu-cobol/%{_mver}/gnucobol-%{version}.tar.xz.sig +# PATCH-FIX-UPSTREAM fix_test_698.patch -- see https://sourceforge.net/p/gnucobol/bugs/695/ +Patch1: fix_test_698.patch +# PATCH-FIX-UPSTREAM gnucobol-3.1.2-C99.diff -- Missing include which causes compilation errors with GCC 14 +Patch2: gnucobol-3.1.2-C99.diff +BuildRequires: autoconf +BuildRequires: db-devel +BuildRequires: dos2unix +BuildRequires: gmp-devel +BuildRequires: help2man +BuildRequires: makeinfo +BuildRequires: pkgconfig(json-c) >= 0.12 +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(ncurses) >= 5.4 +Requires(post): %{install_info_prereq} +Requires(preun): %{install_info_prereq} +Provides: libcob-devel = %{version} +Provides: opencobol = %{version} +Obsoletes: libcob-devel <= 3.1.2 + +%description +GnuCOBOL (formerly OpenCOBOL) is a COBOL compiler. +cobc translates COBOL to executable using intermediate C sources, +providing full access to nearly all C libraries. + +%package -n libcob%{sover} +Summary: GnuCOBOL shared library +License: LGPL-3.0-or-later +Group: Development/Languages/Other + +%description -n libcob%{sover} +GnuCOBOL (formerly OpenCOBOL) is a COBOL compiler. +cobc translates COBOL to executable using intermediate C sources, +providing full access to nearly all C libraries. + +%prep +%autosetup -p1 -n gnucobol-%{version} + +%build + +%global optflags %{optflags} -Wno-error=incompatible-pointer-types +%configure \ + --enable-hardening \ + --enable-static=no +%make_build + +%install +%make_install +%find_lang gnucobol +find %{buildroot} -type f -name "*.la" -delete -print + +%check +%make_build check + +%post +%install_info --info-dir=%{_infodir} %{_infodir}/gnucobol.info.gz + +%preun +%install_info_delete --info-dir=%{_infodir} %{_infodir}/gnucobol.info.gz + +%post -n libcob%{sover} -p /sbin/ldconfig +%postun -n libcob%{sover} -p /sbin/ldconfig + +%files -f gnucobol.lang +%license COPYING COPYING.DOC +%doc ABOUT-NLS AUTHORS ChangeLog NEWS README THANKS TODO +%{_bindir}/cob-config +%{_bindir}/cobc +%{_bindir}/cobcrun +%{_datadir}/gnucobol +%{_infodir}/gnucobol.info%{?ext_info} +%{_libdir}/gnucobol +%{_libdir}/libcob.so +%{_includedir}/libcob.h +%{_includedir}/libcob +%{_mandir}/man1/cob-config.1%{ext_info} +%{_mandir}/man1/cobc.1%{ext_info} +%{_mandir}/man1/cobcrun.1%{ext_info} + +%files -n libcob%{sover} +%license COPYING.LESSER +%{_libdir}/libcob.so.%{sover}* + +%changelog diff --git a/gnucobol-3.1.2-C99.diff b/gnucobol-3.1.2-C99.diff new file mode 100644 index 0000000..02d0022 --- /dev/null +++ b/gnucobol-3.1.2-C99.diff @@ -0,0 +1,24 @@ +Index: gnucobol-3.1.2/libcob/common.c +=================================================================== +--- gnucobol-3.1.2.orig/libcob/common.c ++++ gnucobol-3.1.2/libcob/common.c +@@ -111,6 +111,7 @@ + #endif + + #if defined (WITH_XML2) ++#include + #include + #include + #endif +Index: gnucobol-3.1.2/libcob/mlio.c +=================================================================== +--- gnucobol-3.1.2.orig/libcob/mlio.c ++++ gnucobol-3.1.2/libcob/mlio.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #endif + + #if defined (WITH_CJSON) diff --git a/gnucobol-3.1.2.tar.xz b/gnucobol-3.1.2.tar.xz new file mode 100644 index 0000000..964b20c --- /dev/null +++ b/gnucobol-3.1.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:597005d71fd7d65b90cbe42bbfecd5a9ec0445388639404662e70d53ddf22574 +size 2198512 diff --git a/gnucobol-3.1.2.tar.xz.sig b/gnucobol-3.1.2.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..c80b2612e753e7e26712d4ff15e157070b14b1662646adcf8c08ffcb409ed75f GIT binary patch literal 566 zcmV-60?GY}0y6{v0SEvc79j+=MV$<&r$DnKBV6AT>1$KK1z=7E0$<}ZSpW(N5EJQZ zQ@{maPXBfg0II5rOFVs(iYYtS4{Eb)OSf?$acWPa9;AGmvCG1FS`A01-eNt;&)QIV zFLVNMr5!fT2)n^DUP627hXD4c}$~g?lU|kS%69^B5Wv6BW1To~$59BuSjwoCp#?QmX