[Midnightbsd-cvs] mports: mports/multimedia: Add ffmpeg (finally) Report bugs to me.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Sep 24 23:34:33 EDT 2008


Log Message:
-----------
Add ffmpeg (finally)  Report bugs to me.

Modified Files:
--------------
    mports/multimedia:
        Makefile (r1.44 -> r1.45)

Added Files:
-----------
    mports/multimedia/ffmpeg:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-plist (r1.1)
    mports/multimedia/ffmpeg/files:
        ffserver.in (r1.1)
        patch-configure (r1.1)
        patch-libavcodec_Makefile (r1.1)
        patch-libavcodec_imgconvert.c (r1.1)
        patch-libavutil__bswap.h (r1.1)
        patch-subdir.mak (r1.1)

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/multimedia/Makefile,v
retrieving revision 1.44
retrieving revision 1.45
diff -L multimedia/Makefile -L multimedia/Makefile -u -r1.44 -r1.45
--- multimedia/Makefile
+++ multimedia/Makefile
@@ -6,6 +6,7 @@
     SUBDIR += clive
     SUBDIR += etoile-babbler
     SUBDIR += etoile-multimediakit
+    SUBDIR += ffmpeg
     SUBDIR += gnustep-mplayer
     SUBDIR += gpac-libgpac
     SUBDIR += gstreamer
--- /dev/null
+++ multimedia/ffmpeg/pkg-descr
@@ -0,0 +1,24 @@
+[ excerpt (with adaptations) from developer's README ]
+ffmpeg is a hyper fast realtime audio/video encoder, a streaming
+server and a generic audio and video file converter.
+
+It can convert a standard video source into several file formats
+based on DCT/motion compensation encoding. Sound is compressed in
+MPEG audio layer 2 or using an AC3 compatible stream.
+
+What makes ffmpeg interesting ?
+- Simple and efficient video encoder: outputs MPEG1, H263, Real
+  Video(tm), MPEG4, DIVX and MJPEG compatible bitstreams using the
+  same encoder core.
+- Hyper fast MPEG audio layer 2 compression (50 times faster than
+  realtime on a K6 500).
+[snip -> rest on website below]
+
+ffmpeg is made of two programs:
+* ffmpeg: soft VCR which encodes in real time to several formats.
+  It can also encode from any supported input file format to any
+  input supported format.
+* ffserver: high performance live broadcast streaming server based
+  on the ffmpeg core encoders.
+
+WWW: http://ffmpeg.mplayerhq.hu/
--- /dev/null
+++ multimedia/ffmpeg/pkg-plist
@@ -0,0 +1,100 @@
+bin/ffmpeg
+bin/ffserver
+etc/ffserver.conf
+etc/ffserver.conf-dist
+include/ffmpeg/adler32.h
+include/ffmpeg/avcodec.h
+include/ffmpeg/avdevice.h
+include/ffmpeg/avformat.h
+include/ffmpeg/avio.h
+include/ffmpeg/avstring.h
+include/ffmpeg/avutil.h
+include/ffmpeg/base64.h
+include/ffmpeg/common.h
+include/ffmpeg/crc.h
+include/ffmpeg/fifo.h
+include/ffmpeg/intfloat_readwrite.h
+include/ffmpeg/log.h
+include/ffmpeg/lzo.h
+include/ffmpeg/mathematics.h
+include/ffmpeg/md5.h
+include/ffmpeg/mem.h
+include/ffmpeg/opt.h
+include/ffmpeg/postprocess.h
+include/ffmpeg/random.h
+include/ffmpeg/rational.h
+include/ffmpeg/rgb2rgb.h
+include/ffmpeg/rtsp.h
+include/ffmpeg/rtspcodes.h
+include/ffmpeg/sha1.h
+include/ffmpeg/swscale.h
+include/libavcodec/avcodec.h
+include/libavcodec/opt.h
+include/libavdevice/avdevice.h
+include/libavformat/avformat.h
+include/libavformat/avio.h
+include/libavformat/rtsp.h
+include/libavformat/rtspcodes.h
+include/libavutil/adler32.h
+include/libavutil/avstring.h
+include/libavutil/avutil.h
+include/libavutil/base64.h
+include/libavutil/common.h
+include/libavutil/crc.h
+include/libavutil/fifo.h
+include/libavutil/intfloat_readwrite.h
+include/libavutil/log.h
+include/libavutil/lzo.h
+include/libavutil/mathematics.h
+include/libavutil/md5.h
+include/libavutil/mem.h
+include/libavutil/random.h
+include/libavutil/rational.h
+include/libavutil/sha1.h
+include/libpostproc/postprocess.h
+include/postproc/postprocess.h
+include/libswscale/rgb2rgb.h
+include/libswscale/swscale.h
+lib/libavcodec.a
+lib/libavcodec.so
+lib/libavcodec.so.1
+lib/libavcodec.so.51.61.0
+lib/libavdevice.a
+lib/libavdevice.so
+lib/libavdevice.so.1
+lib/libavdevice.so.52.0.0
+lib/libavformat.a
+lib/libavformat.so
+lib/libavformat.so.1
+lib/libavformat.so.52.18.0
+lib/libavutil.a
+lib/libavutil.so
+lib/libavutil.so.1
+lib/libavutil.so.49.7.0
+lib/libpostproc.a
+lib/libpostproc.so
+lib/libpostproc.so.1
+lib/libpostproc.so.51.1.0
+lib/libswscale.a
+lib/libswscale.so
+lib/libswscale.so.0.5.1
+lib/libswscale.so.1
+lib/vhook/fish.so
+lib/vhook/null.so
+lib/vhook/ppm.so
+lib/vhook/watermark.so
+libdata/pkgconfig/libavcodec.pc
+libdata/pkgconfig/libavdevice.pc
+libdata/pkgconfig/libavformat.pc
+libdata/pkgconfig/libavutil.pc
+libdata/pkgconfig/libpostproc.pc
+libdata/pkgconfig/libswscale.pc
+ at dirrm lib/vhook
+ at dirrm include/postproc
+ at dirrm include/libswscale
+ at dirrm include/libpostproc
+ at dirrm include/libavutil
+ at dirrm include/libavformat
+ at dirrm include/libavdevice
+ at dirrm include/libavcodec
+ at dirrm include/ffmpeg
--- /dev/null
+++ multimedia/ffmpeg/Makefile
@@ -0,0 +1,330 @@
+# New ports collection makefile for:	ffmpeg cvs
+# Date created:		Sun May  1 20:46:59 UTC 2005
+# Whom:			Mario Sergio Fujikawa Ferreira <lioux at FreeBSD.org>
+#
+# $MidnightBSD: mports/multimedia/ffmpeg/Makefile,v 1.1 2008/09/25 03:34:30 laffer1 Exp $
+# $FreeBSD: ports/multimedia/ffmpeg/Makefile,v 1.88 2008/08/17 02:58:21 ahze Exp $
+
+PORTNAME=	ffmpeg
+DISTVERSION=	2008-07-27
+PORTREVISION=	6
+CATEGORIES=	multimedia audio ipv6 net
+MASTER_SITES=	${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR=	ahze
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Hyper fast realtime audio/video encoder/converter, streaming server
+LICENSE=	gpl2
+
+HAS_CONFIGURE=	yes
+CONFIGURE_LOG=	config.err
+USE_BZIP2=	yes
+USE_GMAKE=	yes
+WANT_SDL=	yes
+
+OPTIONS=	AMR_NB	"AMR narrowband encoder" off \
+		AMR_WB	"AMR wideband encoder" off \
+		FAAC	"FAAC mp4/aac audio encoder" off \
+		FAAD	"FAAD mp4/aac audio decoder" on \
+		GSM	"gsm audio codec" off \
+		IPV6	"IPV6 network support" on \
+		LAME	"lame MP3 codec" off \
+		LIBA52	"liba52 support"	on \
+		OPTIMIZED_CFLAGS "Additional optimizations" off \
+		SDL	"SDL support (build ffplay)" off \
+		THEORA	"libtheora support (implies OGG)" on \
+		VORBIS	"libvorbisenc support (implies OGG)" on \
+		X264	"X.264 codec" off \
+		XVID	"XVID codec" off
+
+#FAKE_OPTS=	prefixhack
+
+COMPAT_HEADERS=	libavcodec/avcodec.h \
+	libavcodec/opt.h \
+	libavdevice/avdevice.h \
+	libavformat/avformat.h \
+	libavformat/avio.h \
+	libavformat/rtsp.h \
+	libavformat/rtspcodes.h \
+	libavutil/adler32.h  \
+	libavutil/avstring.h \
+	libavutil/avutil.h \
+	libavutil/base64.h \
+	libavutil/common.h \
+	libavutil/crc.h \
+	libavutil/fifo.h \
+	libavutil/intfloat_readwrite.h \
+	libavutil/log.h \
+	libavutil/lzo.h \
+	libavutil/mathematics.h \
+	libavutil/md5.h \
+	libavutil/mem.h \
+	libavutil/random.h \
+	libavutil/rational.h \
+	libavutil/sha1.h \
+	libpostproc/postprocess.h \
+	libswscale/rgb2rgb.h \
+	libswscale/swscale.h
+
+.include <bsd.port.pre.mk>
+
+CONFIGURE_ARGS+=--cc="${CC}" --prefix="${TRUE_PREFIX}" \
+		--disable-debug \
+		--enable-memalign-hack \
+		--enable-shared \
+		--enable-postproc \
+		--extra-cflags="${FFMPEG_CFLAGS} -I${LOCALBASE}/include" \
+		--extra-ldflags="-L${LOCALBASE}/lib ${FFMPEG_LDFLAGS}" \
+		--extra-libs="${PTHREAD_LIBS}" \
+		--enable-gpl \
+		--enable-pthreads \
+		--enable-swscale \
+		--mandir=${PREFIX}/man
+CONFIGURE_ENV+=	LANG=C
+MAKE_ENV+=	INSTALL="${INSTALL}"
+SHLIB_VER=	1
+PLIST_SUB=	SHLIB_VER=${SHLIB_VER}
+USE_LDCONFIG=	yes
+
+##
+DOC_FILES=	Changelog README
+# under subdir doc
+DOC_DOCFILES=	TODO faq.html ffmpeg-doc.html \
+		ffplay-doc.html ffserver-doc.html \
+		hooks.html optimization.txt
+PORTDOCS=	*
+
+## sse hardware vector support
+.if (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse} == "sse")
+WITH_BUILTIN_VECTOR=	yes
+.endif
+
+##
+## support activation
+##
+## PORTDOCS
+.ifndef(NOPORTDOCS)
+BUILD_DEPENDS+=	texi2html:${PORTSDIR}/textproc/texi2html
+MAN1+=	ffmpeg.1 ffserver.1
+.endif
+
+.ifdef(WITH_OPTIMIZED_CFLAGS)
+CFLAGS:=		${CFLAGS:N-O*} -O3 -ffast-math -fomit-frame-pointer
+.else
+CFLAGS:=		${CFLAGS:N-O0} -O2
+DEBUG_FLAGS+=		 -O2
+.endif
+
+## a52
+.if !defined(WITHOUT_LIBA52) && !defined(WITHOUT_A52)
+LIB_DEPENDS+=	a52.0:${PORTSDIR}/audio/liba52
+
+CONFIGURE_ARGS+=	--enable-liba52 \
+			--enable-liba52bin
+FFMPEG_LDFLAGS+=	-la52
+.else
+CONFIGURE_ARGS+=	--disable-liba52
+.endif
+
+.ifdef(WITH_FAAC)
+LIB_DEPENDS+=		faac.0:${PORTSDIR}/audio/faac
+CONFIGURE_ARGS+=	--enable-libfaac
+.else
+CONFIGURE_ARGS+=	--disable-libfaac
+.endif
+
+## faad
+.ifndef(WITHOUT_FAAD)
+LIB_DEPENDS+=		faad.0:${PORTSDIR}/audio/faad
+CONFIGURE_ARGS+=	--enable-libfaad \
+			--enable-libfaadbin
+.else
+CONFIGURE_ARGS+=	--disable-libfaad
+.endif
+
+## amr
+.ifdef(WITH_AMR_NB)
+LIB_DEPENDS+=		amrnb.3:${PORTSDIR}/audio/libamrnb
+CONFIGURE_ARGS+=	--enable-libamr-nb --enable-nonfree
+.else
+CONFIGURE_ARGS+=	--disable-libamr-nb
+.endif
+
+.ifdef(WITH_AMR_WB)
+LIB_DEPENDS+=		amrwb.3:${PORTSDIR}/audio/libamrwb
+CONFIGURE_ARGS+=	--enable-libamr-wb --enable-nonfree
+.else
+CONFIGURE_ARGS+=	--disable-libamr-wb
+.endif
+
+USE_RC_SUBR=		ffserver
+
+.if ${MACHINE_CPU:Mmmx}==""
+CONFIGURE_ARGS+=	--disable-mmx
+
+WITHOUT_BUILTIN_VECTOR=	yes
+.endif
+## gsm
+.ifdef(WITH_GSM)
+LIB_DEPENDS+=		gsm.1:${PORTSDIR}/audio/gsm
+
+CONFIGURE_ARGS+=	--enable-libgsm
+.else
+CONFIGURE_ARGS+=	--disable-libgsm
+.endif
+## mp3
+.ifdef(WITH_LAME)
+LIB_DEPENDS+=		mp3lame.0:${PORTSDIR}/audio/lame
+CONFIGURE_ARGS+=	--enable-libmp3lame
+.else
+CONFIGURE_ARGS+=	--disable-libmp3lame
+.endif
+
+## SDL
+.ifdef(WITH_SDL)
+USE_SDL+=	sdl
+PLIST_FILES+=	bin/ffplay
+.if !defined(NOPORTDOCS)
+MAN1+=	ffplay.1
+.endif
+.else
+CONFIGURE_ARGS+=	--disable-ffplay
+.endif
+
+## theora
+.if !defined(WITHOUT_THEORA)
+LIB_DEPENDS+=		theora.0:${PORTSDIR}/multimedia/libtheora
+
+CONFIGURE_ARGS+=	--enable-libtheora
+.else
+CONFIGURE_ARGS+=	--disable-libtheora
+.endif
+
+## vorbis
+.if !defined(WITHOUT_VORBIS)
+LIB_DEPENDS+=		vorbisenc.2:${PORTSDIR}/audio/libvorbis
+
+CONFIGURE_ARGS+=	--enable-libvorbis
+FFMPEG_CFLAGS+=		-I${LOCALBASE}/include/vorbis
+.else
+CONFIGURE_ARGS+=	--disable-libvorbis
+.endif
+
+# x264
+.if !defined(WITHOUT_X264)
+LIB_DEPENDS+=		x264.50:${PORTSDIR}/multimedia/x264
+
+CONFIGURE_ARGS+=	--enable-libx264
+.else
+CONFIGURE_ARGS+=	--disable-libx264
+.endif
+## builtin vector, requires mmx
+.if !defined(WITHOUT_BUILTIN_VECTOR) && defined(WITH_BUILTIN_VECTOR)
+FFMPEG_CFLAGS+=		-msse
+.endif
+
+## xvid
+.ifdef(WITH_XVID)
+LIB_DEPENDS+=		xvidcore.4:${PORTSDIR}/multimedia/xvid
+CONFIGURE_ARGS+=	--enable-libxvid
+.else
+CONFIGURE_ARGS+=	--disable-libxvid
+.endif
+
+pre-configure:
+.if defined(WITHOUT_OGG) && (!defined(WITHOUT_VORBIS) || !defined(WITHOUT_THEORA))
+	@${ECHO_MSG}	WITH_VORBIS or WITH_THEORA defined, libogg will be built
+.endif
+.if defined(WITHOUT_VHOOK) && (defined(WITH_VHOOK_FREETYPE2) || defined(WITH_VHOOK_IMLIB2))
+	@${ECHO_MSG}	WITH_VHOOK_FREETYPE2 or WITH_VHOOK_IMLIB2 defined, video hooks will be built
+.endif
+
+post-patch:
+# Faad compat
+	@${REINPLACE_CMD} -e 's|faacD|NeAACD|' ${WRKSRC}/libavcodec/libfaad.c
+# {C,LD}FLAGS safeness
+# fix x264 math, use correct log base 2 from math(3)
+.if ${OSVERSION} <= 601000
+	@${REINPLACE_CMD} -E \
+		-e 's| log2| log|' \
+		${WRKSRC}/libavcodec/libx264.c
+.endif
+
+	${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${FAKE_DESTDIR}${PREFIX}/libdata/pkgconfig|' \
+		${WRKSRC}/common.mak ${WRKSRC}/subdir.mak
+	@${REINPLACE_CMD} -e 's|/etc/ffserver.conf|${PREFIX}/etc/ffserver.conf|' \
+		${WRKSRC}/ffserver.c
+	@${REINPLACE_CMD} -E \
+		-e "s|(EXTRALIBS[[:space:]]*=)|\1-L${LOCALBASE}/lib |g; \
+		s|%%LOCALBASE%%|${LOCALBASE}|g; s|%%SHLIB_VER%%|${SHLIB_VER}|g; \
+		s|-pthread|${PTHREAD_LIBS}|g" \
+		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+# force detection of texi2html
+.ifndef(NOPORTDOCS)
+	@${REINPLACE_CMD} -E \
+		-e 's|^(texi2html=)no|\1yes|' \
+		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+.endif
+	@${REINPLACE_CMD} -e 's|-ldl||' \
+		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+.if defined(WITH_IMLIB2) && !defined(WITHOUT_IMLIB2)
+	@${REINPLACE_CMD} -E \
+		-e 's|^(imlib2).*$$|\1=yes|' \
+		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+.endif
+.if !defined(WITHOUT_IPV6)
+	@${REINPLACE_CMD} -E \
+		-e 's|^(ipv6).*$$|\1=yes|' \
+		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+.endif
+.ifdef(WITH_SDL)
+	@${REINPLACE_CMD} -E \
+		-e 's|sdl-config|${SDL_CONFIG}|g' \
+		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+	@${FIND} ${WRKSRC} -type f | \
+		${XARGS} -n 10 ${REINPLACE_CMD} -E \
+		-e 's|#include <SDL|#include <SDL/SDL|'
+.endif
+.if !defined(WITHOUT_BUILTIN_VECTOR) && defined(WITH_BUILTIN_VECTOR)
+	@${REINPLACE_CMD} -E \
+		-e 's|^([[:space:]]+builtin_vector).*$$|\1=yes|' \
+		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+.else
+	@${REINPLACE_CMD} -E \
+		-e 's|^([[:space:]]+builtin_vector).*$$|\1=no|' \
+		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+.endif
+	${REINPLACE_CMD} -e 's|$$(LIBDIR)/pkgconfig|${FAKE_DESTDIR}${PREFIX}/libdata/pkgconfig|' \
+		-e 's|$$(prefix)/libdata/pkgconfig|${FAKE_DESTDIR}${PREFIX}/libdata/pkgconfig|' \
+		${WRKSRC}/common.mak ${WRKSRC}/subdir.mak
+
+post-configure:
+.ifdef(WITHOUT_THEORA)
+	@${REINPLACE_CMD} -E \
+		-e 's|^(CONFIG_LIBTHEORA).*$$|\1=no|' \
+		${WRKSRC}/config.mak
+.endif
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf ${PREFIX}/etc/ffserver.conf-dist
+	if [ ! -f ${PREFIX}/etc/ffserver.conf ]; then \
+		${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf ${PREFIX}/etc; \
+	fi
+.ifndef(NOPORTDOCS)
+	${MKDIR} ${DOCSDIR}
+.for FILE in ${DOC_FILES}
+	${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
+.endfor
+.for FILE in ${DOC_DOCFILES}
+	${INSTALL_DATA} ${WRKSRC}/doc/${FILE} ${DOCSDIR}
+.endfor
+.endif
+	${MKDIR} ${PREFIX}/include/ffmpeg
+.for FILE in ${COMPAT_HEADERS}
+	${CP} -f ${WRKSRC}/${FILE} ${PREFIX}/include/ffmpeg/${FILE:C,^[^/]+/([^/]+).*,\1,}
+.endfor
+	${MKDIR} ${PREFIX}/include/postproc
+	${CP} -f ${WRKSRC}/libpostproc/postprocess.h \
+		 ${PREFIX}/include/postproc/
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ multimedia/ffmpeg/distinfo
@@ -0,0 +1,3 @@
+MD5 (ffmpeg-2008-07-27.tar.bz2) = 777351947a51778a165ec0559f827387
+SHA256 (ffmpeg-2008-07-27.tar.bz2) = 492a20be1a60910aa1fd1538a56f25ef5b0ecbbd588906d4eb28b3a0bcf004ba
+SIZE (ffmpeg-2008-07-27.tar.bz2) = 2581976
--- /dev/null
+++ multimedia/ffmpeg/files/patch-libavutil__bswap.h
@@ -0,0 +1,21 @@
+--- libavutil/bswap.h.orig	Mon Nov 28 22:16:18 2005
++++ libavutil/bswap.h	Mon Nov 28 22:21:22 2005
+@@ -6,8 +6,18 @@
+ #ifndef __BSWAP_H__
+ #define __BSWAP_H__
+ 
++/* to detect __FreeBSD_version */
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
++
+ #ifdef HAVE_BYTESWAP_H
+ #include <byteswap.h>
++#elif (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
++# include <sys/endian.h>
++# define bswap_16(x) bswap16(x)
++# define bswap_32(x) bswap32(x)
++# define bswap_64(x) bswap64(x)
+ #else
+ 
+ #ifdef ARCH_X86_64
--- /dev/null
+++ multimedia/ffmpeg/files/patch-libavcodec_imgconvert.c
@@ -0,0 +1,18 @@
+--- libavcodec/imgconvert.c.orig	2008-08-14 14:31:37.000000000 -0400
++++ libavcodec/imgconvert.c	2008-08-14 14:31:54.000000000 -0400
+@@ -2108,7 +2108,6 @@ int img_pad(AVPicture *dst, const AVPict
+ }
+ #endif
+ 
+-#ifndef CONFIG_SWSCALE
+ static uint8_t y_ccir_to_jpeg[256];
+ static uint8_t y_jpeg_to_ccir[256];
+ static uint8_t c_ccir_to_jpeg[256];
+@@ -2628,7 +2627,6 @@ int img_convert(AVPicture *dst, int dst_
+     avpicture_free(tmp);
+     return ret;
+ }
+-#endif
+ 
+ /* NOTE: we scan all the pixels to have an exact information */
+ static int get_alpha_info_pal8(const AVPicture *src, int width, int height)
--- /dev/null
+++ multimedia/ffmpeg/files/patch-configure
@@ -0,0 +1,60 @@
+--- configure.orig	2008-07-24 06:53:32.000000000 -0400
++++ configure	2008-08-11 00:23:15.000000000 -0400
+@@ -1596,8 +1596,8 @@ od -A n -t x1 $TMPO | grep -q '42 *49 *4
+ 
+ if check_func dlopen; then
+     ldl=
+-elif check_func dlopen -ldl; then
+-    ldl=-ldl
++elif check_func dlopen ; then
++    ldl=
+ fi
+ 
+ check_func  fork
+@@ -1718,10 +1718,17 @@ fi
+ if enabled vhook; then
+     check_ldflags -rdynamic
+     check_ldflags -export-dynamic
++    if enabled imlib2; then
++        check_foo_config imlib2 imlib2 Imlib2.h imlib_load_font
++    fi
++    if enabled freetype2; then
++        check_foo_config freetype2 freetype ft2build.h FT_Init_FreeType
++    fi
++else
++    disable imlib2
++    disable freetype2
+ fi
+ 
+-check_foo_config imlib2 imlib2 Imlib2.h imlib_load_font
+-check_foo_config freetype2 freetype ft2build.h FT_Init_FreeType
+ 
+ ##########################################
+ # SDL check
+@@ -2072,7 +2079,7 @@ get_version(){
+     eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
+     lcname=$(tolower $name)
+     eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
+-    eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
++    eval echo "${lcname}_VERSION_MAJOR=1" >> config.mak
+ }
+ 
+ get_version LIBSWSCALE  libswscale/swscale.h
+@@ -2096,7 +2103,7 @@ if enabled shared; then
+     echo "SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}" >> config.mak
+ fi
+ echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
+-echo "EXTRALIBS=$extralibs" >> config.mak
++echo "EXTRALIBS=-L/usr/local/lib -L/usr/local/lib -L/usr/local/lib $extralibs" >> config.mak
+ 
+ print_config ARCH_   $TMPH config.mak $ARCH_LIST
+ print_config HAVE_   $TMPH config.mak $HAVE_LIST
+@@ -2206,7 +2213,7 @@ Requires.private: $(enabled shared && ec
+ Conflicts:
+ Libs: -L\${libdir} -l${shortname} $(disabled shared && echo $libs)
+ Libs.private: $(enabled shared && echo $libs)
+-Cflags: -I\${includedir}
++Cflags: -I\${includedir} -I\${includedir}/ffmpeg
+ EOF
+ cat <<EOF > $name/$name-uninstalled.pc
+ prefix=
--- /dev/null
+++ multimedia/ffmpeg/files/patch-libavcodec_Makefile
@@ -0,0 +1,12 @@
+--- libavcodec/Makefile.orig	2008-08-14 14:31:06.000000000 -0400
++++ libavcodec/Makefile	2008-08-14 14:31:16.000000000 -0400
+@@ -373,9 +373,7 @@ OBJS-$(HAVE_W32THREADS)                +
+ 
+ OBJS-$(HAVE_XVMC)                      += xvmcvideo.o
+ 
+-ifndef CONFIG_SWSCALE
+ OBJS += imgresample.o
+-endif
+ 
+ # processor-specific code
+ ifdef HAVE_MMX
--- /dev/null
+++ multimedia/ffmpeg/files/patch-subdir.mak
@@ -0,0 +1,14 @@
+--- subdir.mak.orig	2008-07-27 15:57:37.873013462 -0500
++++ subdir.mak	2008-07-27 15:58:54.041106334 -0500
+@@ -54,9 +54,9 @@
+ 
+ install-headers::
+ 	install -d "$(INCINSTDIR)"
+-	install -d "$(LIBDIR)/pkgconfig"
++	install -d "$(prefix)/libdata/pkgconfig"
+ 	install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(INCINSTDIR)"
+-	install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"
++	install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc "$(prefix)/libdata/pkgconfig"
+ 
+ uninstall-libs::
+ 	-rm -f "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
--- /dev/null
+++ multimedia/ffmpeg/files/ffserver.in
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/multimedia/ffmpeg/files/ffserver.in,v 1.1 2007/05/25 17:07:36 ahze Exp $
+#
+
+# PROVIDE: ffserver
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable ffserver:
+#
+#ffserver_enable="YES"
+#
+ffserver_enable="${ffserver_enable-NO}"
+
+. %%RC_SUBR%%
+
+name=ffserver
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/bin/${name}
+required_files=%%PREFIX%%/etc/ffserver.conf
+
+load_rc_config ${name}
+run_rc_command "$1"


More information about the Midnightbsd-cvs mailing list