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:           Fri Apr 26 09:04:32 UTC 2024

Modified Files:
        pkgsrc/emulators/libretro-picodrive: Makefile
Added Files:
        pkgsrc/emulators/picodrive: DESCR Makefile Makefile.common PLIST
            distinfo options.mk
        pkgsrc/emulators/picodrive/files: picodrive.desktop
        pkgsrc/emulators/picodrive/patches: patch-Makefile
            patch-platform_libpicofe_linux_plat.c
            patch-platform_libpicofe_posix.h

Log Message:
Import the standalone version of picodrive.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/emulators/libretro-picodrive/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/picodrive/DESCR \
    pkgsrc/emulators/picodrive/Makefile \
    pkgsrc/emulators/picodrive/Makefile.common \
    pkgsrc/emulators/picodrive/PLIST pkgsrc/emulators/picodrive/distinfo \
    pkgsrc/emulators/picodrive/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/picodrive/files/picodrive.desktop
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/picodrive/patches/patch-Makefile \
    pkgsrc/emulators/picodrive/patches/patch-platform_libpicofe_linux_plat.c \
    pkgsrc/emulators/picodrive/patches/patch-platform_libpicofe_posix.h

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

Modified files:

Index: pkgsrc/emulators/libretro-picodrive/Makefile
diff -u pkgsrc/emulators/libretro-picodrive/Makefile:1.12 pkgsrc/emulators/libretro-picodrive/Makefile:1.13
--- pkgsrc/emulators/libretro-picodrive/Makefile:1.12   Fri Jan 29 09:17:27 2021
+++ pkgsrc/emulators/libretro-picodrive/Makefile        Fri Apr 26 09:04:31 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2021/01/29 09:17:27 nia Exp $
+# $NetBSD: Makefile,v 1.13 2024/04/26 09:04:31 nia Exp $
 
 DISTNAME=      libretro-picodrive-20200527
 PKGREVISION=   2
@@ -13,44 +13,9 @@ LICENSE=     mame-license
 
 MAKE_FILE=     Makefile.libretro
 
-.include "../../mk/bsd.prefs.mk"
-
-NOT_FOR_PLATFORM=      ${BIGENDIANPLATFORMS}
-
-.if ${MACHINE_ARCH} == "earmv7hf"
-# Avoid mixing in Thumb code with Picodrive's ARM asm.
-CFLAGS+=       -marm
-MAKE_FLAGS+=   ARCH=arm
-MAKE_FLAGS+=   ARM_ASM=1
-MAKE_FLAGS+=   use_cyclone=0
-MAKE_FLAGS+=   use_fame=1
-MAKE_FLAGS+=   use_drz80=0
-MAKE_FLAGS+=   use_cz80=1
-MAKE_FLAGS+=   use_sh2drc=1
-MAKE_FLAGS+=   use_svpdrc=1
-.elif ${MACHINE_ARCH} == "earmv6hf"
-CFLAGS+=       -marm
-MAKE_FLAGS+=   ARCH=arm
-MAKE_FLAGS+=   ARM_ASM=1
-MAKE_FLAGS+=   asm_memory=1
-MAKE_FLAGS+=   asm_render=1
-MAKE_FLAGS+=   asm_ym2612=1
-MAKE_FLAGS+=   asm_misc=1
-MAKE_FLAGS+=   asm_cdpico=1
-MAKE_FLAGS+=   asm_cdmemory=1
-MAKE_FLAGS+=   asm_mix=1
-MAKE_FLAGS+=   use_cyclone=0
-MAKE_FLAGS+=   use_fame=0
-MAKE_FLAGS+=   use_drz80=1
-MAKE_FLAGS+=   use_cz80=0
-MAKE_FLAGS+=   use_sh2drc=1
-MAKE_FLAGS+=   use_svpdrc=1
-.elif ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
-MAKE_FLAGS+=   use_sh2drc=0
-.endif
-
 LIBRETRO_CORE= picodrive
 
+.include "../../emulators/picodrive/Makefile.common"
 .include "../../emulators/retroarch/core.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Added files:

Index: pkgsrc/emulators/picodrive/DESCR
diff -u /dev/null pkgsrc/emulators/picodrive/DESCR:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/DESCR    Fri Apr 26 09:04:31 2024
@@ -0,0 +1,3 @@
+Picodrive is yet another Megadrive / Genesis / Sega CD / Mega CD / 32X / SMS
+emulator, which was written with ARM-based handheld devices in mind
+but also runs on non-ARM little-endian hardware too.
Index: pkgsrc/emulators/picodrive/Makefile
diff -u /dev/null pkgsrc/emulators/picodrive/Makefile:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/Makefile Fri Apr 26 09:04:31 2024
@@ -0,0 +1,65 @@
+# $NetBSD: Makefile,v 1.1 2024/04/26 09:04:31 nia Exp $
+
+DISTNAME=      PicoDrive_1.93
+PKGNAME=       ${DISTNAME:tl:S/_/-/1}
+CATEGORIES=    emulators
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=notaz/}
+GITHUB_RELEASE=        v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/notaz/picodrive
+COMMENT=       Fast Sega Mega Drive/MegaCD/32X emulator
+LICENSE=       mame-license
+
+WRKSRC=                ${WRKDIR}/PicoDrive-${PKGVERSION_NOREV}
+
+HAS_CONFIGURE= yes
+USE_TOOLS+=    gmake
+
+CFLAGS+=       -DPICO_DATA_DIR="\"${PREFIX}/share/picodrive/\""
+
+SOUND_DRIVERS+=        sdl
+
+.include "Makefile.common"
+.include "options.mk"
+
+.include "../../mk/oss.buildlink3.mk"
+
+.if ${OSS_TYPE} != "none"
+SOUND_DRIVERS+=                oss
+LDFLAGS+=              ${LIBOSSAUDIO}
+SUBST_CLASSES+=                oss
+SUBST_STAGE.oss=       pre-configure
+SUBST_MESSAGE.oss=     Correcting the path to the OSS device.
+SUBST_FILES.oss+=      platform/libpicofe/linux/sndout_oss.c
+SUBST_SED.oss+=                -e "s,/dev/dsp,${DEVOSSAUDIO},g"
+.endif
+
+CONFIGURE_ENV+=                SDL_CONFIG=${PREFIX}/bin/sdl-config
+
+CONFIGURE_ARGS+=       --platform=generic
+CONFIGURE_ARGS+=       --sound-drivers=${SOUND_DRIVERS:Q}
+
+INSTALLATION_DIRS+=    bin
+INSTALLATION_DIRS+=    share/applications
+INSTALLATION_DIRS+=    share/picodrive/skin
+INSTALLATION_DIRS+=    share/pixmaps
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/PicoDrive \
+               ${DESTDIR}${PREFIX}/bin/picodrive
+       ${INSTALL_DATA} ${FILESDIR}/picodrive.desktop \
+               ${DESTDIR}${PREFIX}/share/applications/picodrive.desktop
+       ${INSTALL_DATA} ${WRKSRC}/platform/opendingux/data/megadrive.png \
+               ${DESTDIR}${PREFIX}/share/pixmaps/picodrive.png
+       ${INSTALL_DATA} ${WRKSRC}/platform/gp2x/skin/*.png \
+               ${DESTDIR}${PREFIX}/share/picodrive/skin
+       ${INSTALL_DATA} ${WRKSRC}/platform/gp2x/skin/*.txt \
+               ${DESTDIR}${PREFIX}/share/picodrive/skin
+
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+BUILDLINK_TRANSFORM+=  opt:-ldl:${BUILDLINK_LDADD.dl:Q}
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/emulators/picodrive/Makefile.common
diff -u /dev/null pkgsrc/emulators/picodrive/Makefile.common:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/Makefile.common  Fri Apr 26 09:04:31 2024
@@ -0,0 +1,37 @@
+# $NetBSD: Makefile.common,v 1.1 2024/04/26 09:04:31 nia Exp $
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+NOT_FOR_PLATFORM=      ${BIGENDIANPLATFORMS}
+
+.if ${MACHINE_ARCH} == "earmv7hf"
+# Avoid mixing in Thumb code with Picodrive's ARM asm.
+CFLAGS+=       -marm
+MAKE_FLAGS+=   ARCH=arm
+MAKE_FLAGS+=   ARM_ASM=1
+MAKE_FLAGS+=   use_cyclone=0
+MAKE_FLAGS+=   use_fame=1
+MAKE_FLAGS+=   use_drz80=0
+MAKE_FLAGS+=   use_cz80=1
+MAKE_FLAGS+=   use_sh2drc=1
+MAKE_FLAGS+=   use_svpdrc=1
+.elif ${MACHINE_ARCH} == "earmv6hf"
+CFLAGS+=       -marm
+MAKE_FLAGS+=   ARCH=arm
+MAKE_FLAGS+=   ARM_ASM=1
+MAKE_FLAGS+=   asm_memory=1
+MAKE_FLAGS+=   asm_render=1
+MAKE_FLAGS+=   asm_ym2612=1
+MAKE_FLAGS+=   asm_misc=1
+MAKE_FLAGS+=   asm_cdpico=1
+MAKE_FLAGS+=   asm_cdmemory=1
+MAKE_FLAGS+=   asm_mix=1
+MAKE_FLAGS+=   use_cyclone=0
+MAKE_FLAGS+=   use_fame=0
+MAKE_FLAGS+=   use_drz80=1
+MAKE_FLAGS+=   use_cz80=0
+MAKE_FLAGS+=   use_sh2drc=1
+MAKE_FLAGS+=   use_svpdrc=1
+.elif ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
+MAKE_FLAGS+=   use_sh2drc=0
+.endif
Index: pkgsrc/emulators/picodrive/PLIST
diff -u /dev/null pkgsrc/emulators/picodrive/PLIST:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/PLIST    Fri Apr 26 09:04:31 2024
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2024/04/26 09:04:31 nia Exp $
+bin/picodrive
+share/applications/picodrive.desktop
+share/picodrive/skin/background.png
+share/picodrive/skin/font.png
+share/picodrive/skin/readme.txt
+share/picodrive/skin/selector.png
+share/picodrive/skin/skin.txt
+share/pixmaps/picodrive.png
Index: pkgsrc/emulators/picodrive/distinfo
diff -u /dev/null pkgsrc/emulators/picodrive/distinfo:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/distinfo Fri Apr 26 09:04:31 2024
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2024/04/26 09:04:31 nia Exp $
+
+BLAKE2s (PicoDrive_1.93.tar.gz) = ad4bce3706a88aba9ab5c3344885511f4a21f38581492ccad82da5dfa5c91578
+SHA512 (PicoDrive_1.93.tar.gz) = d233d709caf3ced97545ac87f066d42e08c65553fec4769379413ca224cc724663e889cc9ae4cc243cbc67763d9bc7d0f0987d3dbf6beca247e5246b37ca76c1
+Size (PicoDrive_1.93.tar.gz) = 1542062 bytes
+SHA1 (patch-Makefile) = 7ac6cb7d997e370ec5ebbe58fd4c6afc3c5466ca
+SHA1 (patch-platform_libpicofe_linux_plat.c) = 48e801656336caa2a21d42f4346c145595bacc9e
+SHA1 (patch-platform_libpicofe_posix.h) = 31e30dc438b2404a676408336a53258a87563d60
Index: pkgsrc/emulators/picodrive/options.mk
diff -u /dev/null pkgsrc/emulators/picodrive/options.mk:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/options.mk       Fri Apr 26 09:04:31 2024
@@ -0,0 +1,17 @@
+# $NetBSD: options.mk,v 1.1 2024/04/26 09:04:31 nia Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.picodrive
+PKG_SUPPORTED_OPTIONS=         alsa pulseaudio
+PKG_SUGGESTED_OPTIONS.Linux=   alsa
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+SOUND_DRIVERS+=                alsa
+.  include "../../audio/alsa-lib/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+SOUND_DRIVERS+=                pulseaudio
+.  include "../../audio/pulseaudio/buildlink3.mk"
+.endif

Index: pkgsrc/emulators/picodrive/files/picodrive.desktop
diff -u /dev/null pkgsrc/emulators/picodrive/files/picodrive.desktop:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/files/picodrive.desktop  Fri Apr 26 09:04:31 2024
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=PicoDrive
+Comment=A Mega Drive/Genesis emulator
+Exec=picodrive %f
+Icon=picodrive
+Categories=Game;Emulator;
+Terminal=false
+Type=Application
+StartupNotify=true

Index: pkgsrc/emulators/picodrive/patches/patch-Makefile
diff -u /dev/null pkgsrc/emulators/picodrive/patches/patch-Makefile:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/patches/patch-Makefile   Fri Apr 26 09:04:31 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile,v 1.1 2024/04/26 09:04:31 nia Exp $
+
+Don't build support for evdev by default on non-Linux.
+
+--- Makefile.orig      2024-04-16 19:16:33.283380940 +0000
++++ Makefile
+@@ -132,7 +132,7 @@ OBJS += platform/common/main.o platform/
+ 
+ # libpicofe
+ OBJS += platform/libpicofe/input.o platform/libpicofe/readpng.o \
+-      platform/libpicofe/fonts.o platform/libpicofe/linux/in_evdev.o \
++      platform/libpicofe/fonts.o \
+       platform/libpicofe/linux/plat.o
+ 
+ # libpicofe - sound
Index: pkgsrc/emulators/picodrive/patches/patch-platform_libpicofe_linux_plat.c
diff -u /dev/null pkgsrc/emulators/picodrive/patches/patch-platform_libpicofe_linux_plat.c:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/patches/patch-platform_libpicofe_linux_plat.c    Fri Apr 26 09:04:31 2024
@@ -0,0 +1,18 @@
+$NetBSD: patch-platform_libpicofe_linux_plat.c,v 1.1 2024/04/26 09:04:31 nia Exp $
+
+NetBSD support.
+
+--- platform/libpicofe/linux/plat.c.orig       2024-04-16 19:15:52.544337311 +0000
++++ platform/libpicofe/linux/plat.c
+@@ -215,7 +215,11 @@ void *plat_mremap(void *ptr, size_t olds
+ {
+       void *ret;
+ 
++#ifdef __NetBSD__
++      ret = mremap(ptr, oldsize, NULL, newsize, 0);
++#else
+       ret = mremap(ptr, oldsize, newsize, MREMAP_MAYMOVE);
++#endif
+       if (ret == MAP_FAILED) {
+               fprintf(stderr, "mremap %p %zd %zd: ",
+                       ptr, oldsize, newsize);
Index: pkgsrc/emulators/picodrive/patches/patch-platform_libpicofe_posix.h
diff -u /dev/null pkgsrc/emulators/picodrive/patches/patch-platform_libpicofe_posix.h:1.1
--- /dev/null   Fri Apr 26 09:04:32 2024
+++ pkgsrc/emulators/picodrive/patches/patch-platform_libpicofe_posix.h Fri Apr 26 09:04:31 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-platform_libpicofe_posix.h,v 1.1 2024/04/26 09:04:31 nia Exp $
+
+NetBSD support.
+
+--- platform/libpicofe/posix.h.orig    2024-04-16 19:15:33.864037786 +0000
++++ platform/libpicofe/posix.h
+@@ -2,7 +2,7 @@
+ #define LIBPICOFE_POSIX_H
+ 
+ /* define POSIX stuff: dirent, scandir, getcwd, mkdir */
+-#if defined(__linux__) || defined(__MINGW32__)
++#if defined(__linux__) || defined(__MINGW32__) || defined(__unix__)
+ 
+ #include <dirent.h>
+ #include <unistd.h>



Home | Main Index | Thread Index | Old Index