Compare commits

...

1 Commits

Author SHA1 Message Date
David Abdurachmanov 9551155948
Set LUA_CDIR to lib64 on riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-03-20 09:46:02 +02:00
2 changed files with 19 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: compat-lua
Version: 5.1.5
Release: 22%{?dist}
Release: 22.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 .riscv64
# 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
* Mon Mar 20 2023 David Abdurachmanov <davidlt@rivosinc.com> - 5.1.5-22.0.riscv64
- Fix LUA_CDIR for riscv64
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.5-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

View File

@ -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/"