diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-11-03 07:01:44 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-11-03 07:01:44 +0000 |
commit | 77072d02124dce44eb0465a68982aede5c0fe250 (patch) | |
tree | 9edcfd962c313161b0a981f438260312f375270b /multimedia/ffmpeg | |
parent | a23fe2469b6dabbf76a005f97030367879da89e4 (diff) | |
download | ports-77072d02124dce44eb0465a68982aede5c0fe250.tar.gz ports-77072d02124dce44eb0465a68982aede5c0fe250.zip |
Notes
Diffstat (limited to 'multimedia/ffmpeg')
-rw-r--r-- | multimedia/ffmpeg/Makefile | 30 | ||||
-rw-r--r-- | multimedia/ffmpeg/files/patch-libavcodec::bswap.h | 41 |
2 files changed, 70 insertions, 1 deletions
diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index dba45bad6419..be8da9146e74 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -26,7 +26,6 @@ USE_GMAKE= yes USE_REINPLACE= yes CONFIGURE_ARGS= --cc="${CC}" --prefix="${PREFIX}" \ --make="${GMAKE}" --enable-shared \ - --extra-cflags="-I${LOCALBASE}/include" \ --extra-libs="-lm -L${LOCALBASE}/lib" PLIST_SUB= SHLIB_VERSION=${SHLIB_VERSION} INSTALLS_SHLIB= yes @@ -58,6 +57,16 @@ WITH_VORBIS=yes ## support activation ## +## disable a52 +.ifndef(WITHOUT_A52) +LIB_DEPENDS+= a52.0:${PORTSDIR}/audio/liba52 + +CONFIGURE_ARGS+= --enable-a52 \ + --enable-a52bin +.else +CONFIGURE_ARGS+= --enable-a52 \ + --disable-a52bin +.endif ## disable mmx .ifdef(WITHOUT_MMX) CONFIGURE_ARGS+= --disable-mmx @@ -68,6 +77,13 @@ LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame CONFIGURE_ARGS+= --enable-mp3lame .endif +## optimization +.ifdef(WITH_OPTIMIZED_CFLAGS) +CONFIGURE_ARGS+= --extra-cflags="${CFLAGS} -I${LOCALBASE}/include \ + -O3 -ffast-math -fomit-frame-pointer" +.else +CONFIGURE_ARGS+= --extra-cflags="${CFLAGS} -I${LOCALBASE}/include" +.endif ## vorbis .ifdef(WITH_VORBIS) LIB_DEPENDS+= vorbisenc.2:${PORTSDIR}/audio/libvorbis @@ -76,12 +92,20 @@ CONFIGURE_ARGS+= --enable-vorbis .endif pre-everything:: +.ifndef(WITHOUT_LIBA52) + @${ECHO_MSG} "You can disable liba52 support by defining WITHOUT_LIBA52" +.endif .ifndef(WITHOUT_MMX) @${ECHO_MSG} "Define WITHOUT_MMX if your system does not support MMX" .endif .ifndef(WITH_MP3) @${ECHO_MSG} 'Define WITH_MP3 to enable lame MP3 codec' .endif +.ifndef(WITH_OPTIMIZED_CFLAGS) + @${ECHO_MSG} + @${ECHO_MSG} 'You can enable additional compilation optimizations' + @${ECHO_MSG} 'by defining WITH_OPTIMIZED_CFLAGS' +.endif .ifndef(WITH_VORBIS) @${ECHO_MSG} 'Define WITH_VORBIS to enable libvorbisenc VORBIS codec' .endif @@ -118,6 +142,10 @@ post-patch: "s!VIDEO_INPUT METEOR_INPUT_DEV0!VIDEO_INPUT METEOR_INPUT_DEV${WITH_BKTR_DEV}!" \ ${WRKSRC}/libav/grab_bsdbktr.c .endif +.ifndef(WITHOUT_LIBA52) + @${REINPLACE_CMD} -e 's|-ldl||' \ + ${WRKSRC}/configure +.endif post-install: .ifndef(NOPORTDOCS) diff --git a/multimedia/ffmpeg/files/patch-libavcodec::bswap.h b/multimedia/ffmpeg/files/patch-libavcodec::bswap.h new file mode 100644 index 000000000000..e0c419c1dc42 --- /dev/null +++ b/multimedia/ffmpeg/files/patch-libavcodec::bswap.h @@ -0,0 +1,41 @@ +--- libavcodec/bswap.h.orig Sun Nov 3 04:51:51 2002 ++++ libavcodec/bswap.h Sun Nov 3 04:53:30 2002 +@@ -5,6 +5,14 @@ + #include <byteswap.h> + #else + ++#if (defined(BSD) && (BSD >= 199103)) ++#include <sys/param.h> ++#endif ++ ++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000 ++#include <sys/endian.h> ++#endif ++ + #ifdef ARCH_X86 + inline static unsigned short ByteSwap16(unsigned short x) + { +@@ -13,7 +21,11 @@ + "0" (x)); + return x; + } ++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000 ++#define bswap_16(x) (be16toh(x)) ++#else + #define bswap_16(x) ByteSwap16(x) ++#endif + + inline static unsigned int ByteSwap32(unsigned int x) + { +@@ -29,7 +41,11 @@ + "0" (x)); + return x; + } ++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000 ++#define bswap_32(x) (be32toh(x)) ++#else + #define bswap_32(x) ByteSwap32(x) ++#endif + + inline static unsigned long long int ByteSwap64(unsigned long long int x) + { |