pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/libv4l Add license and fix Linux build to use...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/92723ac1db36
branches:  trunk
changeset: 352178:92723ac1db36
user:      richard <richard%pkgsrc.org@localhost>
date:      Thu Sep 08 15:43:12 2016 +0000

description:
Add license and fix Linux build to use SYS_openat syscall when SYS_open
isn't available.

Also, videodev.h is expected in include/linux to build.

Upgrade to more current version next time around.

diffstat:

 graphics/libv4l/Makefile         |   7 ++++---
 graphics/libv4l/distinfo         |   8 ++++----
 graphics/libv4l/patches/patch-ad |  29 +++++++++++++++++++++++------
 graphics/libv4l/patches/patch-af |  25 ++++++++++++++++++++-----
 graphics/libv4l/patches/patch-ak |  22 +++++++++++++++++++---
 5 files changed, 70 insertions(+), 21 deletions(-)

diffs (240 lines):

diff -r 2ae6375c927a -r 92723ac1db36 graphics/libv4l/Makefile
--- a/graphics/libv4l/Makefile  Thu Sep 08 15:41:01 2016 +0000
+++ b/graphics/libv4l/Makefile  Thu Sep 08 15:43:12 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2016/08/28 15:48:32 wiz Exp $
+# $NetBSD: Makefile,v 1.12 2016/09/08 15:43:12 richard Exp $
 
 DISTNAME=      libv4l-0.4.3
 PKGREVISION=   3
@@ -8,6 +8,7 @@
 MAINTAINER=    tech-multimedia%NetBSD.org@localhost
 HOMEPAGE=      http://people.atrpms.net/~hdegoede/
 COMMENT=       Video4Linux userspace library
+LICENSE=       gnu-gpl-v2
 
 USE_GCC_RUNTIME=       yes
 
@@ -29,8 +30,8 @@
        ${INSTALL_DATA} ${FILESDIR}/videoio.h ${DESTDIR}${PREFIX}/include/sys
 .elif !exists(/usr/include/linux/videodev.h)
 pre-configure:
-       ${MKDIR} ${BUILDLINK_DIR}/include
-       cp ${FILESDIR}/videodev.h ${BUILDLINK_DIR}/include/videodev.h
+       ${MKDIR} ${BUILDLINK_DIR}/include/linux
+       cp ${FILESDIR}/videodev.h ${BUILDLINK_DIR}/include/linux
 .endif
 
 PLIST_VARS=    needs_videoio
diff -r 2ae6375c927a -r 92723ac1db36 graphics/libv4l/distinfo
--- a/graphics/libv4l/distinfo  Thu Sep 08 15:41:01 2016 +0000
+++ b/graphics/libv4l/distinfo  Thu Sep 08 15:43:12 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2016/08/28 15:48:32 wiz Exp $
+$NetBSD: distinfo,v 1.15 2016/09/08 15:43:12 richard Exp $
 
 SHA1 (libv4l-0.4.3.tar.gz) = 2539aa6b04650b97c9fc7ba95721f1e362a73031
 RMD160 (libv4l-0.4.3.tar.gz) = 4f0435d955f15602ac093385607417fab71deb17
@@ -7,12 +7,12 @@
 SHA1 (patch-aa) = 2e6e4d525be190a890c03ca3d00ba77f7e06d124
 SHA1 (patch-ab) = 5ade487d6d64d280f3fdae8afad99fbd0b6e5eda
 SHA1 (patch-ac) = 5457af836909f1c9f759c6a780daeb13968ec91f
-SHA1 (patch-ad) = 1d2568e49182efcbde47c14911b6a04e088b2578
+SHA1 (patch-ad) = 998090cf0748a9ecb51455de1fc5c0371795f226
 SHA1 (patch-ae) = 1bdefe4897c6edbe4049c52d963f1769bd916750
-SHA1 (patch-af) = 80ffb8b9aba0c80cac137f7755f1e7ac67a3d1e0
+SHA1 (patch-af) = 47c55033c1ce23ea725f5d377c71140289cfb9a3
 SHA1 (patch-ah) = d32f2e6aa694d4f0d04e8afbf462b3e61a31bbcc
 SHA1 (patch-ai) = 8f22e4050d5e20981bfdd1fc51e572e42347c2b5
 SHA1 (patch-aj) = 521abdfba83a34716ce0909f75d784fe0b6ecc8a
-SHA1 (patch-ak) = 0465c3cc368609a3108f8d1aafcacf0ab3c61858
+SHA1 (patch-ak) = 64995ff50b0f306703d42177920fe5ce230fee85
 SHA1 (patch-al) = 8d020ef01f9956b37f718a529306e5f13aaa03a3
 SHA1 (patch-am) = 21573a1e8cb19dd1d96b4e4898b72ef4ea22a984
diff -r 2ae6375c927a -r 92723ac1db36 graphics/libv4l/patches/patch-ad
--- a/graphics/libv4l/patches/patch-ad  Thu Sep 08 15:41:01 2016 +0000
+++ b/graphics/libv4l/patches/patch-ad  Thu Sep 08 15:43:12 2016 +0000
@@ -1,7 +1,8 @@
-$NetBSD: patch-ad,v 1.5 2012/04/18 17:47:22 hans Exp $
+$NetBSD: patch-ad,v 1.6 2016/09/08 15:43:12 richard Exp $
 
 * XXX
 * `mode_t' is promoted to `int' when passwd through `...'.
+* if SYS_open doesn't exist, use SYS_openat
 
 --- libv4l2/libv4l2.c.orig     2008-09-03 10:23:46.000000000 +0000
 +++ libv4l2/libv4l2.c
@@ -41,16 +42,32 @@
        (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 +420,7 @@ int v4l2_open (const char *file, int ofl
+@@ -408,14 +420,22 @@ int v4l2_open (const char *file, int ofl
      mode_t mode;
  
      va_start (ap, oflag);
 -    mode = va_arg (ap, mode_t);
 +    mode = (mode_t)va_arg (ap, int);
  
++#ifdef SYS_open
      fd = syscall(SYS_open, file, oflag, mode);
+-
++#else
++    fd = syscall(SYS_openat, AT_FDCWD, file, oflag, mode);
++#endif
++ 
+     va_end(ap);
+   }
+   else
++#ifdef SYS_open
+     fd = syscall(SYS_open, file, oflag);
++#else
++    fd = syscall(SYS_openat, AT_FDCWD, file, oflag);
++#endif
+   /* end of original open code */
  
-@@ -584,7 +596,11 @@ int v4l2_dup(int fd)
+   if (fd == -1)
+@@ -584,7 +604,11 @@ int v4l2_dup(int fd)
    int index;
  
    if ((index = v4l2_get_index(fd)) == -1)
@@ -62,7 +79,7 @@
  
    devices[index].open_count++;
  
-@@ -871,7 +887,7 @@ int v4l2_ioctl (int fd, unsigned long in
+@@ -871,7 +895,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) {
@@ -71,7 +88,7 @@
                                                   (size_t)(
                                                     devices[index].no_frames *
                                                     V4L2_FRAME_BUF_SIZE),
-@@ -995,7 +1011,7 @@ void *v4l2_mmap(void *start, size_t leng
+@@ -995,7 +1019,7 @@ void *v4l2_mmap(void *start, size_t leng
        return MAP_FAILED;
      }
  
@@ -80,7 +97,7 @@
                           (__off_t)(offset >> MMAP2_PAGE_SHIFT));
    }
  
-@@ -1012,7 +1028,7 @@ void *v4l2_mmap(void *start, size_t leng
+@@ -1012,7 +1036,7 @@ void *v4l2_mmap(void *start, size_t leng
    }
  
    if (devices[index].convert_mmap_buf == MAP_FAILED) {
diff -r 2ae6375c927a -r 92723ac1db36 graphics/libv4l/patches/patch-af
--- a/graphics/libv4l/patches/patch-af  Thu Sep 08 15:41:01 2016 +0000
+++ b/graphics/libv4l/patches/patch-af  Thu Sep 08 15:43:12 2016 +0000
@@ -1,8 +1,9 @@
-$NetBSD: patch-af,v 1.6 2016/08/28 15:48:32 wiz Exp $
+$NetBSD: patch-af,v 1.7 2016/09/08 15:43:12 richard Exp $
 
 * XXXX
 * `mode_t' is promoted to `int' when passed through `...'.
 * Fix SunOS 64-bit.
+* if SYS_open doesn't exist, use SYS_openat
 
 --- libv4l2/v4l2convert.c.orig 2008-08-26 12:32:39.000000000 +0000
 +++ libv4l2/v4l2convert.c
@@ -46,16 +47,30 @@
  /* Check that open/read/mmap is not a define */
  #if defined open || defined read || defined mmap
  #error open/read/mmap is a prepocessor macro !!
-@@ -61,7 +80,7 @@ LIBV4L_PUBLIC int open (const char *file
+@@ -61,13 +80,20 @@ LIBV4L_PUBLIC int open (const char *file
      mode_t mode;
  
      va_start (ap, oflag);
 -    mode = va_arg (ap, mode_t);
 +    mode = (sizeof (mode_t) < sizeof (int) ? (mode_t)va_arg (ap, int) : va_arg (ap, mode_t));
  
++#ifdef SYS_OPEN
      fd = syscall(SYS_open, file, oflag, mode);
+-
++#else
++    fd = syscall(SYS_openat, AT_FDCWD, file, oflag, mode);
++#endif
+     va_end(ap);
+   } else
++#ifdef SYS_OPEN
+     fd = syscall(SYS_open, file, oflag);
++#else
++    fd = syscall(SYS_openat, AT_FDCWD, file, oflag);
++#endif
+   /* end of original open code */
  
-@@ -92,6 +111,7 @@ LIBV4L_PUBLIC int open (const char *file
+   if (fd == -1)
+@@ -92,6 +118,7 @@ LIBV4L_PUBLIC int open (const char *file
    return fd;
  }
  
@@ -63,7 +78,7 @@
  LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
  {
    int fd;
-@@ -114,6 +134,7 @@ LIBV4L_PUBLIC int open64(const char *fil
+@@ -114,6 +141,7 @@ LIBV4L_PUBLIC int open64(const char *fil
  
    return fd;
  }
@@ -71,7 +86,7 @@
  
  LIBV4L_PUBLIC int close(int fd)
  {
-@@ -137,22 +158,19 @@ LIBV4L_PUBLIC int ioctl (int fd, unsigne
+@@ -137,22 +165,19 @@ LIBV4L_PUBLIC int ioctl (int fd, unsigne
    return v4l2_ioctl (fd, request, arg);
  }
  
diff -r 2ae6375c927a -r 92723ac1db36 graphics/libv4l/patches/patch-ak
--- a/graphics/libv4l/patches/patch-ak  Thu Sep 08 15:41:01 2016 +0000
+++ b/graphics/libv4l/patches/patch-ak  Thu Sep 08 15:43:12 2016 +0000
@@ -1,7 +1,8 @@
-$NetBSD: patch-ak,v 1.4 2012/04/18 17:47:22 hans Exp $
+$NetBSD: patch-ak,v 1.5 2016/09/08 15:43:12 richard Exp $
 
 * XXX
 * 'mode_t' is promoted to `int' when passwd through `...'.
+* if SYS_open doesn't exist, use SYS_openat
 
 --- libv4l1/libv4l1.c.orig     2008-08-06 08:46:06.000000000 +0000
 +++ libv4l1/libv4l1.c
@@ -45,16 +46,31 @@
  #define V4L1_SUPPORTS_ENUMINPUT 0x01
  #define V4L1_SUPPORTS_ENUMSTD   0x02
  #define V4L1_PIX_FMT_TOUCHED    0x04
-@@ -267,7 +278,7 @@ int v4l1_open (const char *file, int ofl
+@@ -267,13 +282,20 @@ int v4l1_open (const char *file, int ofl
      mode_t mode;
  
      va_start (ap, oflag);
 -    mode = va_arg (ap, mode_t);
 +    mode = (sizeof (mode_t) < sizeof (int) ? (mode_t)va_arg (ap, int) : va_arg (ap, mode_t));
  
++#ifdef SYS_open
      fd = syscall(SYS_open, file, oflag, mode);
+-
++#else
++    fd = syscall(SYS_openat, AT_FDCWD, file, oflag, mode);
++#endif
+     va_end(ap);
+   } else
+-    fd = syscall(SYS_open, file, oflag);
++#ifdef SYS_open
++     fd = syscall(SYS_open, file, oflag);
++#else
++     fd = syscall(SYS_openat, AT_FDCWD, file, oflag);
++#endif
+   /* end of original open code */
  
-@@ -434,7 +449,11 @@ int v4l1_dup(int fd)
+   if (fd == -1)
+@@ -434,7 +456,11 @@ int v4l1_dup(int fd)
    int index;
  
    if ((index = v4l1_get_index(fd)) == -1)



Home | Main Index | Thread Index | Old Index