pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/emulators libretro-reicast: import version 20181013



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d1105154ab4f
branches:  trunk
changeset: 313906:d1105154ab4f
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat Oct 13 17:02:16 2018 +0000

description:
libretro-reicast: import version 20181013

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.

Reicast is a multi-platform Sega Dreamcast emulator.

diffstat:

 emulators/Makefile                                                   |   3 +-
 emulators/libretro-reicast/DESCR                                     |   7 +
 emulators/libretro-reicast/MESSAGE                                   |  24 +++
 emulators/libretro-reicast/Makefile                                  |  52 +++++++
 emulators/libretro-reicast/PLIST                                     |   2 +
 emulators/libretro-reicast/distinfo                                  |   9 +
 emulators/libretro-reicast/options.mk                                |  28 +++
 emulators/libretro-reicast/patches/patch-Makefile                    |  71 ++++++++++
 emulators/libretro-reicast/patches/patch-core_hw_sh4_dyna_driver.cpp |  16 ++
 emulators/libretro-reicast/patches/patch-core_libretro_common.cpp    |  15 ++
 10 files changed, 226 insertions(+), 1 deletions(-)

diffs (277 lines):

diff -r 4669f4fb745b -r d1105154ab4f emulators/Makefile
--- a/emulators/Makefile        Sat Oct 13 16:19:43 2018 +0000
+++ b/emulators/Makefile        Sat Oct 13 17:02:16 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.285 2018/10/13 16:19:31 nia Exp $
+# $NetBSD: Makefile,v 1.286 2018/10/13 17:02:16 nia Exp $
 #
 
 COMMENT=       Emulators for other operating systems
@@ -118,6 +118,7 @@
 SUBDIR+=       libretro-picodrive
 SUBDIR+=       libretro-ppsspp
 SUBDIR+=       libretro-prosystem
+SUBDIR+=       libretro-reicast
 SUBDIR+=       libretro-sameboy
 SUBDIR+=       libretro-snes9x
 SUBDIR+=       libretro-snes9x2005
diff -r 4669f4fb745b -r d1105154ab4f emulators/libretro-reicast/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-reicast/DESCR  Sat Oct 13 17:02:16 2018 +0000
@@ -0,0 +1,7 @@
+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.
+
+Reicast is a multi-platform Sega Dreamcast emulator.
diff -r 4669f4fb745b -r d1105154ab4f emulators/libretro-reicast/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-reicast/MESSAGE        Sat Oct 13 17:02:16 2018 +0000
@@ -0,0 +1,24 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2018/10/13 17:02:16 nia Exp $
+
+Reicast requires the following BIOS files in order to work:
+
+SHA256 (dc/dc_boot.bin) =
+88d6a666495ad14ab5988d8cb730533cfc94ec2cfd53a7eeda14642ab0d4abf9
+
+SHA256 (dc/dc_flash.bin) =
+dd8b365521a9c08bb4c170da3592212580f7251f35a45d6083774d1c030bc3e3
+
+In retroarch, you'll need to place them in the System Directory.
+
+Alternatively, you can place them in your Content Directory next to the
+software you are going to run.
+
+--
+
+This package is not PaX MPROTECT-safe, because of its just-in-time
+compiler.
+
+MPROTECT must be disabled for RetroArch for this core to be usable.
+
+===========================================================================
diff -r 4669f4fb745b -r d1105154ab4f emulators/libretro-reicast/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-reicast/Makefile       Sat Oct 13 17:02:16 2018 +0000
@@ -0,0 +1,52 @@
+# $NetBSD: Makefile,v 1.1 2018/10/13 17:02:16 nia Exp $
+
+DISTNAME=      libretro-reicast-20181013
+CATEGORIES=    emulators
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=libretro/}
+GITHUB_PROJECT=        reicast-emulator
+GITHUB_TAG=    bc92da858da3853f186be01e6e2a25febcb17420
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://docs.libretro.com/library/reicast/
+COMMENT=       Libretro core based on the Reicast Sega Dreamcast emulator
+LICENSE=       gnu-gpl-v2
+
+EXTRACT_USING= bsdtar
+USE_TOOLS+=    gmake
+USE_LANGUAGES= c c++11
+
+MAKE_FLAGS+=           HAVE_OPENMP=0
+MAKE_FLAGS+=           HAVE_LTCG=0
+MAKE_FLAGS+=           SINGLE_PREC_FLAGS=1
+MAKE_FLAGS+=           GIT_VERSION="-pkgsrc"
+MAKE_FLAGS+=           CC_AS=${AS:Q}
+
+MAKE_FLAGS.NetBSD+=    NO_NVMEM=1
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH} == "x86_64"
+MAKE_FLAGS+=           WITH_DYNAREC=x86_64
+.elif ${MACHINE_ARCH} == "i386"
+MAKE_FLAGS+=           WITH_DYNAREC=x86
+.elif !empty(MACHINE_ARCH:M*arm*)
+CFLAGS+=               -marm
+MAKE_FLAGS+=           WITH_DYNAREC=arm
+.elif !empty(MACHINE_ARCH:M*mips*)
+MAKE_FLAGS+=           WITH_DYNAREC=mips
+.else
+MAKE_FLAGS+=           WITH_DYNAREC=
+.endif
+
+BUILDLINK_TRANSFORM.SunOS+=    rm:-Wl,--version-script=link.T
+BUILDLINK_TRANSFORM.SunOS+=    rm:-Wl,-no-undefined
+
+INSTALLATION_DIRS+=    ${PREFIX}/lib/libretro
+
+do-install:
+       ${INSTALL_LIB} ${WRKSRC}/reicast_libretro.so \
+           ${DESTDIR}${PREFIX}/lib/libretro/reicast_libretro.so
+
+.include "options.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 4669f4fb745b -r d1105154ab4f emulators/libretro-reicast/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-reicast/PLIST  Sat Oct 13 17:02:16 2018 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2018/10/13 17:02:16 nia Exp $
+lib/libretro/reicast_libretro.so
diff -r 4669f4fb745b -r d1105154ab4f emulators/libretro-reicast/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-reicast/distinfo       Sat Oct 13 17:02:16 2018 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2018/10/13 17:02:16 nia Exp $
+
+SHA1 (libretro-reicast-20181013-bc92da858da3853f186be01e6e2a25febcb17420.tar.gz) = ac5fac9aaa2c9c9761d2f4b0cea3ed06cabb9f0c
+RMD160 (libretro-reicast-20181013-bc92da858da3853f186be01e6e2a25febcb17420.tar.gz) = abf85746413d00b722f692800bc93c5d3857b283
+SHA512 (libretro-reicast-20181013-bc92da858da3853f186be01e6e2a25febcb17420.tar.gz) = 
c5aa0ab0a7934bd21ed10aac17ec074a22ed024bacb3f9a52d18efe5a1b998f819a3a98c768ae0c62f6ca78afd6d07bbeee412bd2d9ed447963fe2ec9dc9cde2
+Size (libretro-reicast-20181013-bc92da858da3853f186be01e6e2a25febcb17420.tar.gz) = 1576085 bytes
+SHA1 (patch-Makefile) = 9839c2bc70a73fa5f9ef3907d74593f78c01380a
+SHA1 (patch-core_hw_sh4_dyna_driver.cpp) = 6d00a7297f528fe3389a13872095da80200a9013
+SHA1 (patch-core_libretro_common.cpp) = b1291f55ced1dc92087d31270f8bc582c2db6fc5
diff -r 4669f4fb745b -r d1105154ab4f emulators/libretro-reicast/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-reicast/options.mk     Sat Oct 13 17:02:16 2018 +0000
@@ -0,0 +1,28 @@
+# $NetBSD: options.mk,v 1.1 2018/10/13 17:02:16 nia Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.libretro-reicast
+PKG_OPTIONS_REQUIRED_GROUPS=   graphics
+PKG_OPTIONS_GROUP.graphics=    opengl
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if !empty(MACHINE_ARCH:M*arm*)
+PKG_OPTIONS_GROUP.graphics+=   rpi
+.endif
+
+.if !empty(MACHINE_ARCH:Mearm*) && ${OPSYS} == "NetBSD"
+PKG_SUGGESTED_OPTIONS+=                rpi
+.else
+PKG_SUGGESTED_OPTIONS+=                opengl
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mopengl)
+MAKE_FLAGS+=   HAVE_OIT=1
+.include "../../graphics/MesaLib/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mrpi)
+MAKE_FLAGS+=   GLES=1
+MAKE_FLAGS+=   GL_LIB="-lbrcmGLESv2"
+.include "../../misc/raspberrypi-userland/buildlink3.mk"
+.endif
diff -r 4669f4fb745b -r d1105154ab4f emulators/libretro-reicast/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-reicast/patches/patch-Makefile Sat Oct 13 17:02:16 2018 +0000
@@ -0,0 +1,71 @@
+$NetBSD: patch-Makefile,v 1.1 2018/10/13 17:02:17 nia Exp $
+
+Don't override pkgsrc-set variables.
+
+Don't make assumptions based on uname.
+
+--- Makefile.orig      2018-10-12 17:39:34.000000000 +0000
++++ Makefile
+@@ -20,19 +20,6 @@ HAVE_CHD      := 1
+ 
+ TARGET_NAME   := reicast
+ 
+-CXX      = ${CC_PREFIX}g++
+-CC       = ${CC_PREFIX}gcc
+-CC_AS    = ${CC_PREFIX}as
+-
+-MFLAGS   := 
+-ASFLAGS  := 
+-LDFLAGS  :=
+-LDFLAGS_END :=
+-INCFLAGS :=
+-LIBS     :=
+-CFLAGS   := 
+-CXXFLAGS :=
+-
+ GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
+ ifneq ($(GIT_VERSION)," unknown")
+       CXXFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
+@@ -42,15 +29,6 @@ UNAME=$(shell uname -a)
+ 
+ LIBRETRO_DIR := .
+ 
+-# Cross compile ?
+-
+-ifeq (,$(ARCH))
+-      ARCH = $(shell uname -m)
+-endif
+-
+-# Target Dynarec
+-WITH_DYNAREC = $(ARCH)
+-
+ ifeq ($(ARCH), $(filter $(ARCH), i386 i686))
+       WITH_DYNAREC = x86
+ endif
+@@ -635,7 +613,7 @@ RZDCY_CXXFLAGS += $(CORE_DEFINES)
+ CFLAGS         += $(CORE_DEFINES)
+ CXXFLAGS       += $(CORE_DEFINES)
+ 
+-CFLAGS   += $(OPTFLAGS) -c
++CFLAGS   += -c
+ CFLAGS   += -fno-strict-aliasing -ffast-math
+ CXXFLAGS += -fno-rtti -fpermissive -fno-operator-names
+ LIBS     += -lm 
+@@ -682,14 +660,14 @@ $(TARGET): $(OBJECTS)
+ ifeq ($(STATIC_LINKING), 1)
+       $(AR) rcs $@ $(OBJECTS)
+ else
+-      $(LD) $(MFLAGS) $(fpic) $(SHARED) $(LDFLAGS) $(OBJECTS) $(LDFLAGS_END) $(GL_LIB) $(LIBS) -o $@
++      $(LD) $(fpic) $(SHARED) $(LDFLAGS) $(OBJECTS) $(LDFLAGS_END) $(GL_LIB) $(LIBS) -o $@
+ endif
+ 
+ %.o: %.cpp
+-      $(CXX) $(INCFLAGS) $(CFLAGS) $(MFLAGS) $(CXXFLAGS) $< -o $@
++      $(CXX) $(INCFLAGS) $(CFLAGS) $(CXXFLAGS) $< -o $@
+       
+ %.o: %.c
+-      $(CC) $(INCFLAGS) $(CFLAGS) $(MFLAGS) $< -o $@
++      $(CC) $(INCFLAGS) $(CFLAGS) $< -o $@
+ 
+ %.o: %.S
+       $(CC_AS) $(ASFLAGS) $(INCFLAGS) $< -o $@
diff -r 4669f4fb745b -r d1105154ab4f emulators/libretro-reicast/patches/patch-core_hw_sh4_dyna_driver.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-reicast/patches/patch-core_hw_sh4_dyna_driver.cpp      Sat Oct 13 17:02:16 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-core_hw_sh4_dyna_driver.cpp,v 1.1 2018/10/13 17:02:17 nia Exp $
+
+Add support for NetBSD.
+
+--- core/hw/sh4/dyna/driver.cpp.orig   2018-10-12 17:39:34.000000000 +0000
++++ core/hw/sh4/dyna/driver.cpp
+@@ -34,7 +34,8 @@ u8 SH4_TCB[CODE_SIZE+4096]
+ #if defined(_WIN32) || FEAT_SHREC != DYNAREC_JIT
+       ;
+ #elif defined(__linux__) || defined(__HAIKU__) || \
+-      defined(__FreeBSD__) || defined(__DragonFly__)
++      defined(__FreeBSD__) || defined(__DragonFly__) || \
++      defined(__NetBSD__)
+       __attribute__((section(".text")));
+ #elif defined(__MACH__)
+       __attribute__((section("__TEXT,.text")));
diff -r 4669f4fb745b -r d1105154ab4f emulators/libretro-reicast/patches/patch-core_libretro_common.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-reicast/patches/patch-core_libretro_common.cpp Sat Oct 13 17:02:16 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-core_libretro_common.cpp,v 1.1 2018/10/13 17:02:17 nia Exp $
+
+Add support for NetBSD.
+
+--- core/libretro/common.cpp.orig      2018-10-12 17:39:34.000000000 +0000
++++ core/libretro/common.cpp
+@@ -342,7 +342,7 @@ static void sigill_handler(int sn, sigin
+ #endif
+ 
+ #if defined(__MACH__) || defined(__linux__) || defined(__HAIKU__) || \
+-   defined(__FreeBSD__) || defined(__DragonFly__)
++   defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
+ //#define LOG_SIGHANDLER
+ 
+ static void signal_handler(int sn, siginfo_t * si, void *segfault_ctx)



Home | Main Index | Thread Index | Old Index