pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/libv4l Make this build on SunOS 5.11.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bbeab7b5a210
branches:  trunk
changeset: 602708:bbeab7b5a210
user:      hans <hans%pkgsrc.org@localhost>
date:      Wed Apr 18 17:47:22 2012 +0000

description:
Make this build on SunOS 5.11.

diffstat:

 graphics/libv4l/Makefile         |   4 +++-
 graphics/libv4l/distinfo         |  20 ++++++++++----------
 graphics/libv4l/patches/patch-aa |  10 +++++++---
 graphics/libv4l/patches/patch-ab |   7 +++++--
 graphics/libv4l/patches/patch-ac |  11 +++++++++--
 graphics/libv4l/patches/patch-ad |  30 +++++++++++++++++++++++-------
 graphics/libv4l/patches/patch-ae |  16 ++++++++++++----
 graphics/libv4l/patches/patch-af |   8 ++++++--
 graphics/libv4l/patches/patch-aj |  16 ++++++++++++----
 graphics/libv4l/patches/patch-ak |  20 ++++++++++++++++++--
 graphics/libv4l/patches/patch-al |  11 +++++++++--
 11 files changed, 114 insertions(+), 39 deletions(-)

diffs (truncated from 401 to 300 lines):

diff -r 0be94bc37564 -r bbeab7b5a210 graphics/libv4l/Makefile
--- a/graphics/libv4l/Makefile  Wed Apr 18 16:39:49 2012 +0000
+++ b/graphics/libv4l/Makefile  Wed Apr 18 17:47:22 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2010/12/27 04:58:10 obache Exp $
+# $NetBSD: Makefile,v 1.7 2012/04/18 17:47:22 hans Exp $
 
 DISTNAME=      libv4l-0.4.3
 PKGREVISION=   2
@@ -35,4 +35,6 @@
 
 PLIST_VARS=    needs_videoio
 
+CPPFLAGS.SunOS+=       -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1
+
 .include "../../mk/bsd.pkg.mk"
diff -r 0be94bc37564 -r bbeab7b5a210 graphics/libv4l/distinfo
--- a/graphics/libv4l/distinfo  Wed Apr 18 16:39:49 2012 +0000
+++ b/graphics/libv4l/distinfo  Wed Apr 18 17:47:22 2012 +0000
@@ -1,17 +1,17 @@
-$NetBSD: distinfo,v 1.7 2011/01/07 15:20:45 obache Exp $
+$NetBSD: distinfo,v 1.8 2012/04/18 17:47:22 hans 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) = a4be4c6f09f0a16affba135b10794e01d7c2541b
-SHA1 (patch-ab) = 8528622d992e977d6e28388335db0a7c29ab272f
-SHA1 (patch-ac) = e886846a68d20d9c3eed905f10143f5e9f9fa4a0
-SHA1 (patch-ad) = e5a3acfb8c2411bf76c4c43cbe09ba86a19afe84
-SHA1 (patch-ae) = afb8579ac122dc2f0958b3c3d711d3641cf3c0c0
-SHA1 (patch-af) = 88429670ab709d398d61002bddb4b210df9def6e
+SHA1 (patch-aa) = ab28c6400bbf8cf4e4e5ae6b258841574ec95ee3
+SHA1 (patch-ab) = 5ade487d6d64d280f3fdae8afad99fbd0b6e5eda
+SHA1 (patch-ac) = 5457af836909f1c9f759c6a780daeb13968ec91f
+SHA1 (patch-ad) = 1d2568e49182efcbde47c14911b6a04e088b2578
+SHA1 (patch-ae) = 1bdefe4897c6edbe4049c52d963f1769bd916750
+SHA1 (patch-af) = 5eba7f447789b2cfd42b1f73bde4dd3c1985a6b2
 SHA1 (patch-ah) = d32f2e6aa694d4f0d04e8afbf462b3e61a31bbcc
 SHA1 (patch-ai) = 8f22e4050d5e20981bfdd1fc51e572e42347c2b5
-SHA1 (patch-aj) = 2545189ac57f97ff181645132c25b32aa51f6a47
-SHA1 (patch-ak) = 7c9f3c4c5c080b0d7a19e9069e80e4884c737519
-SHA1 (patch-al) = a6eae236be7e16e03047d09b58a6f6d8baafd193
+SHA1 (patch-aj) = 868bd339adfc62925cee0bf1b1f445427e4c1474
+SHA1 (patch-ak) = 0465c3cc368609a3108f8d1aafcacf0ab3c61858
+SHA1 (patch-al) = 8d020ef01f9956b37f718a529306e5f13aaa03a3
 SHA1 (patch-am) = 0baf169cb5177f99e0d37de5820aefaee3aa71dd
diff -r 0be94bc37564 -r bbeab7b5a210 graphics/libv4l/patches/patch-aa
--- a/graphics/libv4l/patches/patch-aa  Wed Apr 18 16:39:49 2012 +0000
+++ b/graphics/libv4l/patches/patch-aa  Wed Apr 18 17:47:22 2012 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.3 2010/12/27 04:58:10 obache Exp $
+$NetBSD: patch-aa,v 1.4 2012/04/18 17:47:22 hans Exp $
 
 --- 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 @@
+@@ -22,10 +22,20 @@
  /* 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>
@@ -11,11 +11,15 @@
  #include <linux/ioctl.h>
  /* end broken header workaround includes */
  #include <linux/videodev2.h>
-+#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun)
 +#include <sys/types.h>
 +#include <sys/ioctl.h>
++#if defined(__sun)
++#include <sys/videodev2.h>
++#else
 +#include <sys/videoio.h>
 +#endif
++#endif
  
  #ifdef __cplusplus
  extern "C" {
diff -r 0be94bc37564 -r bbeab7b5a210 graphics/libv4l/patches/patch-ab
--- a/graphics/libv4l/patches/patch-ab  Wed Apr 18 16:39:49 2012 +0000
+++ b/graphics/libv4l/patches/patch-ab  Wed Apr 18 17:47:22 2012 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.2 2008/09/08 19:10:20 jmcneill Exp $
+$NetBSD: patch-ab,v 1.3 2012/04/18 17:47:22 hans Exp $
 
 --- 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 @@
+@@ -19,7 +19,14 @@
  #include <errno.h>
  #include <string.h>
  #include <stdlib.h>
@@ -11,6 +11,9 @@
 +#else
 +#include <sys/syscall.h>
 +#endif
++#ifdef __sun
++#include <alloca.h>
++#endif
  #include <unistd.h>
  #include "libv4lconvert.h"
  #include "libv4lconvert-priv.h"
diff -r 0be94bc37564 -r bbeab7b5a210 graphics/libv4l/patches/patch-ac
--- a/graphics/libv4l/patches/patch-ac  Wed Apr 18 16:39:49 2012 +0000
+++ b/graphics/libv4l/patches/patch-ac  Wed Apr 18 17:47:22 2012 +0000
@@ -1,14 +1,21 @@
-$NetBSD: patch-ac,v 1.3 2010/12/27 04:58:10 obache Exp $
+$NetBSD: patch-ac,v 1.4 2012/04/18 17:47:22 hans Exp $
 
 --- 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 @@
+@@ -22,6 +22,18 @@
  #include <stdio.h>
  #include <unistd.h>
  
 +#if defined(__NetBSD__) || defined(__DragonFly__)
 +#include <sys/types.h>
 +typedef off_t __off64_t;
++#elif defined(__sun)
++#ifdef _LARGEFILE64_SOURCE
++typedef off64_t __off64_t;
++#else
++typedef off_t __off64_t;
++#endif
++typedef off_t __off_t;
 +#endif
 +
  #ifdef __cplusplus
diff -r 0be94bc37564 -r bbeab7b5a210 graphics/libv4l/patches/patch-ad
--- a/graphics/libv4l/patches/patch-ad  Wed Apr 18 16:39:49 2012 +0000
+++ b/graphics/libv4l/patches/patch-ad  Wed Apr 18 17:47:22 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ad,v 1.4 2010/12/27 04:58:10 obache Exp $
+$NetBSD: patch-ad,v 1.5 2012/04/18 17:47:22 hans Exp $
 
 * XXX
 * `mode_t' is promoted to `int' when passwd through `...'.
@@ -17,10 +17,14 @@
  #include <fcntl.h>
  #include <string.h>
  #include <unistd.h>
-@@ -69,6 +73,10 @@
+@@ -69,6 +73,14 @@
  #include "libv4l2.h"
  #include "libv4l2-priv.h"
  
++#ifdef __sun
++#define __off_t off_t
++#endif
++
 +#ifndef MAP_ANONYMOUS
 +#define MAP_ANONYMOUS MAP_ANON
 +#endif
@@ -28,7 +32,7 @@
  /* 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! */
-@@ -154,7 +162,7 @@ static int v4l2_map_buffers(int index)
+@@ -154,7 +166,7 @@ static int v4l2_map_buffers(int index)
        break;
      }
  
@@ -37,7 +41,7 @@
        (size_t)buf.length, PROT_READ|PROT_WRITE, MAP_SHARED, devices[index].fd,
        (__off_t)(buf.m.offset >> MMAP2_PAGE_SHIFT));
      if (devices[index].frame_pointers[i] == MAP_FAILED) {
-@@ -408,7 +416,7 @@ int v4l2_open (const char *file, int ofl
+@@ -408,7 +420,7 @@ int v4l2_open (const char *file, int ofl
      mode_t mode;
  
      va_start (ap, oflag);
@@ -46,7 +50,19 @@
  
      fd = syscall(SYS_open, file, oflag, mode);
  
-@@ -871,7 +879,7 @@ int v4l2_ioctl (int fd, unsigned long in
+@@ -584,7 +596,11 @@ int v4l2_dup(int fd)
+   int index;
+ 
+   if ((index = v4l2_get_index(fd)) == -1)
++#ifdef __sun
++    return syscall(SYS_fcntl, fd, F_DUPFD, 0);
++#else
+     return syscall(SYS_dup, fd);
++#endif
+ 
+   devices[index].open_count++;
+ 
+@@ -871,7 +887,7 @@ int v4l2_ioctl (int fd, unsigned long in
           but we need the buffer _now_ to write our converted data
           to it! */
        if (devices[index].convert_mmap_buf == MAP_FAILED) {
@@ -55,7 +71,7 @@
                                                   (size_t)(
                                                     devices[index].no_frames *
                                                     V4L2_FRAME_BUF_SIZE),
-@@ -995,7 +1003,7 @@ void *v4l2_mmap(void *start, size_t leng
+@@ -995,7 +1011,7 @@ void *v4l2_mmap(void *start, size_t leng
        return MAP_FAILED;
      }
  
@@ -64,7 +80,7 @@
                           (__off_t)(offset >> MMAP2_PAGE_SHIFT));
    }
  
-@@ -1012,7 +1020,7 @@ void *v4l2_mmap(void *start, size_t leng
+@@ -1012,7 +1028,7 @@ void *v4l2_mmap(void *start, size_t leng
    }
  
    if (devices[index].convert_mmap_buf == MAP_FAILED) {
diff -r 0be94bc37564 -r bbeab7b5a210 graphics/libv4l/patches/patch-ae
--- a/graphics/libv4l/patches/patch-ae  Wed Apr 18 16:39:49 2012 +0000
+++ b/graphics/libv4l/patches/patch-ae  Wed Apr 18 17:47:22 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ae,v 1.3 2010/12/27 04:58:10 obache Exp $
+$NetBSD: patch-ae,v 1.4 2012/04/18 17:47:22 hans Exp $
 
 --- libv4l2/log.c.orig 2008-09-08 14:45:43.000000000 -0400
 +++ libv4l2/log.c      2008-09-08 14:47:53.000000000 -0400
@@ -10,7 +10,7 @@
  #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 @@
+@@ -25,9 +26,28 @@
  #include <asm/types.h>
  /* end broken header workaround includes */
  #include <linux/videodev2.h>
@@ -18,12 +18,20 @@
 +#include <sys/types.h>
 +#include <sys/ioctl.h>
 +#include <sys/time.h>
++#ifdef __sun
++#include <sys/videodev2.h>
++#else
 +#include <sys/videoio.h>
 +#endif
++#endif
  #include "libv4l2.h"
  #include "libv4l2-priv.h"
  
-+#if defined(__NetBSD__) || defined(__DragonFly__)
++#if defined(__sun)
++#define IOCGROUP(x)   (((x) >> 8) & 0xff)
++#endif
++
++#if defined(__NetBSD__) || defined(__DragonFly__) || defined(__sun)
 +#define _IOC_NR(x)    ((x) & 0xff)
 +#define _IOC_TYPE     IOCGROUP
 +#endif
@@ -31,7 +39,7 @@
  #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
  
  FILE *v4l2_log_file = NULL;
-@@ -84,11 +96,13 @@
+@@ -84,11 +104,13 @@ static const char *v4l2_ioctls[] = {
        [_IOC_NR(VIDIOC_ENUMAUDOUT)]       = "VIDIOC_ENUMAUDOUT",
        [_IOC_NR(VIDIOC_G_PRIORITY)]       = "VIDIOC_G_PRIORITY",
        [_IOC_NR(VIDIOC_S_PRIORITY)]       = "VIDIOC_S_PRIORITY",
diff -r 0be94bc37564 -r bbeab7b5a210 graphics/libv4l/patches/patch-af
--- a/graphics/libv4l/patches/patch-af  Wed Apr 18 16:39:49 2012 +0000
+++ b/graphics/libv4l/patches/patch-af  Wed Apr 18 17:47:22 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-af,v 1.3 2011/01/07 15:20:45 obache Exp $
+$NetBSD: patch-af,v 1.4 2012/04/18 17:47:22 hans Exp $
 
 * XXXX
 * `mode_t' is promoted to `int' when passed through `...'.
@@ -22,7 +22,7 @@
  /* 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 @@
+@@ -36,8 +41,22 @@
  #include <linux/ioctl.h>
  /* end broken header workaround includes */
  #include <linux/videodev2.h>
@@ -30,8 +30,12 @@
 +#include <sys/types.h>
 +#include <sys/time.h>
 +#include <sys/ioctl.h>
++#ifdef __sun
++#include <sys/videodev2.h>
++#else
 +#include <sys/videoio.h>
 +#endif
++#endif
  #include <libv4l2.h>
  
 +#ifndef O_LARGEFILE
diff -r 0be94bc37564 -r bbeab7b5a210 graphics/libv4l/patches/patch-aj
--- a/graphics/libv4l/patches/patch-aj  Wed Apr 18 16:39:49 2012 +0000
+++ b/graphics/libv4l/patches/patch-aj  Wed Apr 18 17:47:22 2012 +0000
@@ -1,13 +1,21 @@
-$NetBSD: patch-aj,v 1.1 2009/01/10 21:04:23 jmcneill Exp $
+$NetBSD: patch-aj,v 1.2 2012/04/18 17:47:22 hans Exp $
 
 --- include/libv4l1.h.orig     2009-01-10 15:36:53.000000000 -0500
 +++ include/libv4l1.h  2009-01-10 15:37:29.000000000 -0500



Home | Main Index | Thread Index | Old Index