diff --git a/media-video/mplayer/mplayer-1.3.0.recipe b/media-video/mplayer/mplayer-1.3.0.recipe index 347ebcfff..bcb088609 100644 --- a/media-video/mplayer/mplayer-1.3.0.recipe +++ b/media-video/mplayer/mplayer-1.3.0.recipe @@ -22,7 +22,7 @@ DVD subtitles (SPU streams, VOBsub and Closed Captions) are supported as well." HOMEPAGE="http://www.mplayerhq.hu/" COPYRIGHT="2001-2016 The MPlayer Team" LICENSE="GNU LGPL v2.1" -REVISION="4" +REVISION="5" SOURCE_URI="http://www.mplayerhq.hu/MPlayer/releases/MPlayer-$portVersion.tar.xz" CHECKSUM_SHA256="3ad0846c92d89ab2e4e6fb83bf991ea677e7aa2ea775845814cbceb608b09843" SOURCE_DIR="MPlayer-$portVersion" diff --git a/media-video/mplayer/patches/mplayer_x86-1.3.0.patchset b/media-video/mplayer/patches/mplayer_x86-1.3.0.patchset index 046b5b12d..21c6cdd0f 100644 --- a/media-video/mplayer/patches/mplayer_x86-1.3.0.patchset +++ b/media-video/mplayer/patches/mplayer_x86-1.3.0.patchset @@ -1400,3 +1400,55 @@ index 0000000..614c8ff -- 2.10.2 +From 38ddddaa2dd35b98fdbdaf063163cf28e288dea6 Mon Sep 17 00:00:00 2001 +From: Damillora +Date: Sun, 24 Dec 2017 13:13:40 +0700 +Subject: Put settings to user settings folder + + +diff --git a/path.c b/path.c +index b8d9335..a98f43b 100644 +--- a/path.c ++++ b/path.c +@@ -42,6 +42,11 @@ + #include + #endif + ++#ifdef __HAIKU__ ++#include ++#include ++#endif ++ + #include "osdep/osdep.h" + + char *get_path(const char *filename){ +@@ -51,6 +56,13 @@ char *get_path(const char *filename){ + char *buff; + #ifdef __MINGW32__ + const char *config_dir = "/mplayer"; ++#elif defined(__HAIKU__) ++ dev_t volume = dev_for_path("/boot"); ++ char buffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH]; ++ status_t result; ++ result = find_directory(B_USER_SETTINGS_DIRECTORY,volume,false,buffer,sizeof(buffer)); ++ strcat(buffer,"/mplayer"); ++ const char *config_dir = &buffer; + #else + const char *config_dir = "/.mplayer"; + #endif +@@ -94,6 +106,12 @@ char *get_path(const char *filename){ + else config_dir++; + #endif + } ++#ifdef __HAIKU__ ++ // As the home directory path is already on the ++ // find_directory call above, we empty the homedir ++ // variable ++ homedir = ""; ++#endif + len = strlen(homedir) + strlen(config_dir) + 1; + if (filename == NULL) { + if ((buff = malloc(len)) == NULL) +-- +2.14.2 +