[Pkg-phototools-devel] Bug#528380: libgphoto2: FTBFS on GNU/kFreeBSD

Aurelien Jarno aurel32 at debian.org
Tue May 12 15:07:21 UTC 2009


Package: libgphoto2
Version: 2.4.5-1
Severity: important
Tags: patch
User: glibc-bsd-devel at lists.alioth.debian.org
Usertags: kfreebsd

libgphoto2 version 2.4.5-1 fails to build on GNU/kFreeBSD with two small
issues. Please find below a patch to fix that. Some comments:

- there is no udev on GNU/kFreeBSD, so udev related file should not 
  tried to be installed (as they are also not installed by 'make 
  install')
- camlibs/ptp2/config.c uses 'struct in_addr', but does not explictely
  includes <netinet/in.h>. On GNU/Linux it works as this header is 
  included through libgphoto2/gphoto2-endian.h.


diff -u libgphoto2-2.4.5/debian/rules libgphoto2-2.4.5/debian/rules
--- libgphoto2-2.4.5/debian/rules
+++ libgphoto2-2.4.5/debian/rules
@@ -83,12 +83,15 @@
 		debian/libgphoto2-$(major)/usr/share/doc/libgphoto2-$(major)
 	mv debian/libgphoto2-port0/usr/share/doc/libgphoto2_port \
 		debian/libgphoto2-port0/usr/share/doc/libgphoto2-port0
+
+ifeq ($(DEB_HOST_ARCH_OS),linux)
 	install -D packaging/generic/check-ptp-camera debian/libgphoto2-$(major)/lib/udev/check-ptp-camera
 	rm debian/tmp/usr/lib/udev/check-ptp-camera
 	-test -e debian/tmp/usr/lib/udev/check-mtp-device && \
 		mkdir -p debian/libgphoto2-port0/lib/udev && \
 		mv debian/tmp/usr/lib/udev/check-mtp-device \
 			debian/libgphoto2-port0/lib/udev/check-mtp-device
+endif
 
 	# remove *.la files before trying to remove debian/tmp
 	find debian/tmp/usr/lib -name '*.la' -maxdepth 1 -type f -delete
diff -u libgphoto2-2.4.5/debian/patches/series libgphoto2-2.4.5/debian/patches/series
--- libgphoto2-2.4.5/debian/patches/series
+++ libgphoto2-2.4.5/debian/patches/series
@@ -4,0 +5 @@
+80_kfreebsd
only in patch2:
unchanged:
--- libgphoto2-2.4.5.orig/debian/patches/80_kfreebsd
+++ libgphoto2-2.4.5/debian/patches/80_kfreebsd
@@ -0,0 +1,10 @@
+--- a/camlibs/ptp2/config.c
++++ b/camlibs/ptp2/config.c
+@@ -24,6 +24,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <time.h>
++#include <netinet/in.h>
+ 
+ #include <gphoto2/gphoto2-library.h>
+ #include <gphoto2/gphoto2-port-log.h>

-- System Information:
Debian Release: squeeze/sid
Architecture: kfreebsd-i386 (i686)

Kernel: kFreeBSD 7.1-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash





More information about the Pkg-phototools-devel mailing list