Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 396870 Details for
Bug 540572
StepMania 5.0.6 ebuild
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/01_all_extdatadir.patch
01_all_extdatadir.patch (text/plain), 5.52 KB, created by
Andrew Udvare
on 2015-02-18 20:20:50 UTC
(
hide
)
Description:
files/01_all_extdatadir.patch
Filename:
MIME Type:
Creator:
Andrew Udvare
Created:
2015-02-18 20:20:50 UTC
Size:
5.52 KB
patch
obsolete
>diff -r 23cf2445ee5d autoconf/m4/ax_define_dir.m4 >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/autoconf/m4/ax_define_dir.m4 Sat Jan 14 10:52:30 2012 +0200 >@@ -0,0 +1,49 @@ >+# =========================================================================== >+# http://www.gnu.org/software/autoconf-archive/ax_define_dir.html >+# =========================================================================== >+# >+# SYNOPSIS >+# >+# AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) >+# >+# DESCRIPTION >+# >+# This macro sets VARNAME to the expansion of the DIR variable, taking >+# care of fixing up ${prefix} and such. >+# >+# VARNAME is then offered as both an output variable and a C preprocessor >+# symbol. >+# >+# Example: >+# >+# AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) >+# >+# LICENSE >+# >+# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz> >+# Copyright (c) 2008 Andreas Schwab <schwab@suse.de> >+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> >+# Copyright (c) 2008 Alexandre Oliva >+# >+# Copying and distribution of this file, with or without modification, are >+# permitted in any medium without royalty provided the copyright notice >+# and this notice are preserved. This file is offered as-is, without any >+# warranty. >+ >+#serial 6 >+ >+AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR]) >+AC_DEFUN([AX_DEFINE_DIR], [ >+ prefix_NONE= >+ exec_prefix_NONE= >+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix >+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix >+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn >+dnl refers to ${prefix}. Thus we have to use `eval' twice. >+ eval ax_define_dir="\"[$]$2\"" >+ eval ax_define_dir="\"$ax_define_dir\"" >+ AC_SUBST($1, "$ax_define_dir") >+ AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3]) >+ test "$prefix_NONE" && prefix=NONE >+ test "$exec_prefix_NONE" && exec_prefix=NONE >+]) >diff -r 23cf2445ee5d configure.ac >--- a/configure.ac Fri Jan 13 00:39:56 2012 -0500 >+++ b/configure.ac Sat Jan 14 10:52:30 2012 +0200 >@@ -134,6 +134,11 @@ > CXXFLAGS="$CXXFLAGS -msse2" > fi > >+AC_ARG_WITH(extdatadir, AC_HELP_STRING([--with-extdatadir], [Search Songs etc. from the configured DATADIR]), with_extdatadr=$withval, with_extdatadir=no) >+if test "$with_extdatadir" = "yes"; then >+ AX_DEFINE_DIR([EXT_DATADIR], [datadir], [External datadir]) >+fi >+ > AC_ARG_WITH(prof, AS_HELP_STRING([--with-prof],[Enable profiling]), with_prof=$withval, with_prof=no) > if test "$with_prof" = "yes"; then > test "$DEFAULT_CFLAGS" = "yes" && CFLAGS="$CFLAGS -pg" >diff -r 23cf2445ee5d src/arch/ArchHooks/ArchHooks_Unix.cpp >--- a/src/arch/ArchHooks/ArchHooks_Unix.cpp Fri Jan 13 00:39:56 2012 -0500 >+++ b/src/arch/ArchHooks/ArchHooks_Unix.cpp Sat Jan 14 10:52:30 2012 +0200 >@@ -269,15 +269,28 @@ > * (Deprecated; use rootfs.) */ > FILEMAN->Mount( "dir", "/proc", "/proc" ); > #endif >+ // Get Lower case product family >+ RString sProductFamily = PRODUCT_FAMILY; >+ sProductFamily.MakeLower(); > > RString Root; > struct stat st; >+ >+#if defined(EXT_DATADIR) >+ // Search folders at EXT_DATADIR >+ RString ext_dir = EXT_DATADIR + RString("/") + sProductFamily; >+ if( !stat(ext_dir + "/Packages", &st) && st.st_mode&S_IFDIR ) >+ Root = ext_dir; >+ else if( !stat(ext_dir + "/Songs", &st) && st.st_mode&S_IFDIR ) >+ Root = ext_dir; >+#else > if( !stat(sDirOfExecutable + "/Packages", &st) && st.st_mode&S_IFDIR ) > Root = sDirOfExecutable; > else if( !stat(sDirOfExecutable + "/Songs", &st) && st.st_mode&S_IFDIR ) > Root = sDirOfExecutable; > else if( !stat(RageFileManagerUtil::sInitialWorkingDirectory + "/Songs", &st) && st.st_mode&S_IFDIR ) > Root = RageFileManagerUtil::sInitialWorkingDirectory; >+#endif > else > RageException::Throw( "%s", COULDNT_FIND_SONGS.GetValue().c_str() ); > >diff -r 23cf2445ee5d src/arch/LoadingWindow/LoadingWindow_Gtk.cpp >--- a/src/arch/LoadingWindow/LoadingWindow_Gtk.cpp Fri Jan 13 00:39:56 2012 -0500 >+++ b/src/arch/LoadingWindow/LoadingWindow_Gtk.cpp Sat Jan 14 10:52:30 2012 +0200 >@@ -1,4 +1,5 @@ > #include "global.h" >+#include "ProductInfo.h" > #include "RageLog.h" > #include "RageFileManager.h" > #include "RageUtil.h" >@@ -29,7 +30,12 @@ > { > ASSERT( Handle == NULL ); > >- Handle = dlopen( RageFileManagerUtil::sDirOfExecutable + "/" + "GtkModule.so", RTLD_NOW ); >+ #if defined(EXT_DATADIR) >+ Handle = dlopen( EXT_DATADIR + RString("/") + RString(PRODUCT_FAMILY).MakeLower() + "/" + "GtkModule.so", RTLD_NOW ); >+ #else >+ Handle = dlopen( RageFileManagerUtil::sDirOfExecutable + "/" + "GtkModule.so", RTLD_NOW ); >+ #endif >+ > if( Handle == NULL ) > return ssprintf( "dlopen(): %s", dlerror() ); > >diff -r 23cf2445ee5d src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp >--- a/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp Fri Jan 13 00:39:56 2012 -0500 >+++ b/src/arch/LoadingWindow/LoadingWindow_GtkModule.cpp Sat Jan 14 10:52:30 2012 +0200 >@@ -1,4 +1,5 @@ > #include "global.h" >+#include "ProductInfo.h" > #include "LoadingWindow_GtkModule.h" > #include "RageUtil.h" > #include "RageSurface.h" >@@ -15,7 +16,19 @@ > extern "C" const char *Init( int *argc, char ***argv ) > { > // Need to use external library to load this image. Native loader seems broken :/ >+#if defined(EXT_DATADIR) >+ gchar splash_image_path[50] = EXT_DATADIR; >+ gchar product[] = PRODUCT_FAMILY; >+ int i,plen = strlen(product); >+ for (i = 0; i < plen; i++) >+ product[i] = tolower(product[i]); >+ strcat(splash_image_path,"/"); >+ strcat(splash_image_path,product); >+ strcat(splash_image_path,"/Data/splash.png"); >+#else > const gchar *splash_image_path = "Data/splash.png"; >+#endif >+ > GtkWidget *vbox; > > gtk_disable_setlocale();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 540572
:
396866
|
396868
| 396870 |
396872
|
396874