summaryrefslogtreecommitdiff
path: root/graphics/libv4l
diff options
context:
space:
mode:
authorjmcneill <jmcneill>2008-09-08 19:07:41 +0000
committerjmcneill <jmcneill>2008-09-08 19:07:41 +0000
commit1eb7f0ca8475f6bb1ae0611eeb35ce33e31bea1f (patch)
treebf55c1c7f4e6c975fd0e75a1ec6d1faaf71b967b /graphics/libv4l
parent1e881b1fdfb2932e357555ccdf94e1def0a2b037 (diff)
downloadpkgsrc-1eb7f0ca8475f6bb1ae0611eeb35ce33e31bea1f.tar.gz
libv4l is a collection of libraries which adds a thin abstraction layer on
top of video4linux2 devices. The purpose of this (thin) layer is to make it easy for application writers to support a wide variety of devices without having to write seperate code for different devices in the same class.
Diffstat (limited to 'graphics/libv4l')
-rw-r--r--graphics/libv4l/DESCR4
-rw-r--r--graphics/libv4l/Makefile23
-rw-r--r--graphics/libv4l/PLIST11
-rw-r--r--graphics/libv4l/buildlink3.mk20
-rw-r--r--graphics/libv4l/distinfo12
-rw-r--r--graphics/libv4l/patches/patch-aa19
-rw-r--r--graphics/libv4l/patches/patch-ab14
-rw-r--r--graphics/libv4l/patches/patch-ac14
-rw-r--r--graphics/libv4l/patches/patch-ad25
-rw-r--r--graphics/libv4l/patches/patch-ae45
-rw-r--r--graphics/libv4l/patches/patch-af38
-rw-r--r--graphics/libv4l/patches/patch-ag11
12 files changed, 236 insertions, 0 deletions
diff --git a/graphics/libv4l/DESCR b/graphics/libv4l/DESCR
new file mode 100644
index 00000000000..ef2b5e2c86c
--- /dev/null
+++ b/graphics/libv4l/DESCR
@@ -0,0 +1,4 @@
+libv4l is a collection of libraries which adds a thin abstraction layer on
+top of video4linux2 devices. The purpose of this (thin) layer is to make it
+easy for application writers to support a wide variety of devices without
+having to write seperate code for different devices in the same class.
diff --git a/graphics/libv4l/Makefile b/graphics/libv4l/Makefile
new file mode 100644
index 00000000000..014de81fe2f
--- /dev/null
+++ b/graphics/libv4l/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/09/08 19:07:41 jmcneill Exp $
+
+DISTNAME= libv4l-0.4.3
+CATEGORIES= graphics
+MASTER_SITES= http://people.atrpms.net/~hdegoede/
+
+MAINTAINER= jmcneill@NetBSD.org
+HOMEPAGE= http://people.atrpms.net/~hdegoede/
+COMMENT= Video4Linux userspace library
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+USE_TOOLS+= gmake
+
+.if exists(/usr/include/sys/videoio.h)
+do-install:
+ cd ${WRKSRC} && ${GMAKE} install PREFIX=${PREFIX}
+.else
+NO_BUILD= yes
+do-install: # nothing
+.endif
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/libv4l/PLIST b/graphics/libv4l/PLIST
new file mode 100644
index 00000000000..db6e6a24c5f
--- /dev/null
+++ b/graphics/libv4l/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/09/08 19:07:41 jmcneill Exp $
+include/libv4l2.h
+include/libv4lconvert.h
+lib/libv4l/v4l2convert.so
+lib/libv4l2.so
+lib/libv4l2.so.0
+lib/libv4lconvert.so
+lib/libv4lconvert.so.0
+lib/pkgconfig/libv4l2.pc
+lib/pkgconfig/libv4lconvert.pc
+@dirrm lib/libv4l
diff --git a/graphics/libv4l/buildlink3.mk b/graphics/libv4l/buildlink3.mk
new file mode 100644
index 00000000000..9f59cc7ccd5
--- /dev/null
+++ b/graphics/libv4l/buildlink3.mk
@@ -0,0 +1,20 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/09/08 19:07:41 jmcneill Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+LIBV4L_BUILDLINK3_MK:= ${LIBV4L_BUILDLINK3_MK}+
+
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= libv4l
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibv4l}
+BUILDLINK_PACKAGES+= libv4l
+BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libv4l
+
+.if !empty(LIBV4L_BUILDLINK3_MK:M+)
+BUILDLINK_API_DEPENDS.libv4l+= libv4l>=0.4.3
+BUILDLINK_ABI_DEPENDS.libv4l+= libv4l>=0.4.3
+BUILDLINK_PKGSRCDIR.libv4l?= ../../graphics/libv4l
+.endif # LIBV4L_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/graphics/libv4l/distinfo b/graphics/libv4l/distinfo
new file mode 100644
index 00000000000..d7f2a978bcf
--- /dev/null
+++ b/graphics/libv4l/distinfo
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/09/08 19:07:41 jmcneill Exp $
+
+SHA1 (libv4l-0.4.3.tar.gz) = 2539aa6b04650b97c9fc7ba95721f1e362a73031
+RMD160 (libv4l-0.4.3.tar.gz) = 4f0435d955f15602ac093385607417fab71deb17
+Size (libv4l-0.4.3.tar.gz) = 83022 bytes
+SHA1 (patch-aa) = e4d4e38085ab20d1fb1c16fac40687bc02db8e30
+SHA1 (patch-ab) = 964b2e7c93ed6372901ab52090f0d7a1e04bf04d
+SHA1 (patch-ac) = 749a8b6643a44145af6622502d4aa38f1c31f7fb
+SHA1 (patch-ad) = dd7f7712f5ab46978b292d70206682760ee7431f
+SHA1 (patch-ae) = 31bb5d58bab1bdb6615042e96de04d268c68f76e
+SHA1 (patch-af) = 5d25df8e5b13d0d335bab5c036c51a250155743f
+SHA1 (patch-ag) = c68fd77dc7e8182bdaffb6edfb77ed27dcca111b
diff --git a/graphics/libv4l/patches/patch-aa b/graphics/libv4l/patches/patch-aa
new file mode 100644
index 00000000000..a32ebcdc47a
--- /dev/null
+++ b/graphics/libv4l/patches/patch-aa
@@ -0,0 +1,19 @@
+--- include/libv4lconvert.h.orig 2008-09-08 14:33:17.000000000 -0400
++++ include/libv4lconvert.h 2008-09-08 14:34:03.000000000 -0400
+@@ -22,10 +22,16 @@
+ /* These headers are not needed by us, but by linux/videodev2.h,
+ which is broken on some systems and doesn't include them itself :( */
+ #include <sys/time.h>
++#ifdef __linux__
+ #include <linux/types.h>
+ #include <linux/ioctl.h>
+ /* end broken header workaround includes */
+ #include <linux/videodev2.h>
++#elif defined(__NetBSD__) || defined(__OpenBSD__)
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <sys/videoio.h>
++#endif
+
+ #ifdef __cplusplus
+ extern "C" {
diff --git a/graphics/libv4l/patches/patch-ab b/graphics/libv4l/patches/patch-ab
new file mode 100644
index 00000000000..9c8ff6c7377
--- /dev/null
+++ b/graphics/libv4l/patches/patch-ab
@@ -0,0 +1,14 @@
+--- libv4lconvert/libv4lconvert.c.orig 2008-09-08 14:34:57.000000000 -0400
++++ libv4lconvert/libv4lconvert.c 2008-09-08 14:38:17.000000000 -0400
+@@ -19,7 +19,11 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <syscall.h>
++#else
++#include <sys/syscall.h>
++#endif
+ #include <unistd.h>
+ #include "libv4lconvert.h"
+ #include "libv4lconvert-priv.h"
diff --git a/graphics/libv4l/patches/patch-ac b/graphics/libv4l/patches/patch-ac
new file mode 100644
index 00000000000..9633d6d03d2
--- /dev/null
+++ b/graphics/libv4l/patches/patch-ac
@@ -0,0 +1,14 @@
+--- include/libv4l2.h.orig 2008-09-08 14:42:22.000000000 -0400
++++ include/libv4l2.h 2008-09-08 14:43:43.000000000 -0400
+@@ -22,6 +22,11 @@
+ #include <stdio.h>
+ #include <unistd.h>
+
++#ifdef __NetBSD__
++#include <sys/types.h>
++typedef off_t __off64_t;
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
diff --git a/graphics/libv4l/patches/patch-ad b/graphics/libv4l/patches/patch-ad
new file mode 100644
index 00000000000..fb03a0abdce
--- /dev/null
+++ b/graphics/libv4l/patches/patch-ad
@@ -0,0 +1,25 @@
+--- libv4l2/libv4l2.c.orig 2008-09-08 14:41:10.000000000 -0400
++++ libv4l2/libv4l2.c 2008-09-08 14:42:04.000000000 -0400
+@@ -59,7 +59,11 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <syscall.h>
++#else
++#include <sys/syscall.h>
++#endif
+ #include <fcntl.h>
+ #include <string.h>
+ #include <unistd.h>
+@@ -69,6 +73,10 @@
+ #include "libv4l2.h"
+ #include "libv4l2-priv.h"
+
++#ifndef MAP_ANONYMOUS
++#define MAP_ANONYMOUS MAP_ANON
++#endif
++
+ /* Note these flags are stored together with the flags passed to v4l2_fd_open()
+ in v4l2_dev_info's flags member, so care should be taken that the do not
+ use the same bits! */
diff --git a/graphics/libv4l/patches/patch-ae b/graphics/libv4l/patches/patch-ae
new file mode 100644
index 00000000000..30145c33286
--- /dev/null
+++ b/graphics/libv4l/patches/patch-ae
@@ -0,0 +1,45 @@
+--- libv4l2/log.c.orig 2008-09-08 14:45:43.000000000 -0400
++++ libv4l2/log.c 2008-09-08 14:47:53.000000000 -0400
+@@ -18,6 +18,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <linux/ioctl.h>
+ /* These headers are not needed by us, but by linux/videodev2.h,
+ which is broken on some systems and doesn't include them itself :( */
+@@ -25,9 +26,20 @@
+ #include <asm/types.h>
+ /* end broken header workaround includes */
+ #include <linux/videodev2.h>
++#else
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <sys/time.h>
++#include <sys/videoio.h>
++#endif
+ #include "libv4l2.h"
+ #include "libv4l2-priv.h"
+
++#ifdef __NetBSD__
++#define _IOC_NR(x) ((x) & 0xff)
++#define _IOC_TYPE IOCGROUP
++#endif
++
+ #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
+
+ FILE *v4l2_log_file = NULL;
+@@ -84,11 +96,13 @@
+ [_IOC_NR(VIDIOC_ENUMAUDOUT)] = "VIDIOC_ENUMAUDOUT",
+ [_IOC_NR(VIDIOC_G_PRIORITY)] = "VIDIOC_G_PRIORITY",
+ [_IOC_NR(VIDIOC_S_PRIORITY)] = "VIDIOC_S_PRIORITY",
++#ifdef VIDIOC_G_SLICED_VBI_CAP
+ [_IOC_NR(VIDIOC_G_SLICED_VBI_CAP)] = "VIDIOC_G_SLICED_VBI_CAP",
+ [_IOC_NR(VIDIOC_LOG_STATUS)] = "VIDIOC_LOG_STATUS",
+ [_IOC_NR(VIDIOC_G_EXT_CTRLS)] = "VIDIOC_G_EXT_CTRLS",
+ [_IOC_NR(VIDIOC_S_EXT_CTRLS)] = "VIDIOC_S_EXT_CTRLS",
+ [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS",
++#endif
+ };
+
+ void v4l2_log_ioctl(unsigned long int request, void *arg, int result)
diff --git a/graphics/libv4l/patches/patch-af b/graphics/libv4l/patches/patch-af
new file mode 100644
index 00000000000..a580419e284
--- /dev/null
+++ b/graphics/libv4l/patches/patch-af
@@ -0,0 +1,38 @@
+--- libv4l2/v4l2convert.c.orig 2008-09-08 14:48:19.000000000 -0400
++++ libv4l2/v4l2convert.c 2008-09-08 14:50:00.000000000 -0400
+@@ -24,11 +24,16 @@
+
+ #include <stdarg.h>
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <syscall.h>
++#else
++#include <sys/syscall.h>
++#endif
+ #include <fcntl.h>
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
++#ifdef __linux__
+ /* These headers are not needed by us, but by linux/videodev2.h,
+ which is broken on some systems and doesn't include them itself :( */
+ #include <sys/time.h>
+@@ -36,8 +41,18 @@
+ #include <linux/ioctl.h>
+ /* end broken header workaround includes */
+ #include <linux/videodev2.h>
++#else
++#include <sys/types.h>
++#include <sys/time.h>
++#include <sys/ioctl.h>
++#include <sys/videoio.h>
++#endif
+ #include <libv4l2.h>
+
++#ifndef O_LARGEFILE
++#define O_LARGEFILE 0
++#endif
++
+ /* Check that open/read/mmap is not a define */
+ #if defined open || defined read || defined mmap
+ #error open/read/mmap is a prepocessor macro !!
diff --git a/graphics/libv4l/patches/patch-ag b/graphics/libv4l/patches/patch-ag
new file mode 100644
index 00000000000..407b8960f29
--- /dev/null
+++ b/graphics/libv4l/patches/patch-ag
@@ -0,0 +1,11 @@
+--- Makefile.orig 2008-09-08 14:50:17.000000000 -0400
++++ Makefile 2008-09-08 14:50:32.000000000 -0400
+@@ -4,7 +4,7 @@
+ all clean install:
+ $(MAKE) -C libv4lconvert V4L2_LIB_VERSION=$(V4L2_LIB_VERSION) $@
+ $(MAKE) -C libv4l2 V4L2_LIB_VERSION=$(V4L2_LIB_VERSION) $@
+- $(MAKE) -C libv4l1 V4L2_LIB_VERSION=$(V4L2_LIB_VERSION) $@
++ #$(MAKE) -C libv4l1 V4L2_LIB_VERSION=$(V4L2_LIB_VERSION) $@
+
+ export: clean
+ mkdir /tmp/libv4l-$(V4L2_LIB_VERSION)