SHA256
1
0
forked from pool/aegisub

Accepting request 799624 from multimedia:apps

Replaced luabins.patch with luaL_Reg-not-luaL_reg.patch sent   upstream via https://github.com/Aegisub/Aegisub/issues/182
Removed spec file generated git_version.h, it's not needed when  git metadata is present.

OBS-URL: https://build.opensuse.org/request/show/799624
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/aegisub?expand=0&rev=33
This commit is contained in:
Dominique Leuenberger 2020-05-02 20:18:57 +00:00 committed by Git OBS Bridge
commit f15edd7614
6 changed files with 54 additions and 193 deletions

View File

@ -1,20 +1,24 @@
<!-- Downloads master with .git to allow aegisub to create git_version.h -->
<services>
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/Aegisub/Aegisub.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="submodules">disable</param>
<param name="package-meta">yes</param>
<param name="changesgenerate">enable</param>
<param name="exclude">.git/objects</param>
<param name="exclude">vendor/boost</param>
<param name="exclude">vendor/ffmpeg</param>
<param name="exclude">vendor/ffms2</param>
<param name="exclude">vendor/fftw</param>
<param name="exclude">vendor/freetype2</param>
<param name="exclude">vendor/googletest</param>
<param name="exclude">vendor/hunspell</param>
<param name="exclude">vendor/icu</param>
<param name="exclude">vendor/libass</param>
<param name="exclude">vendor/uchardet</param>
<param name="exclude">vendor/wxWidgets</param>
<param name="versionformat">3.2.2+git%cd</param>
<param name="revision">master</param>
<param name="filename">aegisub</param>
</service>
<service name="recompress" mode="disabled">

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b50b417ad5a2eb87f7d765f725dd85166d8fe19b88fb538227ec2dd7c9aa8ac1
size 5158788
oid sha256:054eb7cb867e559b65ef2843aab9d538362960381e8eb3da7fe3daf73ef5751c
size 5087992

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Apr 30 12:49:32 UTC 2020 - Dave Plater <davejplater@gmail.com>
- Replaced luabins.patch with luaL_Reg-not-luaL_reg.patch sent
upstream via https://github.com/Aegisub/Aegisub/issues/182
- Removed spec file generated git_version.h, it's not needed when
git metadata is present.
-------------------------------------------------------------------
Wed Apr 29 10:48:36 UTC 2020 - Luigi Baldoni <aloisio@gmx.com>

View File

@ -12,7 +12,7 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -29,7 +29,8 @@ Source100: %{name}-rpmlintrc
Patch1: Makefile.inc.in.patch
Patch2: remove-vendor-luajit-dependency.patch
Patch3: aegisub-no-optimize.patch
Patch4: luabins.patch
Patch4: luaL_Reg-not-luaL_reg.patch
#luabins.patch
# PATCH-FIX-UPSTREAM aegisub-fix_build_with_make4.3.patch
Patch8: aegisub-fix_build_with_make4.3.patch
BuildRequires: automake
@ -64,11 +65,6 @@ effects in the subtitles, apart from just basic timed text.
%prep
%autosetup -p1
tee build/git_version.h << "EOF"
#define BUILD_GIT_VERSION_NUMBER 9010
#define BUILD_GIT_VERSION_STRING "%{version}"
#define TAGGED_RELEASE 0
EOF
cp %{SOURCE99} .
%build

View File

@ -0,0 +1,35 @@
diff --git a/libaegisub/lua/modules/lpeg.c b/libaegisub/lua/modules/lpeg.c
index 8d67335ab..5261c2061 100644
--- a/libaegisub/lua/modules/lpeg.c
+++ b/libaegisub/lua/modules/lpeg.c
@@ -2334,7 +2334,7 @@ static int matchl (lua_State *L) {
}
-static struct luaL_reg pattreg[] = {
+static struct luaL_Reg pattreg[] = {
{"match", matchl},
{"print", printpat_l},
{"locale", locale_l},
@@ -2360,7 +2360,7 @@ static struct luaL_reg pattreg[] = {
};
-static struct luaL_reg metapattreg[] = {
+static struct luaL_Reg metapattreg[] = {
{"__add", union_l},
{"__pow", star_l},
{"__sub", diff_l},
diff --git a/vendor/luabins/src/luabins.c b/vendor/luabins/src/luabins.c
index 60668213f..35b177629 100644
--- a/vendor/luabins/src/luabins.c
+++ b/vendor/luabins/src/luabins.c
@@ -54,7 +54,7 @@ static int l_load(lua_State * L)
}
/* luabins Lua module API */
-static const struct luaL_reg R[] =
+static const struct luaL_Reg R[] =
{
{ "save", l_save },
{ "load", l_load },

View File

@ -1,182 +0,0 @@
Index: Aegisub-524c6114a82157b143567240884de3a6d030b091/libaegisub/lua/modules/lpeg.c
===================================================================
--- Aegisub-524c6114a82157b143567240884de3a6d030b091.orig/libaegisub/lua/modules/lpeg.c 2018-07-10 00:06:51.000000000 +0200
+++ Aegisub-524c6114a82157b143567240884de3a6d030b091/libaegisub/lua/modules/lpeg.c 2019-03-29 13:17:41.817198250 +0200
@@ -2334,7 +2334,7 @@ static int matchl (lua_State *L) {
}
-static struct luaL_reg pattreg[] = {
+static struct luaL_Reg pattreg[] = {
{"match", matchl},
{"print", printpat_l},
{"locale", locale_l},
@@ -2360,7 +2360,7 @@ static struct luaL_reg pattreg[] = {
};
-static struct luaL_reg metapattreg[] = {
+static struct luaL_Reg metapattreg[] = {
{"__add", union_l},
{"__pow", star_l},
{"__sub", diff_l},
Index: Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/AUTHORS
===================================================================
--- Aegisub-524c6114a82157b143567240884de3a6d030b091.orig/vendor/luabins/AUTHORS 2018-07-10 00:06:51.000000000 +0200
+++ Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/AUTHORS 2019-03-29 13:17:41.817198250 +0200
@@ -2,3 +2,4 @@ Luabins authors:
----------------
Alexander Gladysh <agladysh@gmail.com>
+hanxi <hanxi@gmail.com>
Index: Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/README.md
===================================================================
--- Aegisub-524c6114a82157b143567240884de3a6d030b091.orig/vendor/luabins/README.md 2018-07-10 00:06:51.000000000 +0200
+++ Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/README.md 2019-03-29 13:17:41.817198250 +0200
@@ -4,6 +4,8 @@ luabins — Lua Binary Serialization Lib
Allows to save tuples of primitive Lua types into binary chunks
and to load saved data back.
+NB: You may be better off with luatexts: https://github.com/agladysh/luatexts.
+
On serialization
----------------
Index: Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/src/luabins.c
===================================================================
--- Aegisub-524c6114a82157b143567240884de3a6d030b091.orig/vendor/luabins/src/luabins.c 2018-07-10 00:06:51.000000000 +0200
+++ Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/src/luabins.c 2019-03-29 13:17:41.817198250 +0200
@@ -54,7 +54,7 @@ static int l_load(lua_State * L)
}
/* luabins Lua module API */
-static const struct luaL_reg R[] =
+static const struct luaL_Reg R[] =
{
{ "save", l_save },
{ "load", l_load },
Index: Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/src/luaheaders.h
===================================================================
--- Aegisub-524c6114a82157b143567240884de3a6d030b091.orig/vendor/luabins/src/luaheaders.h 2018-07-10 00:06:51.000000000 +0200
+++ Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/src/luaheaders.h 2019-03-29 13:17:41.817198250 +0200
@@ -7,6 +7,16 @@ extern "C" {
#include <lua.h>
#include <lauxlib.h>
+
+#if !defined LUA_VERSION_NUM
+#define luaL_Reg luaL_reg
+#endif
+
+#if LUA_VERSION_NUM > 501
+#define luaL_register(L,n,R) (luaL_newlib(L,R))
+#define lua_objlen(L,i) lua_rawlen(L, (i))
+#endif
+
#if defined (__cplusplus) && !defined (LUABINS_LUABUILTASCPP)
}
#endif
Index: Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/src/luainternals.h
===================================================================
--- Aegisub-524c6114a82157b143567240884de3a6d030b091.orig/vendor/luabins/src/luainternals.h 2018-07-10 00:06:51.000000000 +0200
+++ Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/src/luainternals.h 2019-03-29 13:17:41.817198250 +0200
@@ -7,6 +7,24 @@
#ifndef LUABINS_LUAINTERNALS_H_INCLUDED_
#define LUABINS_LUAINTERNALS_H_INCLUDED_
+#ifndef LUAI_BITSINT
+/*
+* LUAI_BITSINT defines the number of bits in an int.
+* CHANGE here if Lua cannot automatically detect the number of bits of
+* your machine. Probably you do not need to change this.
+*
+* avoid overflows in comparison */
+#if INT_MAX-20 < 32760
+#define LUAI_BITSINT 16
+#elif INT_MAX > 2147483640L
+/* int has at least 32 bits */
+#define LUAI_BITSINT 32
+#else
+#error "you must define LUA_BITSINT with number of bits in an integer"
+#endif
+
+#endif // ifndef LUAI_BITSINT
+
/*
* BEGIN COPY-PASTE FROM Lua 5.1.4 luaconf.h
* WARNING: If your Lua config differs, fix this!
@@ -38,7 +56,6 @@ int luaO_log2 (unsigned int x);
/*
** max size of array part is 2^MAXBITS
*/
-#define LUAI_BITSINT 32
#if LUAI_BITSINT > 26
#define MAXBITS 26
#else
Index: Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/src/lualess.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/src/lualess.c 2019-03-29 13:17:41.817198250 +0200
@@ -0,0 +1,32 @@
+/*
+* lualess.h
+* Lua-related definitions for lua-less builds (based on Lua manual)
+* See copyright notice in luabins.h
+*/
+
+#include <stdlib.h>
+
+/*
+* lua_Alloc-compatible allocator to use in Lua-less applications
+* with lbs_SaveBuffer. Based on sample code from Lua 5.1 manual.
+*/
+void * lbs_simplealloc(
+ void * ud,
+ void * ptr,
+ size_t osize,
+ size_t nsize
+ )
+{
+ (void) ud;
+ (void) osize; /* not used */
+
+ if (nsize == 0)
+ {
+ free(ptr);
+ return NULL;
+ }
+ else
+ {
+ return realloc(ptr, nsize);
+ }
+}
Index: Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/test/test.lua
===================================================================
--- Aegisub-524c6114a82157b143567240884de3a6d030b091.orig/vendor/luabins/test/test.lua 2018-07-10 00:06:51.000000000 +0200
+++ Aegisub-524c6114a82157b143567240884de3a6d030b091/vendor/luabins/test/test.lua 2019-03-29 13:17:41.817198250 +0200
@@ -6,6 +6,8 @@
package.cpath = "./?.so;"..package.cpath
+local pack = pack or table.pack
+local unpack = unpack or table.unpack
local randomseed = 1235134892
--local randomseed = os.time()
@@ -145,6 +147,7 @@ end
-- Test helper functions
-- ----------------------------------------------------------------------------
+luabins = require 'luabins'
local luabins_local = require 'luabins'
assert(luabins_local == luabins)
@@ -281,7 +284,7 @@ check_fail_save(
"can't save: unsupported type detected",
coroutine.create(function() end)
)
-check_fail_save("can't save: unsupported type detected", newproxy())
+check_fail_save("can't save: unsupported type detected", function()end)
print("---> basic table tests")