diff --git a/love-0.10.2-luajit2.1.0beta3.patch b/love-0.10.2-luajit2.1.0beta3.patch new file mode 100644 index 0000000..a8568f7 --- /dev/null +++ b/love-0.10.2-luajit2.1.0beta3.patch @@ -0,0 +1,40 @@ +# HG changeset patch +# User Bart van Strien +# Date 1493809570 -7200 +# Node ID 10f58e78bbfd82b681a45aeaf1177a765726bb31 +# Parent 33511fb56ffe3f7a9d3d1471114743e2e725d6fa +Fix luasocket compatibility with luajit 2.1.0 beta 3 (fix #1277) + +Note that luasocket 3.0 (in minor) targets lua 5.1, so it does not rely on a +5.0 compatibility feature, and does not require this patch. Since a 0.10.3 +release seems unlikely at this point, this commit is mostly targeted at future +packagers of older love versions. + +diff --git a/changes.txt b/changes.txt +--- a/changes.txt ++++ b/changes.txt +@@ -8,6 +8,7 @@ + * Fixed Shader:send and Shader:sendColor ignoring the last argument for an array. + * Fixed a crash when love.graphics.pop is called after a love.window.setMode while the transformation stack was not empty. + * Fixed BezierCurves to error instead of hanging in some situations. ++ * Fixed compilation of luasocket with newer luajit 2.1.0 beta versions. + + * Improved command line argument handling. + * Improved seeking support, especially for short video files. +diff --git a/src/libraries/luasocket/libluasocket/lua.h b/src/libraries/luasocket/libluasocket/lua.h +--- a/src/libraries/luasocket/libluasocket/lua.h ++++ b/src/libraries/luasocket/libluasocket/lua.h +@@ -6,9 +6,12 @@ + #include + #include + +-#if LUA_VERSION_NUM > 501 ++#if LUA_VERSION_NUM >= 501 ++# undef luaL_reg + # define luaL_reg luaL_Reg ++# undef luaL_putchar + # define luaL_putchar(B, c) luaL_addchar(B, c) ++# undef luaL_typerror + # define luaL_typerror(L, n, t) luax_typerror(L, n, t) + + extern int luax_typerror(lua_State *L, int narg, const char *type); diff --git a/love.spec b/love.spec index ae687a0..aeea843 100644 --- a/love.spec +++ b/love.spec @@ -7,7 +7,7 @@ Name: love Version: 0.10.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A free 2D game engine which enables easy game creation in Lua #All is licensed as zlib with one exception: @@ -16,6 +16,12 @@ License: zlib and Public Domain URL: http://love2d.org Source0: https://bitbucket.org/rude/%{name}/get/%{version}.tar.gz +#From upstream: +#https://bitbucket.org/rude/love/commits/10f58e78bbfd82b681a45aeaf1177a765726bb31 +%if 0%{?fedora} > 26 +Patch1: %{name}-%{version}-luajit2.1.0beta3.patch +%endif + #ppc64le is currently broken, excluding from build for now: ExcludeArch: ppc64le @@ -65,7 +71,7 @@ Lua scripting language. LOVE can be used to make games of any license allowing it to be used for both free and non-free projects. %prep -%setup -q -n rude-%{name}-afc69c4f7145 +%autosetup -n rude-%{name}-afc69c4f7145 #Fixing line encoding: sed -i 's/\r//' license.txt #Fixing permissions: @@ -125,6 +131,9 @@ fi %{_libdir}/lib%{name}.* %changelog +* Tue May 30 2017 Jeremy Newton - 0.10.2-4 +- Cherry-pick upstream luajit patch + * Sun Nov 13 2016 Jeremy Newton - 0.10.2-3 - Bump and build