pkgsrc-WIP-changes archive

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

libretro-mgba: Import libretro-mgba-20170329 as wip/libretro-mgba



Module Name:	pkgsrc-wip
Committed By:	Nia Alarie <nia.alarie%gmail.com@localhost>
Pushed By:	nee
Date:		Mon May 15 23:47:01 2017 +0100
Changeset:	643d5859372e0b3903380af6bfe300642b7b0468

Modified Files:
	Makefile
Added Files:
	libretro-mgba/DESCR
	libretro-mgba/Makefile
	libretro-mgba/PLIST
	libretro-mgba/distinfo
	libretro-mgba/patches/patch-Makefile.libretro
	libretro-mgba/patches/patch-src_util_common.h
	libretro-mgba/patches/patch-src_util_math.h

Log Message:
libretro-mgba: Import libretro-mgba-20170329 as wip/libretro-mgba

Libretro is a simple but powerful development interface that allows for the
easy creation of emulators, games and multimedia applications that can plug
straight into any libretro-compatible frontend. This development interface is
open to others so that they can run these pluggable emulator and game cores
also in their own programs or devices.

mGBA is an emulator for running Game Boy Advance games. It aims to be faster
and more accurate than many existing Game Boy Advance emulators, as well as
adding features that other emulators lack. It also supports Game Boy and
Game Boy Color games.

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

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

diffstat:
 Makefile                                      |  1 +
 libretro-mgba/DESCR                           | 10 ++++++++++
 libretro-mgba/Makefile                        | 24 ++++++++++++++++++++++++
 libretro-mgba/PLIST                           |  2 ++
 libretro-mgba/distinfo                        |  9 +++++++++
 libretro-mgba/patches/patch-Makefile.libretro | 15 +++++++++++++++
 libretro-mgba/patches/patch-src_util_common.h | 14 ++++++++++++++
 libretro-mgba/patches/patch-src_util_math.h   | 22 ++++++++++++++++++++++
 8 files changed, 97 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index a3dab67689..c75ec135ca 100644
--- a/Makefile
+++ b/Makefile
@@ -1735,6 +1735,7 @@ SUBDIR+=	libretro-mednafen-psx
 SUBDIR+=	libretro-mednafen-supergrafx
 SUBDIR+=	libretro-mednafen-vb
 SUBDIR+=	libretro-mednafen-wswan
+SUBDIR+=	libretro-mgba
 SUBDIR+=	libretro-nestopia
 SUBDIR+=	libretro-parallel-n64
 SUBDIR+=	libretro-picodrive
diff --git a/libretro-mgba/DESCR b/libretro-mgba/DESCR
new file mode 100644
index 0000000000..6feb98cfcc
--- /dev/null
+++ b/libretro-mgba/DESCR
@@ -0,0 +1,10 @@
+Libretro is a simple but powerful development interface that allows for the
+easy creation of emulators, games and multimedia applications that can plug
+straight into any libretro-compatible frontend. This development interface is
+open to others so that they can run these pluggable emulator and game cores
+also in their own programs or devices.
+
+mGBA is an emulator for running Game Boy Advance games. It aims to be faster
+and more accurate than many existing Game Boy Advance emulators, as well as
+adding features that other emulators lack. It also supports Game Boy and
+Game Boy Color games.
diff --git a/libretro-mgba/Makefile b/libretro-mgba/Makefile
new file mode 100644
index 0000000000..fb86df07ca
--- /dev/null
+++ b/libretro-mgba/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD$
+
+DISTNAME=	libretro-mgba-20170329
+CATEGORIES=	emulators
+MASTER_SITES=	${MASTER_SITE_GITHUB:=libretro/}
+
+HOMEPAGE=	https://wiki.libretro.com/index.php?title=MGBA
+COMMENT=	Libretro core based on the mGBA emulator
+LICENSE=	mpl-2.0
+
+GITHUB_PROJECT=	mgba
+GITHUB_TAG=	1e95e8913a3d98b897573be1f0b5906394671b10
+
+USE_TOOLS=	gmake
+
+MAKE_FILE=	Makefile.libretro
+
+INSTALLATION_DIRS+=	${PREFIX}/lib/libretro
+
+do-install:
+	${INSTALL_LIB} ${WRKSRC}/mgba_libretro.so \
+	    ${DESTDIR}${PREFIX}/lib/libretro/mgba_libretro.so
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/libretro-mgba/PLIST b/libretro-mgba/PLIST
new file mode 100644
index 0000000000..9039191963
--- /dev/null
+++ b/libretro-mgba/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+lib/libretro/mgba_libretro.so
diff --git a/libretro-mgba/distinfo b/libretro-mgba/distinfo
new file mode 100644
index 0000000000..f6090a11f8
--- /dev/null
+++ b/libretro-mgba/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+SHA1 (libretro-mgba-20170329-1e95e8913a3d98b897573be1f0b5906394671b10.tar.gz) = a88829f56260928dc6c64cf0409f8fdca00e697c
+RMD160 (libretro-mgba-20170329-1e95e8913a3d98b897573be1f0b5906394671b10.tar.gz) = e09d1f63c24d805f80c8f6174733aad0af1e6a50
+SHA512 (libretro-mgba-20170329-1e95e8913a3d98b897573be1f0b5906394671b10.tar.gz) = e22163068b1c66800cbc52b355f2deb9774cf195a9c6cc6e3ab363467ecf6431f3b546cc43eea7d3076d0fa08dda12be1b99e3fe7b046ae3a4513722e44ef297
+Size (libretro-mgba-20170329-1e95e8913a3d98b897573be1f0b5906394671b10.tar.gz) = 5354237 bytes
+SHA1 (patch-Makefile.libretro) = 3dcd5b1952d3884dae6fbe123093bfff98003a3d
+SHA1 (patch-src_util_common.h) = 8fc1fd5d204c0919b924a8461cba27be4751b84d
+SHA1 (patch-src_util_math.h) = a3f7e4412e5df4d2119a13fd9e4122f3d0f6bf23
diff --git a/libretro-mgba/patches/patch-Makefile.libretro b/libretro-mgba/patches/patch-Makefile.libretro
new file mode 100644
index 0000000000..1c82b6d1ff
--- /dev/null
+++ b/libretro-mgba/patches/patch-Makefile.libretro
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Has problems on systems that lack uselocale but have locale_t.
+
+--- Makefile.libretro.orig	2017-03-29 18:42:18.000000000 +0000
++++ Makefile.libretro
+@@ -85,7 +85,7 @@ ifneq (,$(findstring unix,$(platform)))
+    TARGET := $(TARGET_NAME)_libretro.so
+    fpic := -fPIC
+    SHARED := -shared -Wl,-version-script=link.T
+-   DEFINES += -std=c99 -D_GNU_SOURCE -DHAVE_LOCALE
++   DEFINES += -std=c99 -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -DHAVE_SETLOCALE
+ 
+    # Raspberry Pi 3
+    ifneq (,$(findstring rpi3,$(platform)))
diff --git a/libretro-mgba/patches/patch-src_util_common.h b/libretro-mgba/patches/patch-src_util_common.h
new file mode 100644
index 0000000000..e7cad989bc
--- /dev/null
+++ b/libretro-mgba/patches/patch-src_util_common.h
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Needed for strcasecmp
+
+--- src/util/common.h.orig	2017-03-29 18:42:18.000000000 +0000
++++ src/util/common.h
+@@ -18,6 +18,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <strings.h>
+ 
+ #ifdef _WIN32
+ // WinSock2 gets very angry if it's included too late
diff --git a/libretro-mgba/patches/patch-src_util_math.h b/libretro-mgba/patches/patch-src_util_math.h
new file mode 100644
index 0000000000..9ce1ec979f
--- /dev/null
+++ b/libretro-mgba/patches/patch-src_util_math.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+NetBSD defines popcount32 in libc
+
+--- src/util/math.h.orig	2017-03-29 18:42:18.000000000 +0000
++++ src/util/math.h
+@@ -8,11 +8,15 @@
+ 
+ #include "util/common.h"
+ 
++#ifndef __NetBSD__
+ static inline uint32_t popcount32(unsigned bits) {
+ 	bits = bits - ((bits >> 1) & 0x55555555);
+ 	bits = (bits & 0x33333333) + ((bits >> 2) & 0x33333333);
+ 	return (((bits + (bits >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24;
+ }
++#else
++unsigned int popcount32(uint32_t);
++#endif
+ 
+ static inline unsigned clz32(uint32_t bits) {
+ #if defined(__GNUC__) || __clang__


Home | Main Index | Thread Index | Old Index