diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2008-12-24 04:04:04 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2008-12-24 04:04:04 +0000 |
commit | 21bc1a9c276e27895307f40cb32e3f9764fdc865 (patch) | |
tree | 61b791d373e7a21f500e65c690b7ef1b84f87cb6 /graphics | |
parent | 0926a9a82fece585d016053d690547b3ae5e4723 (diff) | |
download | pkgsrc-21bc1a9c276e27895307f40cb32e3f9764fdc865.tar.gz |
Fix build on NetBSD when sys/videoio.h isn't available.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/cheese/Makefile | 3 | ||||
-rw-r--r-- | graphics/cheese/distinfo | 6 | ||||
-rw-r--r-- | graphics/cheese/patches/patch-aa | 16 | ||||
-rw-r--r-- | graphics/cheese/patches/patch-ab | 55 |
4 files changed, 59 insertions, 21 deletions
diff --git a/graphics/cheese/Makefile b/graphics/cheese/Makefile index 842d60b8ced..b1d1365ed70 100644 --- a/graphics/cheese/Makefile +++ b/graphics/cheese/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2008/12/14 19:21:01 hasso Exp $ +# $NetBSD: Makefile,v 1.9 2008/12/24 04:04:04 jmcneill Exp $ DISTNAME= cheese-2.24.2 CATEGORIES= graphics @@ -32,6 +32,7 @@ GCONF_SCHEMAS+= cheese.schemas pre-configure: cd ${WRKSRC} && autoreconf -vi # -f breaks it + cd ${WRKSRC} && autoheader -f .include "options.mk" diff --git a/graphics/cheese/distinfo b/graphics/cheese/distinfo index e54219c3687..1c35bce2b56 100644 --- a/graphics/cheese/distinfo +++ b/graphics/cheese/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.6 2008/12/02 11:47:09 wiz Exp $ +$NetBSD: distinfo,v 1.7 2008/12/24 04:04:04 jmcneill Exp $ SHA1 (cheese-2.24.2.tar.gz) = efa0de5e3d663a7417244b3f463844edefe7835c RMD160 (cheese-2.24.2.tar.gz) = 619bf834d9e71b0901a8c177e4e3109e57e81587 Size (cheese-2.24.2.tar.gz) = 2878710 bytes -SHA1 (patch-aa) = 6be8e2b429a3033202cc20aad329ca3979489427 -SHA1 (patch-ab) = bb7a12f2ed26bdd134ee5ac114f1d4a6ca409267 +SHA1 (patch-aa) = dcb50c18f53385b524c58e8205d448dcdbc09ec2 +SHA1 (patch-ab) = e345b9b4959717c7439107717db3f539f2d721f8 SHA1 (patch-ac) = 4db9fc3c6288ba6eb20ad98aca8875326952dfd8 SHA1 (patch-ad) = 8755f4b1dc133f1ab6164894a9ea19cb96a8a49b diff --git a/graphics/cheese/patches/patch-aa b/graphics/cheese/patches/patch-aa index 6188caf0518..f06c7ffd36a 100644 --- a/graphics/cheese/patches/patch-aa +++ b/graphics/cheese/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.3 2008/11/28 14:29:31 jmcneill Exp $ +$NetBSD: patch-aa,v 1.4 2008/12/24 04:04:04 jmcneill Exp $ ---- configure.ac.orig 2008-10-20 12:01:53.000000000 -0400 -+++ configure.ac -@@ -17,8 +17,9 @@ AM_PROG_LIBTOOL +--- configure.ac.orig 2008-11-24 18:03:24.000000000 -0500 ++++ configure.ac 2008-12-23 22:47:58.000000000 -0500 +@@ -17,8 +17,9 @@ CFLAGS="${CFLAGS} -Wall" @@ -14,7 +14,7 @@ $NetBSD: patch-aa,v 1.3 2008/11/28 14:29:31 jmcneill Exp $ #******************************************************************************* # Expanded dirs -@@ -88,7 +89,6 @@ PKG_CHECK_MODULES(CHEESE, \ +@@ -88,7 +89,6 @@ cairo >= $CAIRO_REQUIRED \ dbus-1 >= $DBUS_REQUIRED \ dbus-glib-1 >= $DBUS_GLIB_REQUIRED \ @@ -22,7 +22,7 @@ $NetBSD: patch-aa,v 1.3 2008/11/28 14:29:31 jmcneill Exp $ pangocairo >= $PANGOCAIRO_REQUIRED \ librsvg-2.0 >= $LIBRSVG_REQUIRED) AC_SUBST(CHEESE_CFLAGS) -@@ -107,6 +107,21 @@ fi +@@ -107,6 +107,25 @@ AM_CONDITIONAL(WITH_HILDON, test "x$enable_hildon" = "xyes") @@ -41,6 +41,10 @@ $NetBSD: patch-aa,v 1.3 2008/11/28 14:29:31 jmcneill Exp $ + AC_DEFINE(HAVE_HAL, 0, define to 1 if HAL is used) +fi + ++AC_CHECK_HEADER([sys/videoio.h], ++ [AC_DEFINE(USE_SYS_VIDEOIO_H, 1, define to 1 if sys/videoio.h is present)], ++ [AC_DEFINE(USE_SYS_VIDEOIO_H, 0, define to 1 if sys/videoio.h is present)], []) ++ AC_PATH_PROG(GCONFTOOL, gconftool-2) AM_GCONF_SOURCE_2 diff --git a/graphics/cheese/patches/patch-ab b/graphics/cheese/patches/patch-ab index a4aa542e1c8..ec54e153f7e 100644 --- a/graphics/cheese/patches/patch-ab +++ b/graphics/cheese/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.4 2008/12/02 11:47:09 wiz Exp $ +$NetBSD: patch-ab,v 1.5 2008/12/24 04:04:04 jmcneill Exp $ ---- src/cheese-webcam.c.orig 2008-11-24 23:03:19.000000000 +0000 -+++ src/cheese-webcam.c -@@ -32,13 +32,24 @@ +--- src/cheese-webcam.c.orig 2008-11-24 18:03:19.000000000 -0500 ++++ src/cheese-webcam.c 2008-12-23 22:58:59.000000000 -0500 +@@ -32,13 +32,26 @@ #include <gst/gst.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include <X11/Xlib.h> @@ -17,7 +17,7 @@ $NetBSD: patch-ab,v 1.4 2008/12/02 11:47:09 wiz Exp $ #include <unistd.h> -#include <sys/ioctl.h> + -+#if defined(__NetBSD__) || defined(__OpenBSD__) ++#if USE_SYS_VIDEOIO_H > 0 +#include <sys/types.h> +#include <sys/videoio.h> +#elif defined(__sun) @@ -25,11 +25,13 @@ $NetBSD: patch-ab,v 1.4 2008/12/02 11:47:09 wiz Exp $ +#include <sys/videodev2.h> +#elif defined(__linux__) #include <linux/videodev.h> ++#else ++#define NO_VIDEO_SUPPORT +#endif #include "cheese-webcam.h" #include "cheese-flash.h" -@@ -244,6 +255,7 @@ cheese_webcam_bus_message_cb (GstBus *bu +@@ -244,6 +257,7 @@ cheese_webcam_bus_message_cb (GstBus *bu } } @@ -37,25 +39,35 @@ $NetBSD: patch-ab,v 1.4 2008/12/02 11:47:09 wiz Exp $ static void cheese_webcam_get_video_devices_from_hal (CheeseWebcam *webcam) { -@@ -306,7 +318,9 @@ cheese_webcam_get_video_devices_from_hal +@@ -305,8 +319,12 @@ cheese_webcam_get_video_devices_from_hal + char *parent_udi = NULL; char *subsystem = NULL; char *gstreamer_src, *product_name; ++#ifndef NO_VIDEO_SUPPORT struct v4l2_capability v2cap; ++#endif +#ifdef VIDIOCGCAP struct video_capability v1cap; +#endif gint vendor_id = 0; gint product_id = 0; gchar *property_name = NULL; -@@ -368,6 +382,7 @@ cheese_webcam_get_video_devices_from_hal +@@ -365,9 +383,14 @@ cheese_webcam_get_video_devices_from_hal + libhal_free_string (device); + continue; + } ++#ifdef VIDIOC_QUERYCAP ok = ioctl (fd, VIDIOC_QUERYCAP, &v2cap); ++#else ++ ok = -1; ++#endif if (ok < 0) { +#ifdef VIDIOCGCAP ok = ioctl (fd, VIDIOCGCAP, &v1cap); if (ok < 0) { -@@ -381,6 +396,13 @@ cheese_webcam_get_video_devices_from_hal +@@ -381,14 +404,22 @@ cheese_webcam_get_video_devices_from_hal g_print ("Device type: %d\n", v1cap.type); gstreamer_src = "v4lsrc"; product_name = v1cap.name; @@ -69,7 +81,28 @@ $NetBSD: patch-ab,v 1.4 2008/12/02 11:47:09 wiz Exp $ } else { -@@ -434,6 +456,55 @@ fallback: ++#ifndef NO_VIDEO_SUPPORT + guint cap = v2cap.capabilities; + g_print ("Detected v4l2 device: %s\n", v2cap.card); + g_print ("Driver: %s, version: %d\n", v2cap.driver, v2cap.version); + /* g_print ("Bus info: %s\n", v2cap.bus_info); */ /* Doesn't seem anything useful */ +- g_print ("Capabilities: 0x%08X\n", v2cap.capabilities); ++ g_print ("Capabilities: 0x%08X\n", v2cap.capabilities); + if (!(cap & V4L2_CAP_VIDEO_CAPTURE)) + { + g_print ("Device %s seems to not have the capture capability, (radio tuner?)\n" +@@ -399,6 +430,10 @@ cheese_webcam_get_video_devices_from_hal + } + gstreamer_src = "v4l2src"; + product_name = (char *) v2cap.card; ++#else /* NO_VIDEO_SUPPORT */ ++ gstreamer_src = "v4l2src"; ++ product_name = "Webcam"; ++#endif + } + + g_print ("\n"); +@@ -434,6 +469,55 @@ fallback: priv->webcam_devices[0].hal_udi = g_strdup ("cheese_fake_videodevice"); } } @@ -125,7 +158,7 @@ $NetBSD: patch-ab,v 1.4 2008/12/02 11:47:09 wiz Exp $ static void cheese_webcam_get_supported_framerates (CheeseVideoFormat *video_format, GstStructure *structure) -@@ -739,7 +810,11 @@ cheese_webcam_detect_webcam_devices (Che +@@ -739,7 +823,11 @@ cheese_webcam_detect_webcam_devices (Che int i; |