mirror of
https://github.com/openbsd/ports.git
synced 2026-06-18 07:24:23 +02:00
update to motion-4.1.1
This commit is contained in:
+12
-13
@@ -1,12 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.15 2018/01/11 19:27:04 rpe Exp $
|
||||
# $OpenBSD: Makefile,v 1.16 2018/03/29 19:31:00 sthen Exp $
|
||||
|
||||
V= 4.1.1
|
||||
COMMENT= motion detection software for video
|
||||
|
||||
GH_ACCOUNT= Motion-Project
|
||||
GH_PROJECT= motion
|
||||
GH_COMMIT= 9b4c16cae0ea77950cc156a9c82947ac51825f68
|
||||
V= 3.4.1
|
||||
REVISION= 5
|
||||
GH_TAGNAME= release-$V
|
||||
DISTNAME= motion-$V
|
||||
|
||||
CATEGORIES= multimedia
|
||||
@@ -18,10 +17,13 @@ MAINTAINER= Stuart Henderson <sthen@openbsd.org>
|
||||
# GPL (according to source files, v2 only. website says v2+).
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
|
||||
WANTLIB += SDL avcodec avformat avutil c jpeg m pthread sqlite3 swscale
|
||||
WANTLIB += avcodec avdevice avformat avutil c jpeg m pthread sqlite3 swscale
|
||||
|
||||
FLAVOR?=
|
||||
FLAVORS= bktr mysql pgsql
|
||||
FLAVORS= mysql pgsql
|
||||
|
||||
FLAVOR_COMMA= ${FLAVOR_EXT:S/-/,/g}
|
||||
SUBST_VARS= FLAVOR_COMMA
|
||||
|
||||
LIB_DEPENDS= databases/sqlite3 \
|
||||
graphics/jpeg \
|
||||
@@ -40,10 +42,6 @@ CONFIGURE_ARGS= --without-optimizecpu \
|
||||
LDFLAGS="-L${LOCALBASE}/lib" \
|
||||
CPPFLAGS="-I${LOCALBASE}/include"
|
||||
|
||||
.if ${FLAVOR:L:Mbktr}
|
||||
CONFIGURE_ARGS+= --without-v4l
|
||||
.endif
|
||||
|
||||
.if ${FLAVOR:L:Mmysql}
|
||||
LIB_DEPENDS+= databases/mariadb
|
||||
WANTLIB+= lib/mysql/mysqlclient z
|
||||
@@ -61,9 +59,6 @@ CONFIGURE_ARGS+= --without-pgsql
|
||||
|
||||
NO_TEST= Yes
|
||||
|
||||
post-extract:
|
||||
printf '#!/bin/sh\necho -n "$V-Git-${GH_COMMIT:C/[0-9a-f]{33}$//}"\n' > ${WRKSRC}/version.sh
|
||||
|
||||
post-patch:
|
||||
cd ${WRKSRC} && AUTOCONF_VERSION=${AUTOCONF_VERSION} \
|
||||
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} autoreconf -fiv
|
||||
@@ -72,6 +67,10 @@ pre-configure:
|
||||
perl -pi -e s,/usr/local/etc,${SYSCONFDIR},g \
|
||||
${WRKSRC}/motion-dist.conf.in
|
||||
|
||||
post-install:
|
||||
cd ${PREFIX}/share/examples/motion; \
|
||||
rm -f motion.init-{Fedora,Debian,FreeBSD.sh} motion.service
|
||||
|
||||
.include <bsd.port.arch.mk>
|
||||
|
||||
.if ${ARCH:Mamd64}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
SHA256 (motion-3.4.1-9b4c16ca.tar.gz) = kU6defhInQp1gPFmhb5x9RvxriQAgtiTNLoztn4Qwao=
|
||||
SIZE (motion-3.4.1-9b4c16ca.tar.gz) = 387288
|
||||
SHA256 (motion-4.1.1.tar.gz) = IHS5Nb3+KPhMLDIzJ0sGkIM2d48wO7E1MNQpnD+KpOI=
|
||||
SIZE (motion-4.1.1.tar.gz) = 447795
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.1 2018/03/29 19:31:00 sthen Exp $
|
||||
|
||||
Index: Makefile.in
|
||||
--- Makefile.in.orig
|
||||
+++ Makefile.in
|
||||
@@ -103,7 +103,7 @@ pre-mobject-info:
|
||||
################################################################################
|
||||
%.o: @top_srcdir@/%.c
|
||||
@echo -e "\tCompiling $< into $@..."
|
||||
- @$(CC) -c $(CFLAGS) -I@top_builddir@ $< -o $@
|
||||
+ $(CC) -c $(CFLAGS) -I@top_builddir@ $< -o $@
|
||||
|
||||
################################################################################
|
||||
# Include the dependency file if it exists. #
|
||||
@@ -122,7 +122,7 @@ endif
|
||||
################################################################################
|
||||
$(DEPEND_FILE): *.h $(SRC)
|
||||
@echo "Generating dependencies, please wait..."
|
||||
- @$(CC) $(CFLAGS) -I@top_builddir@ -M $(SRC) > .tmp
|
||||
+ $(CC) $(CFLAGS) -I@top_builddir@ -M $(SRC) > .tmp
|
||||
@mv -f .tmp $(DEPEND_FILE)
|
||||
@echo
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.4 2018/03/29 19:31:00 sthen Exp $
|
||||
|
||||
Index: configure.ac
|
||||
--- configure.ac.orig
|
||||
+++ configure.ac
|
||||
@@ -106,7 +106,7 @@ if test "x${BKTR}" = "xyes"; then
|
||||
fi
|
||||
fi
|
||||
if test "${V4L2}" = "yes"; then
|
||||
- AC_CHECK_HEADERS(linux/videodev2.h,[V4L2="yes"],[V4L2="no"])
|
||||
+ AC_CHECK_HEADERS(sys/videoio.h,[V4L2="yes"],[V4L2="no"])
|
||||
fi
|
||||
|
||||
if test "x${V4L2}" = "xyes"; then
|
||||
@@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-event_c,v 1.1 2018/03/29 19:31:00 sthen Exp $
|
||||
|
||||
Index: event.c
|
||||
--- event.c.orig
|
||||
+++ event.c
|
||||
@@ -353,7 +353,7 @@ static void event_stream_put(struct context *cnt,
|
||||
}
|
||||
|
||||
|
||||
-#if defined(HAVE_V4L2) && !defined(__FreeBSD__)
|
||||
+#if defined(HAVE_V4L2) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
|
||||
static void event_vlp_putpipe(struct context *cnt,
|
||||
motion_event type ATTRIBUTE_UNUSED,
|
||||
struct image_data *img_data, char *dummy ATTRIBUTE_UNUSED, void *devpipe,
|
||||
@@ -1022,7 +1022,7 @@ struct event_handlers event_handlers[] = {
|
||||
EVENT_IMAGE_SNAPSHOT,
|
||||
event_image_snapshot
|
||||
},
|
||||
-#if defined(HAVE_V4L2) && !defined(__FreeBSD__)
|
||||
+#if defined(HAVE_V4L2) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
|
||||
{
|
||||
EVENT_IMAGE,
|
||||
event_vlp_putpipe
|
||||
@@ -1,7 +1,8 @@
|
||||
$OpenBSD: patch-motion-dist_conf_in,v 1.2 2015/01/30 20:58:18 sthen Exp $
|
||||
--- motion-dist.conf.in.orig Mon Jan 26 00:12:50 2015
|
||||
+++ motion-dist.conf.in Fri Jan 30 20:45:21 2015
|
||||
@@ -74,7 +74,7 @@ v4l2_palette 17
|
||||
$OpenBSD: patch-motion-dist_conf_in,v 1.3 2018/03/29 19:31:00 sthen Exp $
|
||||
Index: motion-dist.conf.in
|
||||
--- motion-dist.conf.in.orig
|
||||
+++ motion-dist.conf.in
|
||||
@@ -49,7 +49,7 @@ v4l2_palette 17
|
||||
# The video input to be used (default: -1)
|
||||
# Should normally be set to 0 or 1 for video/TV cards, and -1 for USB cameras
|
||||
# Set to 0 for uvideo(4) on OpenBSD
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-motion_c,v 1.3 2018/03/29 19:31:00 sthen Exp $
|
||||
|
||||
Index: motion.c
|
||||
--- motion.c.orig
|
||||
+++ motion.c
|
||||
@@ -1071,7 +1071,7 @@ static int motion_init(struct context *cnt)
|
||||
/* create a reference frame */
|
||||
alg_update_reference_frame(cnt, RESET_REF_FRAME);
|
||||
|
||||
-#if defined(HAVE_V4L2) && !defined(__FreeBSD__)
|
||||
+#if defined(HAVE_V4L2) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
|
||||
/* open video loopback devices if enabled */
|
||||
if (cnt->conf.vidpipe) {
|
||||
MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "Opening video loopback device for normal pictures");
|
||||
@@ -1,15 +1,16 @@
|
||||
$OpenBSD: patch-track_c,v 1.3 2015/11/20 11:57:19 sthen Exp $
|
||||
--- track.c.orig Thu Nov 19 18:38:24 2015
|
||||
+++ track.c Thu Nov 19 18:39:44 2015
|
||||
@@ -6,7 +6,11 @@
|
||||
* This program is published under the GNU Public license
|
||||
*/
|
||||
#ifdef MOTION_V4L2
|
||||
$OpenBSD: patch-track_c,v 1.4 2018/03/29 19:31:00 sthen Exp $
|
||||
Index: track.c
|
||||
--- track.c.orig
|
||||
+++ track.c
|
||||
@@ -9,7 +9,11 @@
|
||||
#include "motion.h"
|
||||
|
||||
#ifdef HAVE_V4L2
|
||||
+#if defined(HAVE_LINUX_VIDEODEV_H)
|
||||
#include <linux/videodev2.h>
|
||||
+#elif defined(HAVE_SYS_VIDEOIO_H)
|
||||
+#include <sys/videoio.h>
|
||||
+#endif
|
||||
#endif /* MOTION_V4L2 */
|
||||
#include <math.h>
|
||||
#include "motion.h"
|
||||
#include "pwc-ioctl.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-video_v4l2_c,v 1.1 2018/03/29 19:31:00 sthen Exp $
|
||||
|
||||
Index: video_v4l2.c
|
||||
--- video_v4l2.c.orig
|
||||
+++ video_v4l2.c
|
||||
@@ -23,7 +23,11 @@
|
||||
|
||||
#ifdef HAVE_V4L2
|
||||
|
||||
+#ifdef __OpenBSD__
|
||||
+#include <sys/videoio.h>
|
||||
+#else
|
||||
#include <linux/videodev2.h>
|
||||
+#endif
|
||||
|
||||
/* video4linux stuff */
|
||||
#define NORM_DEFAULT 0
|
||||
@@ -1,4 +1,5 @@
|
||||
@comment $OpenBSD: PLIST,v 1.4 2015/11/20 11:57:19 sthen Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.5 2018/03/29 19:31:00 sthen Exp $
|
||||
@pkgpath multimedia/motion,bktr${FLAVOR_COMMA}
|
||||
@newgroup _motion:704
|
||||
@newuser _motion:704:_motion:daemon:motion user:/nonexistent:/sbin/nologin
|
||||
@bin bin/motion
|
||||
@@ -7,17 +8,18 @@ share/doc/motion/
|
||||
share/doc/motion/CHANGELOG
|
||||
share/doc/motion/COPYING
|
||||
share/doc/motion/CREDITS
|
||||
share/doc/motion/README
|
||||
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/examples/motion/
|
||||
share/examples/motion/camera1-dist.conf
|
||||
share/examples/motion/camera2-dist.conf
|
||||
share/examples/motion/camera3-dist.conf
|
||||
share/examples/motion/camera4-dist.conf
|
||||
share/examples/motion/motion-dist.conf
|
||||
@sample ${SYSCONFDIR}/motion/
|
||||
@sample ${SYSCONFDIR}/motion/motion.conf
|
||||
@comment share/examples/motion/motion.init-Debian
|
||||
@comment share/examples/motion/motion.init-Fedora
|
||||
@comment share/examples/motion/motion.init-FreeBSD.sh
|
||||
share/examples/motion/thread1-dist.conf
|
||||
share/examples/motion/thread2-dist.conf
|
||||
share/examples/motion/thread3-dist.conf
|
||||
share/examples/motion/thread4-dist.conf
|
||||
@rcscript ${RCDIR}/motion
|
||||
|
||||
Reference in New Issue
Block a user