From 503a1ade230a0e3e0e90adf95e12104ae4e83a87 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 31 Jul 2020 17:07:11 +0200 Subject: [PATCH] make the code build with lua-5.4.x Otherwise the build would fail like this: gcc -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -Wall -Wno-address -fno-strict-overflow -rdynamic -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o elinks lib.o vernum.o -lssl -lcrypto -L/usr/lib -llua -lm -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -ldl -lgpm -lz -lbz2 -lidn2 -lexpat /usr/bin/ld: lib.o: in function `l_tmpname': /home/kdudka/fedora/elinks/elinks-0.12pre6/src/scripting/lua/core.c:252: warning: the use of `tempnam' is dangerous, better use `mkstemp' /usr/bin/ld: lib.o: in function `script_hook_pre_format_html': /home/kdudka/fedora/elinks/elinks-0.12pre6/src/scripting/lua/hooks.c:147: undefined reference to `lua_strlen' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:41: elinks] Error 1 make[1]: Leaving directory '/home/kdudka/fedora/elinks/elinks-0.12pre6/src' make: *** [Makefile.lib:269: all-recursive] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.1Mc5xz (%build) --- elinks.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/elinks.spec b/elinks.spec index 4ceb4b5..787b2bf 100644 --- a/elinks.spec +++ b/elinks.spec @@ -3,7 +3,7 @@ Name: elinks Summary: A text-mode Web browser Version: 0.12 -Release: 0.63.%{prerel}%{?dist} +Release: 0.64.%{prerel}%{?dist} License: GPLv2 URL: http://elinks.or.cz Source: http://elinks.or.cz/download/elinks-%{version}%{prerel}.tar.bz2 @@ -102,6 +102,10 @@ autoheader %build export CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS) -D_GNU_SOURCE" + +# make the code build with lua-5.4.x +CFLAGS="$CFLAGS -DLUA_COMPAT_5_3" + %configure %{?rescue:--without-gpm} \ --enable-256-colors \ --enable-bittorrent \ @@ -158,6 +162,9 @@ exit 0 %{_mandir}/man5/* %changelog +* Fri Jul 31 2020 Kamil Dudka - 0.12-0.64.pre6 +- make the code build with lua-5.4.x + * Mon Jul 27 2020 Fedora Release Engineering - 0.12-0.63.pre6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild