summarylogtreecommitdiffstats
path: root/fvwm-themes.patch
diff options
context:
space:
mode:
authorBrian Bidulock2015-06-10 05:31:05 -0600
committerBrian Bidulock2015-06-10 05:31:05 -0600
commitc22030def718ae632a114a4c8e3d3a6543b2b98f (patch)
tree225eeebf276055efa8a9bd1e832eb663dd16d1d7 /fvwm-themes.patch
downloadaur-fvwm-themes.tar.gz
initial version
Diffstat (limited to 'fvwm-themes.patch')
-rw-r--r--fvwm-themes.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/fvwm-themes.patch b/fvwm-themes.patch
new file mode 100644
index 000000000000..19e1b2bae873
--- /dev/null
+++ b/fvwm-themes.patch
@@ -0,0 +1,65 @@
+diff -up src/fvwm-themes-0.7.0/bin/fvwm-themes-config.in.orig src/fvwm-themes-0.7.0/bin/fvwm-themes-config.in
+--- src/fvwm-themes-0.7.0/bin/fvwm-themes-config.in.orig 2003-10-20 08:45:50.000000000 -0600
++++ src/fvwm-themes-0.7.0/bin/fvwm-themes-config.in 2013-09-06 19:47:29.000000000 -0600
+@@ -275,7 +275,7 @@ sub getExpandedRc ($) {
+ my $file = shift;
+ ### should detect infinitive loops?
+ if (!-f $file) {
+- foreach (@searchPath) {
++ foreach (@searchPath, "$ROOT_PREFIX$ftDataDir") {
+ if (-f "$_/$file") { $file = "$_/$file"; last; }
+ }
+ }
+@@ -311,7 +311,7 @@ sub searchThemeCfgIncludeFile ($$) {
+ unshift @subDirs, ".";
+ }
+ my $dir;
+- foreach $dir (@searchPath) {
++ foreach $dir (@searchPath, "$ROOT_PREFIX$ftDataDir") {
+ foreach (@subDirs) {
+ my $file = "$dir/$themesSubDir/$_/$file";
+ return $file if -f $file;
+@@ -656,7 +656,7 @@ sub parseComponentName ($) {
+ sub getThemeDir ($) {
+ my $theme = shift;
+ my $dir;
+- foreach $dir (@searchPath) {
++ foreach $dir (@searchPath, "$ROOT_PREFIX$ftDataDir") {
+ my $dir = "$dir/$themesSubDir/$theme";
+ return $dir if -d $dir;
+ }
+@@ -966,6 +966,7 @@ sub new ($$;$$) {
+ $readFile = "$dir/$component";
+ $readFile .= ".d" if -d "$readFile.d" && !-e $readFile;
+ $readFile .= "/$mainDirFile" if -d $readFile;
++ $readFile =~ s{^$ROOT_PREFIX}{};
+ }
+ $cc->{'read-file'} = $readFile;
+ }
+@@ -1444,6 +1445,7 @@ sub getOwnThemeSubMenusRc ($) {
+ }
+ my $readFile = $cc->{'read-file'};
+ $readFile =~ s:/[^/]+$:/$variants->[$index]->{'file'}:;
++ $readFile =~ s{^$ROOT_PREFIX}{};
+ if ($readFile ne $cc->{'read-file'}) {
+ $cc->{'read-file'} = $readFile;
+ $self->setModified();
+@@ -2285,7 +2287,9 @@ Read @$rcFile2@
+ saveFile("$workDir/$rcFile", \$contents);
+
+ my $imagePath = "$workDir/$currentThemeSubDir/images:$workDir/images";
++ $imagePath =~ s{^$ROOT_PREFIX}{};
+ $imagePath .= ":$siteDir/images" if $workDir ne $siteDir;
++ $imagePath =~ s{:$ROOT_PREFIX}{:};
+ $imagePath .= ":$fvwmDefaultImagePath" if $fvwmDefaultImagePath;
+ $imagePath =~ s=(^|:)\Q$userDir\E(/|:|$)=$1\$FVWM_USERDIR$2=g;
+ $imagePath =~ s=(^|:)\Q$userHome\E(/|:|$)=$1\$HOME$2=g;
+@@ -2402,7 +2406,7 @@ GetOptions(
+ ) || wrongUsage();
+
+ shift @searchPath if $site;
+-$workDir = $searchPath[0];
++$workDir = "$ROOT_PREFIX$searchPath[0]";
+ $siteDir = $searchPath[-1];
+
+ if ($install) {