Source: xosview
Version: 1.14-1
Severity: wishlist
Tags: patch

Hi,

the changes in the experimental version still make xosview compiled as
"linux" even in non-Linux OSes, and never uses the right platform
string on kFreeBSD.
The attached patch factorizes the detection of the platform string
to use when invoking make,
- making it use the right one on kFreeBSD (which though won't compile
  yet, and that will need proper fixes)
- bailing out when the OS is not recognized, and it is easy (just add
  the two proper lines in that if chain, e.g. starting from the
  kfreebsd ones) to add cases for new OSes

Thanks,
-- 
Pino
--- a/debian/rules
+++ b/debian/rules
@@ -9,23 +9,20 @@
 CXX=g++
 
 DEB_BUILD_ARCH_OS ?=$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
+ifeq ($(DEB_BUILD_ARCH_OS),linux)
+  PLATFORM=linux
+else ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd)
+  PLATFORM=bsd
+else
+  $(error Missing implementation for $(DEB_BUILD_ARCH_OS))
+endif
 
 build: build-arch build-indep
 build-arch: build-stamp
 build-indep: build-stamp
 build-stamp:
 	dh_testdir
-
-#experimental kfreebsd-* support
-ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd-i386)
-	$(MAKE) PLATFORM=bsd
-else
-ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd-amd64)
-	$(MAKE) PLATFORM=bsd
-endif
-endif
-
-	$(MAKE) PLATFORM=linux
+	$(MAKE) PLATFORM=$(PLATFORM)
 	touch $@
 
 clean:

Reply via email to