diff options
author | pav <pav@FreeBSD.org> | 2004-05-12 16:43:58 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-05-12 16:43:58 +0800 |
commit | 45ca8fa87bb06e71638574563f0eb2a0e8c94e93 (patch) | |
tree | 193d610d569bb1b3fc9fb475ea5d74bfc3ea0ab2 /audio/gtkpod | |
parent | 01083168f0b7c2a4071e8c5a9a71f50c2f46a587 (diff) | |
download | freebsd-ports-gnome-45ca8fa87bb06e71638574563f0eb2a0e8c94e93.tar.gz freebsd-ports-gnome-45ca8fa87bb06e71638574563f0eb2a0e8c94e93.tar.zst freebsd-ports-gnome-45ca8fa87bb06e71638574563f0eb2a0e8c94e93.zip |
- Add AAC support, optionally either with faad or mpeg4ip
PR: ports/66356
Submitted by: ume
Approved by: maintainer
Diffstat (limited to 'audio/gtkpod')
-rw-r--r-- | audio/gtkpod/Makefile | 42 | ||||
-rw-r--r-- | audio/gtkpod/files/patch-configure | 27 | ||||
-rw-r--r-- | audio/gtkpod/files/patch-src::mp4file.c | 19 | ||||
-rw-r--r-- | audio/gtkpod/files/systems.h | 7 |
4 files changed, 54 insertions, 41 deletions
diff --git a/audio/gtkpod/Makefile b/audio/gtkpod/Makefile index f661dcf4bc2b..b55e2a4a9c8b 100644 --- a/audio/gtkpod/Makefile +++ b/audio/gtkpod/Makefile @@ -18,16 +18,6 @@ COMMENT= GUI for Apple iPods using GTK2 LIB_DEPENDS= id3tag.2:${PORTSDIR}/audio/libid3tag RUN_DEPENDS= mp3gain:${PORTSDIR}/audio/mp3gain -.if defined(WITH_AAC) -BROKEN= "need mpeg4ip-1.0 for AAC support." -#LIB_DEPENDS+= mp4v2.1:${PORTSDIR}/multimedia/mpeg4ip -#.else -#pre-everything:: -# @${ECHO_MSG} -# @${ECHO_MSG} "To enable AAC support define the WITH_AAC knob." -# @${ECHO_MSG} -.endif - USE_REINPLACE= yes USE_X_PREFIX= yes @@ -35,9 +25,39 @@ USE_GMAKE= yes USE_GNOME= gtk20 GNU_CONFIGURE= yes +.include <bsd.port.pre.mk> + +.if exists(${LOCALBASE}/lib/libmp4v2.so) +.if exists(${LOCALBASE}/include/mpeg4ip_config.h) +WITH_AAC= YES +.else +WITH_FAAD= YES +.endif +.endif +.if defined(WITH_AAC) && defined(WITH_FAAD) +BROKEN= "WITH_AAC and WITH_FAAD are exclusive." +.endif +.if defined(WITH_AAC) +LIB_DEPENDS+= mp4v2.0:${PORTSDIR}/multimedia/mpeg4ip +.endif +.if defined(WITH_FAAD) +LIB_DEPENDS+= mp4v2.0:${PORTSDIR}/audio/faad +.endif + CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib" +.if !defined(WITH_AAC) && !defined(WITH_FAAD) +pre-everything:: + @${ECHO_MSG} + @${ECHO_MSG} "To enable AAC support with mpeg4ip define the WITH_AAC knob." + @${ECHO_MSG} "To enable AAC support with faad2 define the WITH_FAAD knob." + @${ECHO_MSG} +.endif + +post-patch: + @${CP} ${FILESDIR}/systems.h ${WRKSRC}/src + pre-configure: # install locale correctly (share dir instead of lib dir) @${REINPLACE_CMD} -e 's|DATADIRNAME=lib|DATADIRNAME=share|' \ @@ -53,4 +73,4 @@ post-install: @${INSTALL_DATA} ${WRKSRC}/TODOandBUGS.txt ${DOCSDIR} .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/audio/gtkpod/files/patch-configure b/audio/gtkpod/files/patch-configure deleted file mode 100644 index 6b7e1e014e9e..000000000000 --- a/audio/gtkpod/files/patch-configure +++ /dev/null @@ -1,27 +0,0 @@ ---- configure.old Mon Jan 19 13:54:37 2004 -+++ configure Tue Jan 20 00:27:43 2004 -@@ -6409,7 +6409,6 @@ - conftest$ac_exeext conftest.$ac_ext - if test "$ac_cv_search_MP4FileInfo" = no; then - for ac_lib in "mp4v2" "mp4v2 -lstdc++" "mp4v2 -lz" "mp4v2 -lz -lstdc++"; do -- LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -6468,16 +6467,7 @@ - fi - echo "$as_me:$LINENO: result: $ac_cv_search_MP4FileInfo" >&5 - echo "${ECHO_T}$ac_cv_search_MP4FileInfo" >&6 --if test "$ac_cv_search_MP4FileInfo" != no; then -- test "$ac_cv_search_MP4FileInfo" = "none required" || LIBS="$ac_cv_search_MP4FileInfo $LIBS" -- have_mp4v2="yes -- will build with aac support" --cat >>confdefs.h <<_ACEOF --#define HAVE_LIBMP4V2 1 --_ACEOF -- --else - have_mp4v2="***no -- will build without aac support" --fi - - - diff --git a/audio/gtkpod/files/patch-src::mp4file.c b/audio/gtkpod/files/patch-src::mp4file.c index 56f67b658f3e..c3c7c19befbb 100644 --- a/audio/gtkpod/files/patch-src::mp4file.c +++ b/audio/gtkpod/files/patch-src::mp4file.c @@ -1,6 +1,19 @@ ---- src/mp4file.c.old Sat Jan 17 10:37:49 2004 -+++ src/mp4file.c Tue Jan 20 21:33:20 2004 -@@ -342,7 +342,7 @@ +Index: src/mp4file.c +diff -u -p src/mp4file.c.orig src/mp4file.c +--- src/mp4file.c.orig Sat Jan 17 18:37:49 2004 ++++ src/mp4file.c Fri May 7 15:20:24 2004 +@@ -109,6 +109,10 @@ + + #include "mp4.h" + ++#ifndef UINT64_TO_DOUBLE ++#define UINT64_TO_DOUBLE(a) ((double)((int64_t)(a))) ++#endif ++ + Track *file_get_mp4_info (gchar *mp4FileName) + { + Track *track = NULL; +@@ -342,7 +346,7 @@ Track *file_get_mp4_info (gchar *name) return NULL; } diff --git a/audio/gtkpod/files/systems.h b/audio/gtkpod/files/systems.h new file mode 100644 index 000000000000..d4013d8560c6 --- /dev/null +++ b/audio/gtkpod/files/systems.h @@ -0,0 +1,7 @@ +/* This file is included from faad2 version of mepg4ip.h. */ + +#include <sys/types.h> +#include <stdlib.h> +#include <string.h> + +#define HAVE_RINT |