diff --git a/media-libs/libsdl/libsdl-1.2.15.recipe b/media-libs/libsdl/libsdl-1.2.15.recipe index 7c43ad69c..01bdf1649 100644 --- a/media-libs/libsdl/libsdl-1.2.15.recipe +++ b/media-libs/libsdl/libsdl-1.2.15.recipe @@ -5,7 +5,7 @@ joystick, and graphics via OpenGL." HOMEPAGE="http://www.libsdl.org/" COPYRIGHT="1997-2012 Sam Lantinga" LICENSE="GNU LGPL v2.1" -REVISION="9" +REVISION="10" SOURCE_URI="http://www.libsdl.org/release/SDL-1.2.15.tar.gz" CHECKSUM_SHA256="d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00" SOURCE_DIR="SDL-$portVersion" diff --git a/media-libs/libsdl/patches/libsdl-1.2.15.patchset b/media-libs/libsdl/patches/libsdl-1.2.15.patchset index f00d15095..b5309d1aa 100644 --- a/media-libs/libsdl/patches/libsdl-1.2.15.patchset +++ b/media-libs/libsdl/patches/libsdl-1.2.15.patchset @@ -501,3 +501,55 @@ index 818d1a0..0100f3b 100644 -- 2.2.2 + +From d7ef3da5dc491445e50eb4f915d00d7d4b722fe4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Mon, 11 Jul 2016 15:08:06 +0200 +Subject: Try to find correct application signature from app resources + +Instead of always hardcoding application/x-SDL-executable. + +diff --git a/src/main/beos/SDL_BeApp.cc b/src/main/beos/SDL_BeApp.cc +index 8b79377..65a6dbf 100644 +--- a/src/main/beos/SDL_BeApp.cc ++++ b/src/main/beos/SDL_BeApp.cc +@@ -24,8 +24,10 @@ + /* Handle the BeApp specific portions of the application */ + + #include ++#include + #include + #include ++#include + #include + + #include "SDL_BeApp.h" +@@ -42,7 +44,24 @@ static int StartBeApp(void *unused) + if(!be_app) { + BApplication *App; + +- App = new BApplication("application/x-SDL-executable"); ++ // default application signature ++ const char *signature = "application/x-SDL-executable"; ++ // dig resources for correct signature ++ image_info info; ++ int32 cookie = 0; ++ if (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) { ++ BFile f(info.name, O_RDONLY); ++ if (f.InitCheck() == B_OK) { ++ BAppFileInfo app_info(&f); ++ if (app_info.InitCheck() == B_OK) { ++ char sig[B_MIME_TYPE_LENGTH]; ++ if (app_info.GetSignature(sig) == B_OK) ++ signature = strndup(sig, B_MIME_TYPE_LENGTH); ++ } ++ } ++ } ++ ++ App = new BApplication(signature); + + App->Run(); + delete App; +-- +2.8.0 +