summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-05-14 13:06:33 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-05-14 13:06:33 +0000
commit96ffab2c0366999611918f3e0ffe93a936898697 (patch)
tree486fcfe698f8547fca2e725946a45de8b594e394 /audio
parentUpgrade to chasen-2.3.3 and ipadic-2.7.0. (diff)
- Update to 2.0 release
- Use external mpeg4ip, provide knob to use internal one PR: ports/66598 Submitted by: michael johnson <ahze@ahze.net> (maintainer)
Notes
Notes: svn path=/head/; revision=109116
Diffstat (limited to 'audio')
-rw-r--r--audio/faad/Makefile65
-rw-r--r--audio/faad/distinfo4
-rw-r--r--audio/faad/files/patch-frontend_main_c38
-rw-r--r--audio/faad/files/patch-structs.h92
-rw-r--r--audio/faad/pkg-plist6
5 files changed, 53 insertions, 152 deletions
diff --git a/audio/faad/Makefile b/audio/faad/Makefile
index 648a1a934d95..ee93f61e69ab 100644
--- a/audio/faad/Makefile
+++ b/audio/faad/Makefile
@@ -7,11 +7,10 @@
PORTNAME= faad2
PORTVERSION= 2.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= faac
-DISTNAME= ${PORTNAME}-${PORTVERSION}-rc3
MAINTAINER= ahze@ahze.net
COMMENT= A LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder
@@ -20,15 +19,16 @@ LIB_DEPENDS= sndfile.1:${PORTSDIR}/audio/libsndfile
WRKSRC= ${WRKDIR}/${PORTNAME}
-USE_AUTOMAKE_VER= 15
-USE_AUTOHEADER= yes
+USE_AUTOMAKE_VER=15
+USE_AUTOHEADER= yes
AUTOMAKE_ARGS= --add-missing
-CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-USE_GETOPT_LONG= yes
+CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+USE_GETOPT_LONG=yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
-USE_LIBTOOL_VER= 13
+USE_LIBTOOL_VER=13
USE_REINPLACE= yes
+USE_SDL= yes
CONFIGURE_ARGS= --with-mp4v2 --with-drm
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
@@ -36,6 +36,35 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
INSTALLS_SHLIB= yes
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/lib/libmp4v2.a)
+HAS_MP4V2= yes
+.endif
+
+.if defined(WITHOUT_MPEG4IP) && !defined(HAS_MP4V2)
+PLIST_FILES+= include/mp4.h include/mpeg4ip.h include/systems.h \
+ lib/libmp4v2.so lib/libmp4v2.so.0 lib/libmp4v2.a
+.else
+LIB_DEPENDS+= mp4.0:${PORTSDIR}/multimedia/mpeg4ip
+PLIST_FILES+= lib/mp4player_plugin/faad2_plugin.a \
+ lib/mp4player_plugin/faad2_plugin.so \
+ lib/mp4player_plugin/faad2_plugin.so.0
+.endif
+
+pre-everything::
+ @${ECHO_MSG} "===>"
+.if !defined(WITHOUT_MPEG4IP)
+ @${ECHO_MSG} "===> you can disable mpeg4ip support by"
+ @${ECHO_MSG} "===> defining WITHOUT_MPEG4IP"
+.else
+ @${ECHO_MSG} "===> WARNING: WITHOUT_MPEG4IP is defined"
+ @${ECHO_MSG} "===> Having WITHOUT_MPEG4IP defined conflicts"
+ @${ECHO_MSG} "===> with multimedia/mpeg4ip and you will not"
+ @${ECHO_MSG} "===> be able to install mpeg4ip after you install faad2"
+.endif
+ @${ECHO_MSG} "===>"
+
pre-patch: build-depends
post-patch:
@@ -45,17 +74,25 @@ post-patch:
${SETENV} ${SCRIPTS_ENV} ${LIBTOOLIZE} --automake
@${REINPLACE_CMD} -e 's|$$lt_target|$$host|' \
${WRKSRC}/aclocal.m4
+ @${REINPLACE_CMD} -e 's|<SDL|<SDL11|' \
+ ${WRKSRC}/plugins/mpeg4ip/faad2.cpp
+ @${ECHO_CMD} "SUBDIRS = libfaad common frontend plugins" > \
+ ${WRKSRC}/Makefile.am
+.if ${OSVERSION} < 500000
+ @${REINPLACE_CMD} -e 's|uint8_t|unsigned char|; \
+ s|uint16_t|unsigned short|; s|uint32_t|unsigned long|; \
+ s|int8_t|char|;' ${WRKSRC}/libfaad/structs.h
+ @${REINPLACE_CMD} -e 's|stdint.h|sys/inttypes.h|' \
+ ${WRKSRC}/common/mp4ff/mp4ff_int_types.h
+.endif
# CFLAGS safeness
- @${FIND} ${WRKSRC} -type f -name Makefile.am | \
+ @${FIND} ${WRKSRC} -type f -name Makefile.am | \
${XARGS} -n 5 -x \
${REINPLACE_CMD} -e \
's|-O2|${CFLAGS}|'
-
-post-configure:
-# sync the multiple libtool copies
- @${CP} ${WRKSRC}/libtool ${WRKSRC}/common/mp4v2/
-
post-install:
+.if defined(WITHOUT_MPEG4IP)
@${INSTALL_DATA} ${WRKSRC}/common/mp4v2/systems.h ${PREFIX}/include
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/audio/faad/distinfo b/audio/faad/distinfo
index 7757252578de..a9c4a8a47246 100644
--- a/audio/faad/distinfo
+++ b/audio/faad/distinfo
@@ -1,2 +1,2 @@
-MD5 (faad2-2.0-rc3.tar.gz) = 0080076438655ed7facf1089a9805aff
-SIZE (faad2-2.0-rc3.tar.gz) = 704005
+MD5 (faad2-2.0.tar.gz) = 1a6f79365f2934a4888b210ef47a3a07
+SIZE (faad2-2.0.tar.gz) = 766660
diff --git a/audio/faad/files/patch-frontend_main_c b/audio/faad/files/patch-frontend_main_c
deleted file mode 100644
index 5549edb37e89..000000000000
--- a/audio/faad/files/patch-frontend_main_c
+++ /dev/null
@@ -1,38 +0,0 @@
---- frontend/main.c.orig Thu Nov 6 16:45:08 2003
-+++ frontend/main.c Wed Dec 10 06:27:37 2003
-@@ -1074,7 +1074,7 @@
- if (optarg)
- {
- char dr[10];
-- if (sscanf(optarg, "%s", dr) < 1) {
-+ if (sscanf(optarg, "%9s", dr) < 1) {
- def_srate = 0;
- } else {
- def_srate = atoi(dr);
-@@ -1085,7 +1085,7 @@
- if (optarg)
- {
- char dr[10];
-- if (sscanf(optarg, "%s", dr) < 1)
-+ if (sscanf(optarg, "%9s", dr) < 1)
- {
- format = 1;
- } else {
-@@ -1099,7 +1099,7 @@
- if (optarg)
- {
- char dr[10];
-- if (sscanf(optarg, "%s", dr) < 1)
-+ if (sscanf(optarg, "%9s", dr) < 1)
- {
- outputFormat = FAAD_FMT_16BIT; /* just use default */
- } else {
-@@ -1113,7 +1113,7 @@
- if (optarg)
- {
- char dr[10];
-- if (sscanf(optarg, "%s", dr) < 1)
-+ if (sscanf(optarg, "%9s", dr) < 1)
- {
- object_type = LC; /* default */
- } else {
diff --git a/audio/faad/files/patch-structs.h b/audio/faad/files/patch-structs.h
deleted file mode 100644
index 3bfb42d3001e..000000000000
--- a/audio/faad/files/patch-structs.h
+++ /dev/null
@@ -1,92 +0,0 @@
---- libfaad/structs.h.orig Thu Nov 13 07:47:59 2003
-+++ libfaad/structs.h Sun Apr 11 22:01:09 2004
-@@ -297,57 +297,57 @@
- typedef struct mp4AudioSpecificConfig
- {
- /* Audio Specific Info */
-- uint8_t objectTypeIndex;
-- uint8_t samplingFrequencyIndex;
-- uint32_t samplingFrequency;
-- uint8_t channelsConfiguration;
-+ unsigned char objectTypeIndex;
-+ unsigned char samplingFrequencyIndex;
-+ unsigned long samplingFrequency;
-+ unsigned char channelsConfiguration;
-
- /* GA Specific Info */
-- uint8_t frameLengthFlag;
-- uint8_t dependsOnCoreCoder;
-- uint16_t coreCoderDelay;
-- uint8_t extensionFlag;
-- uint8_t aacSectionDataResilienceFlag;
-- uint8_t aacScalefactorDataResilienceFlag;
-- uint8_t aacSpectralDataResilienceFlag;
-- uint8_t epConfig;
-+ unsigned char frameLengthFlag;
-+ unsigned char dependsOnCoreCoder;
-+ unsigned short coreCoderDelay;
-+ unsigned char extensionFlag;
-+ unsigned char aacSectionDataResilienceFlag;
-+ unsigned char aacScalefactorDataResilienceFlag;
-+ unsigned char aacSpectralDataResilienceFlag;
-+ unsigned char epConfig;
-
-- int8_t sbr_present_flag;
-- int8_t forceUpSampling;
-+ char sbr_present_flag;
-+ char forceUpSampling;
- } mp4AudioSpecificConfig;
-
- typedef struct faacDecConfiguration
- {
-- uint8_t defObjectType;
-- uint32_t defSampleRate;
-- uint8_t outputFormat;
-- uint8_t downMatrix;
-- uint8_t useOldADTSFormat;
-+ unsigned char defObjectType;
-+ unsigned long defSampleRate;
-+ unsigned char outputFormat;
-+ unsigned char downMatrix;
-+ unsigned char useOldADTSFormat;
- } faacDecConfiguration, *faacDecConfigurationPtr;
-
- typedef struct faacDecFrameInfo
- {
-- uint32_t bytesconsumed;
-- uint32_t samples;
-- uint8_t channels;
-- uint8_t error;
-- uint32_t samplerate;
-+ unsigned long bytesconsumed;
-+ unsigned long samples;
-+ unsigned char channels;
-+ unsigned char error;
-+ unsigned long samplerate;
-
- /* SBR: 0: off, 1: on; normal, 2: on; downsampled */
-- uint8_t sbr;
-+ unsigned char sbr;
-
- /* MPEG-4 ObjectType */
-- uint8_t object_type;
-+ unsigned char object_type;
-
- /* AAC header type; MP4 will be signalled as RAW also */
-- uint8_t header_type;
-+ unsigned char header_type;
-
- /* multichannel configuration */
-- uint8_t num_front_channels;
-- uint8_t num_side_channels;
-- uint8_t num_back_channels;
-- uint8_t num_lfe_channels;
-- uint8_t channel_position[MAX_CHANNELS];
-+ unsigned char num_front_channels;
-+ unsigned char num_side_channels;
-+ unsigned char num_back_channels;
-+ unsigned char num_lfe_channels;
-+ unsigned char channel_position[MAX_CHANNELS];
- } faacDecFrameInfo;
-
- typedef struct
diff --git a/audio/faad/pkg-plist b/audio/faad/pkg-plist
index 2dad3b01d30d..9063f2e76b8e 100644
--- a/audio/faad/pkg-plist
+++ b/audio/faad/pkg-plist
@@ -1,15 +1,9 @@
bin/faad
include/faad.h
include/mp4ff.h
-include/mp4.h
-include/mpeg4ip.h
-include/systems.h
lib/libfaad.a
lib/libfaad.so
lib/libfaad.so.0
lib/libmp4ff.a
lib/libmp4ff.so
lib/libmp4ff.so.0
-lib/libmp4v2.so
-lib/libmp4v2.so.0
-lib/libmp4v2.a