pkgsrc-WIP-changes archive

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

Patches added to fix compilation



Module Name:	pkgsrc-wip
Committed By:	Dave Tyson <Dave Tyson>
Pushed By:	dtyson
Date:		Mon Jun 12 14:07:54 2017 +0100
Changeset:	e833ec25e7857b9f456b84ee913f83b3d09b327b

Modified Files:
	motion/PLIST
	motion/TODO
	motion/distinfo
Added Files:
	motion/DESCR
	motion/patches/patch-stream.c
	motion/patches/patch-track.c
	motion/patches/patch-video2.c

Log Message:
Patches added to fix compilation

Portability fixes to correct includes and fix up structure sizes
to fix with NetBSD

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e833ec25e7857b9f456b84ee913f83b3d09b327b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 motion/DESCR                  |  4 ++++
 motion/PLIST                  | 19 +++++++++++++++++++
 motion/TODO                   |  6 +++++-
 motion/distinfo               |  3 +++
 motion/patches/patch-stream.c | 15 +++++++++++++++
 motion/patches/patch-track.c  | 18 ++++++++++++++++++
 motion/patches/patch-video2.c | 15 +++++++++++++++
 7 files changed, 79 insertions(+), 1 deletion(-)

diffs:
diff --git a/motion/DESCR b/motion/DESCR
new file mode 100644
index 0000000000..a6565c8091
--- /dev/null
+++ b/motion/DESCR
@@ -0,0 +1,4 @@
+Motion is a program that monitors the video signal from one or more cameras and
+is able to detect if a significant part of the picture has changed. Motion can
+output either image files of the picture frames containing motion or movie files
+showing the entire event. It can also invoke other programs when motion is seen.
diff --git a/motion/PLIST b/motion/PLIST
index 48d96a5493..d6df675f24 100644
--- a/motion/PLIST
+++ b/motion/PLIST
@@ -1 +1,20 @@
 @comment $NetBSD$
+bin/motion
+etc/motion/motion-dist.conf
+man/man1/motion.1
+share/doc/motion/CHANGELOG
+share/doc/motion/COPYING
+share/doc/motion/CREDITS
+share/doc/motion/README.md
+share/doc/motion/mask1.png
+share/doc/motion/motion_guide.html
+share/doc/motion/normal.jpg
+share/doc/motion/outputmotion1.jpg
+share/doc/motion/outputnormal1.jpg
+share/motion/examples/camera1-dist.conf
+share/motion/examples/camera2-dist.conf
+share/motion/examples/camera3-dist.conf
+share/motion/examples/camera4-dist.conf
+share/motion/examples/motion-dist.conf
+share/motion/examples/motion.init-FreeBSD.sh
+share/motion/examples/motion.service
diff --git a/motion/TODO b/motion/TODO
index 754a84a43b..281cff2c3c 100644
--- a/motion/TODO
+++ b/motion/TODO
@@ -1 +1,5 @@
-track.c:9:29: fatal error: linux/videodev2.h: No such file or directory
+basic testing with a USB webcam seems to work OK.
+
+Needs testing to see if the Brooktree video cards
+still work. Also needs the database stuff testing
+and maybe ome tweaks to PLIST. 
diff --git a/motion/distinfo b/motion/distinfo
index 2361c6006c..a7fc6c922f 100644
--- a/motion/distinfo
+++ b/motion/distinfo
@@ -4,3 +4,6 @@ SHA1 (motion-4.0.1.tar.gz) = 539d399eb1eecd8bac3456ae044da8aa6045bfc4
 RMD160 (motion-4.0.1.tar.gz) = f684f75a8b55371495466524a85d2c95a93dc827
 SHA512 (motion-4.0.1.tar.gz) = 6ccde3890e6af56f28208321987dd1b9d62a55bbe7cbc3ab5600263602e6e8f47589392c2f3a3a6cb54f927ee76aea94d0e83f26ce8e4047890c891b6c2f8976
 Size (motion-4.0.1.tar.gz) = 444779 bytes
+SHA1 (patch-stream.c) = 059344a6e901690f31e18d6d1bea5fb4a873b0c1
+SHA1 (patch-track.c) = 8bce673e68b42b62aee935ea4df38641227e6dc3
+SHA1 (patch-video2.c) = 2c441a30fa6eef1011fd4779dc023460746a893a
diff --git a/motion/patches/patch-stream.c b/motion/patches/patch-stream.c
new file mode 100644
index 0000000000..83c494f0cc
--- /dev/null
+++ b/motion/patches/patch-stream.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+portability: bind expects length to match appropriate sockaddr structure  
+
+--- stream.c.orig	2017-06-10 16:56:20.000000000 +0100
++++ stream.c	2017-06-10 16:56:47.000000000 +0100
+@@ -752,7 +752,7 @@
+         }
+     }
+ 
+-    if (bind(sd, (struct sockaddr*)&sin, sizeof(sin)) != 0) {
++    if (bind(sd, (struct sockaddr*)&sin, (ipv6_enabled?sizeof(struct sockaddr_in6):sizeof(struct sockaddr_in))) != 0) {
+         MOTION_LOG(NTC, TYPE_STREAM, NO_ERRNO, "%s: error binding on %s port %d", addr_str, port);
+         close(sd);
+         return -1;
diff --git a/motion/patches/patch-track.c b/motion/patches/patch-track.c
new file mode 100644
index 0000000000..da75b024f3
--- /dev/null
+++ b/motion/patches/patch-track.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Portability: not fixed up by configure
+
+--- track.c.orig	2016-10-25 02:39:24.000000000 +0100
++++ track.c	2017-06-10 17:55:31.000000000 +0100
+@@ -6,7 +6,11 @@
+  *    This program is published under the GNU Public license
+  */
+ #ifdef MOTION_V4L2
++#ifdef __NetBSD__
++#include <sys/videoio.h>
++#else
+ #include <linux/videodev2.h>
++#endif /* __NetBSD__ */
+ #endif /* MOTION_V4L2 */
+ #include <math.h>
+ #include "motion.h"
diff --git a/motion/patches/patch-video2.c b/motion/patches/patch-video2.c
new file mode 100644
index 0000000000..afbdb70d58
--- /dev/null
+++ b/motion/patches/patch-video2.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Portability: Fix defination to match ioctl 
+
+--- video2.c.orig	2016-10-25 02:39:24.000000000 +0100
++++ video2.c	2017-06-10 15:28:04.000000000 +0100
+@@ -184,7 +184,7 @@
+ /**
+  * xioctl
+  */
+-#ifdef __OpenBSD__
++#if defined(__OpenBSD__) || defined(__NetBSD__)
+ static int xioctl(src_v4l2_t *vid_source, unsigned long request, void *arg)
+ #else
+ static int xioctl(src_v4l2_t *vid_source, int request, void *arg)


Home | Main Index | Thread Index | Old Index