From 5106b42b771bec1b3aae2a992b37fa5aa6101bd4 Mon Sep 17 00:00:00 2001 From: Benjamin FRANCOIS Date: Thu, 8 Mar 2018 01:27:29 -0800 Subject: [PATCH] RetroArch: bump to 1.7.1 (#2260) * Define GLOBAL_WRITABLE_FILES and USER_SETTINGS_FILES. * Set sane default paths for various configuration parameters to make the "Online Updater" > "Content Downloader" menu work. --- .../patches/retroarch-1.0.0.3_beta.patchset | 35 ------- .../retroarch/retroarch-1.0.0.3_beta.recipe | 74 --------------- .../retroarch/retroarch-1.7.1.recipe | 94 +++++++++++++++++++ 3 files changed, 94 insertions(+), 109 deletions(-) delete mode 100644 games-emulation/retroarch/patches/retroarch-1.0.0.3_beta.patchset delete mode 100644 games-emulation/retroarch/retroarch-1.0.0.3_beta.recipe create mode 100644 games-emulation/retroarch/retroarch-1.7.1.recipe diff --git a/games-emulation/retroarch/patches/retroarch-1.0.0.3_beta.patchset b/games-emulation/retroarch/patches/retroarch-1.0.0.3_beta.patchset deleted file mode 100644 index 33669b03f..000000000 --- a/games-emulation/retroarch/patches/retroarch-1.0.0.3_beta.patchset +++ /dev/null @@ -1,35 +0,0 @@ -From 4a135acf9cafd827f1a59ecdf268253848ca80b7 Mon Sep 17 00:00:00 2001 -From: Puck Meerburg -Date: Sat, 17 Jan 2015 18:58:21 +0100 -Subject: FFMPEG record driver: Fix Haiku build - - -diff --git a/record/ffmpeg.c b/record/ffmpeg.c -index f0099e0..6f17aa4 100644 ---- a/record/ffmpeg.c -+++ b/record/ffmpeg.c -@@ -27,7 +27,9 @@ extern "C" { - #include - #include - #include -+#ifndef __HAIKU__ - #include -+#endif - #include - #ifdef HAVE_AV_CHANNEL_LAYOUT - #include -@@ -56,7 +58,10 @@ extern "C" { - #include - #endif - --#if LIBAVUTIL_VERSION_INT <= AV_VERSION_INT(52, 9, 0) -+#if defined(__HAIKU__) -+#define av_frame_alloc avcodec_alloc_frame -+#define av_frame_free av_free -+#elif LIBAVUTIL_VERSION_INT <= AV_VERSION_INT(52, 9, 0) - #define av_frame_alloc avcodec_alloc_frame - #define av_frame_free avcodec_free_frame - #endif --- -1.8.3.4 - diff --git a/games-emulation/retroarch/retroarch-1.0.0.3_beta.recipe b/games-emulation/retroarch/retroarch-1.0.0.3_beta.recipe deleted file mode 100644 index 280a7e7e9..000000000 --- a/games-emulation/retroarch/retroarch-1.0.0.3_beta.recipe +++ /dev/null @@ -1,74 +0,0 @@ -SUMMARY="The reference frontend of libretro" -DESCRIPTION="RetroArch is a frontend for the libretro specification for \ -emulation. Libretro supports easy creation of emulators, but people can also \ -make their own frontends and plug existing emulators. It also supports OpenGL \ -shaders and other cool stuff." -HOMEPAGE="https://libretro.com" -COPYRIGHT="2010-2015 The RetroArch Team" -LICENSE="GNU GPL v3" -REVISION="2" -SOURCE_URI="https://github.com/libretro/RetroArch/archive/1.0.0.3-beta.tar.gz" -CHECKSUM_SHA256="bd5be24d81c214db036b756e222f5a8e5cddd3e1c1a2a98180317673c0ca0cc7" -SOURCE_DIR="RetroArch-1.0.0.3-beta" -PATCHES="retroarch-1.0.0.3_beta.patchset" - -ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - retroarch$secondaryArchSuffix = $portVersion - app:retroarch$secondaryArchSuffix = $portVersion - cmd:retroarch$secondaryArchSuffix = $portVersion - cmd:retroarch_joyconfig$secondaryArchSuffix = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libsdl2_2.0$secondaryArchSuffix - lib:libGL$secondaryArchSuffix - ffmpeg$secondaryArchSuffix - " - -PROVIDES_devel=" - retroarch${secondaryArchSuffix}_devel = $portVersion - devel:retroarch$secondaryArchSuffix = $portVersion - " -REQUIRES_devel=" - haiku${secondaryArchSuffix}_devel - retroarch$secondaryArchSuffix == $portVersion base - ffmpeg${secondaryArchSuffix}_devel - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - devel:libsdl2_2.0$secondaryArchSuffix - devel:libgl$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - cmd:make - cmd:which - cmd:pkg_config$secondaryArchSuffix - cmd:gcc$secondaryArchSuffix - " - -BUILD() -{ - ./configure - make $jobArgs -} - -INSTALL() -{ - mkdir -p $appsDir/RetroArch - mkdir -p $binDir - mkdir -p $includeDir - - cp retroarch $appsDir/RetroArch - cp tools/retroarch-joyconfig $appsDir/RetroArch - - symlinkRelative -s $appsDir/RetroArch/* $binDir - addAppDeskbarSymlink $appsDir/RetroArch/retroarch RetroArch - - cp libretro.h $includeDir - packageEntries devel \ - $developDir -} diff --git a/games-emulation/retroarch/retroarch-1.7.1.recipe b/games-emulation/retroarch/retroarch-1.7.1.recipe new file mode 100644 index 000000000..6c9f36c27 --- /dev/null +++ b/games-emulation/retroarch/retroarch-1.7.1.recipe @@ -0,0 +1,94 @@ +SUMMARY="The reference frontend of libretro" +DESCRIPTION="RetroArch is a frontend for emulators, game engines and media \ +players. It enables you to run classic games on a wide range of computers and \ +consoles through its slick graphical interface. It has advanced features like \ +shaders, netplay, rewinding, next-frame response times, and more!" +HOMEPAGE="https://libretro.com/" +COPYRIGHT="2010-2018 The RetroArch Team" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/libretro/RetroArch/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="e9189c7da6b2ca0142528eca14f26104ee322f052f8609203d90b60938d8d3f3" +SOURCE_FILENAME="retroarch-$portVersion.tar.gz" +SOURCE_DIR="RetroArch-$portVersion" + +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +GLOBAL_WRITABLE_FILES=" + $relativeSettingsDir/retroarch.cfg auto-merge + " + +USER_SETTINGS_FILES=" + $relativeSettingsDir/retroarch/retroarch.cfg template \ + $sysconfDir/retroarch.cfg + " + +PROVIDES=" + retroarch$secondaryArchSuffix = $portVersion + app:retroarch$secondaryArchSuffix = $portVersion + cmd:retroarch$secondaryArchSuffix = $portVersion + cmd:retroarch_cg2glsl$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libsdl2_2.0$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix + lib:libavformat$secondaryArchSuffix + lib:libavdevice$secondaryArchSuffix + lib:libswresample$secondaryArchSuffix + lib:libavresample$secondaryArchSuffix + lib:libavutil$secondaryArchSuffix + lib:libswscale$secondaryArchSuffix + retroarch_assets + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libsdl2$secondaryArchSuffix + devel:libgl$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:which + " + +PATCH() +{ + libretroDir="`finddir B_SYSTEM_DIRECTORY`/$relativeAddOnsDir/libretro" + assetsDir="`finddir B_SYSTEM_DATA_DIRECTORY`/retroarch/assets" + cacheDir="`finddir B_SYSTEM_CACHE_DIRECTORY`/retroarch" + contentDir="`finddir B_SYSTEM_VAR_DIRECTORY`/retroarch" + coreAssetsDir="`finddir B_SYSTEM_VAR_DIRECTORY`/retroarch/assets" + sed -i \ + -e "s|^# \(libretro_directory =\)|\1 \"$libretroDir/\"|;" \ + -e "s|^# \(libretro_info_path =\)|\1 \"$libretroDir/\"|;" \ + -e "s|^# \(assets_directory =\)|\1 \"$assetsDir/\"|;" \ + -e "s|^# \(cache_directory =\)|\1 \"$cacheDir/\"|;" \ + -e "s|^# \(content_directory =\)|\1 \"$contentDir/\"|;" \ + -e "s|^# \(core_assets_directory =\)|\1 \"$coreAssetsDir/\"|;" \ + retroarch.cfg +} + +BUILD() +{ + ./configure --prefix="$prefix" --global-config-dir="$sysconfDir" \ + --bindir="$appsDir" --datarootdir="$dataRootDir" \ + --docdir="$docDir" --mandir="$manDir" \ + --with-assets_dir="$dataDir" + make $jobArgs +} + +INSTALL() +{ + make install + addAppDeskbarSymlink "$appsDir"/retroarch RetroArch + install -m 0755 -d "$dataDir"/retroarch + install -m 0644 -T retroarch.cfg "$settingsDir"/retroarch.cfg + install -m 0644 -T retroarch.cfg "$dataDir"/retroarch/retroarch.cfg.default +}