From 224c60d01361115dde84dd2e0f9b6f70feb9122a Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Mon, 4 Jul 2011 17:22:16 -0300 Subject: Fixed build for libdc1394 --- extra/libdc1394/PKGBUILD | 10 +++++-- extra/libdc1394/fix-videodev.h.patch | 53 ++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 extra/libdc1394/fix-videodev.h.patch diff --git a/extra/libdc1394/PKGBUILD b/extra/libdc1394/PKGBUILD index 397b63108..ffda48ac9 100644 --- a/extra/libdc1394/PKGBUILD +++ b/extra/libdc1394/PKGBUILD @@ -3,18 +3,22 @@ pkgname=libdc1394 pkgver=2.1.3 -pkgrel=1 +pkgrel=2 pkgdesc="High level programming interface to control IEEE 1394 based cameras" arch=(i686 x86_64 'mips64el') license=('LGPL') url="http://sourceforge.net/projects/libdc1394/" depends=('libraw1394>=2.0.5' 'libusb') options=(!libtool !emptydirs) -source=(http://downloads.sourceforge.net/sourceforge/libdc1394/${pkgname}-${pkgver}.tar.gz) -md5sums=('d8b2cbfae1b329fdeaa638da80427334') +source=(http://downloads.sourceforge.net/sourceforge/libdc1394/${pkgname}-${pkgver}.tar.gz + fix-videodev.h.patch) +md5sums=('d8b2cbfae1b329fdeaa638da80427334' + '8bbf233bf11295649cfd61a9ac3eba1b') build() { cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np2 -i $srcdir/fix-videodev.h.patch + autoreconf -s -i ./configure --prefix=/usr make } diff --git a/extra/libdc1394/fix-videodev.h.patch b/extra/libdc1394/fix-videodev.h.patch new file mode 100644 index 000000000..560337978 --- /dev/null +++ b/extra/libdc1394/fix-videodev.h.patch @@ -0,0 +1,53 @@ +From 2ee7e7f98dd6225b40d5cd570c240504be7bc86a Mon Sep 17 00:00:00 2001 +From: David Moore +Date: Sun, 27 Mar 2011 22:48:15 -0700 +Subject: [PATCH] Conditionally compile dc1394_vloopback only when linux/videodev.h exists + +--- + libdc1394/ChangeLog | 3 +++ + libdc1394/configure.in | 3 +++ + libdc1394/examples/Makefile.am | 2 ++ + 3 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/libdc1394/ChangeLog b/libdc1394/ChangeLog +index e1355de..536ccae 100644 +--- a/libdc1394/ChangeLog ++++ b/libdc1394/ChangeLog +@@ -1,3 +1,6 @@ ++2011-03-27 David Moore ++ * Conditionally compile dc1394_vloopback only when linux/video.h exists ++ + 2011-01-02 David Moore + * dc1394/conversions.h: Fix typo in DC1394_STEREO_METHOD_MIN + * Update NEWS, README, AUTHORS and version for release 2.1.3. +diff --git a/libdc1394/configure.in b/libdc1394/configure.in +index 69babab..bdddc9b 100644 +--- a/libdc1394/configure.in ++++ b/libdc1394/configure.in +@@ -75,6 +75,9 @@ AM_CONDITIONAL(HAVE_WINDOWS, test x$have_windows = xtrue) + AM_CONDITIONAL(HAVE_LIBRAW1394, test x$libraw1394 = xtrue) + AM_CONDITIONAL(HAVE_LIBUSB, test "x$LIBUSB_LIBS" != "x") + ++AC_CHECK_HEADER([linux/videodev.h], [have_videodev=true]) ++AM_CONDITIONAL(HAVE_VIDEODEV, test x$have_videodev = xtrue) ++ + AC_ARG_ENABLE([examples], [AS_HELP_STRING([--disable-examples], [don't build example programs])], [build_examples=$enableval], [build_examples=true]) + + AM_CONDITIONAL(MAKE_EXAMPLES, test x$build_examples = xtrue) +diff --git a/libdc1394/examples/Makefile.am b/libdc1394/examples/Makefile.am +index fcebf18..035612e 100644 +--- a/libdc1394/examples/Makefile.am ++++ b/libdc1394/examples/Makefile.am +@@ -8,7 +8,9 @@ A = grab_gray_image grab_partial_image grab_color_image \ + B = dc1394_reset_bus + + if HAVE_LINUX ++if HAVE_VIDEODEV + B += dc1394_vloopback ++endif + if HAVE_XV + A += dc1394_multiview + endif +-- +1.7.0.1 + -- cgit v1.2.3-54-g00ecf