diff --git a/compat-lua.spec b/compat-lua.spec index 1d08237..8a921f7 100644 --- a/compat-lua.spec +++ b/compat-lua.spec @@ -1,6 +1,6 @@ Name: compat-lua Version: 5.1.5 -Release: 21%{?dist} +Release: 21.0.riscv64%{?dist} Summary: Powerful light-weight programming language (compat version) License: MIT URL: http://www.lua.org/ @@ -9,6 +9,7 @@ Patch0: lua-5.1.4-autotoolize.patch Patch1: lua-5.1.4-lunatic.patch Patch2: lua-5.1.4-idsize.patch Patch3: lua-5.1.4-pc-compat.patch +Patch9: riscv64-fix-lua_cdir.patch BuildRequires: readline-devel ncurses-devel libtool BuildRequires: make Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -46,6 +47,7 @@ This package contains development files for compat-lua-libs. %patch1 -p0 -z .lunatic %patch2 -p1 -z .idsize %patch3 -p1 +%patch9 -p1 -z .riscv6 -z .riscv644 # fix perms on auto files chmod u+x autogen.sh config.guess config.sub configure depcomp install-sh missing # Avoid make doing auto-reconf itself, killing our rpath removal in the process @@ -104,6 +106,9 @@ mv $RPM_BUILD_ROOT%{_libdir}/pkgconfig/lua.pc \ %changelog +* Wed Nov 16 2022 David Abdurachmanov - 5.1.5-21.0.riscv64 +- Fix LUA_CDIR for riscv64 + * Wed Jul 20 2022 Fedora Release Engineering - 5.1.5-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/riscv64-fix-lua_cdir.patch b/riscv64-fix-lua_cdir.patch new file mode 100644 index 0000000..81c6f1d --- /dev/null +++ b/riscv64-fix-lua_cdir.patch @@ -0,0 +1,13 @@ +diff --git a/src/luaconf.h.template.in b/src/luaconf.h.template.in +index fe9681a..b3ad699 100644 +--- a/src/luaconf.h.template.in ++++ b/src/luaconf.h.template.in +@@ -100,7 +100,7 @@ + #define LUA_LDIR "%lua_datadir%/lua/5.1/" + #if defined __alpha__ || defined __ia64__ || defined __powerpc64__ || \ + defined __s390x__ || defined __sparc64__ || defined __x86_64__ || \ +- defined __aarch64__ ++ defined __aarch64__ || (defined __riscv && __SIZEOF_POINTER__ == 8) + #define LUA_CDIR "/usr/lib64/lua/5.1/" + #else + #define LUA_CDIR "/usr/lib/lua/5.1/"