Package: aisleriot
Tags: patch

The upstream configure script determines the "pysol card themes base path" with the following logic.

if test -f /etc/os-release; then DISTRO="$(source /etc/os-release && echo $ID)" else DISTRO="unknown"
fi
<--snip-->

# Check whether --with-pysol-card-theme-path was given. if test "${with_pysol_card_theme_path+set}" = set; then : withval=$with_pysol_card_theme_path; else case "$DISTRO" in debian|ubuntu) with_pysol_card_theme_path="/usr/share/games/pysol" ;; fedora|rhel|centos) with_pysol_card_theme_path="/usr/share/PySolFC" ;; opensuse) with_pysol_card_theme_path="/usr/share/games/pysol/data" ;; *) as_fn_error $? "When enabling the PySol card theme format, you must specify the PySol card themes base path." "$LINENO" 5 ;; esac
fi

The trouble is that this method of detecting distro's has no ideas of "derivatives" or "distro families" or similar. The result is when the package is built on raspbian it detects the distro name as "raspbian", doesn't recognise that name and fails.

There is similar code for the "kde card theme format" but that doesn't seem to be enabled in the debian package.

Possible fixes:
1: force the "pysol card themes base path" in the debian packaging. This should make the aisleriot debian package build on raspbian and any similar derivatives but obviously won't help those who build directly from upstream sources. This is what we have done locally in raspbian for the moment (see attatched debdiff). 2: add raspbian to the list of distros in the configure script and push that change upstream. This would fix the issue for builds on raspbian whether from debian packages but wouldn't help users of other derivatives. 3: Modify the configure script to look at the ID_LIKE* field in /etc/os_version if ID doesn't match any known distro. Complicating this is that ID_LIKE may contain multiple entries all of which would probablly need to be checked against the "list of known distros".

* http://www.freedesktop.org/software/systemd/man/os-release.html
diff -Nru aisleriot-3.10.1/debian/changelog aisleriot-3.10.1/debian/changelog
--- aisleriot-3.10.1/debian/changelog   2013-10-17 21:42:31.000000000 +0000
+++ aisleriot-3.10.1/debian/changelog   2013-10-28 18:34:26.000000000 +0000
@@ -1,3 +1,10 @@
+aisleriot (1:3.10.1-1+rpi1) jessie-staging; urgency=low
+
+  * Set pysol card themes base explicitly because configure script doesn't
+    recognise raspbian.
+
+ -- Peter Michael Green <plugw...@raspbian.org>  Mon, 28 Oct 2013 18:33:53 
+0000
+
 aisleriot (1:3.10.1-1) unstable; urgency=low
 
   [ Jeremy Bicha ]
diff -Nru aisleriot-3.10.1/debian/rules aisleriot-3.10.1/debian/rules
--- aisleriot-3.10.1/debian/rules       2013-07-28 21:51:22.000000000 +0000
+++ aisleriot-3.10.1/debian/rules       2013-10-28 18:35:45.000000000 +0000
@@ -10,7 +10,8 @@
 
 DEB_CONFIGURE_EXTRA_FLAGS := --bindir=\$${prefix}/games \
                 --bindir=\$${prefix}/games \
-               --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
+               --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
+               --with-pysol-card-theme-path=/usr/share/games/pysol
 
 DEB_DH_FIXPERMS_ARGS_ALL := -X/usr/games/sol
 DEB_DH_MAKESHLIBS_ARGS_aisleriot := --no-act

Reply via email to