diff --git a/emulators/retroarch/Makefile b/emulators/retroarch/Makefile new file mode 100644 index 00000000000..43b9c6c5418 --- /dev/null +++ b/emulators/retroarch/Makefile @@ -0,0 +1,55 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2016/08/05 05:27:52 bentley Exp $ + +COMMENT = generic multi-emulator frontend + +V = 1.3.4 +DISTNAME = retroarch-$V + +CATEGORIES = emulators + +HOMEPAGE = http://www.libretro.com/ + +# GPLv3+ +PERMIT_PACKAGE_CDROM = Yes + +WANTLIB += EGL GL SDL2 X11 X11-xcb Xext Xinerama Xv Xxf86vm ass +WANTLIB += avcodec avformat avutil c drm freetype gbm m openal +WANTLIB += ossaudio pthread swresample swscale usb-1.0 xcb xkbcommon +WANTLIB += z + +GH_ACCOUNT = libretro +GH_PROJECT = RetroArch +GH_TAGNAME = v$V + +MAINTAINER = Anthony J. Bentley + +RUN_DEPENDS = devel/desktop-file-utils +LIB_DEPENDS = audio/openal \ + devel/libusb1 \ + devel/sdl2 \ + graphics/ffmpeg \ + x11/xkbcommon + +MAKE_FLAGS = V=1 \ + HAVE_OSS=0 \ + HAVE_OSS_BSD=0 \ + OPTIMIZE_FLAG= +FAKE_FLAGS = GLOBAL_CONFIG_DIR=${PREFIX}/share/examples + +USE_GMAKE = Yes +CONFIGURE_STYLE = simple +CONFIGURE_ENV = MAN_DIR=${PREFIX}/man/man1 \ + INCLUDE_DIRS="-I${X11BASE}/include" \ + LIBRARY_DIRS="-L${LOCALBASE}/lib -L${X11BASE}/lib" +CONFIGURE_ARGS += --disable-jack \ + --disable-pulse \ + --disable-oss \ + --disable-v4l2 \ + --enable-al + +NO_TEST = Yes + +pre-build: + ${SUBST_CMD} ${WRKSRC}/retroarch.cfg + +.include diff --git a/emulators/retroarch/distinfo b/emulators/retroarch/distinfo new file mode 100644 index 00000000000..0cbe93ec469 --- /dev/null +++ b/emulators/retroarch/distinfo @@ -0,0 +1,2 @@ +SHA256 (retroarch-1.3.4.tar.gz) = pXM6D0rYKK/QD6KgWd62U4k51Goq78SlZsMDAKQO+xw= +SIZE (retroarch-1.3.4.tar.gz) = 11652146 diff --git a/emulators/retroarch/patches/patch-Makefile b/emulators/retroarch/patches/patch-Makefile new file mode 100644 index 00000000000..76a53639bd3 --- /dev/null +++ b/emulators/retroarch/patches/patch-Makefile @@ -0,0 +1,17 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2016/08/05 05:27:52 bentley Exp $ +retroarch-cg2glsl depends on the closed-source NVidia Cg Toolkit, +which will never run on OpenBSD. +--- Makefile.orig Sat Jul 16 00:58:27 2016 ++++ Makefile Sat Jul 16 00:58:34 2016 +@@ -166,11 +166,9 @@ install: $(TARGET) + mkdir -p $(DESTDIR)$(MAN_DIR) 2>/dev/null || /bin/true + mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps 2>/dev/null || /bin/true + install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/bin +- install -m755 tools/cg2glsl.py $(DESTDIR)$(PREFIX)/bin/retroarch-cg2glsl + install -m644 retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg + install -m644 retroarch.desktop $(DESTDIR)$(PREFIX)/share/applications + install -m644 docs/retroarch.1 $(DESTDIR)$(MAN_DIR) +- install -m644 docs/retroarch-cg2glsl.1 $(DESTDIR)$(MAN_DIR) + install -m644 media/retroarch.svg $(DESTDIR)$(PREFIX)/share/pixmaps + + uninstall: diff --git a/emulators/retroarch/patches/patch-audio_audio_driver_c b/emulators/retroarch/patches/patch-audio_audio_driver_c new file mode 100644 index 00000000000..6ea04030399 --- /dev/null +++ b/emulators/retroarch/patches/patch-audio_audio_driver_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-audio_audio_driver_c,v 1.1.1.1 2016/08/05 05:27:52 bentley Exp $ +--- audio/audio_driver.c.orig Fri Jul 15 02:56:47 2016 ++++ audio/audio_driver.c Fri Jul 15 02:56:50 2016 +@@ -97,7 +97,7 @@ static const audio_driver_t *audio_drivers[] = { + &audio_alsathread, + #endif + #endif +-#if defined(HAVE_OSS) || defined(HAVE_OSS_BSD) ++#if 0 + &audio_oss, + #endif + #ifdef HAVE_RSOUND diff --git a/emulators/retroarch/patches/patch-retroarch_cfg b/emulators/retroarch/patches/patch-retroarch_cfg new file mode 100644 index 00000000000..5f1f0ca7e22 --- /dev/null +++ b/emulators/retroarch/patches/patch-retroarch_cfg @@ -0,0 +1,12 @@ +$OpenBSD: patch-retroarch_cfg,v 1.1.1.1 2016/08/05 05:27:52 bentley Exp $ +--- retroarch.cfg.orig Sat Jul 16 00:44:03 2016 ++++ retroarch.cfg Sat Jul 16 00:44:39 2016 +@@ -35,7 +35,7 @@ + # libretro_path = "/path/to/libretro.so" + + # A directory for where to search for libretro core implementations. +-# libretro_directory = ++libretro_directory = "${PREFIX}/lib/libretro" + + # A directory for where to search for libretro core information. + # libretro_info_path = diff --git a/emulators/retroarch/pkg/DESCR b/emulators/retroarch/pkg/DESCR new file mode 100644 index 00000000000..3e278d3fc87 --- /dev/null +++ b/emulators/retroarch/pkg/DESCR @@ -0,0 +1,15 @@ +RetroArch is the reference frontend for the libretro API. Popular examples +of implementations for this API includes videogame system emulators and game +engines, but also more generalized 3D programs. These programs are +instantiated as dynamic libraries, or "libretro cores". + +libretro is an API that exposes generic audio/video/input callbacks. A +frontend for libretro (such as RetroArch) handles video output, audio +output, input and application lifecycle. A libretro core written in portable +C or C++ can run seamlessly on many platforms with very little/no porting +effort. + +RetroArch attempts to be small and lean, while still having all the useful +core features expected from an emulator. It is designed to be very portable +and features a gamepad-centric UI. It also has a full-featured command-line +interface. diff --git a/emulators/retroarch/pkg/PLIST b/emulators/retroarch/pkg/PLIST new file mode 100644 index 00000000000..8d5ea26fd40 --- /dev/null +++ b/emulators/retroarch/pkg/PLIST @@ -0,0 +1,10 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2016/08/05 05:27:52 bentley Exp $ +@bin bin/retroarch +@man man/man1/retroarch.1 +share/applications/retroarch.desktop +share/examples/retroarch.cfg +@sample ${SYSCONFDIR}/retroarch.cfg +share/pixmaps/ +share/pixmaps/retroarch.svg +@exec %D/bin/update-desktop-database +@unexec-delete %D/bin/update-desktop-database