Commit 08f1220f authored by Thaodan's avatar Thaodan

[sb2] Don't use bundled liblua. Contributes to JB#52528

parent cc1bcb98
......@@ -9,6 +9,7 @@ Prefix: /usr
ExclusiveArch: %{ix86}
BuildRequires: make
BuildRequires: autoconf
BuildRequires: pkgconfig(lua)
Requires: fakeroot
Requires: libsb2 = %{version}-%{release}
......
......@@ -66,7 +66,6 @@ subdirs = preload luaif sblib pathmapping execs network rule_tree utils sb2d wra
CFLAGS += -O2 -g -Wall -W
CFLAGS += -I$(OBJDIR)/include -I$(SRCDIR)/include
CFLAGS += -I$(SRCDIR)/luaif/lua-5.1.4/src
CFLAGS += -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
CFLAGS += $(MACH_CFLAG)
LDFLAGS += $(MACH_CFLAG)
......
......@@ -3,7 +3,7 @@
#automake_version=1.9
rm -rf configure autom4te.cache
#aclocal
aclocal
autoheader
autoconf
......@@ -5,6 +5,6 @@ CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
LIBOBJS=@LIBOBJS@
#LUA51_LIBS=@LUA51_LIBS@
#LUA51_CFLAGS=@LUA51_CFLAGS@
LUA_LIBS=@LUA_LIBS@
LUA_CFLAGS=@LUA_CFLAGS@
......@@ -19,7 +19,7 @@ AC_PROG_MAKE_SET
# Checks for libraries.
AC_CHECK_LIB([dl], [dlsym])
#PKG_CHECK_MODULES(LUA51, lua5.1 >= 5.1.0)
PKG_CHECK_MODULES([LUA], lua >= 5.2.0)
# Checks for header files.
AC_HEADER_DIRENT
......@@ -222,7 +222,7 @@ AC_SUBST(CXX, ${CXX})
AC_SUBST(CFLAGS, ${CFLAGS})
AC_SUBST(LDFLAGS, ${LDFLAGS})
#AC_SUBST(LUA51_LIBS, ${LUA51_LIBS})
#AC_SUBST(LUA51_CFLAGS, ${LUA51_CFLAGS})
AC_SUBST(LUA_LIBS, ${LUA_LIBS})
AC_SUBST(LUA_CFLAGS, ${LUA_CFLAGS})
AC_OUTPUT
......@@ -8,10 +8,10 @@ objs := $(D)/sblib_luaif.o
$(D)/sblib_luaif.o: preload/exported.h
luaif/libluaif.a: $(objs)
luaif/libluaif.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(SRCDIR)/$(LUASRC) -I$(OBJDIR)/preload -I$(SRCDIR)/preload \
$(WERROR) -Wmissing-prototypes -Wstrict-prototypes
luaif/libluaif.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(OBJDIR)/preload -I$(SRCDIR)/preload \
$(WERROR) -Wmissing-prototypes -Wstrict-prototypes $(LUA_CFLAGS)
luaif/libluaif.a: override LDFLAGS := $(LDFLAGS)
luaif/libluaif.a: override LIBS :=
luaif/libluaif.a: override LIBS := $(LUA_LIBS)
lua_sources := loadlib.c lstate.c ldebug.c liolib.c llex.c lauxlib.c ldump.c \
......@@ -30,5 +30,5 @@ luaif/liblua.a: override CFLAGS := -O2 -Dfopen=fopen_nomap -g -fPIC -Wall -W $(C
luaif/liblua.a: override LDFLAGS := $(LDFLAGS)
luaif/liblua.a: override LIBS :=
targets := $(targets) $(D)/libluaif.a $(D)/liblua.a
targets := $(targets) $(D)/libluaif.a
......@@ -20,10 +20,10 @@ LIBSB2_LDFLAGS = -Wl,-soname=$(LIBSB2_SONAME) \
# DO NOT add any libraries that depend on libpthread to
# LIBSB2_LIBS or LIBS!! see the comments in luaif.c.
LIBSB2_LIBS =
LIBSB2_LIBS = $(LUA_LIBS)
SHLIBEXT = so
else
LIBSB2_LIBS =
LIBSB2_LIBS = $(LUA_LIBS)
SHLIBEXT = dylib
endif
......
......@@ -18,9 +18,8 @@ $(D)/sb2d: $(D)/sb2d.o \
pathmapping/paths_ruletree_maint.o \
execs/exec_ruletree_maint.o \
luaif/sblib_luaif.o \
luaif/liblua.a
$(MKOUTPUTDIR)
$(P)LD
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lm -ldl
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lm -ldl $(LUA_LIBS)
targets := $(targets) $(D)/sb2d
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment