Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/emulators/libretro-mame2010 Consistently build as C++1...
details: https://anonhg.NetBSD.org/pkgsrc/rev/dbe5757bc1fe
branches: trunk
changeset: 431602:dbe5757bc1fe
user: joerg <joerg%pkgsrc.org@localhost>
date: Thu May 14 19:35:59 2020 +0000
description:
Consistently build as C++11 source, but ignore narrow issues.
Don't depend on ordering of pointers relative to zero. Avoid UDL.
diffstat:
emulators/libretro-mame2010/distinfo | 8 +-
emulators/libretro-mame2010/patches/patch-Makefile | 19 ++++-
emulators/libretro-mame2010/patches/patch-src_emu_hiscore.c | 40 +++++++++++++
emulators/libretro-mame2010/patches/patch-src_emu_romload.c | 20 ++++++
emulators/libretro-mame2010/patches/patch-src_emu_state.h | 21 ++++++
emulators/libretro-mame2010/patches/patch-src_emu_uimenu.c | 17 +++++
6 files changed, 118 insertions(+), 7 deletions(-)
diffs (184 lines):
diff -r f55609d58709 -r dbe5757bc1fe emulators/libretro-mame2010/distinfo
--- a/emulators/libretro-mame2010/distinfo Thu May 14 19:34:44 2020 +0000
+++ b/emulators/libretro-mame2010/distinfo Thu May 14 19:35:59 2020 +0000
@@ -1,8 +1,12 @@
-$NetBSD: distinfo,v 1.1 2019/01/02 13:24:29 nia Exp $
+$NetBSD: distinfo,v 1.2 2020/05/14 19:35:59 joerg Exp $
SHA1 (libretro-mame2010-20180417-70732f9137f6bb2bde4014746ea8bc613173dd1e.tar.gz) = c755106da94893012afb9d31bf488e0bd71f983d
RMD160 (libretro-mame2010-20180417-70732f9137f6bb2bde4014746ea8bc613173dd1e.tar.gz) = a39a85b9d96ca17edb25b941963f8217069bc22e
SHA512 (libretro-mame2010-20180417-70732f9137f6bb2bde4014746ea8bc613173dd1e.tar.gz) =
6b8bc3111eebe19387f6927ee24ba4edef6505c7540c87b872d2930c4b786010ebc63f97b14be427c00182838cffb5e8d707ab38d295ac1144eb4787ada4cfd0
Size (libretro-mame2010-20180417-70732f9137f6bb2bde4014746ea8bc613173dd1e.tar.gz) = 23952671 bytes
-SHA1 (patch-Makefile) = 5831dcc18098b9f654736822b7783fcca2433f3e
+SHA1 (patch-Makefile) = ac0a4ba498396911e195278e84cffdc5f98996a2
SHA1 (patch-src_emu_emucore.h) = ecb9617e260559aeb685e9625195f2ad6c99244d
+SHA1 (patch-src_emu_hiscore.c) = 2c2b10e863c57301d70ae7b2bb00f393e170dbbd
+SHA1 (patch-src_emu_romload.c) = 7907e934439a7e5ed92c71394e6a9a0c5ef9cf94
+SHA1 (patch-src_emu_state.h) = 3c6d8555a8bf20904962c14f629fd5ff360684b4
+SHA1 (patch-src_emu_uimenu.c) = 717302298958fd0734899537ca8b77f45aa8dd77
diff -r f55609d58709 -r dbe5757bc1fe emulators/libretro-mame2010/patches/patch-Makefile
--- a/emulators/libretro-mame2010/patches/patch-Makefile Thu May 14 19:34:44 2020 +0000
+++ b/emulators/libretro-mame2010/patches/patch-Makefile Thu May 14 19:35:59 2020 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-Makefile,v 1.1 2019/01/02 13:24:29 nia Exp $
+$NetBSD: patch-Makefile,v 1.2 2020/05/14 19:35:59 joerg Exp $
Avoid overriding build settings.
--- Makefile.orig 2018-04-17 17:16:44.000000000 +0000
+++ Makefile
-@@ -55,14 +55,9 @@ LIBS =
+@@ -55,14 +55,9 @@ LIBS =
#-------------------------------------------------
# start with empties for everything
@@ -20,7 +20,7 @@
GIT_VERSION ?= " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
-@@ -143,15 +138,6 @@ ifeq ($(VRENDER),opengl)
+@@ -143,15 +138,6 @@ ifeq ($(VRENDER),opengl)
LIBS += -lGL
endif
LDFLAGS += $(SHARED)
@@ -36,7 +36,7 @@
LIBS += -lstdc++ -lpthread
# Android
-@@ -568,7 +554,7 @@ DEFS += -DFLAC__NO_DLL
+@@ -568,7 +554,7 @@ DEFS += -DFLAC__NO_DLL
# CFLAGS is defined based on C or C++ targets
# (remember, expansion only happens when used, so doing it here is ok)
@@ -45,7 +45,16 @@
# we compile C-only to C89 standard with GNU extensions
# we compile C++ code to C++98 standard with GNU extensions
-@@ -588,7 +574,6 @@ ifeq ($(MDEBUG),1)
+@@ -578,7 +564,7 @@ CONLYFLAGS += -ansi
+ else
+ CONLYFLAGS += -std=gnu89
+ endif
+-CPPONLYFLAGS += -x c++ -std=gnu++98
++CPPONLYFLAGS += -x c++ -std=gnu++11 -Wno-c++11-narrowing
+ COBJFLAGS += -x objective-c++
+
+ # this speeds it up a bit by piping between the preprocessor/compiler/assembler
+@@ -588,7 +574,6 @@ ifeq ($(MDEBUG),1)
CCOMFLAGS += -O0 -g
else
# add the optimization flag
diff -r f55609d58709 -r dbe5757bc1fe emulators/libretro-mame2010/patches/patch-src_emu_hiscore.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-mame2010/patches/patch-src_emu_hiscore.c Thu May 14 19:35:59 2020 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_emu_hiscore.c,v 1.1 2020/05/14 19:35:59 joerg Exp $
+
+--- src/emu/hiscore.c.orig 2020-05-13 15:19:06.758626807 +0000
++++ src/emu/hiscore.c
+@@ -48,7 +48,7 @@ static void copy_to_memory (running_mach
+ {
+ int i;
+ const address_space *targetspace;
+- if (strstr(machine->gamedrv->source_file,"cinemat.c") > 0)
++ if (strstr(machine->gamedrv->source_file,"cinemat.c"))
+ {
+ targetspace = cpu_get_address_space(machine->cpu[cpu], ADDRESS_SPACE_DATA);
+ }
+@@ -67,7 +67,7 @@ static void copy_from_memory (running_ma
+ {
+ int i;
+ const address_space *targetspace;
+- if (strstr(machine->gamedrv->source_file,"cinemat.c") > 0)
++ if (strstr(machine->gamedrv->source_file,"cinemat.c"))
+ {
+ targetspace = cpu_get_address_space(machine->cpu[cpu], ADDRESS_SPACE_DATA);
+ }
+@@ -166,7 +166,7 @@ static int safe_to_load (running_machine
+ {
+ memory_range *mem_range = state.mem_range;
+ const address_space *srcspace;
+- if (strstr(machine->gamedrv->source_file,"cinemat.c") > 0)
++ if (strstr(machine->gamedrv->source_file,"cinemat.c"))
+ {
+ srcspace = cpu_get_address_space(machine->cpu[mem_range->cpu], ADDRESS_SPACE_DATA);
+ }
+@@ -316,7 +316,7 @@ void hiscore_init (running_machine *mach
+ while (mem_range)
+ {
+
+- if (strstr(machine->gamedrv->source_file,"cinemat.c") > 0)
++ if (strstr(machine->gamedrv->source_file,"cinemat.c"))
+ {
+ memory_write_byte(
+ cpu_get_address_space(machine->cpu[mem_range->cpu], ADDRESS_SPACE_DATA),
diff -r f55609d58709 -r dbe5757bc1fe emulators/libretro-mame2010/patches/patch-src_emu_romload.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-mame2010/patches/patch-src_emu_romload.c Thu May 14 19:35:59 2020 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_emu_romload.c,v 1.1 2020/05/14 19:35:59 joerg Exp $
+
+--- src/emu/romload.c.orig 2020-05-13 15:21:49.756367021 +0000
++++ src/emu/romload.c
+@@ -586,13 +586,13 @@ static void display_rom_load_results(rom
+ {
+ /* create the error message and exit fatally */
+ mame_printf_error("%s", romdata->errorstring.cstr());
+- fatalerror_exitcode(romdata->machine, MAMERR_MISSING_FILES, "ERROR: required files are missing, the "GAMENOUN" cannot be run.");
++ fatalerror_exitcode(romdata->machine, MAMERR_MISSING_FILES, "ERROR: required files are missing, the " GAMENOUN " cannot be run.");
+ }
+
+ /* if we had warnings, output them, but continue */
+ if (romdata->warnings)
+ {
+- romdata->errorstring.cat("WARNING: the "GAMENOUN" might not run correctly.");
++ romdata->errorstring.cat("WARNING: the " GAMENOUN " might not run correctly.");
+ mame_printf_warning("%s\n", romdata->errorstring.cstr());
+ }
+ }
diff -r f55609d58709 -r dbe5757bc1fe emulators/libretro-mame2010/patches/patch-src_emu_state.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-mame2010/patches/patch-src_emu_state.h Thu May 14 19:35:59 2020 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_emu_state.h,v 1.1 2020/05/14 19:35:59 joerg Exp $
+
+--- src/emu/state.h.orig 2020-05-13 15:02:59.769613659 +0000
++++ src/emu/state.h
+@@ -18,16 +18,8 @@
+ #ifndef __STATE_H__
+ #define __STATE_H__
+
+-#if defined(__MACH__) && !defined(IOS)
+ #include <type_traits>
+ #define DEF_NAMESPACE std
+-#elif defined(IOS)
+-#include <tr1/type_traits>
+-#define DEF_NAMESPACE std::tr1
+-#elif defined(__GNUC__)
+-#include <tr1/type_traits>
+-#define DEF_NAMESPACE std::tr1
+-#endif
+
+
+ /***************************************************************************
diff -r f55609d58709 -r dbe5757bc1fe emulators/libretro-mame2010/patches/patch-src_emu_uimenu.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-mame2010/patches/patch-src_emu_uimenu.c Thu May 14 19:35:59 2020 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_emu_uimenu.c,v 1.1 2020/05/14 19:35:59 joerg Exp $
+
+--- src/emu/uimenu.c.orig 2020-05-13 17:06:07.589487572 +0000
++++ src/emu/uimenu.c
+@@ -3516,9 +3516,9 @@ static void menu_select_game_populate(ru
+ /* if nothing there, add a single multiline item and return */
+ if (matchcount == 0)
+ {
+- ui_menu_item_append(menu, "No "GAMESNOUN" found. Please check the rompath specified in the "CONFIGNAME".ini file.\n\n"
+- "If this is your first time using "APPNAME", please see the config.txt file in "
+- "the docs directory for information on configuring "APPNAME".", NULL, MENU_FLAG_MULTILINE | MENU_FLAG_REDTEXT, NULL);
++ ui_menu_item_append(menu, "No " GAMESNOUN " found. Please check the rompath specified in the " CONFIGNAME ".ini file.\n\n"
++ "If this is your first time using " APPNAME ", please see the config.txt file in "
++ "the docs directory for information on configuring " APPNAME ".", NULL, MENU_FLAG_MULTILINE | MENU_FLAG_REDTEXT, NULL);
+ return;
+ }
+
Home |
Main Index |
Thread Index |
Old Index