diff --git a/00-fix-gcc-fno-common.patch b/00-fix-gcc-fno-common.patch new file mode 100644 index 0000000..0541c31 --- /dev/null +++ b/00-fix-gcc-fno-common.patch @@ -0,0 +1,28 @@ +Index: src/libmawk/vio_fifo.c +=================================================================== +diff --git a/src/libmawk/vio_fifo.c b/src/libmawk/vio_fifo.c +--- a/src/libmawk/vio_fifo.c (revision 1326) ++++ b/src/libmawk/vio_fifo.c (revision 1327) +@@ -10,6 +10,8 @@ + #include "vio_fifo.h" + #include "memory.h" + ++const mawk_vio_imp_t mawk_vio_fifo_imp; ++ + mawk_vio_t *mawk_vio_fifo_open(mawk_state_t *MAWK, const char *name, mawk_vio_open_mode_t mode) + { + mawk_vio_fifo_t *v; +Index: src/libmawk/vio_fifo.h +=================================================================== +diff --git a/src/libmawk/vio_fifo.h b/src/libmawk/vio_fifo.h +--- a/src/libmawk/vio_fifo.h (revision 1326) ++++ b/src/libmawk/vio_fifo.h (revision 1327) +@@ -14,7 +14,7 @@ + int eof_from_app; /* 1 if there won't be more from the app or the app won't accept more data */ + } mawk_vio_fifo_t; + +-const mawk_vio_imp_t mawk_vio_fifo_imp; ++extern const mawk_vio_imp_t mawk_vio_fifo_imp; + + mawk_vio_t *mawk_vio_fifo_open(mawk_state_t *MAWK, const char *name, mawk_vio_open_mode_t mode); + diff --git a/libmawk.spec b/libmawk.spec index a86643a..c919164 100644 --- a/libmawk.spec +++ b/libmawk.spec @@ -1,12 +1,16 @@ Name: libmawk Version: 1.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Embed awk scripting language in any application written in C License: GPLv2 URL: http://repo.hu/projects/libmawk Source0: http://repo.hu/projects/libmawk/releases/%{name}-%{version}.tar.gz +# patch source code to avoid multiple definitions of "C tentative definitions" +# This patch should be removed for next libmawk version packaging, as upstream already implemented it. +Patch0: 00-fix-gcc-fno-common.patch + BuildRequires: gcc %description @@ -32,11 +36,12 @@ HTML documentation for %{name}. %prep -%autosetup +%autosetup -p1 %build -./"configure" --prefix=%{_prefix} --libarchdir=%{_libdir} --symbols \ +# This ./configure command refers to scconfig. See http://repo.hu/projects/scconfig/ +./"configure" --prefix=%{_prefix} --libarchdir=%{_lib} --symbols \ --CFLAGS="%{build_cflags}" --LDFLAGS="%{build_ldflags}" %make_build @@ -48,7 +53,8 @@ HTML documentation for %{name}. %files %license src/libmawk/COPYING %doc AUTHORS README Release_notes -%{_libdir}/*.so.1* +%{_libdir}/*.so.1 +%{_libdir}/*.so.1.0* %{_bindir}/lmawk %dir %{_libdir}/%{name} %{_libdir}/%{name}/*.awk @@ -65,6 +71,10 @@ HTML documentation for %{name}. %changelog +* Mon Feb 10 2020 Alain - 1.0.2-4 +- Fix the libdir install, depending on arch +- Patch source code to comply with gcc -fno-common + * Wed Jan 29 2020 Fedora Release Engineering - 1.0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild