Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2016 23:40:47 +0000 (UTC)
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r428697 - in head/multimedia/motion: . files
Message-ID:  <201612162340.uBGNelfA052231@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhale
Date: Fri Dec 16 23:40:47 2016
New Revision: 428697
URL: https://svnweb.freebsd.org/changeset/ports/428697

Log:
  Update to 4.0.1
  Project has moved to Github and is under active development
  Add support for Sqlite 3 database
  Convert to options helpers
  Move 3 line pkg-plist into the Makefile

Added:
  head/multimedia/motion/files/patch-conf.c   (contents, props changed)
  head/multimedia/motion/files/patch-configure.ac
     - copied, changed from r428696, head/multimedia/motion/files/patch-configure.in
  head/multimedia/motion/files/patch-netcam.c   (contents, props changed)
  head/multimedia/motion/files/patch-track.c   (contents, props changed)
  head/multimedia/motion/files/patch-video__freebsd.c   (contents, props changed)
  head/multimedia/motion/files/patch-webhttpd.c   (contents, props changed)
Deleted:
  head/multimedia/motion/files/patch-configure.in
  head/multimedia/motion/pkg-plist
Modified:
  head/multimedia/motion/Makefile
  head/multimedia/motion/distinfo
  head/multimedia/motion/files/pkg-message.in
  head/multimedia/motion/pkg-descr

Modified: head/multimedia/motion/Makefile
==============================================================================
--- head/multimedia/motion/Makefile	Fri Dec 16 20:30:31 2016	(r428696)
+++ head/multimedia/motion/Makefile	Fri Dec 16 23:40:47 2016	(r428697)
@@ -2,110 +2,99 @@
 # $FreeBSD$
 
 PORTNAME=	motion
-PORTVERSION=	3.2.12
-PORTREVISION=	5
+PORTVERSION=	4.0.1
+DISTVERSIONPREFIX=	release-
 CATEGORIES=	multimedia
-MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}%20-%20${PORTVERSION:R}/${PORTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Motion detection application
 
-LICENSE=	GPLv2
+LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-OPTIONS_DEFINE=	FFMPEG MYSQL PGSQL DOCS EXAMPLES
-OPTIONS_SINGLE=	VIDEO
-OPTIONS_SINGLE_VIDEO=	BKTR PWCBSD
-OPTIONS_DEFAULT=	BKTR FFMPEG
-VIDEO_DESC=	Video capture driver. Choose one of BKTR or PWCBSD
-BKTR_DESC=	BKTR based TV capture cards
-PWCBSD_DESC=	PWCBSD based Webcams
+USE_GITHUB=	yes
+GH_ACCOUNT=	Motion-Project
 
-USES=		autoreconf gmake jpeg
+USES=		autoreconf gmake jpeg localbase pkgconfig
 GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--without-linuxthreads \
+		--without-jpeg-mmx
+
+KMODDIR?=	/boot/modules
+.if ${KMODDIR} == /boot/kernel
+KMODDIR=	/boot/modules
+.endif
 
 USE_RC_SUBR=	${PORTNAME}
 SUB_FILES=	pkg-message
 
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
-
-PORTDOCS=	CHANGELOG CREDITS README README.FreeBSD \
+PLIST_FILES=	bin/motion \
+		man/man1/motion.1.gz \
+		"@sample etc/motion.conf.sample"
+PORTDOCS=	CHANGELOG CREDITS README.md README.FreeBSD \
 		motion_guide.html
-PORTEXAMPLES=	motion-dist.conf thread1.conf thread2.conf \
-		thread3.conf thread4.conf
+PORTEXAMPLES=	camera1-dist.conf camera2-dist.conf \
+		camera3-dist.conf camera4-dist.conf
 
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE=		DOCS EXAMPLES FFMPEG MYSQL PGSQL SQLITE3
+OPTIONS_SINGLE=		VIDEO
+OPTIONS_SINGLE_VIDEO=	BKTR PWCBSD
+OPTIONS_DEFAULT=	BKTR FFMPEG
+VIDEO_DESC=		Video capture driver
 
-.if ${PORT_OPTIONS:MBKTR}
-CONFIGURE_ARGS+=--with-bktr
-.else
-CONFIGURE_ARGS+=--without-bktr
-.endif
+BKTR_DESC=		BKTR based TV capture cards
+BKTR_CONFIGURE_WITH=	bktr
 
-.if ${PORT_OPTIONS:MPWCBSD}
-# Location /boot/modules is hard coded in the pwc port, so use it here too
-KMODDIR=	/boot/modules
-BUILD_DEPENDS+=	v4l_compat>=1.0.20060801:multimedia/v4l_compat
-RUN_DEPENDS+=	${KMODDIR}/pwc.ko:multimedia/pwcbsd
-CONFIGURE_ARGS+=--with-pwcbsd
-.else
-CONFIGURE_ARGS+=--without-pwcbsd
-.endif
+PWCBSD_DESC=		PWCBSD based Webcams
+PWCBSD_BUILD_DEPENDS=	v4l_compat>=1.0.20060801:multimedia/v4l_compat
+PWCBSD_RUN_DEPENDS=	${KMODDIR}/pwc.ko:multimedia/pwcbsd
+PWCBSD_CONFIGURE_WITH=	pwcbsd
+
+FFMPEG_LIB_DEPENDS=	libavformat.so:multimedia/ffmpeg
+FFMPEG_CONFIGURE_ON=	--with-ffmpeg=${LOCALBASE}
+FFMPEG_CONFIGURE_OFF=	--without-ffmpeg
+
+MYSQL_USES=		mysql
+MYSQL_CONFIGURE_ON=	--with-mysql-lib=${LOCALBASE}/lib/mysql \
+			--with-mysql-include=${LOCALBASE}/include/mysql
+MYSQL_CONFIGURE_OFF=	--without-mysql
+
+PGSQL_USES=		pgsql
+PGSQL_CONFIGURE_ON=	--with-pgsql-lib=${LOCALBASE}/lib \
+			--with-pgsql-include=${LOCALBASE}/include
+PGSQL_CONFIGURE_OFF=	--without-pgsql
 
-CONFIGURE_ARGS+=--without-linuxthreads
+SQLITE3_USES=		sqlite:3
+SQLITE3_CONFIGURE_WITH=	sqlite3
 
-.if ${PORT_OPTIONS:MFFMPEG}
-LIB_DEPENDS+=	libavformat0.so:multimedia/ffmpeg0
-CONFIGURE_ARGS+=--with-ffmpeg=${LOCALBASE}
-.else
-CONFIGURE_ARGS+=--without-ffmpeg
-.endif
-
-.if ${PORT_OPTIONS:MMYSQL}
-USE_MYSQL=	yes
-CONFIGURE_ARGS+=--with-mysql-lib=${LOCALBASE}/lib/mysql \
-		--with-mysql-include=${LOCALBASE}/include/mysql
-.else
-CONFIGURE_ARGS+=--without-mysql
-.endif
+.include <bsd.port.pre.mk>
 
-.if ${PORT_OPTIONS:MPGSQL}
-USES+=		pgsql
-CONFIGURE_ARGS+=--with-pgsql-lib=${LOCALBASE}/lib \
-		--with-pgsql-include=${LOCALBASE}/include
-.else
-CONFIGURE_ARGS+=--without-pgsql
+.if ${JPEG_PORT} == "graphics/jpeg-turbo"
+CONFIGURE_ARGS+=	--with-jpeg-turbo=${LOCALBASE}
 .endif
 
-.include <bsd.port.pre.mk>
-
 post-patch:
 	@${REINPLACE_CMD} -e \
-		's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/configure.in
-# Resolve name collision with jpeg-8
-	@${REINPLACE_CMD} -e \
-		's|jpeg_mem_dest|local_jpeg_mem_dest|' ${WRKSRC}/picture.c
+		's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/configure.ac
 # Fix pidfile path
 	@${REINPLACE_CMD} -e \
 		's|/run/motion|/run|' ${WRKSRC}/motion-dist.conf.in
+# Fix warnings about mismatched format specifiers (Fixed upstream in dbd7282)
+	@${REINPLACE_CMD} -e \
+		's|%hd|%d|g;s|%hu|%u|g;s|%Zu|%zu|g' ${WRKSRC}/webhttpd.c ${WRKSRC}/stream.c
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/motion ${STAGEDIR}${PREFIX}/bin
 	${INSTALL_MAN} ${WRKSRC}/motion.1 ${STAGEDIR}${MANPREFIX}/man/man1
 	${INSTALL_DATA} ${WRKSRC}/motion-dist.conf \
 		${STAGEDIR}${PREFIX}/etc/motion.conf.sample
-.if ${PORT_OPTIONS:MDOCS}
+
+do-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-.for f in ${PORTDOCS}
-	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
-.endfor
-.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+do-install-EXAMPLES-on:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-.for f in ${PORTEXAMPLES}
-	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${EXAMPLESDIR}
-.endfor
-.endif
+	${INSTALL_DATA} ${PORTEXAMPLES:S|^|${WRKSRC}/|} ${STAGEDIR}${EXAMPLESDIR}
 
 .include <bsd.port.post.mk>

Modified: head/multimedia/motion/distinfo
==============================================================================
--- head/multimedia/motion/distinfo	Fri Dec 16 20:30:31 2016	(r428696)
+++ head/multimedia/motion/distinfo	Fri Dec 16 23:40:47 2016	(r428697)
@@ -1,2 +1,3 @@
-SHA256 (motion-3.2.12.tar.gz) = a597f8d7ec0bf3c5fb62722c4eead59717fe01c2ae0d256c642027cea74b2f0a
-SIZE (motion-3.2.12.tar.gz) = 425729
+TIMESTAMP = 1481857527
+SHA256 (Motion-Project-motion-release-4.0.1_GH0.tar.gz) = 2f67669a09ce0481ecd987028dae1c5cb135dfdc3c254c06ab7c9ca0c6c183f0
+SIZE (Motion-Project-motion-release-4.0.1_GH0.tar.gz) = 444779

Added: head/multimedia/motion/files/patch-conf.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/motion/files/patch-conf.c	Fri Dec 16 23:40:47 2016	(r428697)
@@ -0,0 +1,254 @@
+Convert old GNU field designator syntax to C99 syntax to remove some
+annoying warnings. Fixed upstream in a870946, mostly.
+
+--- conf.c.orig	2016-10-25 01:39:24 UTC
++++ conf.c
+@@ -49,131 +49,131 @@ char *get_current_dir_name(void)
+ #define stripnewline(x) {if ((x)[strlen(x)-1]=='\n') (x)[strlen(x) - 1] = 0; }
+ 
+ struct config conf_template = {
+-    camera_name:                    NULL,
+-    width:                          DEF_WIDTH,
+-    height:                         DEF_HEIGHT,
+-    quality:                        DEF_QUALITY,
+-    camera_id:                      0,
+-    rotate_deg:                     0,
+-    max_changes:                    DEF_CHANGES,
+-    threshold_tune:                 0,
+-    output_pictures:                "on",
+-    motion_img:                     0,
+-    emulate_motion:                 0,
+-    event_gap:                      DEF_EVENT_GAP,
+-    max_movie_time:                 DEF_MAXMOVIETIME,
+-    snapshot_interval:              0,
+-    locate_motion_mode:             "off",
+-    locate_motion_style:            "box",
+-    input:                          IN_DEFAULT,
+-    norm:                           0,
+-    frame_limit:                    DEF_MAXFRAMERATE,
+-    quiet:                          1,
+-    picture_type:                   "jpeg",
+-    noise:                          DEF_NOISELEVEL,
+-    noise_tune:                     1,
+-    minimum_frame_time:             0,
+-    lightswitch:                    0,
+-    autobright:                     0,
+-    brightness:                     0,
+-    contrast:                       0,
+-    saturation:                     0,
+-    hue:                            0,
+-    power_line_frequency:           -1,
+-    roundrobin_frames:              1,
+-    roundrobin_skip:                1,
+-    pre_capture:                    0,
+-    post_capture:                   0,
+-    switchfilter:                   0,
+-    ffmpeg_output:                  0,
+-    extpipe:                        NULL,
+-    useextpipe:                     0,
+-    ffmpeg_output_debug:            0,
+-    ffmpeg_bps:                     DEF_FFMPEG_BPS,
+-    ffmpeg_vbr:                     DEF_FFMPEG_VBR,
+-    ffmpeg_video_codec:             DEF_FFMPEG_CODEC,
++    .camera_name =                   NULL,
++    .width =                         DEF_WIDTH,
++    .height =                        DEF_HEIGHT,
++    .quality =                       DEF_QUALITY,
++    .camera_id =                     0,
++    .rotate_deg =                    0,
++    .max_changes =                   DEF_CHANGES,
++    .threshold_tune =                0,
++    .output_pictures =               "on",
++    .motion_img =                    0,
++    .emulate_motion =                0,
++    .event_gap =                     DEF_EVENT_GAP,
++    .max_movie_time =                DEF_MAXMOVIETIME,
++    .snapshot_interval =             0,
++    .locate_motion_mode =            "off",
++    .locate_motion_style =           "box",
++    .input =                         IN_DEFAULT,
++    .norm =                          0,
++    .frame_limit =                   DEF_MAXFRAMERATE,
++    .quiet =                         1,
++    .picture_type =                  "jpeg",
++    .noise =                         DEF_NOISELEVEL,
++    .noise_tune =                    1,
++    .minimum_frame_time =            0,
++    .lightswitch =                   0,
++    .autobright =                    0,
++    .brightness =                    0,
++    .contrast =                      0,
++    .saturation =                    0,
++    .hue =                           0,
++    .power_line_frequency =          -1,
++    .roundrobin_frames =             1,
++    .roundrobin_skip =               1,
++    .pre_capture =                   0,
++    .post_capture =                  0,
++    .switchfilter =                  0,
++    .ffmpeg_output =                 0,
++    .extpipe =                       NULL,
++    .useextpipe =                    0,
++    .ffmpeg_output_debug =           0,
++    .ffmpeg_bps =                    DEF_FFMPEG_BPS,
++    .ffmpeg_vbr =                    DEF_FFMPEG_VBR,
++    .ffmpeg_video_codec =            DEF_FFMPEG_CODEC,
+ #ifdef HAVE_SDL
+-    sdl_threadnr:                   0,
++    .sdl_threadnr =                  0,
+ #endif
+-    ipv6_enabled:                   0,
+-    stream_port:                    0,
+-    stream_quality:                 50,
+-    stream_motion:                  0,
+-    stream_maxrate:                 1,
+-    stream_localhost:               1,
+-    stream_limit:                   0,
+-    stream_auth_method:             0,
+-    stream_authentication:          NULL,
+-    stream_preview_scale:           25,
+-    stream_preview_newline:         0,
+-    webcontrol_port:                0,
+-    webcontrol_localhost:           1,
+-    webcontrol_html_output:         1,
+-    webcontrol_authentication:      NULL,
+-    frequency:                      0,
+-    tuner_number:                   0,
+-    timelapse:                      0,
+-    timelapse_mode:                 DEF_TIMELAPSE_MODE,
++    .ipv6_enabled =                  0,
++    .stream_port =                   0,
++    .stream_quality =                50,
++    .stream_motion =                 0,
++    .stream_maxrate =                1,
++    .stream_localhost =              1,
++    .stream_limit =                  0,
++    .stream_auth_method =            0,
++    .stream_authentication =         NULL,
++    .stream_preview_scale =          25,
++    .stream_preview_newline =        0,
++    .webcontrol_port =               0,
++    .webcontrol_localhost =          1,
++    .webcontrol_html_output =        1,
++    .webcontrol_authentication =     NULL,
++    .frequency =                     0,
++    .tuner_number =                  0,
++    .timelapse =                     0,
++    .timelapse_mode =                DEF_TIMELAPSE_MODE,
+ #if (defined(BSD))
+-    tuner_device:                   NULL,
++    .tuner_device =                  NULL,
+ #endif
+-    video_device:                   VIDEO_DEVICE,
+-    v4l2_palette:                   DEF_PALETTE,
+-    vidpipe:                        NULL,
+-    filepath:                       NULL,
+-    imagepath:                      DEF_IMAGEPATH,
+-    moviepath:                      DEF_MOVIEPATH,
+-    snappath:                       DEF_SNAPPATH,
+-    timepath:                       DEF_TIMEPATH,
+-    on_event_start:                 NULL,
+-    on_event_end:                   NULL,
+-    mask_file:                      NULL,
+-    smart_mask_speed:               0,
++    .video_device =                  VIDEO_DEVICE,
++    .v4l2_palette =                  DEF_PALETTE,
++    .vidpipe =                       NULL,
++    .filepath =                      NULL,
++    .imagepath =                     DEF_IMAGEPATH,
++    .moviepath =                     DEF_MOVIEPATH,
++    .snappath =                      DEF_SNAPPATH,
++    .timepath =                      DEF_TIMEPATH,
++    .on_event_start =                NULL,
++    .on_event_end =                  NULL,
++    .mask_file =                     NULL,
++    .smart_mask_speed =              0,
+ #if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3)
+-    sql_log_image:                  1,
+-    sql_log_snapshot:               1,
+-    sql_log_movie:                  0,
+-    sql_log_timelapse:              0,
+-    sql_query:                      DEF_SQL_QUERY,
+-    database_type:                  NULL,
+-    database_dbname:                NULL,
+-    database_host:                  "localhost",
+-    database_user:                  NULL,
+-    database_password:              NULL,
+-    database_port:                  0,
+-    database_busy_timeout:           0,
++    .sql_log_image =                 1,
++    .sql_log_snapshot =              1,
++    .sql_log_movie =                 0,
++    .sql_log_timelapse =             0,
++    .sql_query =                     DEF_SQL_QUERY,
++    .database_type =                 NULL,
++    .database_dbname =               NULL,
++    .database_host =                 "localhost",
++    .database_user =                 NULL,
++    .database_password =             NULL,
++    .database_port =                 0,
++    .database_busy_timeout =          0,
+ #endif /* defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || define(HAVE_SQLITE3) */
+-    on_picture_save:                NULL,
+-    on_motion_detected:             NULL,
+-    on_area_detected:               NULL,
+-    on_movie_start:                 NULL,
+-    on_movie_end:                   NULL,
+-    on_camera_lost:                 NULL,
+-    motionvidpipe:                  NULL,
+-    netcam_url:                     NULL,
+-    netcam_userpass:                NULL,
+-    netcam_keepalive:               "off",
+-    netcam_proxy:                   NULL,
+-    netcam_tolerant_check:          0,
+-    rtsp_uses_tcp:                  1,
++    .on_picture_save =               NULL,
++    .on_motion_detected =            NULL,
++    .on_area_detected =              NULL,
++    .on_movie_start =                NULL,
++    .on_movie_end =                  NULL,
++    .on_camera_lost =                NULL,
++    .motionvidpipe =                 NULL,
++    .netcam_url =                    NULL,
++    .netcam_userpass =               NULL,
++    .netcam_keepalive =              "off",
++    .netcam_proxy =                  NULL,
++    .netcam_tolerant_check =         0,
++    .rtsp_uses_tcp =                 1,
+ #ifdef HAVE_MMAL
+-    mmalcam_name:                   NULL,
+-    mmalcam_control_params:         NULL,
++    .mmalcam_name =                  NULL,
++    .mmalcam_control_params =        NULL,
+ #endif
+-    text_changes:                   0,
+-    text_left:                      NULL,
+-    text_right:                     DEF_TIMESTAMP,
+-    text_event:                     DEF_EVENTSTAMP,
+-    text_double:                    0,
+-    despeckle_filter:               NULL,
+-    area_detect:                    NULL,
+-    minimum_motion_frames:          1,
+-    exif_text:                      NULL,
+-    pid_file:                       NULL,
+-    log_file:                       NULL,
+-    log_level:                      LEVEL_DEFAULT+10,
+-    log_type_str:                   NULL,
+-    camera_dir:                     sysconfdir"/conf.d"
++    .text_changes =                  0,
++    .text_left =                     NULL,
++    .text_right =                    DEF_TIMESTAMP,
++    .text_event =                    DEF_EVENTSTAMP,
++    .text_double =                   0,
++    .despeckle_filter =              NULL,
++    .area_detect =                   NULL,
++    .minimum_motion_frames =         1,
++    .exif_text =                     NULL,
++    .pid_file =                      NULL,
++    .log_file =                      NULL,
++    .log_level =                     LEVEL_DEFAULT+10,
++    .log_type_str =                  NULL,
++    .camera_dir =                    sysconfdir"/conf.d"
+ };
+ 
+ 

Copied and modified: head/multimedia/motion/files/patch-configure.ac (from r428696, head/multimedia/motion/files/patch-configure.in)
==============================================================================
--- head/multimedia/motion/files/patch-configure.in	Fri Dec 16 20:30:31 2016	(r428696, copy source)
+++ head/multimedia/motion/files/patch-configure.ac	Fri Dec 16 23:40:47 2016	(r428697)
@@ -1,78 +1,11 @@
---- configure.in.orig	2010-06-01 10:48:23.000000000 +0400
-+++ configure.in	2013-12-01 13:32:23.000000000 +0400
-@@ -316,7 +316,7 @@
- #
- else if test "${FFMPEG_DIR}" = "yes"; then
- 	# AUTODETECT STATIC/SHARED LIB 
--	AC_MSG_CHECKING(for ffmpeg autodetecting)
-+	AC_MSG_CHECKING(for ffmpeg autodetecting libraries)
- 
- 	if test -f /usr/lib64/libavcodec.a -o -f /usr/lib64/libavcodec.so && test -f /usr/lib64/libavformat.a -o -f /usr/lib64/libavformat.so ; then
- 		AC_MSG_RESULT(found in /usr/lib64)
-@@ -347,11 +347,11 @@
- 		echo ""		
- 	fi 
- else
--	AC_MSG_CHECKING(for ffmpeg in -> [${FFMPEG_DIR}] <-)
--	if test -f ${FFMPEG_DIR}/lib/libavcodec.a -o -f ${FFMPEG_DIR}/lib/libavcodec.so && test -f ${FFMPEG_DIR}/lib/libavformat.a -o -f ${FFMPEG_DIR}/lib/libavformat.so ; then
-+	AC_MSG_CHECKING(for ffmpeg libraries in -> [${FFMPEG_DIR}] <-)
-+	if test -f ${FFMPEG_DIR}/lib/ffmpeg0/libavcodec0.a -o -f ${FFMPEG_DIR}/lib/ffmpeg0/libavcodec0.so && test -f ${FFMPEG_DIR}/lib/ffmpeg0/libavformat0.a -o -f ${FFMPEG_DIR}/lib/ffmpeg0/libavformat0.so ; then
- 		AC_MSG_RESULT(found)
- 		FFMPEG_OK="found"
--		FFMPEG_LIB="${FFMPEG_DIR}/lib"
-+		FFMPEG_LIB="${FFMPEG_DIR}/lib/ffmpeg0"
- 	elif test -f ${FFMPEG_DIR}/libavcodec.a -o -f ${FFMPEG_DIR}/libavcodec.so && test -f ${FFMPEG_DIR}/libavformat.a -o -f ${FFMPEG_DIR}/libavformat.so ; then
- 		AC_MSG_RESULT(found)
- 		FFMPEG_LIB="${FFMPEG_DIR}"
-@@ -389,12 +389,12 @@
- 	elif test -f ${FFMPEG_DIR}/include/ffmpeg/avformat.h; then
- 		AC_MSG_RESULT(found ${FFMPEG_DIR}/include/ffmpeg/avformat.h)
- 		FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include/ffmpeg"
--	elif test -f ${FFMPEG_DIR}/include/libavformat/avformat.h; then
--		AC_MSG_RESULT(found ${FFMPEG_DIR}/include/libavformat/avformat.h)
--		FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include -DFFMPEG_NEW_INCLUDES"
--    elif test -f ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h; then
--        AC_MSG_RESULT(found ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h)
--        FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include/ffmpeg -DFFMPEG_NEW_INCLUDES" 
-+#	elif test -f ${FFMPEG_DIR}/include/libavformat/avformat.h; then
-+#		AC_MSG_RESULT(found ${FFMPEG_DIR}/include/libavformat/avformat.h)
-+#		FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include -DFFMPEG_NEW_INCLUDES"
-+    elif test -f ${FFMPEG_DIR}/include/ffmpeg0/libavformat/avformat.h; then
-+        AC_MSG_RESULT(found ${FFMPEG_DIR}/include/ffmpeg0/libavformat/avformat.h)
-+        FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include/ffmpeg0 -DFFMPEG_NEW_INCLUDES" 
- 	else
- 		AC_MSG_RESULT(not found)
- 		FFMPEG_OK="no_found"
-@@ -413,9 +413,9 @@
- #
- 
- 	if  test "${FFMPEG_OK}" = "found"; then	
--		TEMP_LIBS="$TEMP_LIBS -L${FFMPEG_LIB} -lavformat -lavcodec -lavutil -lm -lz"
-+		TEMP_LIBS="$TEMP_LIBS -L${FFMPEG_LIB} -lavformat0 -lavcodec0 -lavutil0 -lm -lz"
- 		TEMP_LDFLAGS="${TEMP_LDFLAGS} -L${FFMPEG_LIB}"
--		TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_FFMPEG ${FFMPEG_CFLAGS}"
-+		TEMP_CFLAGS="-DHAVE_FFMPEG ${FFMPEG_CFLAGS} ${TEMP_CFLAGS}"
- 
- 		FFMPEG_OBJ="ffmpeg.o"
- 		AC_SUBST(FFMPEG_OBJ)
-@@ -751,7 +751,7 @@
+--- configure.ac.orig	2016-10-25 01:39:24 UTC
++++ configure.ac
+@@ -790,7 +790,7 @@ SUPPORTED_V4L2_old=false
  if test "${V4L}" = "no"; then
  	AC_MSG_CHECKING(for V42L support)
  	AC_MSG_RESULT(skipping)
 -else
 +elif test "${BKTR}" = "no"; then
- 	AC_CHECK_TYPE([struct v4l2_buffer], 
-         	      [SUPPORTED_V4L2=true],
-              	 [SUPPORTED_V4L2=false],
-@@ -1067,6 +1067,11 @@
- LIBS="${TEMP_LIBS}"
- LDFLAGS="${TEMP_LDFLAGS}"
- 
-+AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support]))
-+AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support]))
-+AC_CHECK_FUNC(av_register_protocol2, AC_DEFINE([have_av_register_protocol2],1,[Define to 1 if you have av_register_protocol2 support]))
-+AC_CHECK_FUNC(av_register_protocol, AC_DEFINE([have_av_register_protocol],1,[Define to 1 if you have av_register_protocol support]))
-+
- #
- # Add the right exec path for rc scripts
- #
+ 	AC_CHECK_TYPE([struct v4l2_buffer],
+ 		[SUPPORTED_V4L2=true],
+ 		[SUPPORTED_V4L2=false],

Added: head/multimedia/motion/files/patch-netcam.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/motion/files/patch-netcam.c	Fri Dec 16 23:40:47 2016	(r428697)
@@ -0,0 +1,13 @@
+Fix sockaddr type mismatch warnings (Fixed upstream in dbd7282)
+
+--- netcam.c.orig	2016-10-25 01:39:24 UTC
++++ netcam.c
+@@ -948,7 +948,7 @@ static int netcam_connect(netcam_context
+     }
+ 
+     /* Now the connect call will return immediately. */
+-    ret = connect(netcam->sock, &server, sizeof(server));
++    ret = connect(netcam->sock, (struct sockaddr *)&server, sizeof(server));
+     back_err = errno;           /* Save the errno from connect */
+ 
+     /* If the connect failed with anything except EINPROGRESS, error. */

Added: head/multimedia/motion/files/patch-track.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/motion/files/patch-track.c	Fri Dec 16 23:40:47 2016	(r428697)
@@ -0,0 +1,50 @@
+Convert old GNU field designator syntax to C99 syntax to remove some
+annoying warnings. Fixed upstream in a870946.
+
+--- track.c.orig	2016-10-25 01:39:24 UTC
++++ track.c
+@@ -17,25 +17,25 @@
+ 
+ 
+ struct trackoptions track_template = {
+-    dev:            -1,             /* dev open */
+-    port:           NULL,           /* char *port */
+-    motorx:         0,              /* int motorx */
+-    motory:         0,              /* int motory */
+-    maxx:           0,              /* int maxx; */
+-    maxy:           0,              /* int maxy; */
+-    minx:           0,              /* int minx; */
+-    miny:           0,              /* int miny; */
+-    homex:          128,            /* int homex; */
+-    homey:          128,            /* int homey; */
+-    motorx_reverse: 0,              /* int reversed x servo; */
+-    motory_reverse: 0,              /* int reversed y servo; */
+-    speed:          TRACK_SPEED,    /* speed */
+-    stepsize:       TRACK_STEPSIZE, /* stepsize */
+-    active:         0,              /* auto tracking active */
+-    minmaxfound:    0,              /* flag for minmax values stored for pwc based camera */
+-    step_angle_x:   10,             /* UVC step angle in degrees X-axis that camera moves during auto tracking */
+-    step_angle_y:   10,             /* UVC step angle in degrees Y-axis that camera moves during auto tracking */
+-    move_wait:      10              /* number of frames to disable motion detection after camera moving */
++    .dev =            -1,             /* dev open */
++    .port =           NULL,           /* char *port */
++    .motorx =         0,              /* int motorx */
++    .motory =         0,              /* int motory */
++    .maxx =           0,              /* int maxx; */
++    .maxy =           0,              /* int maxy; */
++    .minx =           0,              /* int minx; */
++    .miny =           0,              /* int miny; */
++    .homex =          128,            /* int homex; */
++    .homey =          128,            /* int homey; */
++    .motorx_reverse = 0,              /* int reversed x servo; */
++    .motory_reverse = 0,              /* int reversed y servo; */
++    .speed =          TRACK_SPEED,    /* speed */
++    .stepsize =       TRACK_STEPSIZE, /* stepsize */
++    .active =         0,              /* auto tracking active */
++    .minmaxfound =    0,              /* flag for minmax values stored for pwc based camera */
++    .step_angle_x =   10,             /* UVC step angle in degrees X-axis that camera moves during auto tracking */
++    .step_angle_y =   10,             /* UVC step angle in degrees Y-axis that camera moves during auto tracking */
++    .move_wait =      10              /* number of frames to disable motion detection after camera moving */
+ };
+ 
+ 

Added: head/multimedia/motion/files/patch-video__freebsd.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/motion/files/patch-video__freebsd.c	Fri Dec 16 23:40:47 2016	(r428697)
@@ -0,0 +1,20 @@
+Comment out unused struct to avoid warnings.
+
+--- video_freebsd.c.orig	2016-10-25 01:39:24 UTC
++++ video_freebsd.c
+@@ -41,6 +41,7 @@
+ 
+ #define array_elem(x) (sizeof(x) / sizeof((x)[0]))
+ 
++/*
+ static const struct camparam_st {
+   int min, max, range, drv_min, drv_range, def;
+ } CamParams[] = {
+@@ -58,6 +59,7 @@ static const struct camparam_st {
+     BT848_CHROMAREGMIN, (BT848_CHROMAREGMAX - BT848_CHROMAREGMIN + 1),
+     BT848_CHROMACENTER, },
+ };
++*/
+ 
+ #define BRIGHT 0
+ #define CONTR  1

Added: head/multimedia/motion/files/patch-webhttpd.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/motion/files/patch-webhttpd.c	Fri Dec 16 23:40:47 2016	(r428697)
@@ -0,0 +1,45 @@
+Fix warnings about mismatched format specifiers (Fixed upstream in dbd7282)
+Fix sockaddr type mismatch warnings (Fixed upstream in dbd7282)
+
+--- webhttpd.c.orig	2016-10-25 01:39:24 UTC
++++ webhttpd.c
+@@ -2067,7 +2067,7 @@ static unsigned int handle_get(int clien
+             //Send the webcontrol section if applicable
+             if (cnt[0]->conf.webcontrol_html_output) {
+                 send_template_ini_client(client_socket, ini_template);
+-                sprintf(res, "<b>Motion "VERSION" Running [%hu] Cameras</b><br>\n"
++                sprintf(res, "<b>Motion "VERSION" Running [%d] Cameras</b><br>\n"
+                              "<a href='/0/'>All</a>\n", i);
+                 send_template(client_socket, res);
+ 
+@@ -2079,7 +2079,7 @@ static unsigned int handle_get(int clien
+                         send_template(client_socket, res);
+                         counter = 0;
+                     }
+-                    sprintf(res, "<a href='/%hu/'>Camera %d%s%s</a>\n", y, cnt[y]->conf.camera_id,
++                    sprintf(res, "<a href='/%d/'>Camera %d%s%s</a>\n", y, cnt[y]->conf.camera_id,
+                                  cnt[y]->conf.camera_name ? " -- " : "",
+                                  cnt[y]->conf.camera_name ? cnt[y]->conf.camera_name : "");
+                     send_template(client_socket, res);
+@@ -2112,10 +2112,10 @@ static unsigned int handle_get(int clien
+                 send_template_end_client(client_socket);
+             } else {
+                 send_template_ini_client_raw(client_socket);
+-                sprintf(res, "Motion "VERSION" Running [%hu] Cameras\n0\n", i);
++                sprintf(res, "Motion "VERSION" Running [%d] Cameras\n0\n", i);
+                 send_template_raw(client_socket, res);
+                 for (y = 1; y < i; y++) {
+-                    sprintf(res, "%hu\n", y);
++                    sprintf(res, "%d\n", y);
+                     send_template_raw(client_socket, res);
+                 }
+             }
+@@ -2571,7 +2571,7 @@ static int acceptnonblocking(int serverf
+ 
+     if (select(serverfd + 1, &fds, NULL, NULL, &tm) > 0) {
+         if (FD_ISSET(serverfd, &fds)) {
+-            if ((curfd = accept(serverfd, &client, &client_len)) > 0)
++            if ((curfd = accept(serverfd, (struct sockaddr *)&client, &client_len)) > 0)
+                 return curfd;
+         }
+     }

Modified: head/multimedia/motion/files/pkg-message.in
==============================================================================
--- head/multimedia/motion/files/pkg-message.in	Fri Dec 16 20:30:31 2016	(r428696)
+++ head/multimedia/motion/files/pkg-message.in	Fri Dec 16 23:40:47 2016	(r428697)
@@ -4,6 +4,31 @@ To use the motion service properly, you 
 	%%PREFIX%%/etc/motion.conf
 
 according to your needs.
+
+To set up your capture device (if using BKTR):
+
+  1. Load the bktr modules
+
+    Type as root:
+      kldload bktr_mem.ko
+      kldload bktr.ko
+
+    You can setup this in your /boot/loader.conf adding:
+      bktr_mem_load="YES"
+      bktr_load="YES"
+
+  2. Configure your card settings (tuner type, format, and card)
+
+    Type as root:
+      sysctl hw.bt848.card=1 ( Miro pctv )
+      sysctl hw.bt848.tuner=10 ( PHILIPS_FR1216_PAL )
+      sysctl hw.bt848.format=0 ( PAL )
+
+    or add to /etc/sysctl.conf adding:
+      hw.bt848.card=1
+      hw.bt848.tuner=10
+      hw.bt848.format=0
+
 To automatically start the service at boot time,
 add the following line to /etc/rc.conf:
 
@@ -12,4 +37,5 @@ add the following line to /etc/rc.conf:
 Then, to start the service right now without reboot, execute
 
 	service motion start
+
 ****************************************************************

Modified: head/multimedia/motion/pkg-descr
==============================================================================
--- head/multimedia/motion/pkg-descr	Fri Dec 16 20:30:31 2016	(r428696)
+++ head/multimedia/motion/pkg-descr	Fri Dec 16 23:40:47 2016	(r428697)
@@ -3,4 +3,4 @@ capture devices that supports bktr(4) wi
 support is not yet implemented. Latest port versions supports webcams supported
 by pwcbsd.
 
-WWW: http://motion.sourceforge.net/
+WWW: https://motion-project.github.io/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612162340.uBGNelfA052231>