pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mame: work around first compilation issue
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By: wiz
Date: Fri Mar 31 00:30:31 2023 +0200
Changeset: 8a8180a14b0e472719b06d6749d23b43a349abb5
Modified Files:
mame/Makefile
mame/TODO
mame/distinfo
Added Files:
mame/patches/patch-scripts_toolchain.lua
Log Message:
mame: work around first compilation issue
Now fails in building included lua.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8a8180a14b0e472719b06d6749d23b43a349abb5
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
mame/Makefile | 6 +-
mame/TODO | 203 ++++++++++++++++++++++++++++---
mame/distinfo | 1 +
mame/patches/patch-scripts_toolchain.lua | 18 +++
4 files changed, 208 insertions(+), 20 deletions(-)
diffs:
diff --git a/mame/Makefile b/mame/Makefile
index 624498bdaa..326934c8aa 100644
--- a/mame/Makefile
+++ b/mame/Makefile
@@ -21,10 +21,9 @@ BUILD_DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
USE_LANGUAGES= c99 c++
GCC_REQD+= 7
-USE_TOOLS+= bsdtar gmake pkg-config
+USE_TOOLS+= gmake pkg-config
UNLIMIT_RESOURCES+= datasize virtualsize
MAKE_FILE= makefile
-EXTRACT_USING= bsdtar
.include "../../mk/bsd.prefs.mk"
@@ -55,7 +54,6 @@ MAKE_ENV+= USE_SYSTEM_LIB_EXPAT=1
MAKE_ENV+= USE_SYSTEM_LIB_ZLIB=1
MAKE_ENV+= USE_SYSTEM_LIB_JPEG=1
MAKE_ENV+= USE_SYSTEM_LIB_FLAC=1
-MAKE_ENV+= USE_SYSTEM_LIB_LUA=1
# use audio from SDL
#MAKE_ENV+= USE_SYSTEM_LIB_PORTAUDIO=1
# no portmidi package exists yet
@@ -79,7 +77,6 @@ MAKE_ENV+= TOOLS=1
MAKE_ENV+= BIGENDIAN=1
.endif
-LUA_VERSIONS_ACCEPTED= 53
PYTHON_FOR_BUILD_ONLY= yes
post-extract:
@@ -118,7 +115,6 @@ do-install:
.include "../../graphics/glm/buildlink3.mk"
.include "../../fonts/SDL2_ttf/buildlink3.mk"
.include "../../fonts/fontconfig/buildlink3.mk"
-.include "../../lang/lua/buildlink3.mk"
.include "../../lang/python/pyversion.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "../../textproc/pugixml/buildlink3.mk"
diff --git a/mame/TODO b/mame/TODO
index 6872a6c93c..e758590437 100644
--- a/mame/TODO
+++ b/mame/TODO
@@ -1,15 +1,188 @@
-https://github.com/mamedev/mame/issues/11049
-
-Compressing src/mame/layout/zodiac.lay...
-Compressing src/mame/layout/zoo.lay...
-.../emulators/mame/work/mame-mame0253/scripts/toolchain.lua:65: attempt to concatenate a nil value (field '?')
-stack traceback:
- .../emulators/mame/work/mame-mame0253/scripts/toolchain.lua:65: in function 'androidToolchainRoot'
- .../emulators/mame/work/mame-mame0253/scripts/toolchain.lua:494: in function 'toolchain'
- ...atch/emulators/mame/work/mame-mame0253/scripts/genie.lua:1150: in main chunk
- [C]: in upvalue 'builtin_dofile'
- [string "premake = { }..."]:109: in function 'dofile'
- [string "_WORKING_DIR = os.getcwd()..."]:46: in function '_premake_main'
-gmake: *** [makefile:1424: build/projects/sdl/mame/gmake-netbsd/Makefile] Error 1
-gmake: *** Waiting for unfinished jobs....
-*** Error code 2
+In file included from ../../../../../3rdparty/lua/src/lua.h:16,
+ from ../../../../../3rdparty/lua/src/lapi.c:17:
+../../../../../3rdparty/lua/src/luaconf.h:557:2: error: #error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"
+ 557 | #error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' \
+ | ^~~~~
+In file included from ../../../../../3rdparty/lua/src/lapi.c:17:
+../../../../../3rdparty/lua/src/lua.h:94:9: error: 'LUA_INTEGER' does not name a type
+ 94 | typedef LUA_INTEGER lua_Integer;
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lua.h:97:22: error: expected initializer before 'lua_Unsigned'
+ 97 | typedef LUA_UNSIGNED lua_Unsigned;
+ | ^~~~~~~~~~~~
+../../../../../3rdparty/lua/src/lua.h:191:9: error: ISO C++ forbids declaration of 'lua_Integer' with no type [-fpermissive]
+ 191 | LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lua.h:191:9: warning: 'lua_Integer' initialized and declared 'extern'
+../../../../../3rdparty/lua/src/lua.h:191:26: error: 'lua_tointegerx' was not declared in this scope; did you mean 'lua_tointeger'?
+ 191 | LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum);
+ | ^~~~~~~~~~~~~~
+ | lua_tointeger
+../../../../../3rdparty/lua/src/lua.h:194:9: error: ISO C++ forbids declaration of 'lua_Unsigned' with no type [-fpermissive]
+ 194 | LUA_API lua_Unsigned (lua_rawlen) (lua_State *L, int idx);
+ | ^~~~~~~~~~~~
+../../../../../3rdparty/lua/src/lua.h:194:9: warning: 'lua_Unsigned' initialized and declared 'extern'
+../../../../../3rdparty/lua/src/lua.h:194:26: error: 'lua_rawlen' was not declared in this scope; did you mean 'lua_call'?
+ 194 | LUA_API lua_Unsigned (lua_rawlen) (lua_State *L, int idx);
+ | ^~~~~~~~~~
+ | lua_call
+../../../../../3rdparty/lua/src/lua.h:235:54: error: 'lua_Integer' is not a type
+ 235 | LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lua.h:253:48: error: 'lua_Integer' is not a type
+ 253 | LUA_API int (lua_geti) (lua_State *L, int idx, lua_Integer n);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lua.h:255:51: error: 'lua_Integer' is not a type
+ 255 | LUA_API int (lua_rawgeti) (lua_State *L, int idx, lua_Integer n);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lua.h:270:50: error: 'lua_Integer' is not a type
+ 270 | LUA_API void (lua_seti) (lua_State *L, int idx, lua_Integer n);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lua.h:272:53: error: 'lua_Integer' is not a type
+ 272 | LUA_API void (lua_rawseti) (lua_State *L, int idx, lua_Integer n);
+ | ^~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lua.h:16,
+ from ../../../../../3rdparty/lua/src/lapi.c:17:
+../../../../../3rdparty/lua/src/luaconf.h:496:22: error: 'LUA_INTEGER' does not name a type
+ 496 | #define LUAI_UACINT LUA_INTEGER
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/llimits.h:84:9: note: in expansion of macro 'LUAI_UACINT'
+ 84 | typedef LUAI_UACINT l_uacInt;
+ | ^~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lstate.h:12,
+ from ../../../../../3rdparty/lua/src/lapi.h:12,
+ from ../../../../../3rdparty/lua/src/lapi.c:19:
+../../../../../3rdparty/lua/src/lobject.h:53:3: error: 'lua_Integer' does not name a type
+ 53 | lua_Integer i; /* integer numbers */
+ | ^~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lua.h:16,
+ from ../../../../../3rdparty/lua/src/lapi.c:17:
+../../../../../3rdparty/lua/src/luaconf.h:766:57: error: 'lua_Integer' does not name a type
+ 766 | #define LUAI_MAXALIGN lua_Number n; double u; void *s; lua_Integer i; long l
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lobject.h:440:3: note: in expansion of macro 'LUAI_MAXALIGN'
+ 440 | LUAI_MAXALIGN; /* ensures maximum alignment for udata bytes */
+ | ^~~~~~~~~~~~~
+../../../../../3rdparty/lua/src/luaconf.h:766:57: error: 'lua_Integer' does not name a type
+ 766 | #define LUAI_MAXALIGN lua_Number n; double u; void *s; lua_Integer i; long l
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lobject.h:472:10: note: in expansion of macro 'LUAI_MAXALIGN'
+ 472 | union {LUAI_MAXALIGN;} bindata;
+ | ^~~~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lstate.h:13,
+ from ../../../../../3rdparty/lua/src/lapi.h:12,
+ from ../../../../../3rdparty/lua/src/lapi.c:19:
+../../../../../3rdparty/lua/src/ltm.h:90:64: error: 'lua_Integer' is not a type
+ 90 | LUAI_FUNC void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2,
+ | ^~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lapi.c:28:
+../../../../../3rdparty/lua/src/ltable.h:38:48: error: 'lua_Integer' is not a type
+ 38 | LUAI_FUNC const TValue *luaH_getint (Table *t, lua_Integer key);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/ltable.h:39:53: error: 'lua_Integer' is not a type
+ 39 | LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key,
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/ltable.h:56:11: error: 'lua_Unsigned' does not name a type
+ 56 | LUAI_FUNC lua_Unsigned luaH_getn (Table *t);
+ | ^~~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lapi.c:31:
+../../../../../3rdparty/lua/src/lvm.h:119:50: error: 'lua_Integer' is not a type
+ 119 | LUAI_FUNC int luaV_tointeger (const TValue *obj, lua_Integer *p, F2Imod mode);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lvm.h:120:52: error: 'lua_Integer' is not a type
+ 120 | LUAI_FUNC int luaV_tointegerns (const TValue *obj, lua_Integer *p,
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lvm.h:122:48: error: 'lua_Integer' is not a type
+ 122 | LUAI_FUNC int luaV_flttointeger (lua_Number n, lua_Integer *p, F2Imod mode);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lvm.h:130:11: error: 'lua_Integer' does not name a type
+ 130 | LUAI_FUNC lua_Integer luaV_idiv (lua_State *L, lua_Integer x, lua_Integer y);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lvm.h:131:11: error: 'lua_Integer' does not name a type
+ 131 | LUAI_FUNC lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lvm.h:133:11: error: 'lua_Integer' does not name a type
+ 133 | LUAI_FUNC lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y);
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lsqlite3/lsqlite3.c: In function 'void db_update_hook_callback(void*, int, const char*, const char*, sqlite3_int64)':
+../../../../../3rdparty/lsqlite3/lsqlite3.c:1320:16: warning: unused variable 'n' [-Wunused-variable]
+ 1320 | lua_Number n;
+ | ^
+../../../../../3rdparty/lua/src/lapi.c:393:9: error: 'lua_Integer' does not name a type
+ 393 | LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *pisnum) {
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lapi.c:430:9: error: 'lua_Unsigned' does not name a type
+ 430 | LUA_API lua_Unsigned lua_rawlen (lua_State *L, int idx) {
+ | ^~~~~~~~~~~~
+../../../../../3rdparty/lua/src/lapi.c:517:45: error: 'lua_Integer' is not a type
+ 517 | LUA_API void lua_pushinteger (lua_State *L, lua_Integer n) {
+ | ^~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lstate.h:12,
+ from ../../../../../3rdparty/lua/src/lapi.h:12,
+ from ../../../../../3rdparty/lua/src/lapi.c:19:
+../../../../../3rdparty/lua/src/lapi.c: In function 'void lua_pushinteger(lua_State*, int)':
+../../../../../3rdparty/lua/src/lobject.h:332:32: error: 'Value' {aka 'union Value'} has no member named 'i'
+ 332 | { TValue *io=(obj); val_(io).i=(x); settt_(io, LUA_VNUMINT); }
+ | ^
+../../../../../3rdparty/lua/src/lapi.c:519:3: note: in expansion of macro 'setivalue'
+ 519 | setivalue(s2v(L->top), n);
+ | ^~~~~~~~~
+../../../../../3rdparty/lua/src/lapi.c: At global scope:
+../../../../../3rdparty/lua/src/lapi.c:699:46: error: 'lua_Integer' is not a type
+ 699 | LUA_API int lua_geti (lua_State *L, int idx, lua_Integer n) {
+ | ^~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lapi.h:11,
+ from ../../../../../3rdparty/lua/src/lapi.c:19:
+../../../../../3rdparty/lua/src/lapi.c: In function 'int lua_geti(lua_State*, int, int)':
+../../../../../3rdparty/lua/src/llimits.h:139:39: error: 'lua_Unsigned' cannot be used as a function
+ 139 | #define l_castS2U(i) ((lua_Unsigned)(i))
+ | ^
+../../../../../3rdparty/lua/src/lvm.h:99:15: note: in expansion of macro 'l_castS2U'
+ 99 | : (slot = (l_castS2U(k) - 1u < hvalue(t)->alimit) \
+ | ^~~~~~~~~
+../../../../../3rdparty/lua/src/lapi.c:704:7: note: in expansion of macro 'luaV_fastgeti'
+ 704 | if (luaV_fastgeti(L, t, n, slot)) {
+ | ^~~~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lstate.h:12,
+ from ../../../../../3rdparty/lua/src/lapi.h:12,
+ from ../../../../../3rdparty/lua/src/lapi.c:19:
+../../../../../3rdparty/lua/src/lobject.h:332:32: error: 'Value' {aka 'union Value'} has no member named 'i'
+ 332 | { TValue *io=(obj); val_(io).i=(x); settt_(io, LUA_VNUMINT); }
+ | ^
+../../../../../3rdparty/lua/src/lapi.c:709:5: note: in expansion of macro 'setivalue'
+ 709 | setivalue(&aux, n);
+ | ^~~~~~~~~
+../../../../../3rdparty/lua/src/lapi.c: At global scope:
+../../../../../3rdparty/lua/src/lapi.c:748:49: error: 'lua_Integer' is not a type
+ 748 | LUA_API int lua_rawgeti (lua_State *L, int idx, lua_Integer n) {
+ | ^~~~~~~~~~~
+../../../../../3rdparty/lua/src/lapi.c:881:47: error: 'lua_Integer' is not a type
+ 881 | LUA_API void lua_seti (lua_State *L, int idx, lua_Integer n) {
+ | ^~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lapi.h:11,
+ from ../../../../../3rdparty/lua/src/lapi.c:19:
+../../../../../3rdparty/lua/src/lapi.c: In function 'void lua_seti(lua_State*, int, int)':
+../../../../../3rdparty/lua/src/llimits.h:139:39: error: 'lua_Unsigned' cannot be used as a function
+ 139 | #define l_castS2U(i) ((lua_Unsigned)(i))
+ | ^
+../../../../../3rdparty/lua/src/lvm.h:99:15: note: in expansion of macro 'l_castS2U'
+ 99 | : (slot = (l_castS2U(k) - 1u < hvalue(t)->alimit) \
+ | ^~~~~~~~~
+../../../../../3rdparty/lua/src/lapi.c:887:7: note: in expansion of macro 'luaV_fastgeti'
+ 887 | if (luaV_fastgeti(L, t, n, slot)) {
+ | ^~~~~~~~~~~~~
+In file included from ../../../../../3rdparty/lua/src/lstate.h:12,
+ from ../../../../../3rdparty/lua/src/lapi.h:12,
+ from ../../../../../3rdparty/lua/src/lapi.c:19:
+../../../../../3rdparty/lua/src/lobject.h:332:32: error: 'Value' {aka 'union Value'} has no member named 'i'
+ 332 | { TValue *io=(obj); val_(io).i=(x); settt_(io, LUA_VNUMINT); }
+ | ^
+../../../../../3rdparty/lua/src/lapi.c:892:5: note: in expansion of macro 'setivalue'
+ 892 | setivalue(&aux, n);
+ | ^~~~~~~~~
+../../../../../3rdparty/lua/src/lapi.c: At global scope:
+../../../../../3rdparty/lua/src/lapi.c:925:50: error: 'lua_Integer' is not a type
+ 925 | LUA_API void lua_rawseti (lua_State *L, int idx, lua_Integer n) {
+ | ^~~~~~~~~~~
+Compiling src/mame/matsushita/duet16.cpp...
+g
diff --git a/mame/distinfo b/mame/distinfo
index 54675ac505..4cfab97286 100644
--- a/mame/distinfo
+++ b/mame/distinfo
@@ -6,3 +6,4 @@ Size (mame-0.253.tar.gz) = 203177249 bytes
SHA1 (patch-3rdparty_bx_src_thread.cpp) = 91d7aa74dbe5e8e73594580ce0c16846f4a0d7b1
SHA1 (patch-3rdparty_genie_build_gmake.darwin_genie.make) = bb2e8c06d4b5f5869fb48e06390d5ca94a190056
SHA1 (patch-makefile) = 343fac4d165438a26e2e8077216db1c6c46a5d1e
+SHA1 (patch-scripts_toolchain.lua) = df383dab4787f58348d62e1c5f25ddaa45eb8199
diff --git a/mame/patches/patch-scripts_toolchain.lua b/mame/patches/patch-scripts_toolchain.lua
new file mode 100644
index 0000000000..8e1a6b812c
--- /dev/null
+++ b/mame/patches/patch-scripts_toolchain.lua
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Not for upstream.
+android toolchain value is not used in pkgsrc so this is good enough for now.
+https://github.com/mamedev/mame/issues/11049
+
+--- scripts/toolchain.lua.orig 2023-03-29 14:05:56.000000000 +0000
++++ scripts/toolchain.lua
+@@ -60,7 +60,8 @@ function androidToolchainRoot()
+ local hostTags = {
+ windows = "windows-x86_64",
+ linux = "linux-x86_64",
+- macosx = "darwin-x86_64"
++ macosx = "darwin-x86_64",
++ bsd = "netbsd-x86_64"
+ }
+ android.toolchainRoot = (os.getenv("ANDROID_NDK_HOME") or "") .. "/toolchains/llvm/prebuilt/" .. hostTags[os.get()]
+ end
Home |
Main Index |
Thread Index |
Old Index