pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libretro-np2kai: Support !Linux



Module Name:	pkgsrc-wip
Committed By:	Nia Alarie <nia.alarie%gmail.com@localhost>
Pushed By:	nee
Date:		Sun Sep 10 12:01:53 2017 +0100
Changeset:	21310cb09f3e6f68740b291acdacfc6971649720

Modified Files:
	libretro-np2kai/Makefile
	libretro-np2kai/distinfo
Added Files:
	libretro-np2kai/patches/patch-sdl2_Makefile.common
	libretro-np2kai/patches/patch-sdl2_Makefile.libretro
Removed Files:
	libretro-np2kai/TODO

Log Message:
libretro-np2kai: Support !Linux

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=21310cb09f3e6f68740b291acdacfc6971649720

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libretro-np2kai/Makefile                           |  7 ++++-
 libretro-np2kai/TODO                               |  3 ---
 libretro-np2kai/distinfo                           |  2 ++
 libretro-np2kai/patches/patch-sdl2_Makefile.common | 30 ++++++++++++++++++++++
 .../patches/patch-sdl2_Makefile.libretro           | 27 +++++++++++++++++++
 5 files changed, 65 insertions(+), 4 deletions(-)

diffs:
diff --git a/libretro-np2kai/Makefile b/libretro-np2kai/Makefile
index 7fabe5468d..0f8088cc65 100644
--- a/libretro-np2kai/Makefile
+++ b/libretro-np2kai/Makefile
@@ -17,7 +17,12 @@ MAKE_FILE=	sdl2/Makefile.libretro
 USE_TOOLS=	gmake
 USE_LANGUAGES=	c c++
 
-ONLY_FOR_PLATFORM=	Linux-*-*
+.include "../../mk/bsd.prefs.mk"
+
+# The networking code currently uses non-portable Linux-specific calls.
+.if ${OPSYS} != "Linux"
+MAKE_FLAGS=	SUPPORT_NET=0
+.endif
 
 INSTALLATION_DIRS+=	${PREFIX}/lib/libretro
 
diff --git a/libretro-np2kai/TODO b/libretro-np2kai/TODO
deleted file mode 100644
index 863fa7d2b6..0000000000
--- a/libretro-np2kai/TODO
+++ /dev/null
@@ -1,3 +0,0 @@
-Build fails on NetBSD, uses linux-specific headers
-
-Fixes will most likely have to be arranged with upstream
diff --git a/libretro-np2kai/distinfo b/libretro-np2kai/distinfo
index 3d9e725054..24b0de8b3e 100644
--- a/libretro-np2kai/distinfo
+++ b/libretro-np2kai/distinfo
@@ -4,3 +4,5 @@ SHA1 (libretro-np2kai-0.11.tar.gz) = 2e2d9ee153749410dfc890a2231e929774a82358
 RMD160 (libretro-np2kai-0.11.tar.gz) = 96696a739e5cdc36bd1844f375f8696f78311086
 SHA512 (libretro-np2kai-0.11.tar.gz) = 6e6ea30cf670d5ad3a98b30896180ad8353c62e8adc5e57e655bf807a8a481b45681ea7fba52fcf39c755eead92f5db311a4ccc3201faf5d4a5a1057b15e3cc2
 Size (libretro-np2kai-0.11.tar.gz) = 1894874 bytes
+SHA1 (patch-sdl2_Makefile.common) = bdaa2ef42e3fe6a287d516f2135ccb2d30652810
+SHA1 (patch-sdl2_Makefile.libretro) = 66bbbe8b0691055af6df18c9df06fff81cb484d1
diff --git a/libretro-np2kai/patches/patch-sdl2_Makefile.common b/libretro-np2kai/patches/patch-sdl2_Makefile.common
new file mode 100644
index 0000000000..1375bab08a
--- /dev/null
+++ b/libretro-np2kai/patches/patch-sdl2_Makefile.common
@@ -0,0 +1,30 @@
+$NetBSD$
+
+https://github.com/AZO234/NP2kai/pull/7
+
+--- sdl2/Makefile.common.orig	2017-08-26 19:45:16.000000000 +0000
++++ sdl2/Makefile.common
+@@ -15,7 +15,6 @@ INCFLAGS := -I$(NP2_PATH) \
+ 	-I$(NP2_PATH)/generic \
+ 	-I$(NP2_PATH)/io \
+ 	-I$(NP2_PATH)/mem \
+-	-I$(NP2_PATH)/network \
+ 	-I$(NP2_PATH)/sound \
+ 	-I$(NP2_PATH)/sound/vermouth \
+ 	-I$(NP2_PATH)/sound/fmgen \
+@@ -47,7 +46,6 @@ SOURCES_C := 		$(NP2_PATH)/calendar.c \
+ 		$(wildcard $(NP2_PATH)/io/*.c) \
+ 		$(wildcard $(NP2_PATH)/lio/*.c) \
+ 		$(wildcard $(NP2_PATH)/mem/*.c) \
+-		$(wildcard $(NP2_PATH)/network/*.c) \
+ 		$(NP2_PATH)/sdl2/commng.c \
+ 		$(NP2_PATH)/sdl2/dosio.c \
+ 		$(NP2_PATH)/sdl2/fontmng.c \
+@@ -73,3 +71,7 @@ SOURCES_C := 		$(NP2_PATH)/calendar.c \
+ SOURCES_CXX := $(NP2_PATH)/sdl2/soundmng.cpp \
+ 		$(wildcard $(NP2_PATH)/sound/fmgen/*.cpp)
+ 
++ifeq ($(SUPPORT_NET), 1)
++	INCFLAGS+=	-I$(NP2_PATH)/network
++	SOURCES_C+=	$(wildcard $(NP2_PATH)/network/*.c)
++endif
diff --git a/libretro-np2kai/patches/patch-sdl2_Makefile.libretro b/libretro-np2kai/patches/patch-sdl2_Makefile.libretro
new file mode 100644
index 0000000000..0f4c2f1604
--- /dev/null
+++ b/libretro-np2kai/patches/patch-sdl2_Makefile.libretro
@@ -0,0 +1,27 @@
+$NetBSD$
+
+https://github.com/AZO234/NP2kai/pull/7
+
+--- sdl2/Makefile.libretro.orig	2017-08-26 19:45:16.000000000 +0000
++++ sdl2/Makefile.libretro
+@@ -1,4 +1,5 @@
+ DEBUG=0
++SUPPORT_NET?=1
+ GIT_VERSION := " $(shell git rev-parse --short HEAD)"
+ 
+ UNAME=$(shell uname -a)
+@@ -218,11 +219,13 @@ OBJECTS  = $(SOURCES_CXX:.cpp=.o) $(SOUR
+ CXXFLAGS += -D__LIBRETRO__ $(fpic) $(INCFLAGS) $(COMMONFLAGS) -DSUPPORT_LARGE_HDD -DSUPPORT_VPCVHD -DSUPPORT_KAI_IMAGES -DHOOK_SYSKEY -DALLOW_MULTIRUN
+ CFLAGS   += -D__LIBRETRO__ $(fpic) $(INCFLAGS) $(COMMONFLAGS) -DSUPPORT_LARGE_HDD -DSUPPORT_VPCVHD -DSUPPORT_KAI_IMAGES -DHOOK_SYSKEY -DALLOW_MULTIRUN
+ LDFLAGS  += -lm -lpthread $(fpic)
++
+ ifeq ($(platform), unix)
++ifeq ($(SUPPORT_NET), 1)
+ CXXFLAGS += -DSUPPORT_NET -DSUPPORT_LGY98
+ CFLAGS   += -DSUPPORT_NET -DSUPPORT_LGY98
+ endif
+-
++endif
+ 
+ ifeq ($(platform), theos_ios)
+ COMMON_FLAGS := -DIOS -DARM $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error


Home | Main Index | Thread Index | Old Index