diff options
-rw-r--r-- | graphics/unicap/DESCR | 2 | ||||
-rw-r--r-- | graphics/unicap/Makefile | 37 | ||||
-rw-r--r-- | graphics/unicap/PLIST | 76 | ||||
-rw-r--r-- | graphics/unicap/buildlink3.mk | 23 | ||||
-rw-r--r-- | graphics/unicap/distinfo | 23 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-aa | 30 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ab | 15 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ac | 19 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ad | 15 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ae | 18 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-af | 15 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ag | 18 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ah | 46 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ai | 18 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-aj | 17 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ak | 18 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-al | 18 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-am | 26 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-an | 17 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ao | 26 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ap | 113 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-aq | 23 | ||||
-rw-r--r-- | graphics/unicap/patches/patch-ar | 23 |
23 files changed, 636 insertions, 0 deletions
diff --git a/graphics/unicap/DESCR b/graphics/unicap/DESCR new file mode 100644 index 00000000000..4f1487e8a44 --- /dev/null +++ b/graphics/unicap/DESCR @@ -0,0 +1,2 @@ +unicap provides a uniform interface to video capture devices. It allows +applications to use any supported video capture device via a single API. diff --git a/graphics/unicap/Makefile b/graphics/unicap/Makefile new file mode 100644 index 00000000000..f4c8c1d6c45 --- /dev/null +++ b/graphics/unicap/Makefile @@ -0,0 +1,37 @@ +# $NetBSD: Makefile,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + +DISTNAME= unicap-0.9.1 +CATEGORIES= graphics +MASTER_SITES= http://unicap-imaging.org/downloads/ + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://unicap-imaging.org/ +COMMENT= Uniform interface to video capture devices + +PKG_DESTDIR_SUPPORT= user-destdir + +USE_TOOLS+= perl pkg-config gmake +USE_LIBTOOL= yes +USE_PKGLOCALEDIR= yes +GNU_CONFIGURE= yes + +CONFIGURE_ARGS+= --disable-v4l +CONFIGURE_ARGS+= --disable-vid21394 +CONFIGURE_ARGS+= --enable-ucil-theora +#CONFIGURE_ARGS+= --enable-ucil-avcodec + +.if exists(/usr/include/sys/videoio.h) +CONFIGURE_ARGS+= --enable-v4l2 +.else +CONFIGURE_ARGS+= --disable-v4l2 +.endif + +.include "../../devel/pango/buildlink3.mk" +.include "../../graphics/png/buildlink3.mk" +#.include "../../multimedia/ffmpeg/buildlink3.mk" +.include "../../multimedia/libtheora/buildlink3.mk" +.include "../../x11/gtk2/buildlink3.mk" +.include "../../x11/libICE/buildlink3.mk" +.include "../../x11/libXv/buildlink3.mk" +.include "../../x11/libX11/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/graphics/unicap/PLIST b/graphics/unicap/PLIST new file mode 100644 index 00000000000..610c4f31401 --- /dev/null +++ b/graphics/unicap/PLIST @@ -0,0 +1,76 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ +include/unicap/ucil.h +include/unicap/ucil_png.h +include/unicap/ucil_version.h +include/unicap/unicap.h +include/unicap/unicap_status.h +include/unicap/unicap_version.h +include/unicap/unicapgtk.h +include/unicap/unicapgtk_device_property.h +include/unicap/unicapgtk_device_selection.h +include/unicap/unicapgtk_property_dialog.h +include/unicap/unicapgtk_version.h +include/unicap/unicapgtk_video_display.h +include/unicap/unicapgtk_video_format_selection.h +lib/libucil.la +lib/libunicap.la +lib/libunicapgtk.la +lib/pkgconfig/libucil.pc +lib/pkgconfig/libunicap.pc +lib/pkgconfig/libunicapgtk.pc +lib/unicap2/cpi/libv4l2.la +share/gtk-doc/html/libucil/ch01.html +share/gtk-doc/html/libucil/home.png +share/gtk-doc/html/libucil/index.html +share/gtk-doc/html/libucil/index.sgml +share/gtk-doc/html/libucil/left.png +share/gtk-doc/html/libucil/libucil-colorspace.html +share/gtk-doc/html/libucil/libucil-draw.html +share/gtk-doc/html/libucil/libucil-mpeg.html +share/gtk-doc/html/libucil/libucil-queue.html +share/gtk-doc/html/libucil/libucil-ucil-theora.html +share/gtk-doc/html/libucil/libucil-ucil-version.html +share/gtk-doc/html/libucil/libucil-ucil.html +share/gtk-doc/html/libucil/libucil-yuvops.html +share/gtk-doc/html/libucil/libucil.devhelp +share/gtk-doc/html/libucil/libucil.devhelp2 +share/gtk-doc/html/libucil/right.png +share/gtk-doc/html/libucil/style.css +share/gtk-doc/html/libucil/up.png +share/gtk-doc/html/libunicap/ch01.html +share/gtk-doc/html/libunicap/home.png +share/gtk-doc/html/libunicap/index.html +share/gtk-doc/html/libunicap/index.sgml +share/gtk-doc/html/libunicap/left.png +share/gtk-doc/html/libunicap/libunicap-unicap.html +share/gtk-doc/html/libunicap/libunicap.devhelp +share/gtk-doc/html/libunicap/libunicap.devhelp2 +share/gtk-doc/html/libunicap/right.png +share/gtk-doc/html/libunicap/style.css +share/gtk-doc/html/libunicap/up.png +share/gtk-doc/html/libunicapgtk/UnicapgtkDeviceProperty.html +share/gtk-doc/html/libunicapgtk/UnicapgtkDeviceSelection.html +share/gtk-doc/html/libunicapgtk/UnicapgtkPropertyDialog.html +share/gtk-doc/html/libunicapgtk/UnicapgtkVideoDisplay.html +share/gtk-doc/html/libunicapgtk/ch01.html +share/gtk-doc/html/libunicapgtk/home.png +share/gtk-doc/html/libunicapgtk/index.html +share/gtk-doc/html/libunicapgtk/index.sgml +share/gtk-doc/html/libunicapgtk/left.png +share/gtk-doc/html/libunicapgtk/libunicapgtk-UnicapgtkVideoFormatSelection.html +share/gtk-doc/html/libunicapgtk/libunicapgtk-unicapgtk-version.html +share/gtk-doc/html/libunicapgtk/libunicapgtk-unicapgtk.html +share/gtk-doc/html/libunicapgtk/libunicapgtk.devhelp +share/gtk-doc/html/libunicapgtk/libunicapgtk.devhelp2 +share/gtk-doc/html/libunicapgtk/right.png +share/gtk-doc/html/libunicapgtk/style.css +share/gtk-doc/html/libunicapgtk/up.png +share/locale/de/LC_MESSAGES/unicap.mo +share/locale/fr/LC_MESSAGES/unicap.mo +share/locale/ru/LC_MESSAGES/unicap.mo +@dirrm share/gtk-doc/html/libunicapgtk +@dirrm share/gtk-doc/html/libunicap +@dirrm share/gtk-doc/html/libucil +@dirrm lib/unicap2/cpi +@dirrm lib/unicap2 +@dirrm include/unicap diff --git a/graphics/unicap/buildlink3.mk b/graphics/unicap/buildlink3.mk new file mode 100644 index 00000000000..7f347f5148c --- /dev/null +++ b/graphics/unicap/buildlink3.mk @@ -0,0 +1,23 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +UNICAP_BUILDLINK3_MK:= ${UNICAP_BUILDLINK3_MK}+ + +.if !empty(BUILDLINK_DEPTH:M+) +BUILDLINK_DEPENDS+= unicap +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nunicap} +BUILDLINK_PACKAGES+= unicap +BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}unicap + +.if !empty(UNICAP_BUILDLINK3_MK:M+) +BUILDLINK_API_DEPENDS.unicap+= unicap>=0.9.1 +BUILDLINK_ABI_DEPENDS.unicap+= unicap>=0.9.1 +BUILDLINK_PKGSRCDIR.unicap?= ../../graphics/unicap +.endif # UNICAP_BUILDLINK3_MK + +.include "../../x11/libXv/buildlink3.mk" +.include "../../multimedia/libtheora/buildlink3.mk" + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/graphics/unicap/distinfo b/graphics/unicap/distinfo new file mode 100644 index 00000000000..5ff7c3c1773 --- /dev/null +++ b/graphics/unicap/distinfo @@ -0,0 +1,23 @@ +$NetBSD: distinfo,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + +SHA1 (unicap-0.9.1.tar.gz) = d0e8265ab5dd924626f59ce421798081e92d833f +RMD160 (unicap-0.9.1.tar.gz) = bfb5a8659fd4b76be86c8c31fd2de7615c7f235e +Size (unicap-0.9.1.tar.gz) = 1320764 bytes +SHA1 (patch-aa) = daafd02550b56a538b81669b5e792238e7d739a9 +SHA1 (patch-ab) = 7731b1dbd1f6dd8bf640e20bb70a2fbf231b3088 +SHA1 (patch-ac) = 30f65b1c48aade6d2515b54e55fbc89bfc252c2d +SHA1 (patch-ad) = d7b60e7c54c6ac9e9160bae089fb2b44ffc61818 +SHA1 (patch-ae) = 83d0f86b305f732effa45e609c3e4b067796e331 +SHA1 (patch-af) = 13e400f7197dfdf69fa253a50618c3152566df8e +SHA1 (patch-ag) = 5e5bd6fbbc0eb9263a2aa5eb2641bb16ee58a413 +SHA1 (patch-ah) = 554dfb541809d4c54fd155cd2fe263330b3f5b3d +SHA1 (patch-ai) = ced51a4b5b98793375c8a024a076e56006d3dfc6 +SHA1 (patch-aj) = 1bbe0b055538adb99a4ec29ce3a53b95c17e4fe7 +SHA1 (patch-ak) = 1bfdf9e4b989ea847c1971956860128afd17cdb5 +SHA1 (patch-al) = 007aec2cb6c9b7fcaea70ba48a52a50d48d767c1 +SHA1 (patch-am) = b11ef1b3f8133e88142ea89361370d9791fa3a10 +SHA1 (patch-an) = 9cd622733b177b6cfc39f73a518686ecb7c39e54 +SHA1 (patch-ao) = d88378597bff3a535fdcb5d3bce5e4b7700800fd +SHA1 (patch-ap) = 37678ec66287b172cefddbb11677753f2ca5abef +SHA1 (patch-aq) = b3f2a2f63e18578567a343824cbdd0e9d4e955e9 +SHA1 (patch-ar) = 1ff2ae9191573022fe716053990aed0726c1318f diff --git a/graphics/unicap/patches/patch-aa b/graphics/unicap/patches/patch-aa new file mode 100644 index 00000000000..37065771f1c --- /dev/null +++ b/graphics/unicap/patches/patch-aa @@ -0,0 +1,30 @@ +$NetBSD: patch-aa,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- libucil/colorspace.c.orig 2008-08-12 04:31:15.000000000 -0400 ++++ libucil/colorspace.c 2008-09-09 00:10:25.000000000 -0400 +@@ -25,7 +25,12 @@ + #endif //HAVE_AVCODEC + + #include <sys/types.h> ++#ifdef __linux__ + #include <linux/types.h> ++#elif defined(__NetBSD__) ++/* for __uN/__sN typedefs */ ++#include <sys/videoio.h> ++#endif + #include <glib.h> + #include <string.h> + +@@ -1595,9 +1600,8 @@ + } + else + { +- g_message( "Could not convert format: %c%c%c%c %08x to %c%c%c%c %08x\n", +- src->format.fourcc, src->format.fourcc, +- dest->format.fourcc, dest->format.fourcc ); ++ g_message( "Could not convert format: %08x to %08x\n", ++ src->format.fourcc, dest->format.fourcc ); + } + + } diff --git a/graphics/unicap/patches/patch-ab b/graphics/unicap/patches/patch-ab new file mode 100644 index 00000000000..674142a632d --- /dev/null +++ b/graphics/unicap/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- libucil/colorspace.h.orig 2008-09-08 23:02:38.000000000 -0400 ++++ libucil/colorspace.h 2008-09-08 23:02:51.000000000 -0400 +@@ -21,7 +21,9 @@ + #define __COLORSPACE_H__ + + #include <sys/types.h> ++#ifdef __linux__ + #include <linux/types.h> ++#endif + + #include "unicap.h" + diff --git a/graphics/unicap/patches/patch-ac b/graphics/unicap/patches/patch-ac new file mode 100644 index 00000000000..9fff11899af --- /dev/null +++ b/graphics/unicap/patches/patch-ac @@ -0,0 +1,19 @@ +$NetBSD: patch-ac,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- libucil/yuvops.c.orig 2008-09-08 23:04:54.000000000 -0400 ++++ libucil/yuvops.c 2008-09-08 23:05:22.000000000 -0400 +@@ -13,8 +13,12 @@ + #include "ucil.h" + + #include <sys/types.h> ++#ifdef __linux__ + #include <linux/types.h> +- ++#elif defined(__NetBSD__) ++/* for __uN/__sN typedefs */ ++#include <sys/videoio.h> ++#endif + + + #define CLIP(v,l,h) (((v)<(l))?(l):(v)>(h)?(h):(v)) diff --git a/graphics/unicap/patches/patch-ad b/graphics/unicap/patches/patch-ad new file mode 100644 index 00000000000..757ba5f108a --- /dev/null +++ b/graphics/unicap/patches/patch-ad @@ -0,0 +1,15 @@ +$NetBSD: patch-ad,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- libucil/rgbops.c.orig 2008-09-08 23:05:48.000000000 -0400 ++++ libucil/rgbops.c 2008-09-08 23:05:59.000000000 -0400 +@@ -13,7 +13,9 @@ + #include "ucil.h" + + #include <sys/types.h> ++#ifdef __linux__ + #include <linux/types.h> ++#endif + + + void ucil_blend_rgb24_a( unicap_data_buffer_t *dest, diff --git a/graphics/unicap/patches/patch-ae b/graphics/unicap/patches/patch-ae new file mode 100644 index 00000000000..d72e6b8bb5b --- /dev/null +++ b/graphics/unicap/patches/patch-ae @@ -0,0 +1,18 @@ +$NetBSD: patch-ae,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- libucil/avi.h.orig 2008-09-08 23:09:57.000000000 -0400 ++++ libucil/avi.h 2008-09-08 23:10:19.000000000 -0400 +@@ -21,7 +21,12 @@ + # define AVI_H_ + + #include <sys/types.h> ++#ifdef __linux__ + #include <linux/types.h> ++#elif defined(__NetBSD__) ++/* for __uN/__sN typedefs */ ++#include <sys/videoio.h> ++#endif + + typedef struct + { diff --git a/graphics/unicap/patches/patch-af b/graphics/unicap/patches/patch-af new file mode 100644 index 00000000000..b1a82688c28 --- /dev/null +++ b/graphics/unicap/patches/patch-af @@ -0,0 +1,15 @@ +$NetBSD: patch-af,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- libucil/ucil_rawavi.c.orig 2008-09-08 23:10:46.000000000 -0400 ++++ libucil/ucil_rawavi.c 2008-09-08 23:10:54.000000000 -0400 +@@ -27,7 +27,9 @@ + #include <arpa/inet.h> + + #include <sys/types.h> ++#ifdef __linux__ + #include <linux/types.h> ++#endif + #include <semaphore.h> + #include <pthread.h> + #include <stdarg.h> diff --git a/graphics/unicap/patches/patch-ag b/graphics/unicap/patches/patch-ag new file mode 100644 index 00000000000..328446987aa --- /dev/null +++ b/graphics/unicap/patches/patch-ag @@ -0,0 +1,18 @@ +$NetBSD: patch-ag,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- libunicapgtk/backend_xv.c.orig 2008-09-08 23:11:35.000000000 -0400 ++++ libunicapgtk/backend_xv.c 2008-09-08 23:12:34.000000000 -0400 +@@ -20,9 +20,10 @@ + #include "config.h" + + #include <stdlib.h> ++#include <sys/types.h> ++#ifdef __linux__ + #include <linux/types.h> +-#include <stdlib.h> +-#include <linux/types.h> ++#endif + #include <string.h> + #include <stdio.h> + #include <ctype.h> diff --git a/graphics/unicap/patches/patch-ah b/graphics/unicap/patches/patch-ah new file mode 100644 index 00000000000..0c2990d0889 --- /dev/null +++ b/graphics/unicap/patches/patch-ah @@ -0,0 +1,46 @@ +$NetBSD: patch-ah,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- cpi/v4l2/v4l2.c.orig 2008-07-30 01:25:30.000000000 -0400 ++++ cpi/v4l2/v4l2.c 2008-09-09 00:00:02.000000000 -0400 +@@ -43,8 +43,12 @@ + #include <errno.h> + #include <pthread.h> + ++#ifdef __linux__ + #include <linux/types.h> + #include <linux/videodev2.h> ++#elif defined(__NetBSD__) ++#include <sys/videoio.h> ++#endif + #include "v4l2.h" + + #include "tisuvccam.h" +@@ -2288,11 +2292,15 @@ + + old_index = handle->dqindex; + ++#ifdef __NetBSD__ ++ sem_wait( &handle->sema ); ++#else + if( sem_timedwait( &handle->sema, &abs_timeout ) ) + { + TRACE( "SEM_WAIT FAILED\n" ); + continue; + } ++#endif + + if( ( ( handle->dqindex + 1 ) % handle->buffer_count ) == handle->qindex ) + { +@@ -2395,7 +2403,11 @@ + + if( handle->io_method == CPI_V4L2_IO_METHOD_MMAP ) + { ++#ifdef __NetBSD__ ++ while( sem_wait( &handle->sema ) ) ++#else + while( sem_timedwait( &handle->sema, &abs_timeout ) ) ++#endif + { + TRACE( "SEM_WAIT FAILED!\n" ); + gettimeofday( &ctime, NULL ); diff --git a/graphics/unicap/patches/patch-ai b/graphics/unicap/patches/patch-ai new file mode 100644 index 00000000000..9e31f92b17e --- /dev/null +++ b/graphics/unicap/patches/patch-ai @@ -0,0 +1,18 @@ +$NetBSD: patch-ai,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- cpi/v4l2/tisuvccam.h.orig 2008-09-08 23:14:26.000000000 -0400 ++++ cpi/v4l2/tisuvccam.h 2008-09-08 23:14:38.000000000 -0400 +@@ -13,8 +13,12 @@ + + #include <sys/types.h> + #include <sys/ioctl.h> ++#ifdef __linux__ + #include <linux/types.h> + #include <linux/videodev2.h> ++#else ++#include <sys/videoio.h> ++#endif + #include <unicap.h> + + int tisuvccam_probe( int fd, const char *path ); diff --git a/graphics/unicap/patches/patch-aj b/graphics/unicap/patches/patch-aj new file mode 100644 index 00000000000..3c3d3d7a9f9 --- /dev/null +++ b/graphics/unicap/patches/patch-aj @@ -0,0 +1,17 @@ +$NetBSD: patch-aj,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- cpi/v4l2/tiseuvccam.h.orig 2008-09-08 23:15:04.000000000 -0400 ++++ cpi/v4l2/tiseuvccam.h 2008-09-08 23:15:19.000000000 -0400 +@@ -8,7 +8,11 @@ + # define TISEUVCCAM_H_ + + #include <unicap.h> ++#ifdef __linux__ + #include <linux/videodev2.h> ++#elif defined(__NetBSD__) ++#include <sys/videoio.h> ++#endif + + int tiseuvccam_probe( int fd, const char *path ); + int tiseuvccam_count_ext_property( int fd ); diff --git a/graphics/unicap/patches/patch-ak b/graphics/unicap/patches/patch-ak new file mode 100644 index 00000000000..756f1681f5f --- /dev/null +++ b/graphics/unicap/patches/patch-ak @@ -0,0 +1,18 @@ +$NetBSD: patch-ak,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- cpi/v4l2/uvcvideo.h.orig 2008-09-08 23:16:20.000000000 -0400 ++++ cpi/v4l2/uvcvideo.h 2008-09-08 23:16:37.000000000 -0400 +@@ -1,8 +1,12 @@ + #ifndef _USB_VIDEO_H_ + #define _USB_VIDEO_H_ + ++#ifdef __linux__ + #include <linux/kernel.h> + #include <linux/videodev.h> ++#elif defined(__NetBSD__) ++#include <sys/videoio.h> ++#endif + + #include "uvc_compat.h" + diff --git a/graphics/unicap/patches/patch-al b/graphics/unicap/patches/patch-al new file mode 100644 index 00000000000..900e6ef684b --- /dev/null +++ b/graphics/unicap/patches/patch-al @@ -0,0 +1,18 @@ +$NetBSD: patch-al,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- cpi/v4l2/uvc_compat.h.orig 2008-09-08 23:16:59.000000000 -0400 ++++ cpi/v4l2/uvc_compat.h 2008-09-08 23:18:15.000000000 -0400 +@@ -1,7 +1,12 @@ + #ifndef _UVC_COMPAT_H + #define _UVC_COMPAT_H + ++#ifdef __linux__ + #include <linux/version.h> ++#elif defined(__NetBSD__) ++#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) ++#define LINUX_VERSION_CODE KERNEL_VERSION(2,6,17) ++#endif + + #ifndef __KERNEL__ + #ifndef __user diff --git a/graphics/unicap/patches/patch-am b/graphics/unicap/patches/patch-am new file mode 100644 index 00000000000..677e946bc26 --- /dev/null +++ b/graphics/unicap/patches/patch-am @@ -0,0 +1,26 @@ +$NetBSD: patch-am,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- cpi/v4l2/tiseuvccam.c.orig 2008-09-08 23:19:03.000000000 -0400 ++++ cpi/v4l2/tiseuvccam.c 2008-09-08 23:19:25.000000000 -0400 +@@ -12,7 +12,6 @@ + + #include <limits.h> + #include <stdlib.h> +-#include <linux/types.h> + #include <string.h> + #include <libgen.h> + #include <stdio.h> +@@ -20,7 +19,12 @@ + #include <sys/types.h> + #include <sys/ioctl.h> + #include <fcntl.h> ++#ifdef __linux__ ++#include <linux/types.h> + #include <linux/videodev2.h> ++#elif defined(__NetBSD__) ++#include <sys/videoio.h> ++#endif + + #include "uvc_compat.h" + diff --git a/graphics/unicap/patches/patch-an b/graphics/unicap/patches/patch-an new file mode 100644 index 00000000000..8e2ae4ca889 --- /dev/null +++ b/graphics/unicap/patches/patch-an @@ -0,0 +1,17 @@ +$NetBSD: patch-an,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- cpi/v4l2/isight.h.orig 2008-09-08 23:19:54.000000000 -0400 ++++ cpi/v4l2/isight.h 2008-09-08 23:20:08.000000000 -0400 +@@ -8,7 +8,11 @@ + # define ISIGHT_H_ + + #include <unicap.h> ++#ifdef __linux__ + #include <linux/videodev2.h> ++#elif defined(__NetBSD__) ++#include <sys/videoio.h> ++#endif + + int isight_probe( int fd, const char *path ); + int isight_count_ext_property( int fd ); diff --git a/graphics/unicap/patches/patch-ao b/graphics/unicap/patches/patch-ao new file mode 100644 index 00000000000..e2b362cec52 --- /dev/null +++ b/graphics/unicap/patches/patch-ao @@ -0,0 +1,26 @@ +$NetBSD: patch-ao,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- cpi/v4l2/isight.c.orig 2008-09-08 23:20:31.000000000 -0400 ++++ cpi/v4l2/isight.c 2008-09-08 23:20:46.000000000 -0400 +@@ -12,7 +12,6 @@ + + #include <limits.h> + #include <stdlib.h> +-#include <linux/types.h> + #include <string.h> + #include <libgen.h> + #include <stdio.h> +@@ -20,7 +19,12 @@ + #include <sys/types.h> + #include <sys/ioctl.h> + #include <fcntl.h> ++#ifdef __linux__ ++#include <linux/types.h> + #include <linux/videodev2.h> ++#elif defined(__NetBSD__) ++#include <sys/videoio.h> ++#endif + + #include "uvc_compat.h" + diff --git a/graphics/unicap/patches/patch-ap b/graphics/unicap/patches/patch-ap new file mode 100644 index 00000000000..483f76ecad4 --- /dev/null +++ b/graphics/unicap/patches/patch-ap @@ -0,0 +1,113 @@ +$NetBSD: patch-ap,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- configure.orig 2008-09-08 23:50:50.000000000 -0400 ++++ configure 2008-09-08 23:50:52.000000000 -0400 +@@ -23068,7 +23068,7 @@ + fi + + +-if test x$UCIL_AVCODEC == "xavcodec" ; then ++if test x$UCIL_AVCODEC = "xavcodec" ; then + HAVE_AVCODEC_TRUE= + HAVE_AVCODEC_FALSE='#' + else +@@ -23190,7 +23190,7 @@ + fi + + +-if test x$UCIL_THEORA == "xogg/theora" ; then ++if test x$UCIL_THEORA = "xogg/theora" ; then + HAVE_THEORA_TRUE= + HAVE_THEORA_FALSE='#' + else +@@ -23312,7 +23312,7 @@ + fi + + +-if test x$UCIL_ALSA == "xalsa" ; then ++if test x$UCIL_ALSA = "xalsa" ; then + HAVE_ALSA_TRUE= + HAVE_ALSA_FALSE='#' + else +@@ -23434,7 +23434,7 @@ + fi + + +-if test x$UCIL_PNG == "xpng" ; then ++if test x$UCIL_PNG = "xpng" ; then + HAVE_PNG_TRUE= + HAVE_PNG_FALSE='#' + else +@@ -25322,7 +25322,7 @@ + echo "${ECHO_T}yes" >&6; } + HAVE_LIBRAW1394="yes";LIBRAW1394_VERSION="RAW1394_1_1_API" + fi +- if( test "$HAVE_LIBRAW1394" == "yes" ); then ++ if( test "$HAVE_LIBRAW1394" = "yes" ); then + + cat >>confdefs.h <<\_ACEOF + #define RAW1394_1_1_API 1 +@@ -25719,7 +25719,7 @@ + fi + fi + +-if test "x$VID21394" == "xyes"; then ++if test "x$VID21394" = "xyes"; then + + cat >>confdefs.h <<\_ACEOF + #define BUILD_VID21394 1 +@@ -25748,7 +25748,7 @@ + fi + fi + +-if test "x$DCAM" == "xyes"; then ++if test "x$DCAM" = "xyes"; then + + cat >>confdefs.h <<\_ACEOF + #define BUILD_DCAM 1 +@@ -25771,7 +25771,7 @@ + fi + + +-if test "x$V4L" == "xyes"; then ++if test "x$V4L" = "xyes"; then + + cat >>confdefs.h <<\_ACEOF + #define BUILD_V4L 1 +@@ -25794,7 +25794,7 @@ + fi + + +-if test "x$V4L2" == "xyes"; then ++if test "x$V4L2" = "xyes"; then + + cat >>confdefs.h <<\_ACEOF + #define BUILD_V4L2 1 +@@ -25820,7 +25820,7 @@ + # Check whether --enable-static-cpi was given. + if test "${enable_static_cpi+set}" = set; then + enableval=$enable_static_cpi; { +- if test "x$enableval" == "xyes"; then ++ if test "x$enableval" = "xyes"; then + + cat >>confdefs.h <<\_ACEOF + #define ENABLE_STATIC_CPI 1 +@@ -25848,7 +25848,7 @@ + # Check whether --enable-thread-locking was given. + if test "${enable_thread_locking+set}" = set; then + enableval=$enable_thread_locking; { +- if test "x$enableval" == "xyes"; then ++ if test "x$enableval" = "xyes"; then + + cat >>confdefs.h <<\_ACEOF + #define UNICAP_THREAD_LOCKING 1 +@@ -25868,7 +25868,7 @@ + # Check whether --enable-unicap-threads was given. + if test "${enable_unicap_threads+set}" = set; then + enableval=$enable_unicap_threads; { +- if test "x$enableval" == "xyes"; then ++ if test "x$enableval" = "xyes"; then + + cat >>confdefs.h <<\_ACEOF + #define UNICAP_THREADS 1 diff --git a/graphics/unicap/patches/patch-aq b/graphics/unicap/patches/patch-aq new file mode 100644 index 00000000000..c8755049d83 --- /dev/null +++ b/graphics/unicap/patches/patch-aq @@ -0,0 +1,23 @@ +$NetBSD: patch-aq,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- libucil/ucil_theora.c.orig 2008-09-08 23:57:33.000000000 -0400 ++++ libucil/ucil_theora.c 2008-09-08 23:58:33.000000000 -0400 +@@ -1026,6 +1026,9 @@ + } + + gettimeofday( &ctime, NULL ); ++#ifdef __NetBSD__ ++ sem_wait( &vobj->sema ); ++#else + abs_timeout.tv_sec = ctime.tv_sec + 1; + abs_timeout.tv_nsec = ctime.tv_usec * 1000; + if( sem_timedwait( &vobj->sema, &abs_timeout ) ) +@@ -1033,6 +1036,7 @@ + TRACE( "SEM_WAIT FAILED\n" ); + continue; + } ++#endif + + if( buffer_ready && vobj->event_callback ) + { diff --git a/graphics/unicap/patches/patch-ar b/graphics/unicap/patches/patch-ar new file mode 100644 index 00000000000..e78be95e218 --- /dev/null +++ b/graphics/unicap/patches/patch-ar @@ -0,0 +1,23 @@ +$NetBSD: patch-ar,v 1.1.1.1 2008/09/09 11:50:18 jmcneill Exp $ + + +--- libunicapgtk/unicapgtk_device_property.c.orig 2008-09-09 00:02:03.000000000 -0400 ++++ libunicapgtk/unicapgtk_device_property.c 2008-09-09 00:02:59.000000000 -0400 +@@ -49,7 +49,17 @@ + #endif + #include "debug.h" + ++#ifdef __NetBSD__ ++double ++fmin(double a, double b) ++{ ++ if (b < a) ++ return b; ++ return a; ++} ++#else + double fmin(double,double); ++#endif + + enum { + UNICAPGTK_DEVICE_PROPERTY_CHANGED_SIGNAL, |