forked from pool/lua51
72f8b90ff8
- lua51 branched from lua package - cross-build fix: use %__cc macro - use %_smp_mflags - removed -L/usr/lib from Libs: in etc/lua.pc [bnc#613497] - used upstream bugfix patch from http://www.lua.org/download.html - buildrequire pkg-config to fix provides - modified LUA_PATH_DEFAULT [bnc#589441]: search modules under /usr/%{_lib}/lua/%{major_version} too - add baselibs.conf as a source - package documentation as noarch - enable parallel building - updated patches to apply with fuzz=0 - add baselibs.conf - package owns /usr/{lib,share}/lua directories from now - emoved unneeded root.patch - updated to 5.1.4: bugfix release - Set LUA_ROOT to /usr and fix INSTALL_CMOD for lib64 OBS-URL: https://build.opensuse.org/request/show/99319 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lua51?expand=0&rev=2
92 lines
2.7 KiB
Diff
92 lines
2.7 KiB
Diff
Index: etc/lua.pc
|
|
===================================================================
|
|
--- etc/lua.pc.orig
|
|
+++ etc/lua.pc
|
|
@@ -8,7 +8,7 @@ V= 5.1
|
|
R= 5.1.4
|
|
|
|
# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
|
|
-prefix= /usr/local
|
|
+prefix= /usr
|
|
INSTALL_BIN= ${prefix}/bin
|
|
INSTALL_INC= ${prefix}/include
|
|
INSTALL_LIB= ${prefix}/lib
|
|
Index: src/luaconf.h
|
|
===================================================================
|
|
--- src/luaconf.h.orig
|
|
+++ src/luaconf.h
|
|
@@ -184,7 +184,7 @@
|
|
|
|
#elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
|
|
defined(__ELF__)
|
|
-#define LUAI_FUNC __attribute__((visibility("hidden"))) extern
|
|
+#define LUAI_FUNC extern
|
|
#define LUAI_DATA LUAI_FUNC
|
|
|
|
#else
|
|
Index: src/Makefile
|
|
===================================================================
|
|
--- src/Makefile.orig
|
|
+++ src/Makefile
|
|
@@ -23,6 +23,7 @@ MYLIBS=
|
|
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
|
|
|
LUA_A= liblua.a
|
|
+LUA_SO= liblua.so
|
|
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
|
|
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
|
|
lundump.o lvm.o lzio.o
|
|
@@ -36,7 +37,7 @@ LUAC_T= luac
|
|
LUAC_O= luac.o print.o
|
|
|
|
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
|
|
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
|
+ALL_T= $(LUA_SO) $(LUA_A) $(LUA_T) $(LUAC_T)
|
|
ALL_A= $(LUA_A)
|
|
|
|
default: $(PLAT)
|
|
@@ -47,15 +48,20 @@ o: $(ALL_O)
|
|
|
|
a: $(ALL_A)
|
|
|
|
+# shared libraries (for Linux)
|
|
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
|
+ $(CC) -o $(LUA_SO).$V -shared -Wl,-soname,$(LUA_SO).$V $(CORE_O) $(LIB_O) -lm -ldl
|
|
+ ln -fs $(LUA_SO).$(V) $(LUA_SO)
|
|
+
|
|
$(LUA_A): $(CORE_O) $(LIB_O)
|
|
$(AR) $@ $?
|
|
$(RANLIB) $@
|
|
|
|
$(LUA_T): $(LUA_O) $(LUA_A)
|
|
- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
|
+ $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) -L. -llua $(LIBS)
|
|
|
|
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
|
- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
|
+ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) -L. -llua $(LIBS)
|
|
|
|
clean:
|
|
$(RM) $(ALL_T) $(ALL_O)
|
|
Index: Makefile
|
|
===================================================================
|
|
--- Makefile.orig
|
|
+++ Makefile
|
|
@@ -43,7 +43,7 @@ PLATS= aix ansi bsd freebsd generic linu
|
|
# What to install.
|
|
TO_BIN= lua luac
|
|
TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
|
|
-TO_LIB= liblua.a
|
|
+TO_LIB= liblua.a liblua.so.$(V)
|
|
TO_MAN= lua.1 luac.1
|
|
|
|
# Lua version and release.
|
|
@@ -62,6 +62,7 @@ install: dummy
|
|
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
|
|
cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
|
|
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
|
|
+ ln -s liblua.so.$(V) $(INSTALL_LIB)/liblua.so
|
|
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
|
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
|
|