FreeBSD Bugzilla – Attachment 125394 Details for
Bug 169006
multimedia/motion: Update to version 3.2.12
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 14.97 KB, created by
tkato432
on 2012-06-12 19:10:14 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
tkato432
Created:
2012-06-12 19:10:14 UTC
Size:
14.97 KB
patch
obsolete
>diff -urN /usr/ports/multimedia/motion/Makefile multimedia/motion/Makefile >--- /usr/ports/multimedia/motion/Makefile 2012-06-07 11:01:53.000000000 +0900 >+++ multimedia/motion/Makefile 2012-06-11 06:32:59.000000000 +0900 >@@ -6,94 +6,121 @@ > # > > PORTNAME= motion >-PORTVERSION= 3.2.11.1 >-PORTREVISION= 7 >+PORTVERSION= 3.2.12 > CATEGORIES= multimedia >-MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20-%203.2/${PORTVERSION} >- >-PATCH_SITES= http://www.lavrsen.dk/twiki/pub/Motion/FreeBSDPatch/ >-PATCHFILES= motion-3.2.11.1.port-freebsd.diff.gz >-PATCH_DIST_STRIP= -p1 >+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20-%20${PORTVERSION:R}/${PORTVERSION} > > MAINTAINER= ports@FreeBSD.org > COMMENT= A motion detection application > >-LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \ >- avformat.1:${PORTSDIR}/multimedia/ffmpeg >+LICENSE= GPLv2 > >-ONLY_FOR_ARCHS= i386 amd64 >+LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg > >-MAN1= motion.1 >+OPTIONS_DEFINE= VIDEO LTHREAD FFMPEG MYSQL PGSQL DOCS EXAMPLES >+OPTIONS_SINGLE= VIDEO >+OPTIONS_SINGLE_VIDEO= BKTR PWCBSD >+OPTIONS_DEFAULT= VIDEO 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 >+LTHREAD_DESC= Use LinuxThreads instead of native POSIX threads > >-USE_AUTOTOOLS= autoconf >-GNU_CONFIGURE= yes > USE_GMAKE= yes >-MANCOMPRESSED= no >+USE_AUTOTOOLS= autoconf >+MAKE_JOBS_SAFE= yes >+ >+CPPFLAGS+= -I${LOCALBASE}/include >+LDFLAGS+= -L${LOCALBASE}/lib > > MAN1= motion.1 >-PORTDOCS= CHANGELOG CREDITS README.FreeBSD README \ >+PORTDOCS= CHANGELOG CREDITS README README.FreeBSD \ > motion_guide.html > PORTEXAMPLES= motion-dist.conf thread1.conf thread2.conf \ > thread3.conf thread4.conf > >-OPTIONS= PWCBSD "PWCBSD based Webcams (disables BKTR)" off \ >- BKTR "Support for TV Capture cards" on \ >- LINUXTHREADS "Use LinuxThreads" off >- >-.include <bsd.port.pre.mk> >+.include <bsd.port.options.mk> > >-.if !defined(WITH_BKTR) && !defined(WITH_PWCBSD) >-CFLAGS+= -DWITHOUT_V4L >+.if ${PORT_OPTIONS:MBKTR} >+CONFIGURE_ARGS+=--with-bktr >+.else >+CONFIGURE_ARGS+=--without-bktr > .endif > >-.if defined(WITH_PWCBSD) >-CONFIGURE_ARGS= --with-pwcbsd >+.if ${PORT_OPTIONS:MPWCBSD} > BUILD_DEPENDS+= v4l_compat>=1.0.20060801:${PORTSDIR}/multimedia/v4l_compat > RUN_DEPENDS+= /boot/modules/pwc.ko:${PORTSDIR}/multimedia/pwcbsd >+CONFIGURE_ARGS+=--with-pwcbsd >+.else >+CONFIGURE_ARGS+=--without-pwcbsd >+CFLAGS+= -DWITHOUT_V4L >+.endif >+ >+.if ${PORT_OPTIONS:MLTHREAD} >+LIB_DEPENDS+= lthread:${PORTSDIR}/devel/linuxthreads >+CONFIGURE_ARGS+=--with-linuxthreads >+.else >+CONFIGURE_ARGS+=--without-linuxthreads >+.endif >+ >+.if ${PORT_OPTIONS:MFFMPEG} >+LIB_DEPENDS+= avformat:${PORTSDIR}/multimedia/ffmpeg >+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 >+ >+.if ${PORT_OPTIONS:MPGSQL} >+USE_PGSQL= yes >+CONFIGURE_ARGS+=--with-pgsql-lib=${LOCALBASE}/lib \ >+ --with-pgsql-include=${LOCALBASE}/include >+.else >+CONFIGURE_ARGS+=--without-pgsql > .endif > >-.if defined(WITH_LINUXTHREADS) >-CONFIGURE_ARGS= --with-linuxthreads >-LIB_DEPENDS+= lthread.[35]:${PORTSDIR}/devel/linuxthreads >+.include <bsd.port.pre.mk> >+ >+.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" >+BROKEN= Does not compile on ia64, powerpc, or sparc64 > .endif > > 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 >+ @${REINPLACE_CMD} -e \ >+ 's|jpeg_mem_dest|local_jpeg_mem_dest|' ${WRKSRC}/picture.c > >-post-install: >+do-install: >+ ${INSTALL_PROGRAM} ${WRKSRC}/motion ${PREFIX}/bin >+ ${INSTALL_MAN} ${WRKSRC}/motion.1 ${MANPREFIX}/man/man1 >+ ${INSTALL_SCRIPT} ${WRKSRC}/motion.init-FreeBSD.sh \ >+ ${PREFIX}/etc/rc.d/motion >+ ${INSTALL_DATA} ${WRKSRC}/motion-dist.conf \ >+ ${PREFIX}/etc/motion.conf.sample > .if !exists(${PREFIX}/etc/motion.conf) >- ${INSTALL_DATA} ${PREFIX}/etc/motion.conf.sample ${PREFIX}/etc/motion.conf >+ ${INSTALL_DATA} ${PREFIX}/etc/motion.conf.sample \ >+ ${PREFIX}/etc/motion.conf > .endif >- ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.init-FreeBSD.sh ${PREFIX}/etc/rc.d/${PORTNAME} >- >-.if !defined(NOPORTEXAMPLES) >- ${MKDIR} ${EXAMPLESDIR} >-.for f in ${PORTEXAMPLES} >- ${INSTALL_DATA} ${WRKSRC}/${f} ${EXAMPLESDIR} >-.endfor >- @${ECHO_MSG} "===> Examples are installed in ${EXAMPLESDIR}." >-.endif >- >-.if !defined(NOPORTDOCS) >- ${MKDIR} ${DOCSDIR} >+.if ${PORT_OPTIONS:MDOCS} >+ @${MKDIR} ${DOCSDIR} > .for f in ${PORTDOCS} > ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} > .endfor >- @${ECHO_MSG} "===> Docs are installed in ${DOCSDIR}." > .endif >- >-.if defined(WITH_BKTR) >- @${ECHO_MSG} "===============================================================================" >- @${ECHO_MSG} "Please make sure you have bktr(4) kernel support." >- @${ECHO_MSG} "===============================================================================" >-.endif >- >-.if defined(WITH_PWCBSD) >- @${ECHO_MSG} "===============================================================================" >- @${ECHO_MSG} "Please make sure you have pwcbsd compiled with mmap support." >- @${ECHO_MSG} "===============================================================================" >+.if ${PORT_OPTIONS:MEXAMPLES} >+ @${MKDIR} ${EXAMPLESDIR} >+.for f in ${PORTEXAMPLES} >+ ${INSTALL_DATA} ${WRKSRC}/${f} ${EXAMPLESDIR} >+.endfor > .endif > > .include <bsd.port.post.mk> >diff -urN /usr/ports/multimedia/motion/distinfo multimedia/motion/distinfo >--- /usr/ports/multimedia/motion/distinfo 2011-07-03 22:38:32.000000000 +0900 >+++ multimedia/motion/distinfo 2012-06-08 19:14:27.000000000 +0900 >@@ -1,4 +1,2 @@ >-SHA256 (motion-3.2.11.1.tar.gz) = 73973e723c39c05cbfc5c2a90357c5dea3078c3162dfc41f303fbf40cda9e403 >-SIZE (motion-3.2.11.1.tar.gz) = 417246 >-SHA256 (motion-3.2.11.1.port-freebsd.diff.gz) = bf494af5525c45d8582e381816429890878c0493342c242be74014b663c089b2 >-SIZE (motion-3.2.11.1.port-freebsd.diff.gz) = 3238 >+SHA256 (motion-3.2.12.tar.gz) = a597f8d7ec0bf3c5fb62722c4eead59717fe01c2ae0d256c642027cea74b2f0a >+SIZE (motion-3.2.12.tar.gz) = 425729 >diff -urN /usr/ports/multimedia/motion/files/patch-configure.in multimedia/motion/files/patch-configure.in >--- /usr/ports/multimedia/motion/files/patch-configure.in 1970-01-01 09:00:00.000000000 +0900 >+++ multimedia/motion/files/patch-configure.in 2012-06-08 23:26:08.000000000 +0900 >@@ -0,0 +1,70 @@ >+--- configure.in.orig 2010-06-01 15:48:23.000000000 +0900 >++++ configure.in 2012-06-08 23:21:55.000000000 +0900 >+@@ -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,7 +347,7 @@ >+ echo "" >+ fi >+ else >+- AC_MSG_CHECKING(for ffmpeg in -> [${FFMPEG_DIR}] <-) >++ AC_MSG_CHECKING(for ffmpeg libraries 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_RESULT(found) >+ FFMPEG_OK="found" >+@@ -392,9 +392,11 @@ >+ 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" >++ AVFORMAT="-I${FFMPEG_DIR}/include/libavformat" >+ 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" >++ AVFORMAT="-I${FFMPEG_DIR}/include/ffmpeg/libavformat" >+ else >+ AC_MSG_RESULT(not found) >+ FFMPEG_OK="no_found" >+@@ -423,9 +425,11 @@ >+ AC_MSG_CHECKING([file_protocol is defined in ffmpeg ?]) >+ saved_CFLAGS=$CFLAGS >+ saved_LIBS=$LIBS >+- CFLAGS="${FFMPEG_CFLAGS}" >++ >++ >++ CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}" >+ LIBS="$TEMP_LIBS" >+- >++ >+ AC_COMPILE_IFELSE( >+ [ >+ #include <avformat.h> >+@@ -442,7 +446,8 @@ >+ ] >+ ) >+ CFLAGS=$saved_CFLAGS >+- LIBS=$saved_LIBS >++ LIBS=$saved_LIBS >++ >+ fi >+ fi >+ fi >+@@ -1067,6 +1072,13 @@ >+ 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 >+ # >diff -urN /usr/ports/multimedia/motion/files/patch-ffmpeg.c multimedia/motion/files/patch-ffmpeg.c >--- /usr/ports/multimedia/motion/files/patch-ffmpeg.c 1970-01-01 09:00:00.000000000 +0900 >+++ multimedia/motion/files/patch-ffmpeg.c 2012-06-08 23:25:19.000000000 +0900 >@@ -0,0 +1,157 @@ >+--- ffmpeg.c.orig 2010-06-01 15:48:23.000000000 +0900 >++++ ffmpeg.c 2012-06-08 23:21:55.000000000 +0900 >+@@ -36,6 +36,11 @@ >+ # endif /* __GNUC__ */ >+ #endif /* LIBAVCODEC_BUILD > 4680 */ >+ >++#if defined LIBAVFORMAT_VERSION_MAJOR && defined LIBAVFORMAT_VERSION_MINOR >++#if LIBAVFORMAT_VERSION_MAJOR < 53 && LIBAVFORMAT_VERSION_MINOR < 45 >++ #define GUESS_NO_DEPRECATED >++#endif >++#endif >+ >+ #if LIBAVFORMAT_BUILD >= 4616 >+ /* The API for av_write_frame changed with FFmpeg version 0.4.9pre1. >+@@ -227,11 +232,13 @@ >+ mpeg1_file_protocol.url_seek = file_protocol.url_seek; >+ mpeg1_file_protocol.url_close = file_protocol.url_close; >+ >+- /* Register the append file protocol. */ >+-#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) >++/* Register the append file protocol. */ >++#ifdef have_av_register_protocol2 >++ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); >++#elif defined have_av_register_protocol >+ av_register_protocol(&mpeg1_file_protocol); >+ #else >+- register_protocol(&mpeg1_file_protocol); >++# warning av_register_protocolXXX missing >+ #endif >+ } >+ >+@@ -258,7 +265,11 @@ >+ /* We use "mpeg1video" for raw mpeg1 format. Using "mpeg" would >+ * result in a muxed output file, which isn't appropriate here. >+ */ >+- of = guess_format("mpeg1video", NULL, NULL); >++#ifdef GUESS_NO_DEPRECATED >++ of = guess_format("mpeg1video", NULL, NULL); >++#else >++ of = av_guess_format("mpeg1video", NULL, NULL); >++#endif >+ if (of) { >+ /* But we want the trailer to be correctly written. */ >+ of->write_trailer = mpeg1_write_trailer; >+@@ -270,24 +281,44 @@ >+ #endif >+ } else if (strcmp(codec, "mpeg4") == 0) { >+ ext = ".avi"; >+- of = guess_format("avi", NULL, NULL); >++#ifdef GUESS_NO_DEPRECATED >++ of = guess_format("mpeg1video", NULL, NULL); >++#else >++ of = av_guess_format("avi", NULL, NULL); >++#endif >+ } else if (strcmp(codec, "msmpeg4") == 0) { >+ ext = ".avi"; >+- of = guess_format("avi", NULL, NULL); >++#ifdef GUESS_NO_DEPRECATED >++ of = guess_format("mpeg1video", NULL, NULL); >++#else >++ of = av_guess_format("avi", NULL, NULL); >++#endif >+ if (of) { >+ /* Manually override the codec id. */ >+ of->video_codec = CODEC_ID_MSMPEG4V2; >+ } >+ } else if (strcmp(codec, "swf") == 0) { >+ ext = ".swf"; >+- of = guess_format("swf", NULL, NULL); >++#ifdef GUESS_NO_DEPRECATED >++ of = guess_format("mpeg1video", NULL, NULL); >++#else >++ of = av_guess_format("swf", NULL, NULL); >++#endif >+ } else if (strcmp(codec, "flv") == 0) { >+ ext = ".flv"; >+- of = guess_format("flv", NULL, NULL); >++#ifdef GUESS_NO_DEPRECATED >++ of = guess_format("mpeg1video", NULL, NULL); >++#else >++ of = av_guess_format("flv", NULL, NULL); >++#endif >+ of->video_codec = CODEC_ID_FLV1; >+ } else if (strcmp(codec, "ffv1") == 0) { >+ ext = ".avi"; >+- of = guess_format("avi", NULL, NULL); >++#ifdef GUESS_NO_DEPRECATED >++ of = guess_format("mpeg1video", NULL, NULL); >++#else >++ of = av_guess_format("avi", NULL, NULL); >++#endif >+ if (of) { >+ /* Use the FFMPEG Lossless Video codec (experimental!). >+ Requires strict_std_compliance to be <= -2 */ >+@@ -295,7 +326,11 @@ >+ } >+ } else if (strcmp(codec, "mov") == 0) { >+ ext = ".mov"; >+- of = guess_format("mov", NULL, NULL); >++#ifdef GUESS_NO_DEPRECATED >++ of = guess_format("mpeg1video", NULL, NULL); >++#else >++ of = av_guess_format("mov", NULL, NULL); >++#endif >+ } else { >+ motion_log(LOG_ERR, 0, "ffmpeg_video_codec option value %s is not supported", codec); >+ return NULL; >+@@ -340,7 +375,13 @@ >+ snprintf(ffmpeg->codec, sizeof(ffmpeg->codec), "%s", ffmpeg_video_codec); >+ >+ /* allocation the output media context */ >++#ifdef have_avformat_alloc_context >++ ffmpeg->oc = avformat_alloc_context(); >++#elif defined have_av_avformat_alloc_context >++ ffmpeg->oc = av_alloc_format_context(); >++#else >+ ffmpeg->oc = av_mallocz(sizeof(AVFormatContext)); >++#endif >+ >+ if (!ffmpeg->oc) { >+ motion_log(LOG_ERR, 1, "Memory error while allocating output media context"); >+@@ -377,7 +418,11 @@ >+ >+ ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st); >+ c->codec_id = ffmpeg->oc->oformat->video_codec; >++#if LIBAVCODEC_VERSION_MAJOR < 53 >+ c->codec_type = CODEC_TYPE_VIDEO; >++#else >++ c->codec_type = AVMEDIA_TYPE_VIDEO; >++#endif >+ is_mpeg1 = c->codec_id == CODEC_ID_MPEG1VIDEO; >+ >+ if (strcmp(ffmpeg_video_codec, "ffv1") == 0) >+@@ -646,7 +691,11 @@ >+ if (ffmpeg->oc->oformat->flags & AVFMT_RAWPICTURE) { >+ /* raw video case. The API will change slightly in the near future for that */ >+ #ifdef FFMPEG_AVWRITEFRAME_NEWAPI >++#if LIBAVCODEC_VERSION_MAJOR < 53 >+ pkt.flags |= PKT_FLAG_KEY; >++#else >++ pkt.flags |= AV_PKT_FLAG_KEY; >++#endif >+ pkt.data = (uint8_t *)pic; >+ pkt.size = sizeof(AVPicture); >+ ret = av_write_frame(ffmpeg->oc, &pkt); >+@@ -667,7 +716,11 @@ >+ #ifdef FFMPEG_AVWRITEFRAME_NEWAPI >+ pkt.pts = AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->pts; >+ if (AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->key_frame) { >++#if LIBAVCODEC_VERSION_MAJOR < 53 >+ pkt.flags |= PKT_FLAG_KEY; >++#else >++ pkt.flags |= AV_PKT_FLAG_KEY; >++#endif >+ } >+ pkt.data = ffmpeg->video_outbuf; >+ pkt.size = out_size;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 169006
: 125394