pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/emulators Add emulators/mgba version 0.7.2.
details: https://anonhg.NetBSD.org/pkgsrc/rev/20e53421d79c
branches: trunk
changeset: 396744:20e53421d79c
user: nia <nia%pkgsrc.org@localhost>
date: Sat Jun 08 22:46:03 2019 +0000
description:
Add emulators/mgba version 0.7.2.
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.
diffstat:
emulators/Makefile | 3 +-
emulators/mgba/DESCR | 5 +
emulators/mgba/MESSAGE.NetBSD | 7 +
emulators/mgba/Makefile | 29 +++++
emulators/mgba/PLIST | 55 ++++++++++
emulators/mgba/distinfo | 10 +
emulators/mgba/options.mk | 48 ++++++++
emulators/mgba/patches/patch-CMakeLists.txt | 17 +++
emulators/mgba/patches/patch-include_mgba-util_math.h | 22 ++++
emulators/mgba/patches/patch-include_mgba-util_platform_posix_threading.h | 15 ++
emulators/mgba/patches/patch-version.cmake | 22 ++++
11 files changed, 232 insertions(+), 1 deletions(-)
diffs (287 lines):
diff -r 5039425e49a7 -r 20e53421d79c emulators/Makefile
--- a/emulators/Makefile Sat Jun 08 20:04:23 2019 +0000
+++ b/emulators/Makefile Sat Jun 08 22:46:03 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.295 2019/03/21 13:58:55 wiz Exp $
+# $NetBSD: Makefile,v 1.296 2019/06/08 22:46:03 nia Exp $
#
COMMENT= Emulators for other operating systems
@@ -138,6 +138,7 @@
SUBDIR+= makeppf
SUBDIR+= mame
SUBDIR+= mednafen
+SUBDIR+= mgba
SUBDIR+= minivmac
SUBDIR+= mmix
SUBDIR+= nestopia
diff -r 5039425e49a7 -r 20e53421d79c emulators/mgba/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/DESCR Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,5 @@
+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 -r 5039425e49a7 -r 20e53421d79c emulators/mgba/MESSAGE.NetBSD
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/MESSAGE.NetBSD Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE.NetBSD,v 1.1 2019/06/08 22:46:03 nia Exp $
+
+Lowering the system audio latency (or blk_ms) with sysctl(8) may be
+required to achieve full performance and framerates.
+
+===========================================================================
diff -r 5039425e49a7 -r 20e53421d79c emulators/mgba/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/Makefile Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1 2019/06/08 22:46:03 nia Exp $
+
+DISTNAME= mgba-0.7.2
+CATEGORIES= emulators
+MASTER_SITES= ${MASTER_SITE_GITHUB:=mgba-emu/}
+
+MAINTAINER= nia%NetBSD.org@localhost
+HOMEPAGE= https://mgba.io/
+COMMENT= Emulator for running Game Boy Advance games
+LICENSE= mpl-2.0
+
+EXTRACT_USING= bsdtar
+USE_TOOLS+= pkg-config
+USE_CMAKE= yes
+USE_LANGUAGES= c c++
+
+# using libzip
+CMAKE_ARGS+= -DUSE_MINIZIP=OFF
+
+.include "options.mk"
+.include "../../archivers/libzip/buildlink3.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../devel/libelf/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 5039425e49a7 -r 20e53421d79c emulators/mgba/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/PLIST Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,55 @@
+@comment $NetBSD: PLIST,v 1.1 2019/06/08 22:46:03 nia Exp $
+bin/mgba
+${PLIST.qt}bin/mgba-qt
+include/mgba/flags.h
+lib/libmgba.so.0.7
+lib/libmgba.so.${PKGVERSION}
+${PLIST.qt}man/man6/mgba-qt.6
+man/man6/mgba.6
+${PLIST.qt}share/applications/mgba-qt.desktop
+share/doc/mGBA/CHANGES
+share/doc/mGBA/LICENSE
+share/doc/mGBA/README.md
+share/doc/mGBA/README_DE.md
+share/doc/mGBA/licenses/blip_buf.txt
+share/doc/mGBA/licenses/inih.txt
+share/icons/hicolor/128x128/apps/mgba.png
+share/icons/hicolor/16x16/apps/mgba.png
+share/icons/hicolor/24x24/apps/mgba.png
+share/icons/hicolor/256x256/apps/mgba.png
+share/icons/hicolor/32x32/apps/mgba.png
+share/icons/hicolor/48x48/apps/mgba.png
+share/icons/hicolor/512x512/apps/mgba.png
+share/icons/hicolor/64x64/apps/mgba.png
+share/icons/hicolor/96x96/apps/mgba.png
+${PLIST.qt}share/mgba/nointro.dat
+${PLIST.shaders}share/mgba/shaders/agb001.shader/agb001.fs
+${PLIST.shaders}share/mgba/shaders/agb001.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/ags001.shader/ags001-light.fs
+${PLIST.shaders}share/mgba/shaders/ags001.shader/ags001.fs
+${PLIST.shaders}share/mgba/shaders/ags001.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/fish.shader/fish.fs
+${PLIST.shaders}share/mgba/shaders/fish.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/gba-color.shader/gba-color.fs
+${PLIST.shaders}share/mgba/shaders/gba-color.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/lcd.shader/lcd.fs
+${PLIST.shaders}share/mgba/shaders/lcd.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/motion_blur.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/motion_blur.shader/motion_blur.fs
+${PLIST.shaders}share/mgba/shaders/pixelate.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/scanlines.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/scanlines.shader/scanlines.fs
+${PLIST.shaders}share/mgba/shaders/soften.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/soften.shader/soften.fs
+${PLIST.shaders}share/mgba/shaders/vba_pixelate.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/vba_pixelate.shader/vba_pixelate.fs
+${PLIST.shaders}share/mgba/shaders/vignette.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/vignette.shader/vignette.fs
+${PLIST.shaders}share/mgba/shaders/wiiu.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/wiiu.shader/wiiu.fs
+${PLIST.shaders}share/mgba/shaders/xbr-lv2.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/xbr-lv2.shader/xbr.fs
+${PLIST.shaders}share/mgba/shaders/xbr-lv2.shader/xbr.vs
+${PLIST.shaders}share/mgba/shaders/xbr-lv3.shader/manifest.ini
+${PLIST.shaders}share/mgba/shaders/xbr-lv3.shader/xbr.fs
+${PLIST.shaders}share/mgba/shaders/xbr-lv3.shader/xbr.vs
diff -r 5039425e49a7 -r 20e53421d79c emulators/mgba/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/distinfo Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2019/06/08 22:46:03 nia Exp $
+
+SHA1 (mgba-0.7.2.tar.gz) = 342b40efa743f9966ad0e9d3448a8d3f4314c008
+RMD160 (mgba-0.7.2.tar.gz) = 0ad8a97d1307bad71b13d12ee0d8c7bbb2599117
+SHA512 (mgba-0.7.2.tar.gz) = e63519299358ef73939d07012cd6880478d4e5b1e6161c42bcbe36e5207af3dcbe4c147fd1a94432ddbe5fbdf5d2c9755d90984ea800bf9d9860d7f806f996cd
+Size (mgba-0.7.2.tar.gz) = 11255680 bytes
+SHA1 (patch-CMakeLists.txt) = f0b106e75cd2697fe81c7b962159cfa5ed4c6681
+SHA1 (patch-include_mgba-util_math.h) = 448ca1bb3bbe2812e7d9482917c488ddcf3b48f0
+SHA1 (patch-include_mgba-util_platform_posix_threading.h) = c5c737be68340e3571934d43bf0c6eab8bc34978
+SHA1 (patch-version.cmake) = 7d6d44febe7bb0ff2231452f037def7cb3782e21
diff -r 5039425e49a7 -r 20e53421d79c emulators/mgba/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/options.mk Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,48 @@
+# $NetBSD: options.mk,v 1.1 2019/06/08 22:46:03 nia Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.mgba
+
+PKG_SUPPORTED_OPTIONS+= ffmpeg imagemagick qt5 opengl
+PKG_SUGGESTED_OPTIONS+= ffmpeg imagemagick qt5 opengl
+
+PLIST_VARS+= qt shaders
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mffmpeg)
+CMAKE_ARGS+= -DUSE_FFMPEG=ON
+.include "../../multimedia/ffmpeg4/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DUSE_FFMPEG=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mimagemagick)
+CMAKE_ARGS+= -DUSE_MAGICK=ON
+.include "../../graphics/ImageMagick/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DUSE_MAGICK=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mqt5)
+PLIST.qt= yes
+CMAKE_ARGS+= -DBUILD_QT=ON
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../x11/qt5-qtmultimedia/buildlink3.mk"
+.include "../../x11/qt5-qttools/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DBUILD_QT=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mopengl)
+CMAKE_ARGS+= -DBUILD_GL=ON
+CMAKE_ARGS+= -DUSE_EPOXY=ON
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../graphics/libepoxy/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DBUILD_GL=OFF
+CMAKE_ARGS+= -DUSE_EPOXY=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mopengl) && !empty(PKG_OPTIONS:Mqt5)
+PLIST.shaders= yes
+.endif
diff -r 5039425e49a7 -r 20e53421d79c emulators/mgba/patches/patch-CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/patches/patch-CMakeLists.txt Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2019/06/08 22:46:03 nia Exp $
+
+Fix locale detection.
+
+--- CMakeLists.txt.orig 2019-02-25 01:33:16.000000000 +0000
++++ CMakeLists.txt
+@@ -391,7 +391,9 @@ if(HAVE_LOCALTIME_R)
+ list(APPEND FUNCTION_DEFINES HAVE_LOCALTIME_R)
+ endif()
+
+-if(HAVE_NEWLOCALE AND HAVE_FREELOCALE AND HAVE_USELOCALE OR APPLE)
++check_include_files("locale.h" HAVE_LOCALE)
++
++if(HAVE_LOCALE OR APPLE)
+ list(APPEND FUNCTION_DEFINES HAVE_LOCALE)
+ if (HAVE_SNPRINTF_L)
+ list(APPEND FUNCTION_DEFINES HAVE_SNPRINTF_L)
diff -r 5039425e49a7 -r 20e53421d79c emulators/mgba/patches/patch-include_mgba-util_math.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/patches/patch-include_mgba-util_math.h Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-include_mgba-util_math.h,v 1.1 2019/06/08 22:46:03 nia Exp $
+
+NetBSD defines popcount32 in libc.
+
+--- include/mgba-util/math.h.orig 2017-07-16 19:04:50.000000000 +0000
++++ include/mgba-util/math.h
+@@ -10,11 +10,15 @@
+
+ CXX_GUARD_START
+
++#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__
diff -r 5039425e49a7 -r 20e53421d79c emulators/mgba/patches/patch-include_mgba-util_platform_posix_threading.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/patches/patch-include_mgba-util_platform_posix_threading.h Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-include_mgba-util_platform_posix_threading.h,v 1.1 2019/06/08 22:46:03 nia Exp $
+
+Support NetBSD pthreads.
+
+--- include/mgba-util/platform/posix/threading.h.orig 2019-02-25 01:33:16.000000000 +0000
++++ include/mgba-util/platform/posix/threading.h
+@@ -95,6 +95,8 @@ static inline int ThreadSetName(const ch
+ #elif defined(__FreeBSD__) || defined(__OpenBSD__)
+ pthread_set_name_np(pthread_self(), name);
+ return 0;
++#elif defined(__NetBSD__)
++ return pthread_setname_np(pthread_self(), "%s", (void *)name);
+ #elif defined(__HAIKU__)
+ rename_thread(find_thread(NULL), name);
+ return 0;
diff -r 5039425e49a7 -r 20e53421d79c emulators/mgba/patches/patch-version.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/mgba/patches/patch-version.cmake Sat Jun 08 22:46:03 2019 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-version.cmake,v 1.1 2019/06/08 22:46:03 nia Exp $
+
+Avoid looking for git to determine the version string.
+
+--- version.cmake.orig 2019-01-27 00:06:06.000000000 +0000
++++ version.cmake
+@@ -8,15 +8,6 @@ set(LIB_VERSION_ABI 0.7)
+ set(LIB_VERSION_STRING ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH})
+ set(SUMMARY "${PROJECT_NAME} Game Boy Advance Emulator")
+
+-find_program(GIT git)
+-if(GIT AND NOT SKIP_GIT)
+- execute_process(COMMAND ${GIT} describe --always --abbrev=40 --dirty WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE GIT_COMMIT ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+- execute_process(COMMAND ${GIT} describe --always --dirty WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE GIT_COMMIT_SHORT ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+- execute_process(COMMAND ${GIT} symbolic-ref --short HEAD WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE GIT_BRANCH ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+- execute_process(COMMAND ${GIT} rev-list HEAD --count WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE GIT_REV ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+- execute_process(COMMAND ${GIT} describe --tag --exact-match WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE GIT_TAG ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+-endif()
+-
+ if(NOT GIT_REV)
+ set(GIT_REV -1)
+ endif()
Home |
Main Index |
Thread Index |
Old Index