Source: libmtp
Version: 1.0.6-3
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
Hi,
currently[1] libmtp fails to build on hurd-i386.
Attached there are two patches which solve the compilation:
- 1001-kfreebsd_hurd_ftbfs.patch:
replaces the patch 1001-kfreebsd_ftbfs.patch, recognizing also Hurd as
"Linux", in a similar way of what has been done with kFreeBSD
- debian.diff:
this enables the processing of the UDEVFILES on hurd as well, and adds a
.install files processing to not install the udev .rules file on non-Linux
architectures (leaving only the .fdi file for HAL)
[1]
https://buildd.debian.org/status/fetch.php?pkg=libmtp&arch=hurd-i386&ver=1.0.6-3&stamp=1304105348
Thanks,
--
Pino
Description: Remove restrictive check for GNU/Linux archs since the sources
compile fine on some non-linux architectures (kfreebsd, for instance).
Author: Alessio Treglia <[email protected]>
Forwarded: no
---
configure | 2 +-
configure.ac | 2 +-
util/mtp-probe.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--- a/configure
+++ b/configure
@@ -12060,7 +12060,7 @@
$as_echo_n "checking if the host operating system is Linux... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifndef __linux__
+#if !(defined __linux__ || defined __FreeBSD_kernel__ || defined __GNU__)
#error "FAIL"
#endif
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,7 @@
AC_SUBST(OSFLAGS)
AC_MSG_CHECKING([if the host operating system is Linux])
-AC_TRY_COMPILE([#ifndef __linux__
+AC_TRY_COMPILE([#if !(defined __linux__ || defined __FreeBSD_kernel__ ||
defined __GNU__)
#error "FAIL"
#endif
],
--- a/util/mtp-probe.c
+++ b/util/mtp-probe.c
@@ -36,7 +36,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
-#ifndef __linux__
+#if !(defined __linux__ || defined __FreeBSD_kernel__ || defined __GNU__)
#error "This program should only be compiled for Linux!"
#endif
--- a/debian/rules
+++ b/debian/rules
@@ -15,7 +15,10 @@
debian/libmtp$(SOVERSION).install \
debian/libmtp$(SOVERSION).preinst \
debian/libmtp$(SOVERSION).postinst
-UDEVFILES = 45-libmtp$(SOVERSION).rules 20-libmtp$(SOVERSION).fdi
+UDEVFILES = 20-libmtp$(SOVERSION).fdi
+ifeq (linux,$(DEB_HOST_ARCH_OS))
+ UDEVFILES += 45-libmtp$(SOVERSION).rules
+endif
DISTRIBUTION = $(shell lsb_release -i | cut -f2 -d':')
debdir = $(CURDIR)/debian
@@ -25,6 +28,11 @@
# Replace SOVERSION string in debian/ files
libmtp$(SOVERSION).%: libmtp.%.in
sed "s/@SOVERSION@/$(SOVERSION)/g" < $< > $@
+ifneq (linux,$(DEB_HOST_ARCH_OS))
+ mv $@ [email protected]
+ grep -v '/udev/' [email protected] > $@
+ rm [email protected]
+endif
%: %.in
sed "s/@SOVERSION@/$(SOVERSION)/g" < $< > $@
@@ -56,12 +64,10 @@
build/libmtp$(SOVERSION)::
# Fix mode of udev lifting script
chmod +x libmtp.sh
-ifneq (hurd,$(DEB_HOST_ARCH_OS))
# Rename udev files
for f in $(UDEVFILES) ; do \
cp libmtp.$${f#*.} $$f ; \
done
-endif
binary-predeb/libmtp$(SOVERSION)::
ifeq (linux,$(DEB_HOST_ARCH_OS))