mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
mednaffe, new recipe, move mednafen to right path (#7029)
This commit is contained in:
@@ -27,10 +27,11 @@ documentation for more details): \
|
||||
HOMEPAGE="http://mednafen.fobby.net/"
|
||||
COPYRIGHT="2005-2022 Mednafen Team"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="http://mednafen.github.io/releases/files/mednafen-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="da3fbcf02877f9be0f028bfa5d1cb59e953a4049b90fe7e39388a3386d9f362e"
|
||||
SOURCE_DIR="mednafen"
|
||||
PATCHES="mednafen-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?all !x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86"
|
||||
22
games-emulation/mednafen/patches/mednafen-1.29.0.patchset
Normal file
22
games-emulation/mednafen/patches/mednafen-1.29.0.patchset
Normal file
@@ -0,0 +1,22 @@
|
||||
From f03b22e94fd71c6173d88c355145a3188fb3fec8 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sat, 2 Jul 2022 10:55:37 +0200
|
||||
Subject: Stores settings in ~/config/settings/mednafen
|
||||
|
||||
|
||||
diff --git a/src/drivers/main.cpp b/src/drivers/main.cpp
|
||||
index a6f7db2..6278729 100644
|
||||
--- a/src/drivers/main.cpp
|
||||
+++ b/src/drivers/main.cpp
|
||||
@@ -1456,7 +1456,7 @@ std::string GetBaseDirectory(void)
|
||||
|
||||
ol = getenv("HOME");
|
||||
if(ol)
|
||||
- return std::string(ol) + PSS + ".mednafen";
|
||||
+ return std::string(ol) + PSS + "config/settings/mednafen";
|
||||
|
||||
#if defined(HAVE_GETUID) && defined(HAVE_GETPWUID)
|
||||
{
|
||||
--
|
||||
2.36.1
|
||||
|
||||
32
games-emulation/mednaffe/additional-files/mednaffe.rdef.in
Normal file
32
games-emulation/mednaffe/additional-files/mednaffe.rdef.in
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "@APP_NAME@",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource vector_icon {
|
||||
$"6E63696604020112020000003B1906BDCE9B00000049D2014B20D10000FFFF00"
|
||||
$"00020106020000003DEC56BDEC5100000049E13F480189008FB1DCFF3465A403"
|
||||
$"204A870200120239F37D3E5955BE595539F37D4465034BBA6100FFFFFFFF0004"
|
||||
$"0606FF07CB4FC6F1CB4FC6F1CB4FC9ABBF2DCBE1C5E1CBE1B879CBE1B30AC6F1"
|
||||
$"B30AC9ABB30AC437BF2DC201B879C201C5E1C201CB4FC6F1CB4FC437CB4FC6F1"
|
||||
$"C6F10606FF07C9F0BF59C9F0BF59C9F0C530BF5EC9EBC534C9EBB987C9EBB4CB"
|
||||
$"BF59B4CBC530B4CBB983BF5EB4C7B987B4C7C534B4C7C9F0BF59C9F0B983C9F0"
|
||||
$"BF59BF590606FF07C9F0BF59C9F0BF59C9F0C530BF5EC9EBC534C9EBB987C9EB"
|
||||
$"B4CBBF59B4CBC530B4CBB983BF5EB4C7B987B4C7C534B4C7C9F0BF59C9F0B983"
|
||||
$"C9F0BF59BF590606FF07C95BBF59C95BBF59C95BC4DDBF5EC956C4E2C956B9D9"
|
||||
$"C956B560BF59B560C4DDB560B9D5BF5EB55CB9D9B55CC4E2B55CC95BBF59C95B"
|
||||
$"B9D5C95BBF59BF59040A000100000A010101000A0201021001178100040A0301"
|
||||
$"03100117810004"
|
||||
};
|
||||
97
games-emulation/mednaffe/mednaffe-0.9.2.recipe
Normal file
97
games-emulation/mednaffe/mednaffe-0.9.2.recipe
Normal file
@@ -0,0 +1,97 @@
|
||||
SUMMARY="Front-end (GUI) for mednafen emulator"
|
||||
DESCRIPTION="Mednaffe is a front-end (GUI) for mednafen emulator.
|
||||
|
||||
Its main features are:
|
||||
|
||||
* It is written in C language.
|
||||
* Available for Linux and Windows.
|
||||
* The only dependency is GTK+3.
|
||||
* GPLv3 licensed."
|
||||
HOMEPAGE="https://github.com/AmatCoder/mednaffe"
|
||||
COPYRIGHT="2013-2021 AmatCoder"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/archive/refs/tags/0.9.2.tar.gz"
|
||||
CHECKSUM_SHA256="94e5f6fb412657cd8abab20571d4455a47ff8b7afe2ac59ec96aa150f4d1eba8"
|
||||
SOURCE_FILENAME="mednaffe-$portVersion.tar.gz"
|
||||
PATCHES="mednaffe-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="mednaffe.rdef.in"
|
||||
|
||||
ARCHITECTURES="?all !x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
PROVIDES="
|
||||
mednaffe$secondaryArchSuffix = $portVersion
|
||||
app:Mednaffe = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:mednafen$secondaryArchSuffix
|
||||
lib:libatk_1.0$secondaryArchSuffix
|
||||
lib:libcairo$secondaryArchSuffix
|
||||
lib:libcairo_gobject$secondaryArchSuffix
|
||||
lib:libgdk_pixbuf_2.0$secondaryArchSuffix
|
||||
lib:libgdk_3$secondaryArchSuffix
|
||||
lib:libgio_2.0$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgobject_2.0$secondaryArchSuffix
|
||||
lib:libgtk_3$secondaryArchSuffix
|
||||
lib:libharfbuzz$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libpango_1.0$secondaryArchSuffix
|
||||
lib:libpangocairo_1.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgdk_3$secondaryArchSuffix
|
||||
devel:libgtk_3$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoreconf
|
||||
cmd:awk
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -fi
|
||||
runConfigure --omit-dirs binDir ./configure \
|
||||
--bindir=$appsDir
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
mv $appsDir/mednaffe $appsDir/Mednaffe
|
||||
|
||||
rm -rf $dataDir/{applications,icons,pixmaps}
|
||||
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local APP_NAME="Mednaffe"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
local APP_SIGNATURE="application/x-vnd.mednaffe"
|
||||
sed \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
-e "s|@APP_NAME@|$APP_NAME|" \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
$portDir/additional-files/mednaffe.rdef.in > mednaffe.rdef
|
||||
|
||||
addResourcesToBinaries mednaffe.rdef $appsDir/Mednaffe
|
||||
addAppDeskbarSymlink $appsDir/Mednaffe
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
22
games-emulation/mednaffe/patches/mednaffe-0.9.2.patchset
Normal file
22
games-emulation/mednaffe/patches/mednaffe-0.9.2.patchset
Normal file
@@ -0,0 +1,22 @@
|
||||
From bb711a112c4bffb51e94e9d2beeba01d1082fd31 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sat, 2 Jul 2022 14:58:02 +0200
|
||||
Subject: Look for mednafen.cfg in ~/config/settings/mednafen
|
||||
|
||||
|
||||
diff --git a/src/medprocess.c b/src/medprocess.c
|
||||
index 2646ef8..c11a601 100644
|
||||
--- a/src/medprocess.c
|
||||
+++ b/src/medprocess.c
|
||||
@@ -69,7 +69,7 @@ med_process_get_conf_path (MedProcess* self)
|
||||
const gchar* mh = g_getenv ("MEDNAFEN_HOME");
|
||||
|
||||
if (mh == NULL)
|
||||
- self->MedConfPath = g_strconcat (g_get_home_dir (), "/.mednafen/mednafen.cfg", NULL);
|
||||
+ self->MedConfPath = g_strconcat (g_get_home_dir (), "/config/settings/mednafen/mednafen.cfg", NULL);
|
||||
else
|
||||
self->MedConfPath = g_strconcat (mh, "/mednafen.cfg", NULL);
|
||||
#endif
|
||||
--
|
||||
2.36.1
|
||||
|
||||
Reference in New Issue
Block a user