r23337 - gnucash/trunk - Small XDG_DATA_DIRS improvements

Geert Janssens gjanssens at code.gnucash.org
Sat Oct 26 04:56:28 EDT 2013


Author: gjanssens
Date: 2013-10-26 04:56:26 -0400 (Sat, 26 Oct 2013)
New Revision: 23337
Trac: http://svn.gnucash.org/trac/changeset/23337

Modified:
   gnucash/trunk/packaging/win32/gnucash.iss.in
   gnucash/trunk/src/bin/Makefile.am
Log:
Small XDG_DATA_DIRS improvements

- win32: improve iss script to only replace the real XDG_DATA_DIRS path, not the comment
- use $(datadir) instead of $(prefix)/share, for the rare case someone configures with
  --datadir=DIR

Modified: gnucash/trunk/packaging/win32/gnucash.iss.in
===================================================================
--- gnucash/trunk/packaging/win32/gnucash.iss.in	2013-10-26 08:40:06 UTC (rev 23336)
+++ gnucash/trunk/packaging/win32/gnucash.iss.in	2013-10-26 08:56:26 UTC (rev 23337)
@@ -375,7 +375,7 @@
       if (Pos('GNC_DBD_DIR', EnvStrList[iLineCounter]) > 0) then
         EnvStrList[iLineCounter] := 'GNC_DBD_DIR={GNC_HOME}/lib/dbd';
       { Adapt XDG_DATA_DIRS parameter }
-      if (Pos('XDG_DATA_DIRS', EnvStrList[iLineCounter]) > 0) then
+      if (Pos('XDG_DATA_DIRS=', EnvStrList[iLineCounter]) > 0) then
         EnvStrList[iLineCounter] := 'XDG_DATA_DIRS={GNC_HOME}/share;{XDG_DATA_DIRS};/usr/local/share;/usr/share';
     end;
 

Modified: gnucash/trunk/src/bin/Makefile.am
===================================================================
--- gnucash/trunk/src/bin/Makefile.am	2013-10-26 08:40:06 UTC (rev 23336)
+++ gnucash/trunk/src/bin/Makefile.am	2013-10-26 08:56:26 UTC (rev 23337)
@@ -80,13 +80,13 @@
     # The compile time value is added because GnuCash on X11 builds on MacPorts, which
     # uses /opt/local/share as default instead of the Free Desktop defined standard paths
     # /usr/local/share and /usr/share
-	if [ "a$(prefix)" != "a/usr" ] && [ "a$(prefix)" != "a/usr/local" ]; \
+	if [ "a$(datadir)" != "a/usr/share" ] && [ "a$(datadir)" != "a/usr/local/share" ]; \
 	then \
 		echo >> $@.tmp; \
 		echo "# GnuCash was not installed in the default location" >> $@.tmp; \
 		echo "# XDG_DATA_DIRS will be set so that our documentation" >> $@.tmp; \
 		echo "# and gsettings schemas are found." >> $@.tmp; \
-		echo "XDG_DATA_DIRS=$(prefix)/share;{XDG_DATA_DIRS};$(XDG_DATA_DIRS);/usr/local/share/;/usr/share/" >> $@.tmp; \
+		echo "XDG_DATA_DIRS=$(datadir);{XDG_DATA_DIRS};$(XDG_DATA_DIRS);/usr/local/share/;/usr/share/" >> $@.tmp; \
 	fi
 	mv $@.tmp $@
 



More information about the gnucash-changes mailing list