diff options
author | Jeremy Messenger <mezz@FreeBSD.org> | 2006-06-30 19:32:49 +0000 |
---|---|---|
committer | Jeremy Messenger <mezz@FreeBSD.org> | 2006-06-30 19:32:49 +0000 |
commit | dc35477bd03b693a27f2695f12ff78a476376096 (patch) | |
tree | fa7bfaad4d34ec23263ff715ff8a3a13ac2a0962 /multimedia/mjpegtools | |
parent | 195dc22fa1adfd255b0748a0e32121a4732f31a8 (diff) |
- Remove file/patch-configure, already included in the tarball. Also, remove
a few of out of date stuff in post-patch.
- Correct the USE_GETOPT_LONG, no need a check of FreeBSD version.
- Near all of knobs were not work, and option flags and dependenies were out
of date.
* Remove WITH_LIBMOVTAR, WITH_LIBDV_PAL, WITHOUT_AVIFILE and
WITH_JPEGMMX.
* Rename WITH_LIBDV -> WITH_DV (follow /usr/ports/KNOBS).
* Now depend on GTK2, not GTK1, with an autocheck and a new
WITH_GTK2 knob.
* Add new knobs: WITHOUT_PNG, WITHOUT_X11 and WITH_GTK2
* Make sure to not disable SDL if you want GTK2 otherwise it
will not working.
* All of knobs now work correct again with the update of
option flags.
- Fix the plist when you use knobs.
- Bump the PORTREVISION.
Notes
Notes:
svn path=/head/; revision=166668
Diffstat (limited to 'multimedia/mjpegtools')
-rw-r--r-- | multimedia/mjpegtools/Makefile | 227 | ||||
-rw-r--r-- | multimedia/mjpegtools/files/patch-configure | 105 | ||||
-rw-r--r-- | multimedia/mjpegtools/pkg-descr | 2 | ||||
-rw-r--r-- | multimedia/mjpegtools/pkg-plist | 35 |
4 files changed, 124 insertions, 245 deletions
diff --git a/multimedia/mjpegtools/Makefile b/multimedia/mjpegtools/Makefile index e3b2843c2dca..daa9da1f5d4a 100644 --- a/multimedia/mjpegtools/Makefile +++ b/multimedia/mjpegtools/Makefile @@ -7,7 +7,7 @@ PORTNAME= mjpegtools DISTVERSION= 1.8.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= mjpeg @@ -15,176 +15,145 @@ MASTER_SITE_SUBDIR= mjpeg MAINTAINER= multimedia@FreeBSD.org COMMENT= Set of tools to record/playback/edit videos in MPEG format -LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png +LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg +BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm CONFLICTS= mplex-[0-9]* + +WANT_SDL= yes USE_GMAKE= yes +USE_GNOME= gnomehack gnometarget +WANT_GNOME= yes USE_AUTOTOOLS= libtool:15 -USE_XLIB= yes +INSTALLS_SHLIB= yes +USE_GETOPT_LONG=yes GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \ LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" -USE_GNOME= gnomehack gnometarget -WANT_GNOME= yes -WANT_SDL= yes -INSTALLS_SHLIB= yes -INFO= mjpeg-howto -MAN1= jpeg2yuv.1 lav2mpeg.1 lav2wav.1 lav2yuv.1 \ - lavpipe.1 lavplay.1 lavrec.1 lavtrans.1 mjpegtools.1 mp2enc.1 \ - mpeg2enc.1 mplex.1 pgmtoy4m.1 png2yuv.1 pnmtoy4m.1 ppmtoy4m.1 \ - y4mcolorbars.1 y4mdenoise.1 y4munsharp.1 y4mtopnm.1 y4mtoppm.1 \ - yuv2lav.1 yuvdenoise.1 yuvfps.1 yuvinactive.1 yuvkineco.1 \ - yuvmedianfilter.1 yuvplay.1 yuvscaler.1 yuvycsnoise.1 -MAN5= yuv4mpeg.5 - -DOC_FILES= AUTHORS BUGS CHANGES COPYING ChangeLog HINTS NEWS \ - PLANS README README.DV README.avilib README.glav \ - README.AltiVec \ +INFO= mjpeg-howto +MAN1= jpeg2yuv.1 lav2mpeg.1 lav2wav.1 lav2yuv.1 lavpipe.1 lavplay.1 \ + lavrec.1 lavtrans.1 mjpegtools.1 mp2enc.1 mpeg2enc.1 mplex.1 \ + pgmtoy4m.1 png2yuv.1 pnmtoy4m.1 ppmtoy4m.1 y4mcolorbars.1 \ + y4mdenoise.1 y4munsharp.1 y4mtopnm.1 y4mtoppm.1 yuv2lav.1 \ + yuvdenoise.1 yuvfps.1 yuvinactive.1 yuvkineco.1 \ + yuvmedianfilter.1 yuvplay.1 yuvscaler.1 yuvycsnoise.1 +MAN5= yuv4mpeg.5 +DOC_FILES= AUTHORS BUGS CHANGES COPYING ChangeLog HINTS NEWS PLANS README \ + README.DV README.avilib README.glav README.AltiVec \ README.lavpipe README.transist TODO -PORTDOCS= ${DOC_FILES} - -post-install: -.ifndef(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} -.for file in ${DOC_FILES} - @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} -.endfor -.endif - .include <bsd.port.pre.mk> -.if ${ARCH} == "i386" || ${ARCH} == "amd64" -.if !defined(WITHOUT_AVIFILE) && !defined(PACKAGE_BUILDING) -LIB_DEPENDS+= aviplay.0:${PORTSDIR}/multimedia/avifile -.endif +.if !defined(WITHOUT_PNG) +LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png +CONFIGURE_ARGS+=--with-libpng +PLIST_SUB+= PNG:="" +.else +CONFIGURE_ARGS+=--without-libpng +PLIST_SUB+= PNG:="@comment " .endif -.if ${ARCH} == "i386" -BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm +.if !defined(WITHOUT_X11) +USE_XLIB= yes +CONFIGURE_ARGS+=--with-x +.else +CONFIGURE_ARGS+=--without-x +WITHOUT_DV= yes +WITHOUT_GTK2= yes +WITHOUT_SDL= yes +WITHOUT_QUICKTIME=yes .endif -# pre-detection -# JPEGMMX -.if exists(${LOCALBASE}/lib/libjpeg-mmx.a) -WITH_JPEGMMX= yes -.endif -# LIBDV -.if exists(${LOCALBASE}/lib/libdv.a) -WITH_LIBDV= yes +.if exists(${LOCALBASE}/lib/libdv.so) +WITH_DV= yes .endif -# LIBGNUGETOPT -# -CURRENT after 500041 has getopt_long -.if ${OSVERSION} < 500041 -WITH_LIBGNUGETOPT= yes -.endif -# LIBMOVTAR -.if exists(${LOCALBASE}/lib/libmovtar.a) -WITH_LIBMOVTAR= yes -.endif -# QUICKTIME + .if exists(${LOCALBASE}/lib/libquicktime.so.0) WITH_QUICKTIME= yes .endif -# SDL -.if ${HAVE_SDL}:Msdl}!="" -WITH_SDL= yes -.endif -# option activation -.if ${HAVE_GNOME:Mgtk12}!="" -USE_GNOME+= gtk12 -PLIST_SUB+= GTK="" -.else -PLIST_SUB+= GTK="@comment " -.endif -# -.ifdef(WITH_JPEGMMX) -LIB_DEPENDS+= jpeg-mmx.62:${PORTSDIR}/graphics/jpeg-mmx +.if (${HAVE_GNOME:Mgtk20}!="" || defined(WITH_GTK2)) && !defined(WITHOUT_GTK2) +USE_GNOME+= gtk20 +PLIST_SUB+= GTK2:="" +ENABLE_GTK2= yes .else -LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg +PLIST_SUB+= GTK2:="@comment " +DISABLE_GTK2= yes .endif -# -.ifdef(WITH_LIBDV) -LIB_DEPENDS+= dv.4:${PORTSDIR}/multimedia/libdv -CONFIGURE_ARGS+= --with-dv=${LOCALBASE} +# The GTK player required SDL support, so add ENABLE_GTK2 in here. +.if (${HAVE_SDL:Msdl}!="" || defined(WITH_SDL)) && (!defined(WITHOUT_SDL) || defined(ENABLE_GTK2)) +USE_SDL+= sdl +PLIST_SUB+= SDL:="" +.else +PLIST_SUB+= SDL:="@comment " +DISABLE_SDL= yes .endif -# -.ifdef(WITH_LIBDV_PAL) -CONFIGURE_ARGS+= --with-dv-yv12 -WITH_LIBDV= yes -.endif -# -.ifdef(WITH_LIBGNUGETOPT) -USE_GETOPT_LONG= yes +.if defined(WITH_DV) && !defined(WITHOUT_DV) +LIB_DEPENDS+= dv.4:${PORTSDIR}/multimedia/libdv +CONFIGURE_ARGS+=--with-libdv +.else +CONFIGURE_ARGS+=--without-libdv .endif -# -.ifdef(WITH_LIBMOVTAR) -BUILD_DEPENDS+= ${LOCALBASE}/lib/libmovtar.a:${PORTSDIR}/multimedia/libmovtar -CONFIGURE_ARGS+= --with-movtar-prefix=${LOCALBASE} -.endif -# -.ifdef(WITH_SDL) -USE_SDL= sdl -CONFIGURE_ARGS+= --with-sdl -.endif -# -.ifdef(WITH_QUICKTIME) +.if defined(WITH_QUICKTIME) && !defined(WITHOUT_QUICKTIME) LIB_DEPENDS+= quicktime.0:${PORTSDIR}/multimedia/libquicktime - -CONFIGURE_ARGS+= --with-quicktime +CONFIGURE_ARGS+=--with-libquicktime +.else +#CONFIGURE_ARGS+=--without-libquicktime # Does not work, patch it instead... +DISABLE_QUICKTIME=yes .endif pre-everything:: -.if ${HAVE_GNOME:Mgtk12}=="" - @${ECHO_MSG} "====> You can enable GTK support by defining WITH_GNOME" -.endif -.ifndef(WITH_JPEGMMX) - @${ECHO_MSG} "====> You can enable Jpeg-MMX support by defining WITH_JPEGMMX" -.endif -.ifndef(WITH_LIBDV) - @${ECHO_MSG} "====> You can enable DV support by defining WITH_LIBDV" + @${ECHO_MSG} "You may specify the following on the command line:" + @${ECHO_MSG} " " +.if !defined(WITH_DV) + @${ECHO_MSG} "WITH_DV=yes to enable DV support." .endif -.ifndef(WITH_LIBDV_PAL) - @${ECHO_MSG} "====> You can enable DV PAL support by defining WITH_LIBDV_PAL" +.if !defined(WITH_GTK2) + @${ECHO_MSG} "WITH_GTK2=yes to enable GTK+2 support (required SDL)." .endif -.ifndef(WITH_LIBMOVTAR) - @${ECHO_MSG} "====> You can enable movtar support by defining WITH_LIBMOVTAR" +.if !defined(WITH_QUICKTIME) + @${ECHO_MSG} "WITH_QUICKTIME=yes to enable quicktime support." .endif -.ifndef(WITH_QUICKTIME) - @${ECHO_MSG} "====> You can enable quicktime support by defining WITH_QUICKTIME" +.if !defined(WITH_SDL) + @${ECHO_MSG} "WITH_SDL=yes to enable SDL support." .endif -.ifndef(WITH_SDL) - @${ECHO_MSG} "====> You can enable SDL support by defining WITH_SDL" -.endif -.if ${ARCH} == "i386" || ${ARCH} == "amd64" -.ifndef(WITHOUT_AVIFILE) - @${ECHO_MSG} "====> You can disable AVIFILE support by defining WITHOUT_AVIFILE" +.if !defined(WITHOUT_PNG) + @${ECHO_MSG} "WITHOUT_PNG=yes to disable png support." .endif +.if !defined(WITHOUT_X11) + @${ECHO_MSG} "WITHOUT_X11=yes to disable X11 (included DV, GTK2, QUICKTIME and SDL) support." .endif post-patch: - @${REINPLACE_CMD} -e 's|SDL/|SDL11/|' \ + @${REINPLACE_CMD} -e 's|-l$$flag|${PTHREAD_LIBS}|g' \ + ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|SDL/|SDL11/|g' \ ${WRKSRC}/lavtools/liblavplay.c \ ${WRKSRC}/lavtools/yuvplay.c \ ${WRKSRC}/lavtools/lavplay.c -# a bug that is happening with configure. It's not detecting that -# FreeBSD has pthreads. It might happen in other OSes but I'm not -# risking such a general patch -.if ${OPSYS:L} == "freebsd" - @${REINPLACE_CMD} -E -e 's|^(have_pthread=).+$$|\1true|' \ - ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} -.endif -.ifdef(WITH_LIBGNUGETOPT) - @${REINPLACE_CMD} -E -e 's|(AVIPLAY_LIBS \=.*)|\1 -lgnugetopt|' \ - ${WRKSRC}/lavtools/Makefile.in -.endif -# link to pthreads - @${REINPLACE_CMD} -E -e 's|(AVIPLAY_LIBS \=.*)|\1 ${PTHREAD_LIBS}|' \ - ${WRKSRC}/lavtools/Makefile.in +.if defined(DISABLE_GTK2) + @${REINPLACE_CMD} -e 's|have_gtk="true"|have_gtk="false"|g' \ + ${WRKSRC}/configure +.endif +.if defined(DISABLE_QUICKTIME) + @${REINPLACE_CMD} -e 's|have_libquicktime=true|have_libquicktime=false|g' \ + ${WRKSRC}/configure +.endif +.if defined(DISABLE_SDL) + @${REINPLACE_CMD} -e 's|have_sdl=true|have_sdl=false|g' \ + ${WRKSRC}/configure +.endif + +.if !defined(NOPORTDOCS) +post-install: + @${MKDIR} ${DOCSDIR} +.for i in ${DOC_FILES} + @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} +.endfor +.endif .include <bsd.port.post.mk> diff --git a/multimedia/mjpegtools/files/patch-configure b/multimedia/mjpegtools/files/patch-configure deleted file mode 100644 index d1ccb57f675e..000000000000 --- a/multimedia/mjpegtools/files/patch-configure +++ /dev/null @@ -1,105 +0,0 @@ ---- configure.orig Mon Jul 18 10:11:33 2005 -+++ configure Mon Jul 18 10:12:48 2005 -@@ -24288,6 +24288,104 @@ - have_libpng=false - fi - -+ if test x$have_libpng = xfalse ; then -+ -+ succeeded=no -+ -+ if test -z "$PKG_CONFIG"; then -+ # Extract the first word of "pkg-config", so it can be a program name with args. -+set dummy pkg-config; ac_word=$2 -+echo "$as_me:$LINENO: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ case $PKG_CONFIG in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+ -+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" -+ ;; -+esac -+fi -+PKG_CONFIG=$ac_cv_path_PKG_CONFIG -+ -+if test -n "$PKG_CONFIG"; then -+ echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -+echo "${ECHO_T}$PKG_CONFIG" >&6 -+else -+ echo "$as_me:$LINENO: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ fi -+ -+ if test "$PKG_CONFIG" = "no" ; then -+ echo "*** The pkg-config script could not be found. Make sure it is" -+ echo "*** in your path, or set the PKG_CONFIG environment variable" -+ echo "*** to the full path to pkg-config." -+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." -+ else -+ PKG_CONFIG_MIN_VERSION=0.9.0 -+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then -+ echo "$as_me:$LINENO: checking for libpng12" >&5 -+echo $ECHO_N "checking for libpng12... $ECHO_C" >&6 -+ -+ if $PKG_CONFIG --exists "libpng12" ; then -+ echo "$as_me:$LINENO: result: yes" >&5 -+echo "${ECHO_T}yes" >&6 -+ succeeded=yes -+ -+ echo "$as_me:$LINENO: checking LIBPNG_CFLAGS" >&5 -+echo $ECHO_N "checking LIBPNG_CFLAGS... $ECHO_C" >&6 -+ LIBPNG_CFLAGS=`$PKG_CONFIG --cflags "libpng12"` -+ echo "$as_me:$LINENO: result: $LIBPNG_CFLAGS" >&5 -+echo "${ECHO_T}$LIBPNG_CFLAGS" >&6 -+ -+ echo "$as_me:$LINENO: checking LIBPNG_LIBS" >&5 -+echo $ECHO_N "checking LIBPNG_LIBS... $ECHO_C" >&6 -+ LIBPNG_LIBS=`$PKG_CONFIG --libs "libpng12"` -+ echo "$as_me:$LINENO: result: $LIBPNG_LIBS" >&5 -+echo "${ECHO_T}$LIBPNG_LIBS" >&6 -+ else -+ LIBPNG_CFLAGS="" -+ LIBPNG_LIBS="" -+ ## If we have a custom action on failure, don't print errors, but -+ ## do set a variable so people can do so. -+ LIBPNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng12"` -+ -+ fi -+ -+ -+ -+ else -+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." -+ echo "*** See http://www.freedesktop.org/software/pkgconfig" -+ fi -+ fi -+ -+ if test $succeeded = yes; then -+ have_libpng=true -+ else -+ have_libpng=false -+ fi -+ -+ fi - fi diff --git a/multimedia/mjpegtools/pkg-descr b/multimedia/mjpegtools/pkg-descr index efe372e98fe9..073b98f582ce 100644 --- a/multimedia/mjpegtools/pkg-descr +++ b/multimedia/mjpegtools/pkg-descr @@ -1,5 +1,3 @@ -[ edited excerpt from developer's README ] - lavtools: Linux Audio and Video TOOLS for Motion JPEG and MPEG ============================================================== diff --git a/multimedia/mjpegtools/pkg-plist b/multimedia/mjpegtools/pkg-plist index 996d45f2f161..e9c582c63a15 100644 --- a/multimedia/mjpegtools/pkg-plist +++ b/multimedia/mjpegtools/pkg-plist @@ -1,5 +1,5 @@ bin/anytovcd.sh -%%GTK%%bin/glav +%%GTK2:%%bin/glav bin/jpeg2yuv bin/lav2avi.sh bin/lav2mpeg @@ -8,7 +8,7 @@ bin/lav2yuv bin/lavaddwav bin/lavinfo bin/lavpipe -bin/lavplay +%%SDL:%%bin/lavplay bin/lavtrans bin/matteblend.flt bin/mjpeg_simd_helper @@ -18,7 +18,7 @@ bin/mpegtranscode bin/mplex bin/multiblend.flt bin/pgmtoy4m -bin/png2yuv +%%PNG:%%bin/png2yuv bin/pnmtoy4m bin/ppmtoy4m bin/transist.flt @@ -45,7 +45,7 @@ bin/yuvfps bin/yuvinactive bin/yuvkineco bin/yuvmedianfilter -bin/yuvplay +%%SDL:%%bin/yuvplay bin/yuvscaler bin/yuvycsnoise bin/yuyvtoy4m @@ -106,11 +106,11 @@ lib/liblavjpeg-1.8.so.0 lib/liblavjpeg.a lib/liblavjpeg.la lib/liblavjpeg.so -lib/liblavplay-1.8.so -lib/liblavplay-1.8.so.0 -lib/liblavplay.a -lib/liblavplay.la -lib/liblavplay.so +%%SDL:%%lib/liblavplay-1.8.so +%%SDL:%%lib/liblavplay-1.8.so.0 +%%SDL:%%lib/liblavplay.a +%%SDL:%%lib/liblavplay.la +%%SDL:%%lib/liblavplay.so lib/libmjpegutils-1.8.so lib/libmjpegutils-1.8.so.0 lib/libmjpegutils.a @@ -127,6 +127,23 @@ lib/libmplex2.a lib/libmplex2.la lib/libmplex2.so libdata/pkgconfig/mjpegtools.pc +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%/BUGS +%%PORTDOCS%%%%DOCSDIR%%/CHANGES +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/HINTS +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/PLANS +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README.AltiVec +%%PORTDOCS%%%%DOCSDIR%%/README.DV +%%PORTDOCS%%%%DOCSDIR%%/README.avilib +%%PORTDOCS%%%%DOCSDIR%%/README.glav +%%PORTDOCS%%%%DOCSDIR%%/README.lavpipe +%%PORTDOCS%%%%DOCSDIR%%/README.transist +%%PORTDOCS%%%%DOCSDIR%%/TODO +%%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm include/mjpegtools/mplex @dirrm include/mjpegtools/mpeg2enc @dirrm include/mjpegtools |