[aisleriot] build: Don't rely on lsb_release -d producing a meaningful string



commit fe8d616b7e30bb8f1e5364c59c864cbbbdbe5a31
Author: Christian Persch <chpe gnome org>
Date:   Sat Dec 3 19:18:38 2011 +0100

    build: Don't rely on lsb_release -d producing a meaningful string
    
    https://bugzilla.gnome.org/show_bug.cgi?id=629988

 configure.ac |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e6557ec..68fb046 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,16 +201,20 @@ AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_PYSOL],[test "$enable_card_theme_format
 
 AC_PATH_PROG([LSB_RELEASE],[lsb_release],[false])
 if test "$LSB_RELEASE" != "false"; then
+  LSB_DISTRIBUTOR="$($LSB_RELEASE -s -i | sed 's,^\",,;s,\"$,,')"
   LSB_DISTRIBUTION="$($LSB_RELEASE -s -d | sed 's,^\",,;s,\"$,,')"
 else
+  LSB_DISTRIBUTOR=
   LSB_DISTRIBUTION=
 fi
 
+LSB_HINT="$LSB_DISTRIBUTOR $LSB_DISTRIBUTION"
+
 if test "$enable_card_theme_format_kde" = "yes"; then
   AC_MSG_CHECKING([for KDE card themes base path])
   AC_ARG_WITH([kde-card-theme-path],
     [AS_HELP_STRING([--with-kde-card-theme-path],[The base path to the KDE card themes])],
-    [],[case "$LSB_DISTRIBUTION" in
+    [],[case "$LSB_HINT" in
           *Debian*|*Fedora*|*RedHat*|*SUSE*|*Ubuntu*) with_kde_card_theme_path="/usr/share/kde4/apps/carddecks" ;;
           *) AC_MSG_ERROR([When enabling the KDE card theme format, you must specify the KDE card themes base path.]) ;;
         esac])
@@ -223,7 +227,7 @@ if test "$enable_card_theme_format_pysol" = "yes"; then
   AC_MSG_CHECKING([for PySol card themes base path])
   AC_ARG_WITH([pysol-card-theme-path],
     [AS_HELP_STRING([--with-pysol-card-theme-path],[The base path to the PySol card themes])],
-    [],[case "$LSB_DISTRIBUTION" in
+    [],[case "$LSB_HINT" in
           *Debian*|*Ubuntu*) with_pysol_card_theme_path="/usr/share/games/pysol" ;;
           *Fedora*|*RedHat*) with_pysol_card_theme_path="/usr/share/PySolFC" ;;
           *SUSE*)            with_pysol_card_theme_path="/usr/share/games/pysol/data" ;;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]