diff options
Diffstat (limited to 'audio/liba52-devel')
-rw-r--r-- | audio/liba52-devel/Makefile | 114 | ||||
-rw-r--r-- | audio/liba52-devel/distinfo | 6 | ||||
-rw-r--r-- | audio/liba52-devel/files/Makefile | 23 | ||||
-rw-r--r-- | audio/liba52-devel/files/liba52-devel.la | 28 | ||||
-rw-r--r-- | audio/liba52-devel/files/patch-a52.h | 24 | ||||
-rw-r--r-- | audio/liba52-devel/files/patch-a52_internal.h | 33 | ||||
-rw-r--r-- | audio/liba52-devel/files/patch-imdct.c | 15 | ||||
-rw-r--r-- | audio/liba52-devel/files/patch-resample.c | 38 | ||||
-rw-r--r-- | audio/liba52-devel/pkg-descr | 2 | ||||
-rw-r--r-- | audio/liba52-devel/pkg-plist | 24 |
10 files changed, 240 insertions, 67 deletions
diff --git a/audio/liba52-devel/Makefile b/audio/liba52-devel/Makefile index 1831debcf532..8f13676a1014 100644 --- a/audio/liba52-devel/Makefile +++ b/audio/liba52-devel/Makefile @@ -1,73 +1,89 @@ -# New ports collection makefile for: liba52 -# Date created: Tue Oct 16 10:43:56 BRST 2001 +# New ports collection makefile for: liba52-devel +# Date created: Mon Oct 17 02:22:44 UTC 2005 # Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> # # $FreeBSD$ # PORTNAME= liba52 -PORTVERSION= 0.7.4 -PORTREVISION= 1 +PORTVERSION= 0.7.4.${DISTFILE_DATE} CATEGORIES= audio -MASTER_SITES= http://liba52.sourceforge.net/files/ -DISTNAME= a52dec-${PORTVERSION:S/.b/b/} +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= lioux +PKGNAMESUFFIX= -devel +DISTNAME= FFMpeg-${DISTFILE_DATE} MAINTAINER= lioux@FreeBSD.org COMMENT= A free library for decoding ATSC A/52 streams, aka AC-3 -USE_GMAKE= yes -USE_REINPLACE= yes -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --disable-oss --enable-shared -USE_AUTOTOOLS= libtool:13 +OPTIONS= DJBFFT "Adds support for fast djbfft fft library" ON \ + OPTIMIZED_CFLAGS "Enable extra performance optimizations" OFF + +USE_BZIP2= yes +MAKE_ARGS= LIB_VERSION="${LIB_VERSION}" PREFIX="${PREFIX}" INSTALLS_SHLIB= yes -.if !defined(WITHOUT_DJBFFT) && !defined(PACKAGE_BUILDING) -BUILD_DEPENDS+= ${LOCALBASE}/lib/libdjbfft.a:${PORTSDIR}/math/djbfft -RUN_DEPENDS+= ${LOCALBASE}/lib/libdjbfft.a:${PORTSDIR}/math/djbfft +WRKSRC= ${WRKDIR}/${DISTNAME}/libavcodec/liba52 -CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ - LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" -CONFIGURE_ARGS+= --enable-djbfft -.endif +LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX} +PLIST_SUB= LIB_VERSION="${LIB_VERSION}" -MAN1= a52dec.1 extract_a52.1 +DISTFILE_DATE= 2005112800 +LIB_VERSION= 0 -HEADER_FILES= liba52/a52_internal.h +post-extract: + @${CP} ${FILESDIR}/${MAKEFILE} ${BUILD_WRKSRC} -pre-everything:: -.ifndef(WITH_OPTIMIZED_CFLAGS) - @${ECHO_MSG} ">>>" - @${ECHO_MSG} ">>> You can enable extra optimizations by defining WITH_OPTIMIZED_CFLAGS." - @${ECHO_MSG} ">>> For example, 'make WITH_OPTIMIZED_CFLAGS=yes'" - @${ECHO_MSG} ">>>" -.endif -.ifndef(WITHOUT_DJBFFT) - @${ECHO_MSG} '>>>' - @${ECHO_MSG} '>>> You can disable djbfft optimized FFT routines by defining WITHOUT_DJBFFT.' - @${ECHO_MSG} ">>> For example, 'make WITHOUT_DJBFFT=yes'" - @${ECHO_MSG} '>>>' -.endif +post-configure: + @${SED} -E \ + -e 's|/usr/local/|${PREFIX}/|' \ + -e 's|%%LIB_VERSION%%|${LIB_VERSION}|' \ + -e 's|%%DJBFFT%%|${DJBFFT_LIBRARY}|' \ + -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ + -e 's|%%PREFIX%%|${PREFIX}|' \ + ${FILESDIR}/liba52-devel.la > \ + ${WRKDIR}/liba52-devel.la + +pre-install: + @${MKDIR} ${PREFIX}/include/a52dec-devel + +post-install: + @${INSTALL_DATA} ${WRKDIR}/liba52-devel.la \ + ${PREFIX}/lib + +.include <bsd.port.pre.mk> -post-patch: -.ifndef(WITH_OPTIMIZED_CFLAGS) - @${REINPLACE_CMD} -E -e 's!-O3!${CFLAGS}!' -e 's!-mcpu=[^"]+"!"!' \ - ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} +### +## specific ARCH information +### +.if ${ARCH} == "i386" || ${ARCH} == "ia64" || ${ARCH} == "amd64" +CFLAGS+= -DARCH_X86 +. if ${ARCH} == "ia64" || ${ARCH} == "amd64" +CFLAGS+= -DARCH_X86_64 +. endif .endif -.ifndef(WITHOUT_DJBFFT) - @${REINPLACE_CMD} -E -e 's|(fftc4.h)|djbfft/\1|' ${WRKSRC}/liba52/imdct.c +## sse hardware vector support +.if (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse} == "sse") +CFLAGS+= -DHAVE_SSE .endif -post-configure: - @${LN} -sf ${LIBTOOL} ${WRKSRC}/libtool +### +## library dependency +### +.if !defined(WITHOUT_DJBFFT) && !defined(PACKAGE_BUILDING) +BUILD_DEPENDS+= ${LOCALBASE}/lib/libdjbfft.a:${PORTSDIR}/math/djbfft +RUN_DEPENDS+= ${LOCALBASE}/lib/libdjbfft.a:${PORTSDIR}/math/djbfft -post-install: -.ifndef(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/doc/liba52.txt ${DOCSDIR} +CFLAGS+= -DLIBA52_DJBFFT -I${LOCALBASE}/include + +DJBFFT_LIBRARY= -ldjbfft +.endif + +### +## optimizations +### +.ifdef(WITH_OPTIMIZED_CFLAGS) +CFLAGS+= -O3 -ffast-math .endif -.for file in ${HEADER_FILES} - @${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/include/a52dec -.endfor -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/audio/liba52-devel/distinfo b/audio/liba52-devel/distinfo index 8bab35f7ff30..37ef8007af59 100644 --- a/audio/liba52-devel/distinfo +++ b/audio/liba52-devel/distinfo @@ -1,3 +1,3 @@ -MD5 (a52dec-0.7.4.tar.gz) = caa9f5bc44232dc8aeea773fea56be80 -SHA256 (a52dec-0.7.4.tar.gz) = a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33 -SIZE (a52dec-0.7.4.tar.gz) = 241507 +MD5 (FFMpeg-2005112800.tar.bz2) = c3c960816c75f640a93662961ba7f15f +SHA256 (FFMpeg-2005112800.tar.bz2) = 7754ca22c545a8ecf5f9bb47a7fed0cbf918718e415caf40eb12ee84ec1655e9 +SIZE (FFMpeg-2005112800.tar.bz2) = 1694390 diff --git a/audio/liba52-devel/files/Makefile b/audio/liba52-devel/files/Makefile new file mode 100644 index 000000000000..d208bee95ec1 --- /dev/null +++ b/audio/liba52-devel/files/Makefile @@ -0,0 +1,23 @@ +# $FreeBSD$ + +LIB= a52-devel +SHLIB_MAJOR= ${LIB_VERSION} +SHLIB_MINOR= 0 +CFLAGS+= -I${.CURDIR} + +SRCS= bit_allocate.c bitstream.c crc.c downmix.c imdct.c parse.c \ + resample.c +INCS= a52.h a52_internal.h a52_util.h mm_accel.h + +# idea taken from port security/libparanoia +# hacks around <bsd.lib.mk>, which ignores PREFIX +.if defined(PREFIX) +DESTDIR= ${PREFIX}/ +.else +DESTDIR= /usr/local/ +.endif +INCSDIR= include/a52dec-devel/ +INCDIR= ${INCSDIR} # for pre-bsd.incs.mk API +LIBDIR= lib/ + +.include <bsd.lib.mk> diff --git a/audio/liba52-devel/files/liba52-devel.la b/audio/liba52-devel/files/liba52-devel.la new file mode 100644 index 000000000000..ce60406f98ed --- /dev/null +++ b/audio/liba52-devel/files/liba52-devel.la @@ -0,0 +1,28 @@ +# liba52-devel.la - a libtool library file +# Generated by ltmain.sh - GNU libtool 1.3.5-freebsd-ports (1.385.2.206 2000/05/27 11:12:27) +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='' + +# Names of this library. +library_names='liba52-devel.so.%%LIB_VERSION%% liba52-devel.so' + +# The name of the static archive. +old_library='liba52-devel.a' + +# Libraries that this one depends upon. +dependency_libs=' -L%%LOCALBASE%%/lib %%DJBFFT%% -lm' + +# Version information for liba52-devel. +current=0 +age=0 +revision=0 + +# Is this an already installed library? +installed=yes + +# Directory that this library needs to be installed in: +libdir='%%PREFIX%%/lib' diff --git a/audio/liba52-devel/files/patch-a52.h b/audio/liba52-devel/files/patch-a52.h new file mode 100644 index 000000000000..71cb5e473745 --- /dev/null +++ b/audio/liba52-devel/files/patch-a52.h @@ -0,0 +1,24 @@ +--- a52.h.orig Sun Dec 11 01:57:32 2005 ++++ a52.h Sun Dec 11 02:42:30 2005 +@@ -24,11 +24,7 @@ + #ifndef A52_H + #define A52_H + +-#include "../avcodec.h" +- +-#undef malloc +-#undef free +-#undef realloc ++#include <inttypes.h> + + #if defined(LIBA52_FIXED) + typedef int32_t sample_t; +@@ -41,7 +37,7 @@ + typedef float level_t; + #endif + +-typedef struct a52_state_s a52_state_t; ++#include "a52_internal.h" + + #define A52_CHANNEL 0 + #define A52_MONO 1 diff --git a/audio/liba52-devel/files/patch-a52_internal.h b/audio/liba52-devel/files/patch-a52_internal.h new file mode 100644 index 000000000000..095f6a60ad62 --- /dev/null +++ b/audio/liba52-devel/files/patch-a52_internal.h @@ -0,0 +1,33 @@ +--- a52_internal.h.orig Sun Dec 11 01:58:58 2005 ++++ a52_internal.h Sun Dec 11 02:47:04 2005 +@@ -21,6 +21,15 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + ++#ifndef __LIBA52__52_internal_h__ ++# define __LIBA52__52_internal_h__ ++ ++#include <inttypes.h> ++ ++#ifndef NULL ++# define NULL 0 ++#endif ++ + typedef struct { + uint8_t bai; /* fine SNR offset, fast gain */ + uint8_t deltbae; /* delta bit allocation exists */ +@@ -87,6 +96,8 @@ + int downmixed; + }; + ++typedef struct a52_state_s a52_state_t; ++ + #define LEVEL_PLUS6DB 2.0 + #define LEVEL_PLUS3DB 1.4142135623730951 + #define LEVEL_3DB 0.7071067811865476 +@@ -160,3 +171,5 @@ + #define BIAS(x) (x) + + #endif ++ ++#endif /* __LIBA52__52_internal_h__ */ diff --git a/audio/liba52-devel/files/patch-imdct.c b/audio/liba52-devel/files/patch-imdct.c new file mode 100644 index 000000000000..099acc3589a2 --- /dev/null +++ b/audio/liba52-devel/files/patch-imdct.c @@ -0,0 +1,15 @@ +--- imdct.c.orig Sun Aug 24 10:57:20 2003 ++++ imdct.c Sun Dec 11 03:24:14 2005 +@@ -24,6 +24,12 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + ++#include <math.h> ++ ++#ifdef LIBA52_DJBFFT ++#include <djbfft/fftc4.h> ++#endif ++ + #include "a52.h" + #include "a52_internal.h" + #include "mm_accel.h" diff --git a/audio/liba52-devel/files/patch-resample.c b/audio/liba52-devel/files/patch-resample.c new file mode 100644 index 000000000000..dc378c959535 --- /dev/null +++ b/audio/liba52-devel/files/patch-resample.c @@ -0,0 +1,38 @@ +--- resample.c.orig Mon Nov 3 16:06:32 2003 ++++ resample.c Sun Dec 11 03:27:20 2005 +@@ -6,7 +6,6 @@ + + #include "a52.h" + #include "mm_accel.h" +-#include "config.h" + #include "../libpostproc/mangle.h" + + int (* a52_resample) (float * _f, int16_t * s16)=NULL; +@@ -14,6 +13,7 @@ + #include "resample_c.c" + + #ifdef ARCH_X86 ++#include "../../libavutil/common.h" + #include "resample_mmx.c" + #endif + +@@ -24,7 +24,6 @@ + if(mm_accel&MM_ACCEL_X86_MMX){ + tmp=a52_resample_MMX(flags,chans); + if(tmp){ +- if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "Using MMX optimized resampler\n"); + a52_resample=tmp; + return tmp; + } +@@ -33,11 +32,9 @@ + + tmp=a52_resample_C(flags,chans); + if(tmp){ +- if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "No accelerated resampler found\n"); + a52_resample=tmp; + return tmp; + } + +- av_log(NULL, AV_LOG_ERROR, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans); + return NULL; + } diff --git a/audio/liba52-devel/pkg-descr b/audio/liba52-devel/pkg-descr index 10e66340e5da..1ae77193cc93 100644 --- a/audio/liba52-devel/pkg-descr +++ b/audio/liba52-devel/pkg-descr @@ -21,4 +21,4 @@ to ensure that such deviations are only introduced when we fix bugs! Speed - liba52 is really fast, on any modern PC it should take only a few percent of CPU time. -WWW: http://liba52.sourceforge.net/ +WWW: http://www.mplayerhq.hu/ diff --git a/audio/liba52-devel/pkg-plist b/audio/liba52-devel/pkg-plist index c03996cc1c6f..72587ebc250e 100644 --- a/audio/liba52-devel/pkg-plist +++ b/audio/liba52-devel/pkg-plist @@ -1,14 +1,10 @@ -bin/a52dec -bin/extract_a52 -include/a52dec/a52.h -include/a52dec/a52_internal.h -include/a52dec/attributes.h -include/a52dec/audio_out.h -include/a52dec/mm_accel.h -lib/liba52.so.0 -lib/liba52.so -lib/liba52.la -lib/liba52.a -%%PORTDOCS%%%%DOCSDIR%%/liba52.txt -%%PORTDOCS%%@dirrm %%DOCSDIR%% -@dirrm include/a52dec +include/a52dec-devel/a52.h +include/a52dec-devel/a52_internal.h +include/a52dec-devel/a52_util.h +include/a52dec-devel/mm_accel.h +lib/liba52-devel.a +lib/liba52-devel.la +lib/liba52-devel.so +lib/liba52-devel.so.%%LIB_VERSION%% +lib/liba52-devel_p.a +@dirrm include/a52dec-devel |