forked from pool/tolua
- Fix building with namespaced lua, adapt patches:
* tolua-5.2.0-optflags.patch * tolua-5.2.0-shared.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/tolua?expand=0&rev=5
This commit is contained in:
committed by
Git OBS Bridge
parent
1349ab6cf4
commit
5cdf435840
@@ -1,7 +1,7 @@
|
||||
Index: tolua-5.2.0/config
|
||||
Index: tolua-5.2.4/config
|
||||
===================================================================
|
||||
--- tolua-5.2.0.orig/config
|
||||
+++ tolua-5.2.0/config
|
||||
--- tolua-5.2.4.orig/config
|
||||
+++ tolua-5.2.4/config
|
||||
@@ -5,7 +5,7 @@
|
||||
# you need an ANSI C compiler. gcc is a popular one.
|
||||
CC= gcc
|
||||
@@ -11,3 +11,27 @@ Index: tolua-5.2.0/config
|
||||
|
||||
# on SGI's, cc is ANSI.
|
||||
#CC= cc
|
||||
Index: tolua-5.2.4/src/bin/Makefile
|
||||
===================================================================
|
||||
--- tolua-5.2.4.orig/src/bin/Makefile
|
||||
+++ tolua-5.2.4/src/bin/Makefile
|
||||
@@ -17,16 +17,16 @@ T_D = $(TOLUA)/bin/tolua_lua
|
||||
all: $(T)
|
||||
|
||||
$(T): $(OBJS)
|
||||
- $(CC) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm
|
||||
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm
|
||||
|
||||
toluabind.c: $(T_D)
|
||||
$(T_D) -o toluabind.c tolua.pkg
|
||||
|
||||
$(T_D): $(OBJS_D)
|
||||
- $(CC) -o $@ $(OBJS_D) $(LIB) -ltolua -llua -lm
|
||||
+ $(CC) $(CFLAGS) -o $@ $(OBJS_D) $(LIB) -ltolua -llua -lm
|
||||
|
||||
tolua_lua.o: tolua.c
|
||||
- $(CC) -c -DLUA_SOURCE $(INC) -o $@ $<
|
||||
+ $(CC) $(CFLAGS) -c -DLUA_SOURCE $(INC) -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f tolua_lua.o $(OBJS) -$(OBJS_D) $(T) $(T_D)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Index: tolua-5.2.0/config
|
||||
Index: tolua-5.2.4/config
|
||||
===================================================================
|
||||
--- tolua-5.2.0.orig/config
|
||||
+++ tolua-5.2.0/config
|
||||
--- tolua-5.2.4.orig/config
|
||||
+++ tolua-5.2.4/config
|
||||
@@ -32,5 +32,5 @@ LIB= -L$(TOLUA)/lib -L$(LUALIB)
|
||||
|
||||
#CFLAGS= -O2 $(WARN) $(INC)
|
||||
@@ -10,23 +10,23 @@ Index: tolua-5.2.0/config
|
||||
-CPPFLAGS= -g $(WARN) $(INC)
|
||||
+CFLAGS= -fPIC -DLUA_C89_NUMBERS $(WARN) $(INC)
|
||||
+CPPFLAGS= -fPIC -DLUA_C89_NUMBERS $(WARN) $(INC)
|
||||
Index: tolua-5.2.0/src/bin/Makefile
|
||||
Index: tolua-5.2.4/src/bin/Makefile
|
||||
===================================================================
|
||||
--- tolua-5.2.0.orig/src/bin/Makefile
|
||||
+++ tolua-5.2.0/src/bin/Makefile
|
||||
--- tolua-5.2.4.orig/src/bin/Makefile
|
||||
+++ tolua-5.2.4/src/bin/Makefile
|
||||
@@ -17,7 +17,7 @@ T_D = $(TOLUA)/bin/tolua_lua
|
||||
all: $(T)
|
||||
|
||||
$(T): $(OBJS)
|
||||
- $(CC) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm
|
||||
+ $(CC) -shared -o $@ $(OBJS) $(LIB) -ltolua -llua -lm
|
||||
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIB) -ltolua -llua -lm
|
||||
+ $(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LIB) -ltolua -llua -lm
|
||||
|
||||
toluabind.c: $(T_D)
|
||||
$(T_D) -o toluabind.c tolua.pkg
|
||||
Index: tolua-5.2.0/src/lib/Makefile
|
||||
Index: tolua-5.2.4/src/lib/Makefile
|
||||
===================================================================
|
||||
--- tolua-5.2.0.orig/src/lib/Makefile
|
||||
+++ tolua-5.2.0/src/lib/Makefile
|
||||
--- tolua-5.2.4.orig/src/lib/Makefile
|
||||
+++ tolua-5.2.4/src/lib/Makefile
|
||||
@@ -11,14 +11,23 @@ OBJS= \
|
||||
tolua_push.o \
|
||||
tolua_to.o
|
||||
@@ -52,10 +52,10 @@ Index: tolua-5.2.0/src/lib/Makefile
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
|
||||
Index: tolua-5.2.0/Makefile
|
||||
Index: tolua-5.2.4/Makefile
|
||||
===================================================================
|
||||
--- tolua-5.2.0.orig/Makefile
|
||||
+++ tolua-5.2.0/Makefile
|
||||
--- tolua-5.2.4.orig/Makefile
|
||||
+++ tolua-5.2.4/Makefile
|
||||
@@ -1,5 +1,16 @@
|
||||
# makefile for tolua hierarchy
|
||||
|
||||
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 13 19:28:04 UTC 2017 - tchvatal@suse.com
|
||||
|
||||
- Fix building with namespaced lua, adapt patches:
|
||||
* tolua-5.2.0-optflags.patch
|
||||
* tolua-5.2.0-shared.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 22 15:10:55 UTC 2015 - rpm@fthiessen.de
|
||||
|
||||
|
26
tolua.spec
26
tolua.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package tolua
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@@ -17,6 +17,7 @@
|
||||
#
|
||||
|
||||
|
||||
%define libname libtolua5
|
||||
Name: tolua
|
||||
Version: 5.2.4
|
||||
Release: 0
|
||||
@@ -29,8 +30,7 @@ Patch0: %{name}-5.2.0-optflags.patch
|
||||
Patch1: %{name}-5.2.0-shared.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: lua-devel
|
||||
Requires: libtolua5 = %{version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: %{libname} = %{version}
|
||||
|
||||
%description
|
||||
tolua is a tool that greatly simplifies the integration of
|
||||
@@ -44,11 +44,11 @@ automatically maps C/C++ constants, external variables, functions,
|
||||
namespace, classes, and methods to Lua. It also provides
|
||||
facilities to create Lua modules.
|
||||
|
||||
%package -n libtolua5
|
||||
%package -n %{libname}
|
||||
Summary: Shared libraries for tolua
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libtolua5
|
||||
%description -n %{libname}
|
||||
This package provides shared libraries for tolua.
|
||||
|
||||
%package -n libtolua-devel
|
||||
@@ -70,7 +70,7 @@ sed -i -e 's|LUA=%{_prefix}/local|LUA=%{_prefix}|g' \
|
||||
config
|
||||
sed -i -e 's|LUALIB=$(LUA)/lib|LUALIB=$(LUA)/%{_lib}|g' \
|
||||
config
|
||||
sed -i -e 's|$(OPTFLAGS)|%{optflags}|g' {config,src/bin/Makefile}
|
||||
sed -i -e 's|$(OPTFLAGS)|%{optflags} -I%{lua_incdir}|g' {config,src/bin/Makefile}
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags}
|
||||
@@ -78,27 +78,19 @@ make %{?_smp_mflags}
|
||||
%install
|
||||
make install DESTDIR=%{buildroot} LIB=%{_lib}
|
||||
|
||||
%post -n libtolua5 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libtolua5 -p /sbin/ldconfig
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README
|
||||
%{_bindir}/%{name}
|
||||
|
||||
%files -n libtolua5
|
||||
%defattr(-,root,root)
|
||||
%files -n %{libname}
|
||||
%{_libdir}/lib%{name}.so.5
|
||||
%{_libdir}/lib%{name}.so.5.2
|
||||
%{_libdir}/lib%{name}.so.%{version}
|
||||
|
||||
%files -n libtolua-devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/%{name}.h
|
||||
%{_libdir}/lib%{name}.so
|
||||
|
||||
|
Reference in New Issue
Block a user