aboutsummaryrefslogtreecommitdiff
path: root/audio/xmms-faad
diff options
context:
space:
mode:
authorBeech Rintoul <beech@FreeBSD.org>2009-02-21 19:55:46 +0000
committerBeech Rintoul <beech@FreeBSD.org>2009-02-21 19:55:46 +0000
commit05adb12dd5b7e92790df4eee8e43d426f28f2bb3 (patch)
tree1c669db13eead8b0b4b07fece76b649ef034507f /audio/xmms-faad
parent38642b095a2045f1fa44a296adc79319b5e04d07 (diff)
downloadports-05adb12dd5b7e92790df4eee8e43d426f28f2bb3.tar.gz
ports-05adb12dd5b7e92790df4eee8e43d426f28f2bb3.zip
Notes
Diffstat (limited to 'audio/xmms-faad')
-rw-r--r--audio/xmms-faad/Makefile52
-rw-r--r--audio/xmms-faad/Makefile.inc47
-rw-r--r--audio/xmms-faad/distinfo6
-rw-r--r--audio/xmms-faad/files/patch-mp4_utils.c26
-rw-r--r--audio/xmms-faad/files/patch-plugins_xmms_src_Makefile.in12
-rw-r--r--audio/xmms-faad/files/patch-plugins_xmms_src_mp4__utils.c87
6 files changed, 78 insertions, 152 deletions
diff --git a/audio/xmms-faad/Makefile b/audio/xmms-faad/Makefile
index d9abaae6dc3b..28c8b6a97250 100644
--- a/audio/xmms-faad/Makefile
+++ b/audio/xmms-faad/Makefile
@@ -5,59 +5,11 @@
# $FreeBSD$
#
-PORTNAME= faad2
-PORTVERSION= 2.0
-PORTREVISION= 8
-CATEGORIES= audio
-MASTER_SITES= SF
-MASTER_SITE_SUBDIR= faac
PKGNAMEPREFIX= xmms-
MAINTAINER= ports@FreeBSD.org
COMMENT= XMMS plugin for faad
-BUILD_DEPENDS= xmms-config:${PORTSDIR}/multimedia/xmms
-LIB_DEPENDS= id3-3.8.3:${PORTSDIR}/audio/id3lib \
- xmms.4:${PORTSDIR}/multimedia/xmms \
- faad.2:${PORTSDIR}/audio/faad \
- mp4v2.0:${PORTSDIR}/multimedia/mpeg4ip-libmp4v2
-PATCH_DEPENDS= ${BUILD_DEPENDS}
+MASTERDIR= ${.CURDIR}
-WRKSRC= ${WRKDIR}/${PORTNAME}
-
-USE_AUTOTOOLS= automake:15 autoheader:262 autoconf:262 libtool:15
-AUTOMAKE_ARGS= --add-missing
-USE_GNOME= gtk12
-USE_GMAKE= yes
-
-CONFIGURE_ARGS= --with-xmms --with-mp4v2
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS} -DHAVE_GTK" \
- LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" \
-
-DESCR= ${PORTSDIR}/audio/faad/pkg-descr
-PLIST_FILES= lib/xmms/Input/libmp4.a \
- lib/xmms/Input/libmp4.la \
- lib/xmms/Input/libmp4.so
-
-BUILD_WRKSRC= ${WRKSRC}/plugins/xmms/src
-INSTALL_WRKSRC= ${WRKSRC}/plugins/xmms/src
-
-pre-patch: build-depends
-
-post-patch:
- @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/plugins/xmms/src/Makefile.am
- @${REINPLACE_CMD} -e 's|"faad.h"|<faad.h>|; s|"mp4.h"|<mp4.h>|' \
- ${WRKSRC}/plugins/xmms/src/libmp4.c
-# make sure everything is prepared prior to configure stage
-# pre-configure will not work since *AUTO* tools happen in-between
- @cd ${WRKSRC}; ${ACLOCAL} -I ${ACLOCAL_DIR} -I .; \
- ${SETENV} ${SCRIPTS_ENV} ${LIBTOOLIZE} --automake
- @${REINPLACE_CMD} -e 's|$$lt_target|$$host|' \
- -e '/^_LT_AC_SHELL_INIT/d' ${WRKSRC}/aclocal.m4
-# CFLAGS safeness
- @${FIND} ${WRKSRC} -type f -name Makefile.am | \
- ${XARGS} -n 5 -x \
- ${REINPLACE_CMD} -e \
- 's|-O2|${CFLAGS}|'
-
-.include <bsd.port.mk>
+.include "${MASTERDIR}/Makefile.inc"
diff --git a/audio/xmms-faad/Makefile.inc b/audio/xmms-faad/Makefile.inc
new file mode 100644
index 000000000000..25207fdb73e3
--- /dev/null
+++ b/audio/xmms-faad/Makefile.inc
@@ -0,0 +1,47 @@
+# $FreeBSD$
+
+PORTNAME= faad2
+PORTVERSION= 2.7
+CATEGORIES= audio
+MASTER_SITES= SFE/faac
+
+BUILD_DEPENDS= faad2>=2.7:${PORTSDIR}/audio/faad
+RUN_DEPENDS= faad2>=2.7:${PORTSDIR}/audio/faad
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/plugins/xmms/src
+
+USE_BZIP2= yes
+WANT_GNOME= yes
+
+DESCR= ${PORTSDIR}/audio/faad/pkg-descr
+PLIST_FILES= ${PLUGINS_DIR:S,^${PREFIX}/,,}/libmp4.so
+
+.include <bsd.port.pre.mk>
+
+.if ${PKGNAMEPREFIX} == "bmp-"
+LIB_DEPENDS+= beep.2:${PORTSDIR}/multimedia/beep-media-player
+USE_GNOME+= gtk20
+PLUGINS_DIR= ${PREFIX}/lib/bmp/Input
+EXTRA_CFLAGS= `pkg-config --cflags bmp` -DHAVE_BMP
+EXTRA_LDFLAGS= `pkg-config --libs bmp`
+.endif
+
+.if ${PKGNAMEPREFIX} == "xmms-"
+LIB_DEPENDS+= xmms.4:${PORTSDIR}/multimedia/xmms
+USE_GNOME+= gtk12
+PLUGINS_DIR= ${PREFIX}/lib/xmms/Input
+EXTRA_CFLAGS= `xmms-config --cflags`
+EXTRA_LDFLAGS+= `xmms-config --libs`
+.endif
+
+do-build:
+ cd ${WRKSRC} && ${CC} ${CFLAGS} -fPIC -shared \
+ -I${LOCALBASE}/include -DHAVE_STDINT_H \
+ ${EXTRA_CFLAGS} *.c -o libmp4.so \
+ -L${LOCALBASE}/lib -lfaad -lmp4ff \
+ ${EXTRA_LDFLAGS}
+
+do-install:
+ cd ${WRKSRC}; ${INSTALL_DATA} libmp4.so ${PLUGINS_DIR}
+
+.include <bsd.port.post.mk>
diff --git a/audio/xmms-faad/distinfo b/audio/xmms-faad/distinfo
index 764bd7e9aaff..86a0ea442beb 100644
--- a/audio/xmms-faad/distinfo
+++ b/audio/xmms-faad/distinfo
@@ -1,3 +1,3 @@
-MD5 (faad2-2.0.tar.gz) = 1a6f79365f2934a4888b210ef47a3a07
-SHA256 (faad2-2.0.tar.gz) = a62a4622862252e53e0dd58c3b0307a138f5100304e07bf50c8aee31a68ab861
-SIZE (faad2-2.0.tar.gz) = 766660
+MD5 (faad2-2.7.tar.bz2) = 4c332fa23febc0e4648064685a3d4332
+SHA256 (faad2-2.7.tar.bz2) = 14561b5d6bc457e825bfd3921ae50a6648f377a9396eaf16d4b057b39a3f63b5
+SIZE (faad2-2.7.tar.bz2) = 901043
diff --git a/audio/xmms-faad/files/patch-mp4_utils.c b/audio/xmms-faad/files/patch-mp4_utils.c
new file mode 100644
index 000000000000..dafebba69824
--- /dev/null
+++ b/audio/xmms-faad/files/patch-mp4_utils.c
@@ -0,0 +1,26 @@
+--- mp4_utils.c.orig 2004-10-18 05:44:51.000000000 +0900
++++ mp4_utils.c 2009-02-12 02:53:15.000000000 +0900
+@@ -3,15 +3,22 @@
+ */
+
+ #include "mp4ff.h"
+-#include "faad.h"
++#include "neaacdec.h"
+
+ #include <gtk/gtk.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
++
++#if defined(HAVE_BMP)
++#include <bmp/plugin.h>
++#include <bmp/titlestring.h>
++#include <bmp/util.h>
++#else
+ #include <xmms/plugin.h>
+ #include <xmms/titlestring.h>
+ #include <xmms/util.h>
++#endif /*HAVE_BMP*/
+
+ const char *mp4AudioNames[]=
+ {
diff --git a/audio/xmms-faad/files/patch-plugins_xmms_src_Makefile.in b/audio/xmms-faad/files/patch-plugins_xmms_src_Makefile.in
deleted file mode 100644
index b53d2218625e..000000000000
--- a/audio/xmms-faad/files/patch-plugins_xmms_src_Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- plugins/xmms/src/Makefile.am.orig Wed Sep 29 13:33:13 2004
-+++ plugins/xmms/src/Makefile.am Wed Sep 29 13:34:27 2004
-@@ -5,8 +5,7 @@
- `$(GTK_CONFIG) --cflags` -DHAVE_GLIB_H=1 \
- -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4v2
-
--libmp4_la_LIBADD = $(top_builddir)/libfaad/libfaad.la \
-- $(top_builddir)/common/mp4v2/libmp4v2.la
-+LIBS= -lfaad -lmp4v2
-
- libmp4_la_LDFLAGS = -module -avoid-version `$(XMMS_CONFIG) --libs` \
- `$(GTK_CONFIG) --libs` -lpthread -lstdc++
diff --git a/audio/xmms-faad/files/patch-plugins_xmms_src_mp4__utils.c b/audio/xmms-faad/files/patch-plugins_xmms_src_mp4__utils.c
deleted file mode 100644
index b7a7b75962da..000000000000
--- a/audio/xmms-faad/files/patch-plugins_xmms_src_mp4__utils.c
+++ /dev/null
@@ -1,87 +0,0 @@
---- plugins/xmms/src/mp4_utils.c.orig Thu Dec 4 05:07:56 2003
-+++ plugins/xmms/src/mp4_utils.c Fri Jul 29 11:11:21 2005
-@@ -6,23 +6,35 @@
-
- const char *mp4AudioNames[]=
- {
-- "MPEG-1 Audio Layers 1,2 or 3",
-- "MPEG-2 low biterate (MPEG-1 extension) - MP3",
-- "MPEG-2 AAC Main Profile",
-- "MPEG-2 AAC Low Complexity profile",
-- "MPEG-2 AAC SSR profile",
-- "MPEG-4 audio (MPEG-4 AAC)",
-- 0
-+ "MPEG-4 AAC Main profile",
-+ "MPEG-4 AAC Low Complexity profile",
-+ "MPEG-4 AAC SSR profile",
-+ "MPEG-4 AAC Long Term Prediction profile",
-+ "MPEG-4 AAC Scalable",
-+ "MPEG-4 CELP",
-+ "MPEG-4 HVXC",
-+ "MPEG-4 Text to Speech",
-+ "MPEG-4 Main Synthetic profile",
-+ "MPEG-4 Wavetable Synthesis profile",
-+ "MPEG-4 MIDI profile",
-+ "MPEG-4 Algorithmic Synthesis and Audio FX profile",
-+ NULL
- };
-
- const u_int8_t mp4AudioTypes[] =
- {
-- MP4_MPEG1_AUDIO_TYPE, // 0x6B
-- MP4_MPEG2_AUDIO_TYPE, // 0x69
-- MP4_MPEG2_AAC_MAIN_AUDIO_TYPE, // 0x66
-- MP4_MPEG2_AAC_LC_AUDIO_TYPE, // 0x67
-- MP4_MPEG2_AAC_SSR_AUDIO_TYPE, // 0x68
-- MP4_MPEG4_AUDIO_TYPE, // 0x40
-+ MP4_MPEG4_AAC_MAIN_AUDIO_TYPE,
-+ MP4_MPEG4_AAC_LC_AUDIO_TYPE,
-+ MP4_MPEG4_AAC_SSR_AUDIO_TYPE,
-+ MP4_MPEG4_AAC_LTP_AUDIO_TYPE,
-+ MP4_MPEG4_AAC_SCALABLE_AUDIO_TYPE,
-+ MP4_MPEG4_CELP_AUDIO_TYPE,
-+ MP4_MPEG4_HVXC_AUDIO_TYPE,
-+ MP4_MPEG4_TTSI_AUDIO_TYPE,
-+ MP4_MPEG4_MAIN_SYNTHETIC_AUDIO_TYPE,
-+ MP4_MPEG4_WAVETABLE_AUDIO_TYPE,
-+ MP4_MPEG4_MIDI_AUDIO_TYPE,
-+ MP4_MPEG4_ALGORITHMIC_FX_AUDIO_TYPE,
- 0
- };
-
-@@ -54,7 +66,7 @@
- const char *trackType = MP4GetTrackType(file, trackID);
- if(!strcmp(trackType, MP4_AUDIO_TRACK_TYPE)){//we found audio track !
- int j=0;
-- u_int8_t audiotype = MP4GetTrackAudioType(file, trackID);
-+ u_int8_t audiotype = MP4GetTrackAudioMpeg4Type(file, trackID);
- while(mp4AudioTypes[j]){ // what kind of audio is ?
- if(mp4AudioTypes[j] == audiotype){
- if(mp4AudioTypes[j] == MP4_MPEG4_AUDIO_TYPE){//MPEG4 audio ok
-@@ -64,9 +76,9 @@
- }
- else{
- printf("%s\n", mp4AudioNames[j]);
-- if (mp4AudioTypes[j]== MP4_MPEG2_AAC_LC_AUDIO_TYPE ||
-- mp4AudioTypes[j]== MP4_MPEG2_AAC_MAIN_AUDIO_TYPE ||
-- mp4AudioTypes[j]== MP4_MPEG2_AAC_SSR_AUDIO_TYPE)
-+ if (mp4AudioTypes[j]== MP4_MPEG4_AAC_MAIN_AUDIO_TYPE ||
-+ mp4AudioTypes[j]== MP4_MPEG4_AAC_LC_AUDIO_TYPE ||
-+ mp4AudioTypes[j]== MP4_MPEG4_AAC_SSR_AUDIO_TYPE)
- return(trackID);
- return(-1);
- }
-@@ -126,10 +138,11 @@
- printf("Track %d, %s", trackID, trackType);
- if(!strcmp(trackType, MP4_AUDIO_TRACK_TYPE)){//we found audio track !
- int j=0;
-- u_int8_t audiotype = MP4GetTrackAudioType(mp4file, trackID);
-+ u_int8_t audiotype = MP4GetTrackAudioMpeg4Type(mp4file, trackID);
- while(mp4AudioTypes[j]){ // what kind of audio is ?
- if(mp4AudioTypes[j] == audiotype){
-- if(mp4AudioTypes[j] == MP4_MPEG4_AUDIO_TYPE){
-+ if(mp4AudioTypes[j] == MP4_MPEG4_AUDIO_TYPE ||
-+ mp4AudioTypes[j] == MP4_MPEG4_AAC_LC_AUDIO_TYPE){
- audiotype = MP4GetTrackAudioMpeg4Type(mp4file, trackID);
- g_print(" %s", mpeg4AudioNames[audiotype]);
- }