Accepting request 1002891 from home:gmbr3:Lua
- Add shared_link.patch: fix dynamic linking executable - Stop building static library OBS-URL: https://build.opensuse.org/request/show/1002891 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua53?expand=0&rev=38
This commit is contained in:
parent
07d8f66dc3
commit
69c377b06a
@ -40,9 +40,10 @@ Index: lua-5.3.4/Makefile
|
||||
# How to install. If your install program does not support "-p", then
|
||||
# you may have to run ranlib on the installed liblua.a.
|
||||
INSTALL= install -p
|
||||
INSTALL_EXEC= $(INSTALL) -m 0755
|
||||
-INSTALL_EXEC= $(INSTALL) -m 0755
|
||||
+INSTALL_EXEC= $(LIBTOOL) --mode=install install -m 0755
|
||||
INSTALL_DATA= $(INSTALL) -m 0644
|
||||
+INSTALL_LIBTOOL= $(LIBTOOL) --mode=install install -m 0644
|
||||
+INSTALL_LIBTOOL= $(LIBTOOL) --mode=install install -m 0755
|
||||
#
|
||||
# If you don't have "install" you can use "cp" instead.
|
||||
# INSTALL= cp -p
|
||||
@ -134,15 +135,15 @@ Index: lua-5.3.4/src/Makefile
|
||||
$(LUA_A): $(BASE_O)
|
||||
- $(AR) $@ $(BASE_O)
|
||||
- $(RANLIB) $@
|
||||
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl $(BASE_O:.o=.lo) -rpath /usr/lib -version-info 8:0:3 -o liblua$(V).la
|
||||
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl $(BASE_O:.o=.lo) -rpath /usr/lib -shared -version-info 8:0:3 -o liblua$(V).la
|
||||
|
||||
$(LUA_T): $(LUA_O) $(LUA_A)
|
||||
- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
||||
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LIBS) -static liblua$(V).la -Wl,-E lua.lo -o $@
|
||||
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LIBS) $(LUA_A) -Wl,-E lua.lo -o $@
|
||||
|
||||
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
||||
- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
||||
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -static liblua$(V).la luac.lo -o $@
|
||||
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LUA_A) luac.lo -o $@
|
||||
|
||||
clean:
|
||||
$(RM) $(ALL_T) $(ALL_O)
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 12 11:10:48 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
|
||||
|
||||
- Add shared_link.patch: fix dynamic linking executable
|
||||
- Stop building static library
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 25 14:46:59 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
|
||||
|
||||
|
@ -33,6 +33,7 @@ Patch0: lua-build-system.patch
|
||||
#Patch1: upstream-bugs.patch
|
||||
# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.0
|
||||
#Patch2: upstream-bugs-backport-lua54.patch
|
||||
Patch3: shared-link.patch
|
||||
BuildRequires: libtool
|
||||
BuildRequires: lua-macros
|
||||
BuildRequires: pkgconfig
|
||||
@ -142,7 +143,6 @@ make install \
|
||||
V=%{major_version} \
|
||||
INSTALL_TOP="%{buildroot}%{_prefix}" \
|
||||
INSTALL_LIB="%{buildroot}%{_libdir}"
|
||||
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
# create pkg-config file
|
||||
@ -241,7 +241,6 @@ fi
|
||||
%{_includedir}/lua%{major_version}/lua.hpp
|
||||
%{_includedir}/lua%{major_version}/luaconf.h
|
||||
%{_includedir}/lua%{major_version}/lualib.h
|
||||
%{_libdir}/liblua%{major_version}.a
|
||||
%{_libdir}/liblua%{major_version}.so
|
||||
%{_libdir}/pkgconfig/lua%{major_version}.pc
|
||||
# alternatives
|
||||
|
33
shared-link.patch
Normal file
33
shared-link.patch
Normal file
@ -0,0 +1,33 @@
|
||||
--- a/src/lundump.h
|
||||
+++ b/src/lundump.h
|
||||
@@ -26,7 +26,7 @@
|
||||
LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name);
|
||||
|
||||
/* dump one chunk; from ldump.c */
|
||||
-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
|
||||
+LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
|
||||
void* data, int strip);
|
||||
|
||||
#endif
|
||||
|
||||
--- a/src/lopcodes.h
|
||||
+++ b/src/lopcodes.h
|
||||
@@ -278,7 +278,7 @@
|
||||
OpArgK /* argument is a constant or register/constant */
|
||||
};
|
||||
|
||||
-LUAI_DDEC const lu_byte luaP_opmodes[NUM_OPCODES];
|
||||
+LUA_API const lu_byte luaP_opmodes[NUM_OPCODES];
|
||||
|
||||
#define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3))
|
||||
#define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3))
|
||||
@@ -287,7 +287,7 @@
|
||||
#define testTMode(m) (luaP_opmodes[m] & (1 << 7))
|
||||
|
||||
|
||||
-LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
|
||||
+LUA_API const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
|
||||
|
||||
|
||||
/* number of list items to accumulate before a SETLIST instruction */
|
||||
|
Loading…
Reference in New Issue
Block a user