forked from pool/lua-toluapp
osc copypac from project:devel:languages:lua package:lua51-toluapp revision:11, using expand
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-toluapp?expand=0&rev=1
This commit is contained in:
commit
541245c313
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
55
lua51-toluapp.changes
Normal file
55
lua51-toluapp.changes
Normal file
@ -0,0 +1,55 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 11 09:30:42 UTC 2017 - tchvatal@suse.com
|
||||
|
||||
- Fix build with namespaced lua
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 15 09:35:21 UTC 2016 - olaf@aepfle.de
|
||||
|
||||
- Remove version and timestamp from generated files
|
||||
toluapp-build-compare.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 7 04:17:11 UTC 2016 - i@marguerite.su
|
||||
|
||||
- rename the library to libtolua++-5.1
|
||||
- libtolua++-5_1-devel should require toluapp-5.1,
|
||||
which will require the library
|
||||
- fix build on openSUSE without lua-5.1.pc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 10 12:26:18 UTC 2015 - mlin@suse.com
|
||||
|
||||
- Don't version pkgconfig file
|
||||
- Delete toluapp-versioned-include.patch
|
||||
* still have packages rely on tolua++.h
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 18 12:03:33 UTC 2015 - i@marguerite.su
|
||||
|
||||
- previous upstream http://www.codenix.com/~tolua/ dead
|
||||
now use https://github.com/LuaDist/toluapp as source
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 5 15:48:04 UTC 2015 - i@marguerite.su
|
||||
|
||||
- build with versioned includes/sharedlibs.
|
||||
- add pkgconfig file
|
||||
- use update-alternatives to provides tolua++
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 8 07:48:02 UTC 2012 - pgajdos@suse.com
|
||||
|
||||
- build against lua51-devel for openSUSE > 12.1 until tolua++
|
||||
isn't ported to lua 5.2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 28 22:10:20 UTC 2011 - pascal.bleser@opensuse.org
|
||||
|
||||
- don't buildrequire tolua
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 28 20:32:52 CET 2011 - pascal.bleser@opensuse.org
|
||||
|
||||
- initial version (1.0.93)
|
||||
|
166
lua51-toluapp.spec
Normal file
166
lua51-toluapp.spec
Normal file
@ -0,0 +1,166 @@
|
||||
#
|
||||
# spec file for package lua51-toluapp
|
||||
#
|
||||
# Copyright (c) 2017 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
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define lua_major_version 5.1
|
||||
%define lua_suffix 5_1
|
||||
Name: lua51-toluapp
|
||||
Version: 1.0.93
|
||||
Release: 0
|
||||
Summary: C/C++ with Lua Integration Tool
|
||||
License: MIT
|
||||
Group: Development/Languages/Lua
|
||||
Url: https://github.com/LuaDist/toluapp
|
||||
Source: https://github.com/LuaDist/toluapp/archive/%{version}/toluapp-%{version}.tar.gz
|
||||
Patch: toluapp-libdir.patch
|
||||
Patch1: toluapp-versioned-shared-lib.patch
|
||||
Patch2: toluapp-build-compare.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: lua51-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: scons >= 2.3.0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
|
||||
Lua. tolua++ includes new features oriented to c++ such as:
|
||||
* support for std::string as a basic type (this can be turned off by a command
|
||||
line option)
|
||||
* support for class templates
|
||||
as well as other features and bugfixes.
|
||||
|
||||
%package -n toluapp-%{lua_major_version}
|
||||
Summary: C/C++ with Lua Integration Tool
|
||||
Group: Development/Languages/Lua
|
||||
Requires(preun): update-alternatives
|
||||
Requires(post): update-alternatives
|
||||
# 99.1: just make sure it's big enough
|
||||
Provides: tolua++ = %{version}-99.1
|
||||
Obsoletes: tolua++ < %{version}-99.1
|
||||
|
||||
%description -n toluapp-%{lua_major_version}
|
||||
tolua++ is an extended version of tolua, a tool to integrate C/C++ code with
|
||||
Lua. tolua++ includes new features oriented to c++ such as:
|
||||
* support for std::string as a basic type (this can be turned off by a command
|
||||
line option)
|
||||
* support for class templates
|
||||
as well as other features and bugfixes.
|
||||
|
||||
%package -n libtolua++-%{lua_suffix}-1
|
||||
Summary: Runtime libraries for tolua++
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libtolua++-%{lua_suffix}-1
|
||||
This package provides shared libraries for tolua++.
|
||||
|
||||
%package -n libtolua++-%{lua_suffix}-devel
|
||||
Summary: Development headers for tolua++
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: toluapp-%{lua_major_version}
|
||||
|
||||
%description -n libtolua++-%{lua_suffix}-devel
|
||||
This package provides development headers for tolua++.
|
||||
|
||||
%prep
|
||||
%setup -q -n toluapp-%{version}
|
||||
%patch -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
sed -i "s/@SUFFIX@/%{lua_major_version}/" SConstruct
|
||||
|
||||
%build
|
||||
cat <<'EOF' > config_linux.py
|
||||
import re,os
|
||||
|
||||
CCFLAGS = re.split(r"\s+", os.environ['CCFLAGS'])
|
||||
LIBS = re.split(r"\s+", os.environ['LIBS'])
|
||||
prefix = "%{_prefix}"
|
||||
EOF
|
||||
|
||||
CCFLAGS="%{optflags} -fPIC -I%{lua_incdir}" \
|
||||
LIBS="-llua -lm -ldl" \
|
||||
scons %{?_smp_mflags} \
|
||||
prefix="%{_prefix}" \
|
||||
libdir="%{_libdir}" \
|
||||
shared=1 \
|
||||
lib bin
|
||||
|
||||
%install
|
||||
CCFLAGS="%{optflags} -fPIC -I%{lua_incdir}" \
|
||||
LIBS="-llua -lm -ldl" \
|
||||
scons %{?_smp_flags} \
|
||||
prefix="%{buildroot}%{_prefix}" \
|
||||
libdir="%{buildroot}%{_libdir}" \
|
||||
shared=1 \
|
||||
install
|
||||
|
||||
# pkgconfig file
|
||||
mkdir -p %{buildroot}%{_libdir}/pkgconfig
|
||||
cat > %{buildroot}%{_libdir}/pkgconfig/tolua++.pc << EOF
|
||||
prefix=%{_prefix}
|
||||
exec_prefix=%{_prefix}
|
||||
libdir=%{_libdir}
|
||||
sharedlibdir=%{_libdir}
|
||||
includedir=%{_includedir}
|
||||
|
||||
Name: tolua++
|
||||
Description: C/C++ with Lua Integration Tool
|
||||
Version: %{version}
|
||||
|
||||
Libs: -ltolua++-%{lua_major_version}
|
||||
Cflags: -I%{_includedir}
|
||||
EOF
|
||||
|
||||
# update-alternatives
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/tolua++
|
||||
ln -sf %{_sysconfdir}/alternatives/tolua++ %{buildroot}%{_bindir}/tolua++
|
||||
|
||||
%post -n libtolua++-%{lua_suffix}-1 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libtolua++-%{lua_suffix}-1 -p /sbin/ldconfig
|
||||
|
||||
%post -n toluapp-%{lua_major_version}
|
||||
/sbin/ldconfig
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/tolua++ tolua++ %{_bindir}/toluapp-%{lua_major_version} 10
|
||||
|
||||
%preun -n toluapp-%{lua_major_version}
|
||||
if [ "$1" = 0 ] ; then
|
||||
%{_sbindir}/update-alternatives --remove tolua++ %{_bindir}/toluapp-%{lua_major_version}
|
||||
fi
|
||||
|
||||
%postun -n toluapp-%{lua_major_version} -p /sbin/ldconfig
|
||||
|
||||
%files -n toluapp-%{lua_major_version}
|
||||
%defattr(-,root,root)
|
||||
%doc COPYRIGHT README
|
||||
%ghost %{_sysconfdir}/alternatives/tolua++
|
||||
%{_bindir}/tolua++
|
||||
%{_bindir}/toluapp-%{lua_major_version}
|
||||
|
||||
%files -n libtolua++-%{lua_suffix}-devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/tolua++.h
|
||||
%{_libdir}/libtolua++-%{lua_major_version}.so
|
||||
%{_libdir}/pkgconfig/tolua++.pc
|
||||
|
||||
%files -n libtolua++-%{lua_suffix}-1
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libtolua++-%{lua_major_version}.so.1
|
||||
%{_libdir}/libtolua++-%{lua_major_version}.so.%{version}
|
||||
|
||||
%changelog
|
3
toluapp-1.0.93.tar.gz
Normal file
3
toluapp-1.0.93.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0a1ff87cb74e7531aec57e2a7cfdf282116647dea3b46223e3cc7c362b55b5bb
|
||||
size 247926
|
22
toluapp-build-compare.patch
Normal file
22
toluapp-build-compare.patch
Normal file
@ -0,0 +1,22 @@
|
||||
No need to record version or buildtime.
|
||||
If the source changes build-compare will trigger republish.
|
||||
--- a/src/bin/lua/package.lua
|
||||
+++ b/src/bin/lua/package.lua
|
||||
@@ -108,7 +108,7 @@ end
|
||||
function classPackage:preamble ()
|
||||
output('/*\n')
|
||||
output('** Lua binding: '..self.name..'\n')
|
||||
- output('** Generated automatically by '..TOLUA_VERSION..' on '..date()..'.\n')
|
||||
+ output('** Generated automatically.\n')
|
||||
output('*/\n\n')
|
||||
|
||||
output('#ifndef __cplusplus\n')
|
||||
@@ -198,7 +198,7 @@ end
|
||||
-- write header file
|
||||
function classPackage:header ()
|
||||
output('/*\n') output('** Lua binding: '..self.name..'\n')
|
||||
- output('** Generated automatically by '..TOLUA_VERSION..' on '..date()..'.\n')
|
||||
+ output('** Generated automatically.\n')
|
||||
output('*/\n\n')
|
||||
|
||||
if not flags.h then
|
25
toluapp-libdir.patch
Normal file
25
toluapp-libdir.patch
Normal file
@ -0,0 +1,25 @@
|
||||
Index: tolua++-1.0.93/SConstruct
|
||||
===================================================================
|
||||
--- tolua++-1.0.93.orig/SConstruct
|
||||
+++ tolua++-1.0.93/SConstruct
|
||||
@@ -31,6 +31,7 @@ opts.Add('tolua_lib', 'the resulting lib
|
||||
opts.Add('TOLUAPP', 'the name of the tolua++ binary (to use with built_dev=1)', 'tolua++')
|
||||
|
||||
opts.Add('prefix', 'The installation prefix')
|
||||
+opts.Add('libdir', 'The installation prefix for shlibs')
|
||||
opts.Add('build_dev', 'Build for development (uses tolua to rebuild toluabind.c with the embeded scripts', 0)
|
||||
opts.Add('build_failsafe', "Build using 'factory default' toluabind file (in case build_dev fails)", 0)
|
||||
opts.Add('ENV', 'The environment variables')
|
||||
@@ -168,10 +169,10 @@ Default('all')
|
||||
|
||||
if env['prefix']:
|
||||
env.Install(env['prefix']+'/bin', env.bin_target)
|
||||
- env.Install(env['prefix']+'/lib', env.lib_target)
|
||||
+ env.Install(env['libdir'], env.lib_target)
|
||||
env.Install(env['prefix']+'/include', '#include/tolua++.h')
|
||||
|
||||
- env.Alias('install', [env['prefix']+'/bin', env['prefix']+'/include', env['prefix']+'/lib'])
|
||||
+ env.Alias('install', [env['prefix']+'/bin', env['prefix']+'/include', env['libdir']])
|
||||
else:
|
||||
env.Command('install', [], print_install_error)
|
||||
env.Depends('install', 'all')
|
53
toluapp-versioned-shared-lib.patch
Normal file
53
toluapp-versioned-shared-lib.patch
Normal file
@ -0,0 +1,53 @@
|
||||
Index: tolua++-1.0.93/SConstruct
|
||||
===================================================================
|
||||
--- tolua++-1.0.93.orig/SConstruct
|
||||
+++ tolua++-1.0.93/SConstruct
|
||||
@@ -1,6 +1,8 @@
|
||||
import sys;
|
||||
import os
|
||||
|
||||
+version = "1.0.93"
|
||||
+
|
||||
tools = ['default']
|
||||
if os.name == 'nt':
|
||||
tools = ['mingw']
|
||||
@@ -26,8 +28,8 @@ opts.Add('no_cygwin', 'Use -mno-cygwin t
|
||||
opts.Add('LIBS', 'libraries', [])
|
||||
opts.Add('LIBPATH', 'library path', [])
|
||||
|
||||
-opts.Add('tolua_bin', 'the resulting binary', 'tolua++')
|
||||
-opts.Add('tolua_lib', 'the resulting library', 'tolua++')
|
||||
+opts.Add('tolua_bin', 'the resulting binary', 'toluapp-@SUFFIX@')
|
||||
+opts.Add('tolua_lib', 'the resulting library', 'tolua++-@SUFFIX@')
|
||||
opts.Add('TOLUAPP', 'the name of the tolua++ binary (to use with built_dev=1)', 'tolua++')
|
||||
|
||||
opts.Add('prefix', 'The installation prefix')
|
||||
@@ -169,7 +171,7 @@ Default('all')
|
||||
|
||||
if env['prefix']:
|
||||
env.Install(env['prefix']+'/bin', env.bin_target)
|
||||
- env.Install(env['libdir'], env.lib_target)
|
||||
+ env.InstallVersionedLib(env['libdir'], env.lib_target, SHLIBVERSION=version)
|
||||
env.Install(env['prefix']+'/include', '#include/tolua++.h')
|
||||
|
||||
env.Alias('install', [env['prefix']+'/bin', env['prefix']+'/include', env['libdir']])
|
||||
Index: tolua++-1.0.93/src/lib/SCsub
|
||||
===================================================================
|
||||
--- tolua++-1.0.93.orig/src/lib/SCsub
|
||||
+++ tolua++-1.0.93/src/lib/SCsub
|
||||
@@ -1,5 +1,6 @@
|
||||
Import('env')
|
||||
|
||||
+version = "1.0.93"
|
||||
|
||||
sources = [
|
||||
'tolua_event.c',
|
||||
@@ -12,7 +13,7 @@ sources = [
|
||||
env.lib_target_static = env.Library('#/lib/'+env['tolua_lib']+'_static', sources)
|
||||
|
||||
if env['shared']:
|
||||
- env.lib_target = env.SharedLibrary('#lib/'+env['tolua_lib'], sources)
|
||||
+ env.lib_target = env.SharedLibrary('#lib/'+env['tolua_lib'], sources, SHLIBVERSION=version)
|
||||
else:
|
||||
env.lib_target = env.Library('#/lib/'+env['tolua_lib'], sources)
|
||||
|
Loading…
x
Reference in New Issue
Block a user