SHA256
1
0
forked from pool/lua-toluapp

- Fix build with py3 scons:

* toluapp-scons-py3.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-toluapp?expand=0&rev=17
This commit is contained in:
Tomáš Chvátal 2018-02-02 12:32:50 +00:00 committed by Git OBS Bridge
parent 61ab55c8d6
commit cdfd5f89c8
3 changed files with 46 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 25 20:16:23 UTC 2018 - tchvatal@suse.com
- Fix build with py3 scons:
* toluapp-scons-py3.patch
-------------------------------------------------------------------
Mon Oct 30 14:45:32 UTC 2017 - jmatejek@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package lua-toluapp
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -40,6 +40,7 @@ Patch0: toluapp-libdir.patch
Patch1: toluapp-versioned-shared-lib.patch
Patch2: toluapp-build-compare.patch
Patch3: tolua++-1.0.93-lua52.patch
Patch4: toluapp-scons-py3.patch
BuildRequires: %{flavor}-devel
BuildRequires: gcc-c++
BuildRequires: pkgconfig
@ -93,6 +94,7 @@ This package provides development headers for tolua++.
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch4 -p1
%if "%{flavor}" != "lua51"
%patch3 -p1
%endif
@ -106,6 +108,7 @@ CCFLAGS = re.split(r"\s+", os.environ['CCFLAGS'])
LIBS = re.split(r"\s+", os.environ['LIBS'])
prefix = "%{_prefix}"
EOF
cp config_linux.py config_posix.py
CCFLAGS="%{optflags} -fPIC -I%{lua_incdir}" \
LIBS="-llua -lm -ldl" \
@ -114,7 +117,7 @@ scons %{?_smp_mflags} \
libdir="%{_libdir}" \
shared=1 \
lib bin \
-Q CCFLAGS="%{optflags} -I%{lua_incdir} -fPIC -DDATAPATH=\\\"%{lua_noarchdir}/%{name}\\\""
-Q CCFLAGS="%{optflags} -I%{lua_incdir} -fPIC -DDATAPATH=\\\"%{lua_noarchdir}/%{name}\\\"" \
%install
CCFLAGS="%{optflags} -fPIC -I%{lua_incdir}" \
@ -124,7 +127,7 @@ scons %{?_smp_mflags} \
libdir="%{buildroot}%{_libdir}" \
shared=1 \
install \
-Q CCFLAGS="%{optflags} -I%{lua_incdir} -fPIC -DDATAPATH=\\\"%{lua_noarchdir}/%{name}\\\""
-Q CCFLAGS="%{optflags} -I%{lua_incdir} -fPIC -DDATAPATH=\\\"%{lua_noarchdir}/%{name}\\\"" \
# pkgconfig file
mkdir -p %{buildroot}%{_libdir}/pkgconfig

34
toluapp-scons-py3.patch Normal file
View File

@ -0,0 +1,34 @@
Index: toluapp-1.0.93/SConstruct
===================================================================
--- toluapp-1.0.93.orig/SConstruct
+++ toluapp-1.0.93/SConstruct
@@ -52,9 +52,9 @@ env['TOLUAPP_BOOTSTRAP'] = env['tolua_bi
env['build_dev'] = int(env['build_dev'])
## detecting the install directory on win32
-if 'msvc' in env['TOOLS'] and not (env.has_key('prefix') or env['prefix']):
+if 'msvc' in env['TOOLS'] and not ('prefix' in env or env['prefix']):
- if env['MSVS'].has_key('PLATFORMSDKDIR'):
+ if 'PLATFORMSDKDIR' in env['MSVS']:
env['prefix'] = env['MSVS']['PLATFORMSDKDIR']
@@ -68,7 +68,7 @@ def pkg_scan_dep(self, target, source):
## TODO: detectar si el archivo existe antes de abrirlo asi nomas
pkg = open(source, "rt")
- for linea in pkg.xreadlines():
+ for linea in pkg:
dep = re.search("^[\t\w]*\$[cphl]file\s*\"([^\"]+)\"", linea)
if dep:
self.Depends(target, '#' + dep.groups()[0]);
@@ -91,7 +91,7 @@ def make_tolua_code(self, target, source
tolua = 'bin\\'+self['TOLUAPP_BOOTSTRAP']
else:
tolua = 'bin/'+self['TOLUAPP_BOOTSTRAP']
- print("********* tolua is ", tolua)
+ print(("********* tolua is ", tolua))
else:
if use_own:
if 'msvc' in self['TOOLS']: