pkgsrc-Changes archive

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

CVS commit: pkgsrc/emulators



Module Name:    pkgsrc
Committed By:   nia
Date:           Sun Jul  2 17:32:31 UTC 2023

Modified Files:
        pkgsrc/emulators: Makefile
        pkgsrc/emulators/libretro-flycast: DESCR Makefile PLIST options.mk
Added Files:
        pkgsrc/emulators/flycast: DESCR MESSAGE Makefile Makefile.common PLIST
            distinfo options.mk
        pkgsrc/emulators/flycast/patches: patch-CMakeLists.txt
            patch-core_khronos_GL4_gl3w.c patch-core_linux_context.cpp
            patch-core_log_StringUtil.h patch-core_rend_gui.cpp
Removed Files:
        pkgsrc/emulators/libretro-flycast: distinfo
        pkgsrc/emulators/libretro-flycast/patches: patch-Makefile
            patch-Makefile.common patch-core_hw_aica_dsp__x64.cpp
            patch-core_hw_arm7_arm7.cpp patch-core_hw_sh4_dyna_driver.cpp
            patch-core_libretro_common.cpp patch-core_log_StringUtil.h
            patch-core_rec-x64_rec__x64.cpp

Log Message:
Import emulators/flycast. Rejig libretro-flycast package around it.

Flycast is a multi-platform Sega Dreamcast, Naomi, Naomi 2, and Atomiswave
emulator derived from reicast.


To generate a diff of this commit:
cvs rdiff -u -r1.350 -r1.351 pkgsrc/emulators/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/flycast/DESCR \
    pkgsrc/emulators/flycast/MESSAGE pkgsrc/emulators/flycast/Makefile \
    pkgsrc/emulators/flycast/Makefile.common pkgsrc/emulators/flycast/PLIST \
    pkgsrc/emulators/flycast/distinfo pkgsrc/emulators/flycast/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/flycast/patches/patch-CMakeLists.txt \
    pkgsrc/emulators/flycast/patches/patch-core_khronos_GL4_gl3w.c \
    pkgsrc/emulators/flycast/patches/patch-core_linux_context.cpp \
    pkgsrc/emulators/flycast/patches/patch-core_log_StringUtil.h \
    pkgsrc/emulators/flycast/patches/patch-core_rend_gui.cpp
cvs rdiff -u -r1.1 -r1.2 pkgsrc/emulators/libretro-flycast/DESCR \
    pkgsrc/emulators/libretro-flycast/PLIST \
    pkgsrc/emulators/libretro-flycast/options.mk
cvs rdiff -u -r1.6 -r1.7 pkgsrc/emulators/libretro-flycast/Makefile
cvs rdiff -u -r1.4 -r0 pkgsrc/emulators/libretro-flycast/distinfo
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/emulators/libretro-flycast/patches/patch-Makefile \
    pkgsrc/emulators/libretro-flycast/patches/patch-Makefile.common \
    pkgsrc/emulators/libretro-flycast/patches/patch-core_hw_aica_dsp__x64.cpp \
    pkgsrc/emulators/libretro-flycast/patches/patch-core_hw_arm7_arm7.cpp \
    pkgsrc/emulators/libretro-flycast/patches/patch-core_hw_sh4_dyna_driver.cpp \
    pkgsrc/emulators/libretro-flycast/patches/patch-core_libretro_common.cpp \
    pkgsrc/emulators/libretro-flycast/patches/patch-core_log_StringUtil.h \
    pkgsrc/emulators/libretro-flycast/patches/patch-core_rec-x64_rec__x64.cpp

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

Modified files:

Index: pkgsrc/emulators/Makefile
diff -u pkgsrc/emulators/Makefile:1.350 pkgsrc/emulators/Makefile:1.351
--- pkgsrc/emulators/Makefile:1.350     Mon May 29 19:30:47 2023
+++ pkgsrc/emulators/Makefile   Sun Jul  2 17:32:30 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.350 2023/05/29 19:30:47 nia Exp $
+# $NetBSD: Makefile,v 1.351 2023/07/02 17:32:30 nia Exp $
 #
 
 COMMENT=       Emulators for other machines and systems
@@ -63,6 +63,7 @@ SUBDIR+=      e-uae
 SUBDIR+=       emulationstation
 SUBDIR+=       fbneo
 SUBDIR+=       fceu
+SUBDIR+=       flycast
 SUBDIR+=       fmsx
 SUBDIR+=       free42
 SUBDIR+=       freebsd_lib

Index: pkgsrc/emulators/libretro-flycast/DESCR
diff -u pkgsrc/emulators/libretro-flycast/DESCR:1.1 pkgsrc/emulators/libretro-flycast/DESCR:1.2
--- pkgsrc/emulators/libretro-flycast/DESCR:1.1 Sun May 31 15:20:22 2020
+++ pkgsrc/emulators/libretro-flycast/DESCR     Sun Jul  2 17:32:30 2023
@@ -4,4 +4,5 @@ straight into any libretro-compatible fr
 open to others so that they can run these pluggable emulator and game cores
 also in their own programs or devices.
 
-Flycast is a multi-platform Sega Dreamcast emulator.
+Flycast is a multi-platform Sega Dreamcast, Naomi, Naomi 2, and Atomiswave
+emulator derived from reicast.
Index: pkgsrc/emulators/libretro-flycast/PLIST
diff -u pkgsrc/emulators/libretro-flycast/PLIST:1.1 pkgsrc/emulators/libretro-flycast/PLIST:1.2
--- pkgsrc/emulators/libretro-flycast/PLIST:1.1 Sun May 31 15:20:22 2020
+++ pkgsrc/emulators/libretro-flycast/PLIST     Sun Jul  2 17:32:30 2023
@@ -1,2 +1,2 @@
-@comment $NetBSD: PLIST,v 1.1 2020/05/31 15:20:22 nia Exp $
-lib/libretro/flycast_libretro.${SOEXT}
+@comment $NetBSD: PLIST,v 1.2 2023/07/02 17:32:30 nia Exp $
+lib/libretro/flycast_libretro.so
Index: pkgsrc/emulators/libretro-flycast/options.mk
diff -u pkgsrc/emulators/libretro-flycast/options.mk:1.1 pkgsrc/emulators/libretro-flycast/options.mk:1.2
--- pkgsrc/emulators/libretro-flycast/options.mk:1.1    Sun May 31 15:20:22 2020
+++ pkgsrc/emulators/libretro-flycast/options.mk        Sun Jul  2 17:32:30 2023
@@ -1,23 +1,25 @@
-# $NetBSD: options.mk,v 1.1 2020/05/31 15:20:22 nia Exp $
+# $NetBSD: options.mk,v 1.2 2023/07/02 17:32:30 nia Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.libretro-flycast
-PKG_OPTIONS_REQUIRED_GROUPS=   gl
-PKG_OPTIONS_GROUP.gl=          opengl
 
 .include "../../mk/bsd.fast.prefs.mk"
 
-.if ${OPSYS} == "NetBSD" && !empty(MACHINE_ARCH:M*arm*)
-PKG_OPTIONS_GROUP.gl+=         rpi
+.if !empty(MACHINE_ARCH:M*arm*)
+PKG_SUPPORTED_OPTIONS+=                rpi
+.endif
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv6hf)
+PKG_SUGGESTED_OPTIONS+=                rpi
 .endif
-
-PKG_SUGGESTED_OPTIONS+=                opengl
 
 .include "../../mk/bsd.options.mk"
 
-.if !empty(PKG_OPTIONS:Mopengl)
-.  include "../../graphics/MesaLib/buildlink3.mk"
-.elif !empty(PKG_OPTIONS:Mrpi)
-MAKE_FLAGS+=   GLES=1
-MAKE_FLAGS+=   GL_LIB="-lbrcmGLESv2"
+.if !empty(PKG_OPTIONS:Mrpi)
+CMAKE_ARGS+=   -DUSE_VIDEOCORE=ON
+CMAKE_ARGS+=   -DUSE_GLES2=ON
+CMAKE_ARGS+=   -DUSE_OPENGL=OFF
 .  include "../../misc/raspberrypi-userland/buildlink3.mk"
+.else
+.  if ${OPSYS} != "Darwin"
+.    include "../../graphics/MesaLib/buildlink3.mk"
+.  endif
 .endif

Index: pkgsrc/emulators/libretro-flycast/Makefile
diff -u pkgsrc/emulators/libretro-flycast/Makefile:1.6 pkgsrc/emulators/libretro-flycast/Makefile:1.7
--- pkgsrc/emulators/libretro-flycast/Makefile:1.6      Sun Sep 11 12:51:32 2022
+++ pkgsrc/emulators/libretro-flycast/Makefile  Sun Jul  2 17:32:30 2023
@@ -1,71 +1,13 @@
-# $NetBSD: Makefile,v 1.6 2022/09/11 12:51:32 wiz Exp $
+# $NetBSD: Makefile,v 1.7 2023/07/02 17:32:30 nia Exp $
 
-DISTNAME=      libretro-flycast-20200529
-PKGREVISION=   2
-CATEGORIES=    emulators
-GITHUB_PROJECT=        flycast
-GITHUB_TAG=    e595af5dfbff2e49fbcb95bec5b240785c8b4f4f
+.include "../../emulators/flycast/Makefile.common"
 
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      https://docs.libretro.com/library/flycast/
-COMMENT=       Libretro core based on the Flycast Sega Dreamcast emulator
-LICENSE=       gnu-gpl-v2
-
-SUPERSEDES+=   libretro-reicast-[0-9]*
-
-LIBRETRO_CORE= flycast
-USE_LANGUAGES= c c++
+PKGNAME=       libretro-${DISTNAME}
 
-LDFLAGS+=      -lFLAC -lxxhash -lz
-
-MAKE_FLAGS+=   HAVE_OPENMP=0
-MAKE_FLAGS+=   HAVE_VULKAN=0
-MAKE_FLAGS+=   SINGLE_PREC_FLAGS=1
-MAKE_FLAGS+=   CC_AS=${AS}
-
-.if ${MACHINE_ARCH} != "x86_64"
-CFLAGS+=       -DLOW_END
-CXXFLAGS+=     -DLOW_END
-.endif
+MAINTAINER=    nia%NetBSD.org@localhost
+COMMENT=       Libretro core based on the Flycast Sega Dreamcast emulator
 
-.if ${MACHINE_ARCH} == "aarch64"
-MAKE_FLAGS+=   WITH_DYNAREC=arm64
-MAKE_FLAGS+=   HAVE_GENERIC_JIT=0
-MAKE_FLAGS+=   HOST_CPU_FLAGS=-DHOST_CPU=0x20000006
-.elif ${MACHINE_ARCH} == "i386"
-MAKE_FLAGS+=   WITH_DYNAREC=x86
-MAKE_FLAGS+=   HAVE_GENERIC_JIT=0
-.elif ${MACHINE_ARCH} == "x86_64"
-MAKE_FLAGS+=   WITH_DYNAREC=x86_64
-MAKE_FLAGS+=   HAVE_GENERIC_JIT=0
-.elif ${MACHINE_ARCH} == "earmv7hf"
-MAKE_FLAGS+=   WITH_DYNAREC=arm
-MAKE_FLAGS+=   HAVE_GENERIC_JIT=0
-MAKE_FLAGS+=   ARM_FLOAT_ABI_HARD=1
-MAKE_FLAGS+=   ARMV7A_FLAGS=1
-.elif ${MACHINE_ARCH} == "earmv6hf"
-CFLAGS+=       -marm
-CXXFLAGS+=     -marm
-MAKE_FLAGS+=   WITH_DYNAREC=arm
-MAKE_FLAGS+=   HAVE_GENERIC_JIT=0
-MAKE_FLAGS+=   ARM_FLOAT_ABI_HARD=1
-.elif !empty(MACHINE_ARCH:M*arm*)
-CFLAGS+=       -marm
-CXXFLAGS+=     -marm
-MAKE_FLAGS+=   WITH_DYNAREC=arm
-MAKE_FLAGS+=   HAVE_GENERIC_JIT=0
-MAKE_FLAGS+=   ARM_FLOAT_ABI_HARD=0
-.elif !empty(MACHINE_ARCH:M*mips*)
-MAKE_FLAGS+=   WITH_DYNAREC=mips
-MAKE_FLAGS+=   HAVE_GENERIC_JIT=0
-.else
-MAKE_FLAGS+=   WITH_DYNAREC=
-MAKE_FLAGS+=   HAVE_GENERIC_JIT=1
-.endif
+CMAKE_ARGS+=   -DLIBRETRO=ON
 
 .include "options.mk"
-.include "../../emulators/retroarch/core.mk"
-.include "../../audio/flac/buildlink3.mk"
-.include "../../devel/xxhash/buildlink3.mk"
-.include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Added files:

Index: pkgsrc/emulators/flycast/DESCR
diff -u /dev/null pkgsrc/emulators/flycast/DESCR:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/DESCR      Sun Jul  2 17:32:30 2023
@@ -0,0 +1,2 @@
+Flycast is a multi-platform Sega Dreamcast, Naomi, Naomi 2, and Atomiswave
+emulator derived from reicast.
Index: pkgsrc/emulators/flycast/MESSAGE
diff -u /dev/null pkgsrc/emulators/flycast/MESSAGE:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/MESSAGE    Sun Jul  2 17:32:30 2023
@@ -0,0 +1,14 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2023/07/02 17:32:30 nia Exp $
+
+Flycast requires the following BIOS files in order to work:
+
+SHA256 (dc/dc_boot.bin) =
+88d6a666495ad14ab5988d8cb730533cfc94ec2cfd53a7eeda14642ab0d4abf9
+
+SHA256 (dc/dc_flash.bin) =
+dd8b365521a9c08bb4c170da3592212580f7251f35a45d6083774d1c030bc3e3
+
+Place them in ~/.local/share/flycast.
+
+===========================================================================
Index: pkgsrc/emulators/flycast/Makefile
diff -u /dev/null pkgsrc/emulators/flycast/Makefile:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/Makefile   Sun Jul  2 17:32:30 2023
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2023/07/02 17:32:30 nia Exp $
+
+.include "Makefile.common"
+
+MAINTAINER=    nia%NetBSD.org@localhost
+COMMENT=       Sega Dreamcast/Naomi/Atomiswave emulator
+
+NOT_PAX_MPROTECT_SAFE+=        bin/flycast
+
+.include "options.mk"
+.include "../../mk/bsd.fast.prefs.mk"
+.if ${OPSYS} != "Darwin"
+.  include "../../www/curl/buildlink3.mk"
+.endif
+.include "../../audio/libao/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../lang/lua/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/emulators/flycast/Makefile.common
diff -u /dev/null pkgsrc/emulators/flycast/Makefile.common:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/Makefile.common    Sun Jul  2 17:32:30 2023
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile.common,v 1.1 2023/07/02 17:32:30 nia Exp $
+# used by emulators/flycast/Makefile
+# used by emulators/libretro-flycast/Makefile
+
+DISTNAME=      flycast-2.1
+CATEGORIES=    emulators
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=flyinghead/}
+GITHUB_PROJECT=        flycast
+GITHUB_TAG=    V${PKGVERSION_NOREV}
+
+HOMEPAGE=      https://github.com/flyinghead/flycast
+LICENSE=       gnu-gpl-v2
+
+WRKSRC=                ${WRKDIR}/${DISTNAME}
+
+USE_CMAKE=     yes
+USE_TOOLS+=    pkg-config
+USE_LANGUAGES= c c++
+
+# C++17
+GCC_REQD+=     7
+
+CMAKE_ARGS+=   -DUSE_HOST_LIBZIP=ON
+CMAKE_ARGS+=   -DUSE_VULKAN=OFF
+CMAKE_ARGS+=   -DUSE_DX9=OFF
+CMAKE_ARGS+=   -DUSE_DX11=OFF
+
+CMAKE_ARGS+=   -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
+
+DISTINFO_FILE= ${.CURDIR}/../../emulators/flycast/distinfo
+PATCHDIR=      ${.CURDIR}/../../emulators/flycast/patches
+
+GITHUB_SUBMODULES+=    rtissera libchdr 2781322c4a7f8315c5fd6499129ad4b718e35843 core/deps/libchdr
+GITHUB_SUBMODULES+=    flyinghead mingw-breakpad 4c3d5fce1a4fef4decfbfeaf20f3746ecd209775 core/deps/breakpad
+GITHUB_SUBMODULES+=    vinniefalco LuaBridge fab7b33b896a42dcc865ba5ecdbacd9f40 core/deps/luabridge
+
+.include "../../archivers/libzip/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../net/miniupnpc/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
Index: pkgsrc/emulators/flycast/PLIST
diff -u /dev/null pkgsrc/emulators/flycast/PLIST:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/PLIST      Sun Jul  2 17:32:30 2023
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1 2023/07/02 17:32:30 nia Exp $
+bin/flycast
+man/man1/flycast.1
+share/applications/flycast.desktop
+share/icons/hicolor/128x128/apps/flycast.png
+share/icons/hicolor/16x16/apps/flycast.png
+share/icons/hicolor/256x256/apps/flycast.png
+share/icons/hicolor/32x32/apps/flycast.png
+share/icons/hicolor/512x512/apps/flycast.png
+share/icons/hicolor/64x64/apps/flycast.png
+share/metainfo/org.flycast.Flycast.metainfo.xml
+share/pixmaps/flycast.png
Index: pkgsrc/emulators/flycast/distinfo
diff -u /dev/null pkgsrc/emulators/flycast/distinfo:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/distinfo   Sun Jul  2 17:32:30 2023
@@ -0,0 +1,19 @@
+$NetBSD: distinfo,v 1.1 2023/07/02 17:32:30 nia Exp $
+
+BLAKE2s (flycast-2.1.tar.gz) = 00b437bf7ff8731b0784cbc919641a1ead0c518f49e146a3ed82faa8e4f1cf49
+SHA512 (flycast-2.1.tar.gz) = 98db9c4c2b843bbfd3a6b9d15ed1d487891c42e4c91113f6167c5afcbf0bcd70a034e1d488c2ec0c74e71fc829a117d7f61f0a094cf25326b655be94e8a6e556
+Size (flycast-2.1.tar.gz) = 13006518 bytes
+BLAKE2s (flyinghead-mingw-breakpad-4c3d5fce1a4fef4decfbfeaf20f3746ecd209775.tar.gz) = a4f0710f929156a43117286b72de0f7b9a70ed39b4ded3d4f6b1528d10906470
+SHA512 (flyinghead-mingw-breakpad-4c3d5fce1a4fef4decfbfeaf20f3746ecd209775.tar.gz) = 
0eb0b9fff44c87a6cbb55e958de8ba8a4e32a4a30dac58472a04dd3a143e6a3d980de5bda5740c4b82561296e236b655b76159e6b74868248b0c5a8c8b36b044
+Size (flyinghead-mingw-breakpad-4c3d5fce1a4fef4decfbfeaf20f3746ecd209775.tar.gz) = 5384166 bytes
+BLAKE2s (rtissera-libchdr-2781322c4a7f8315c5fd6499129ad4b718e35843.tar.gz) = 3d2bd14f6aa24f0102b7f1dbacbd1826625baa1b1e7585353ec44aaae2940cf2
+SHA512 (rtissera-libchdr-2781322c4a7f8315c5fd6499129ad4b718e35843.tar.gz) = 
49bf3133667dde34ddb1e84c52f65d1d132c2e55f32685175465ee224202321e153c63c605154a3e9b1f57e7c108c94f88c57e30478537f86c6845760428ccb1
+Size (rtissera-libchdr-2781322c4a7f8315c5fd6499129ad4b718e35843.tar.gz) = 416898 bytes
+BLAKE2s (vinniefalco-LuaBridge-fab7b33b896a42dcc865ba5ecdbacd9f40.tar.gz) = 2b0d728012815bb58fa974be88e37abaf37e8509eec9fa68356a2eff9616954d
+SHA512 (vinniefalco-LuaBridge-fab7b33b896a42dcc865ba5ecdbacd9f40.tar.gz) = 
b47ac42637d615bd6497a8d09f6c7c6e8f7a762b80fc1a4b284cb65754302def2a7b1339c8aeb146900ad5ad247a5b33fb381ce07451f97b60a155f7f1b41a9a
+Size (vinniefalco-LuaBridge-fab7b33b896a42dcc865ba5ecdbacd9f40.tar.gz) = 543800 bytes
+SHA1 (patch-CMakeLists.txt) = c5df98646e003579b7c575d84943f7f786ada70c
+SHA1 (patch-core_khronos_GL4_gl3w.c) = 83f5d38c3cdcb6ffaf4a0d7ff45a2185d55dec33
+SHA1 (patch-core_linux_context.cpp) = 4640cb74d38f0919deadd7efc740b353dc387571
+SHA1 (patch-core_log_StringUtil.h) = dc0cf0ee8a6926ca2e63b01e636c49646c534cf3
+SHA1 (patch-core_rend_gui.cpp) = 8cf1beb83758dc72e1ceb4097f660449400fb666
Index: pkgsrc/emulators/flycast/options.mk
diff -u /dev/null pkgsrc/emulators/flycast/options.mk:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/options.mk Sun Jul  2 17:32:30 2023
@@ -0,0 +1,38 @@
+# $NetBSD: options.mk,v 1.1 2023/07/02 17:32:30 nia Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.flycast
+
+PKG_SUPPORTED_OPTIONS+=                alsa pulseaudio
+PKG_SUGGESTED_OPTIONS.Linux+=  alsa
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if !empty(MACHINE_ARCH:M*arm*)
+PKG_SUPPORTED_OPTIONS+=                rpi
+.endif
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv6hf)
+PKG_SUGGESTED_OPTIONS+=                rpi
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+.  include "../../audio/alsa-lib/buildlink3.mk"
+.else
+CMAKE_ARGS+=           -DCMAKE_DISABLE_FIND_PACKAGE_ALSA=ON
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+.  include "../../audio/pulseaudio/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mrpi)
+CMAKE_ARGS+=   -DUSE_VIDEOCORE=ON
+CMAKE_ARGS+=   -DUSE_GLES2=ON
+CMAKE_ARGS+=   -DUSE_OPENGL=OFF
+.  include "../../misc/raspberrypi-userland/buildlink3.mk"
+.else
+.  if ${OPSYS} != "Darwin"
+.    include "../../graphics/MesaLib/buildlink3.mk"
+.  endif
+.endif

Index: pkgsrc/emulators/flycast/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/emulators/flycast/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/patches/patch-CMakeLists.txt       Sun Jul  2 17:32:30 2023
@@ -0,0 +1,88 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2023/07/02 17:32:30 nia Exp $
+
+- Always prefer SDL2 from pkgsrc.
+- Treat APPLE less specially.
+- Use proper dependencies when building libretro core.
+
+--- CMakeLists.txt.orig        2023-02-15 17:59:44.000000000 +0000
++++ CMakeLists.txt
+@@ -356,9 +356,7 @@ if(NOT LIBRETRO)
+       endif()
+ 
+       if(NOT ANDROID AND NOT IOS)
+-              if(NOT APPLE AND (NOT UNIX OR CMAKE_SYSTEM_NAME MATCHES "(FreeBSD|OpenBSD|NetBSD)"))
+-                      find_package(SDL2)
+-              endif()
++              find_package(SDL2)
+               if(NOT SDL2_FOUND)
+                       add_subdirectory(core/deps/SDL EXCLUDE_FROM_ALL)
+                       set(SDL2_FOUND 1)
+@@ -395,7 +393,7 @@ if(NOT LIBRETRO)
+       endif()
+ 
+       find_package(Lua)
+-      if(NOT APPLE AND LUA_FOUND)
++      if(LUA_FOUND)
+               target_compile_definitions(${PROJECT_NAME} PRIVATE USE_LUA)
+               target_include_directories(${PROJECT_NAME} PRIVATE ${LUA_INCLUDE_DIR} core/deps/luabridge/Source)
+               list(TRANSFORM LUA_LIBRARIES REPLACE "\.dll" "")
+@@ -418,7 +416,7 @@ if(NOT WITH_SYSTEM_ZLIB)
+ endif()
+ 
+ find_package(PkgConfig)
+-if(PKG_CONFIG_FOUND AND NOT ANDROID AND NOT APPLE AND NOT LIBRETRO)
++if(PKG_CONFIG_FOUND AND NOT ANDROID AND NOT LIBRETRO)
+       pkg_check_modules(AO IMPORTED_TARGET ao)
+       if(AO_FOUND)
+               target_compile_definitions(${PROJECT_NAME} PRIVATE USE_LIBAO)
+@@ -445,22 +443,22 @@ if(PKG_CONFIG_FOUND AND NOT ANDROID AND 
+               target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::LIBPULSE)
+       endif()
+ 
+-      if(USE_HOST_LIBZIP)
+-              pkg_check_modules(LIBZIP IMPORTED_TARGET libzip)
+-              if(LIBZIP_FOUND)
+-                      target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::LIBZIP)
+-              endif()
+-      endif()
+-
+       if(ENABLE_OPROFILE)
+               target_compile_definitions(${PROJECT_NAME} PRIVATE DYNA_OPROF)
+               target_link_libraries(${PROJECT_NAME} PRIVATE opagent)
+       endif()
++endif()
+ 
+-      find_package(MiniUPnPc)
+-      if(MINIUPNP_FOUND)
+-              target_include_directories(${PROJECT_NAME} PRIVATE ${MINIUPNP_INCLUDE_DIRS})
+-              target_link_libraries(${PROJECT_NAME} PRIVATE ${MINIUPNP_LIBRARIES})
++find_package(MiniUPnPc)
++if(MINIUPNP_FOUND)
++      target_include_directories(${PROJECT_NAME} PRIVATE ${MINIUPNP_INCLUDE_DIRS})
++      target_link_libraries(${PROJECT_NAME} PRIVATE ${MINIUPNP_LIBRARIES})
++endif()
++
++if(USE_HOST_LIBZIP)
++      pkg_check_modules(LIBZIP IMPORTED_TARGET libzip)
++      if(LIBZIP_FOUND)
++              target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::LIBZIP)
+       endif()
+ endif()
+ 
+@@ -1664,10 +1662,14 @@ if(IOS)
+ elseif(NINTENDO_SWITCH AND NOT LIBRETRO)
+       install(FILES ${CMAKE_BINARY_DIR}/flycast.nro DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ else()
+-      install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}")
++      if(NOT LIBRETRO)
++              install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}")
++      else()
++              install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_LIBDIR}/libretro")
++      endif()
+ endif()
+ 
+-if(UNIX AND NOT APPLE AND NOT ANDROID AND NOT LIBRETRO)
++if(UNIX AND NOT ANDROID AND NOT LIBRETRO)
+       install(FILES shell/linux/man/${PROJECT_NAME}.1
+               DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
+       )
Index: pkgsrc/emulators/flycast/patches/patch-core_khronos_GL4_gl3w.c
diff -u /dev/null pkgsrc/emulators/flycast/patches/patch-core_khronos_GL4_gl3w.c:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/patches/patch-core_khronos_GL4_gl3w.c      Sun Jul  2 17:32:30 2023
@@ -0,0 +1,19 @@
+$NetBSD: patch-core_khronos_GL4_gl3w.c,v 1.1 2023/07/02 17:32:30 nia Exp $
+
+libGL.so may have a different soname on NetBSD depending on whether
+it is installed from pkgsrc or xbase.
+
+--- core/khronos/GL4/gl3w.c.orig       2023-02-15 17:59:44.000000000 +0000
++++ core/khronos/GL4/gl3w.c
+@@ -115,7 +115,11 @@ static GL3WglProc (*glx_get_proc_address
+ 
+ static int open_libgl(void)
+ {
++#ifdef __NetBSD__
++      libgl = dlopen("libGL.so", RTLD_LAZY | RTLD_LOCAL);
++#else
+       libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_LOCAL);
++#endif
+       if (!libgl)
+               return GL3W_ERROR_LIBRARY_OPEN;
+ 
Index: pkgsrc/emulators/flycast/patches/patch-core_linux_context.cpp
diff -u /dev/null pkgsrc/emulators/flycast/patches/patch-core_linux_context.cpp:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/patches/patch-core_linux_context.cpp       Sun Jul  2 17:32:30 2023
@@ -0,0 +1,19 @@
+$NetBSD: patch-core_linux_context.cpp,v 1.1 2023/07/02 17:32:30 nia Exp $
+
+Fix build on NetBSD/amd64.
+
+--- core/linux/context.cpp.orig        2023-02-15 17:59:44.000000000 +0000
++++ core/linux/context.cpp
+@@ -84,9 +84,9 @@ static void context_segfault(host_contex
+               bicopy<ToSegfault>(hostctx->pc, MCTX(.mc_rip));
+       #elif defined(__NetBSD__)
+               bicopy<ToSegfault>(hostctx->pc, MCTX(.__gregs[_REG_RIP]));
+-              bicopy<ToSegfault>(hostctx->rsp, MCTX(.__gregs[REG_RSP]));
+-              bicopy<ToSegfault>(hostctx->r9, MCTX(.__gregs[REG_R9]));
+-              bicopy<ToSegfault>(hostctx->rdi, MCTX(.__gregs[REG_RDI]));
++              bicopy<ToSegfault>(hostctx->rsp, MCTX(.__gregs[_REG_RSP]));
++              bicopy<ToSegfault>(hostctx->r9, MCTX(.__gregs[_REG_R9]));
++              bicopy<ToSegfault>(hostctx->rdi, MCTX(.__gregs[_REG_RDI]));
+       #elif defined(__unix__)
+               bicopy<ToSegfault>(hostctx->pc, MCTX(.gregs[REG_RIP]));
+               bicopy<ToSegfault>(hostctx->rsp, MCTX(.gregs[REG_RSP]));
Index: pkgsrc/emulators/flycast/patches/patch-core_log_StringUtil.h
diff -u /dev/null pkgsrc/emulators/flycast/patches/patch-core_log_StringUtil.h:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/patches/patch-core_log_StringUtil.h        Sun Jul  2 17:32:30 2023
@@ -0,0 +1,38 @@
+$NetBSD: patch-core_log_StringUtil.h,v 1.1 2023/07/02 17:32:30 nia Exp $
+
+Fix build on NetBSD.
+
+--- core/log/StringUtil.h.orig 2023-02-15 17:59:44.000000000 +0000
++++ core/log/StringUtil.h
+@@ -69,11 +69,11 @@ bool CharArrayFromFormatV(char* out, int
+   writtenCount = vsnprintf(out, outsize, format, args);
+ #endif
+ #else
+-#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) && !defined(__SWITCH__)
++#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) && !defined(__SWITCH__) && !defined(__NetBSD__)
+   locale_t previousLocale = uselocale(GetCLocale());
+ #endif
+   writtenCount = vsnprintf(out, outsize, format, args);
+-#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) && !defined(__SWITCH__)
++#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) && !defined(__SWITCH__) && !defined(__NetBSD__)
+   uselocale(previousLocale);
+ #endif
+ #endif
+@@ -101,7 +101,7 @@ std::string StringFromFormatV(const char
+   std::string temp = buf;
+   delete[] buf;
+ #else
+-#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) && !defined(__SWITCH__)
++#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) && !defined(__SWITCH__) && !defined(__NetBSD__)
+   locale_t previousLocale = uselocale(GetCLocale());
+ #endif
+   if (vasprintf(&buf, format, args) < 0)
+@@ -110,7 +110,7 @@ std::string StringFromFormatV(const char
+     buf = nullptr;
+   }
+ 
+-#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) && !defined(__SWITCH__)
++#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) && !defined(__SWITCH__) && !defined(__NetBSD__)
+   uselocale(previousLocale);
+ #endif
+ 
Index: pkgsrc/emulators/flycast/patches/patch-core_rend_gui.cpp
diff -u /dev/null pkgsrc/emulators/flycast/patches/patch-core_rend_gui.cpp:1.1
--- /dev/null   Sun Jul  2 17:32:31 2023
+++ pkgsrc/emulators/flycast/patches/patch-core_rend_gui.cpp    Sun Jul  2 17:32:30 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-core_rend_gui.cpp,v 1.1 2023/07/02 17:32:30 nia Exp $
+
+Here, we support Unix.
+
+--- core/rend/gui.cpp.orig     2023-02-15 17:59:44.000000000 +0000
++++ core/rend/gui.cpp
+@@ -2230,7 +2230,7 @@ static void gui_display_settings()
+ #ifdef __ANDROID__
+                                       "Android"
+ #elif defined(__unix__)
+-                                      "Linux"
++                                      "Unix"
+ #elif defined(__APPLE__)
+ #ifdef TARGET_IPHONE
+                               "iOS"



Home | Main Index | Thread Index | Old Index