bruno pushed to fillets-ng (f20). "Use compat version of lua for 5.1 support (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat May 9 02:08:32 UTC 2015


From 1a563e1bcd38641366c748c9f2f84441477edba8 Mon Sep 17 00:00:00 2001
From: Bruno Wolff III <bruno at wolff.to>
Date: Fri, 8 May 2015 19:46:39 -0500
Subject: Use compat version of lua for 5.1 support

The lua 5.2 patch wasn't actually working. Now that there is a compat
version of lua with 5.1 support, let's try that.

diff --git a/fillets-ng-1.0.1-lua-5.2.patch b/fillets-ng-1.0.1-lua-5.2.patch
deleted file mode 100644
index 7175f3d..0000000
--- a/fillets-ng-1.0.1-lua-5.2.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -up fillets-ng-1.0.1/src/gengine/ScriptState.cpp.lua-52 fillets-ng-1.0.1/src/gengine/ScriptState.cpp
---- fillets-ng-1.0.1/src/gengine/ScriptState.cpp.lua-52	2005-07-06 14:50:18.000000000 -0400
-+++ fillets-ng-1.0.1/src/gengine/ScriptState.cpp	2013-05-14 16:34:30.954384609 -0400
-@@ -17,6 +17,10 @@ extern "C" {
- #include "lauxlib.h"
- }
- 
-+#ifndef lua_open
-+#define lua_open()     luaL_newstate()
-+#endif
-+
- #include "def-script.h"
- 
- //-----------------------------------------------------------------
-@@ -42,9 +46,8 @@ ScriptState::~ScriptState()
- void
- ScriptState::prepareErrorHandler()
- {
--    lua_pushliteral(m_state, "_TRACEBACK");
-     lua_pushcfunction(m_state, script_debugStack);
--    lua_settable(m_state, LUA_GLOBALSINDEX);
-+    lua_setglobal(m_state, "_TRACEBACK");
- }
- //-----------------------------------------------------------------
- /**
-@@ -54,7 +57,10 @@ void
- ScriptState::insertErrorHandler(int index)
- {
-     lua_pushliteral(m_state, "_TRACEBACK");
--    lua_rawget(m_state, LUA_GLOBALSINDEX);
-+    lua_rawgeti(m_state, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS);
-+    lua_insert(m_state, -2);
-+    lua_rawget(m_state, -2);
-+    lua_remove(m_state, -2);
-     lua_insert(m_state, index);
- }
- //-----------------------------------------------------------------
diff --git a/fillets-ng.spec b/fillets-ng.spec
index b5af711..f6d3cb0 100644
--- a/fillets-ng.spec
+++ b/fillets-ng.spec
@@ -1,7 +1,7 @@
 Summary: Fish Fillets Next Generation, a puzzle game with 70 levels
 Name: fillets-ng
 Version: 1.0.1
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv2+
 Group: Amusements/Games
 URL: http://fillets.sourceforge.net/
@@ -9,14 +9,13 @@ Source0: http://downloads.sf.net/fillets/fillets-ng-%{version}.tar.gz
 Source1: fillets.desktop
 Source2: fillets.png
 Patch0: fillets-ng-0.8.1-gcc43.patch
-Patch1: fillets-ng-1.0.1-lua-5.2.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires: fillets-ng-data >= 0.9.0
 BuildRequires: SDL-devel
 BuildRequires: SDL_mixer-devel
 BuildRequires: SDL_image-devel
 BuildRequires: SDL_ttf-devel
-BuildRequires: lua-devel
+BuildRequires: compat-lua-devel
 BuildRequires: fribidi-devel
 BuildRequires: desktop-file-utils
 Requires(post): coreutils
@@ -34,11 +33,10 @@ comforting music.
 %prep
 %setup -q
 %patch0 -p1 -b .gcc43
-%patch1 -p1 -b .lua-52
 
 
 %build
-%configure --datadir=%{_datadir}/fillets-ng
+%configure LUA_CFLAGS='-I${includedir}/lua-5.1' LUA_LIBS='-llua-5.1 -lm -ldl' --datadir=%{_datadir}/fillets-ng
 %{__make} %{?_smp_mflags}
 
 
@@ -119,6 +117,9 @@ fi
 
 
 %changelog
+* Fri May 08 2015 Bruno Wolff III <bruno at wolff.to> = 1.0.1-7
+- The lua 5.2 patch wasn't working, switch to using compat version for 5.1
+
 * Sat May 02 2015 Kalev Lember <kalevlember at gmail.com> - 1.0.1-6
 - Rebuilt for GCC 5 C++11 ABI change
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/fillets-ng.git/commit/?h=f20&id=1a563e1bcd38641366c748c9f2f84441477edba8


More information about the scm-commits mailing list