SHA256
1
0
forked from pool/lua-toluapp

- Tweak the tolua++-1.0.93-lua52.patch to work with lua5.1 too correctly

OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-toluapp?expand=0&rev=11
This commit is contained in:
Tomáš Chvátal 2017-09-05 10:55:58 +00:00 committed by Git OBS Bridge
parent 1c32f108a3
commit 230628da51
2 changed files with 10 additions and 11 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Sep 5 10:56:14 UTC 2017 - tchvatal@suse.com
- Tweak the tolua++-1.0.93-lua52.patch to work with lua5.1 too correctly
-------------------------------------------------------------------
Fri Jul 14 11:53:09 UTC 2017 - tchvatal@suse.com

View File

@ -93,9 +93,7 @@ This package provides development headers for tolua++.
%patch0 -p1
%patch1 -p1
%patch2 -p1
%if "%{flavor}" == "lua52" || "%{flavor}" == "lua53"
%patch3 -p1
%endif
sed -i "s/@SUFFIX@/%{lua_version}/" SConstruct
%build
@ -114,7 +112,7 @@ scons %{?_smp_mflags} \
libdir="%{_libdir}" \
shared=1 \
lib bin \
-Q CCFLAGS="%{optflags} -I%{lua_incdir} -fPIC -DDATAPATH=\\\"%{_datadir}/%{name}\\\""
-Q CCFLAGS="%{optflags} -I%{lua_incdir} -fPIC -DDATAPATH=\\\"%{lua_noarchdir}/%{name}\\\""
%install
CCFLAGS="%{optflags} -fPIC -I%{lua_incdir}" \
@ -124,7 +122,7 @@ scons %{?_smp_mflags} \
libdir="%{buildroot}%{_libdir}" \
shared=1 \
install \
-Q CCFLAGS="%{optflags} -I%{lua_incdir} -fPIC -DDATAPATH=\\\"%{_datadir}/%{name}\\\""
-Q CCFLAGS="%{optflags} -I%{lua_incdir} -fPIC -DDATAPATH=\\\"%{lua_noarchdir}/%{name}\\\""
# pkgconfig file
mkdir -p %{buildroot}%{_libdir}/pkgconfig
@ -143,10 +141,8 @@ Libs: -ltolua++-%{lua_version}
Cflags: -I%{_includedir}
EOF
%if "%{flavor}" == "lua52" || "%{flavor}" == "lua53"
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
install -p -m 644 src/bin/lua/*.lua $RPM_BUILD_ROOT%{_datadir}/%{name}
%endif
mkdir -p %{buildroot}%{lua_noarchdir}/%{name}
install -p -m 644 src/bin/lua/*.lua %{buildroot}%{lua_noarchdir}/%{name}
# update-alternatives
mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
@ -170,9 +166,7 @@ fi
%ghost %{_sysconfdir}/alternatives/tolua++
%{_bindir}/tolua++
%{_bindir}/toluapp-%{lua_version}
%if "%{flavor}" == "lua52" || "%{flavor}" == "lua53"
%{_datadir}/%{name}
%endif
%{lua_noarchdir}/%{name}
%files -n libtolua++-%{lua_suffix}-devel
%{_includedir}/tolua++.h