pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/libv4l Allow building libv4l on older NetBSD ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d51dccb1c581
branches: trunk
changeset: 547475:d51dccb1c581
user: joerg <joerg%pkgsrc.org@localhost>
date: Wed Sep 17 14:04:54 2008 +0000
description:
Allow building libv4l on older NetBSD systems by providing videoio.h.
Don't override user CFLAGS.
Bump revision.
diffstat:
graphics/libv4l/Makefile | 23 +-
graphics/libv4l/PLIST | 3 +-
graphics/libv4l/distinfo | 7 +-
graphics/libv4l/files/videoio.h | 721 +++++++++++++++++++++++++++++++++++++++
graphics/libv4l/patches/patch-ag | 8 +-
graphics/libv4l/patches/patch-ah | 16 +-
graphics/libv4l/patches/patch-ai | 13 +
7 files changed, 769 insertions(+), 22 deletions(-)
diffs (truncated from 856 to 300 lines):
diff -r 2af6e5ff67a8 -r d51dccb1c581 graphics/libv4l/Makefile
--- a/graphics/libv4l/Makefile Wed Sep 17 13:44:16 2008 +0000
+++ b/graphics/libv4l/Makefile Wed Sep 17 14:04:54 2008 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/09/08 19:07:41 jmcneill Exp $
+# $NetBSD: Makefile,v 1.2 2008/09/17 14:04:54 joerg Exp $
DISTNAME= libv4l-0.4.3
+PKGREVISION= 1
CATEGORIES= graphics
MASTER_SITES= http://people.atrpms.net/~hdegoede/
@@ -12,12 +13,20 @@
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
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD" && !exists(/usr/include/sys/videoio.h)
+PLIST.needs_videoio= yes
+INSTALLATION_DIRS+= include/sys
+
+pre-configure:
+ ${MKDIR} ${WRKSRC}/include/sys
+ cp ${FILESDIR}/videoio.h ${WRKSRC}/include/sys
+
+post-install:
+ ${INSTALL_DATA} ${FILESDIR}/videoio.h ${DESTDIR}${PREFIX}/include/sys
.endif
+PLIST_VARS= needs_videoio
+
.include "../../mk/bsd.pkg.mk"
diff -r 2af6e5ff67a8 -r d51dccb1c581 graphics/libv4l/PLIST
--- a/graphics/libv4l/PLIST Wed Sep 17 13:44:16 2008 +0000
+++ b/graphics/libv4l/PLIST Wed Sep 17 14:04:54 2008 +0000
@@ -1,6 +1,7 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2008/09/08 19:07:41 jmcneill Exp $
+@comment $NetBSD: PLIST,v 1.2 2008/09/17 14:04:54 joerg Exp $
include/libv4l2.h
include/libv4lconvert.h
+${PLIST.needs_videoio}include/sys/videoio.h
lib/libv4l/v4l2convert.so
lib/libv4l2.so
lib/libv4l2.so.0
diff -r 2af6e5ff67a8 -r d51dccb1c581 graphics/libv4l/distinfo
--- a/graphics/libv4l/distinfo Wed Sep 17 13:44:16 2008 +0000
+++ b/graphics/libv4l/distinfo Wed Sep 17 14:04:54 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2008/09/13 17:59:27 jmcneill Exp $
+$NetBSD: distinfo,v 1.4 2008/09/17 14:04:54 joerg Exp $
SHA1 (libv4l-0.4.3.tar.gz) = 2539aa6b04650b97c9fc7ba95721f1e362a73031
RMD160 (libv4l-0.4.3.tar.gz) = 4f0435d955f15602ac093385607417fab71deb17
@@ -9,5 +9,6 @@
SHA1 (patch-ad) = 053ec7cea81c916d172df6f6f450fec23638d38f
SHA1 (patch-ae) = d1cadfdf41f7b46311e828600352bfac6c3d6c22
SHA1 (patch-af) = ce15db36e94b0e386f86b4a024a5eb6d972d0958
-SHA1 (patch-ag) = 540fec30c0c506f80763df81a07711ce0b3cbf27
-SHA1 (patch-ah) = 08d7facfc9d67c2b4b9850750da8645f6efcb052
+SHA1 (patch-ag) = 37489786e4d783e498493b41bf2c541457bedbf6
+SHA1 (patch-ah) = d32f2e6aa694d4f0d04e8afbf462b3e61a31bbcc
+SHA1 (patch-ai) = 8f22e4050d5e20981bfdd1fc51e572e42347c2b5
diff -r 2af6e5ff67a8 -r d51dccb1c581 graphics/libv4l/files/videoio.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/libv4l/files/videoio.h Wed Sep 17 14:04:54 2008 +0000
@@ -0,0 +1,721 @@
+/* $NetBSD: videoio.h,v 1.1 2008/09/17 14:04:54 joerg Exp $ */
+
+/*-
+ * Copyright (c) 2005, 2008 Jared D. McNeill <jmcneill%invisible.ca@localhost>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* See http://v4l2spec.bytesex.org/ for Video4Linux 2 specifications */
+
+#ifndef _HAVE_SYS_VIDEOIO_H
+#define _HAVE_SYS_VIDEOIO_H
+
+#include <sys/types.h>
+#include <sys/time.h>
+
+#ifndef _KERNEL
+#define __u64 uint64_t
+#define __u32 uint32_t
+#define __u16 uint16_t
+#define __u8 uint8_t
+#define __s64 int64_t
+#define __s32 int32_t
+#define __s16 int16_t
+#define __s8 int8_t
+#endif
+
+typedef uint64_t v4l2_std_id;
+#define v4l2_fourcc(a,b,c,d) (((uint32_t)(a) << 0) | \
+ ((uint32_t)(b) << 8) | \
+ ((uint32_t)(c) << 16) | \
+ ((uint32_t)(d) << 24))
+#if 0
+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+#endif
+
+#define V4L2_CTRL_ID2CLASS(id) ((id >> 16) & 0xfff)
+#define V4L2_CTRL_ID2CID(id) (id & 0xffff)
+
+enum v4l2_colorspace {
+ V4L2_COLORSPACE_SMPTE170M = 1,
+ V4L2_COLORSPACE_SMPTE240M,
+ V4L2_COLORSPACE_REC709,
+ V4L2_COLORSPACE_BT878,
+ V4L2_COLORSPACE_470_SYSTEM_M,
+ V4L2_COLORSPACE_470_SYSTEM_BG,
+ V4L2_COLORSPACE_JPEG,
+ V4L2_COLORSPACE_SRGB
+};
+
+enum v4l2_field {
+ V4L2_FIELD_ANY = 0,
+ V4L2_FIELD_NONE,
+ V4L2_FIELD_TOP,
+ V4L2_FIELD_BOTTOM,
+ V4L2_FIELD_INTERLACED,
+ V4L2_FIELD_SEQ_TB,
+ V4L2_FIELD_SEQ_BT,
+ V4L2_FIELD_ALTERNATE
+};
+
+enum v4l2_buf_type {
+ V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
+ V4L2_BUF_TYPE_VIDEO_OUTPUT,
+ V4L2_BUF_TYPE_VIDEO_OVERLAY,
+ V4L2_BUF_TYPE_VBI_CAPTURE,
+ V4L2_BUF_TYPE_VBI_OUTPUT,
+ V4L2_BUF_TYPE_PRIVATE = 0x80
+};
+
+enum v4l2_memory {
+ V4L2_MEMORY_MMAP = 1,
+ V4L2_MEMORY_USERPTR,
+ V4L2_MEMORY_OVERLAY
+};
+
+enum v4l2_priority {
+ V4L2_PRIORITY_UNSET = 0,
+ V4L2_PRIORITY_BACKGROUND,
+ V4L2_PRIORITY_INTERACTIVE,
+ V4L2_PRIORITY_RECORD,
+ V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE
+};
+
+enum v4l2_tuner_type {
+ V4L2_TUNER_RADIO = 1,
+ V4L2_TUNER_ANALOG_TV
+};
+
+enum v4l2_ctrl_type {
+ V4L2_CTRL_TYPE_INTEGER = 1,
+ V4L2_CTRL_TYPE_BOOLEAN,
+ V4L2_CTRL_TYPE_MENU,
+ V4L2_CTRL_TYPE_BUTTON
+};
+
+struct v4l2_timecode {
+ uint32_t type;
+ uint32_t flags;
+ uint8_t frames;
+ uint8_t seconds;
+ uint8_t minutes;
+ uint8_t hours;
+ uint8_t userbits[4];
+};
+
+struct v4l2_pix_format {
+ uint32_t width;
+ uint32_t height;
+ uint32_t pixelformat;
+ enum v4l2_field field;
+ uint32_t bytesperline;
+ uint32_t sizeimage;
+ enum v4l2_colorspace colorspace;
+ uint32_t priv;
+};
+
+struct v4l2_buffer {
+ uint32_t index;
+ enum v4l2_buf_type type;
+ uint32_t bytesused;
+ uint32_t flags;
+ enum v4l2_field field;
+ struct timeval timestamp;
+ struct v4l2_timecode timecode;
+ uint32_t sequence;
+ enum v4l2_memory memory;
+ union {
+ uint32_t offset;
+ unsigned long userptr;
+ } m;
+ uint32_t length;
+ uint32_t input;
+ uint32_t reserved;
+};
+
+struct v4l2_rect {
+ int32_t left;
+ int32_t top;
+ int32_t width;
+ int32_t height;
+};
+
+struct v4l2_fract {
+ uint32_t numerator;
+ uint32_t denominator;
+};
+
+struct v4l2_fmtdesc {
+ uint32_t index;
+ enum v4l2_buf_type type;
+ uint32_t flags;
+ uint8_t description[32];
+ uint32_t pixelformat;
+ uint32_t reserved[4];
+};
+
+struct v4l2_clip {
+ struct v4l2_rect c;
+ struct v4l2_clip *next;
+};
+
+struct v4l2_window {
+ struct v4l2_rect w;
+ enum v4l2_field field;
+ uint32_t chromakey;
+ struct v4l2_clip *clips;
+ uint32_t clipcount;
+ void *bitmap;
+};
+
+struct v4l2_vbi_format {
+ uint32_t sampling_rate;
+ uint32_t offset;
+ uint32_t samples_per_line;
+ uint32_t sample_format;
+ uint32_t start[2];
+ uint32_t count[2];
+ uint32_t flags;
+ uint32_t reserved[2];
+};
+
+/* In the API docs, but not the Linux implementation
+ *
+ * struct v4l2_sliced_vbi_format {
+ * uint32_t service_set;
+ * uint32_t packet_size;
+ * uint32_t io_size;
+ * uint32_t reserved;
+ * };
+ *
+ *
+ * struct v4l2_sliced_data {
+ * uint32_t id;
+ * uint32_t line;
+ * uint8_t data[];
+ * };
+ */
+
+struct v4l2_cropcap {
+ enum v4l2_buf_type type;
+ struct v4l2_rect bounds;
+ struct v4l2_rect defrect;
+ struct v4l2_fract pixelaspect;
+};
+
+struct v4l2_input {
+ uint32_t index;
Home |
Main Index |
Thread Index |
Old Index