diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-05-12 08:43:58 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-05-12 08:43:58 +0000 |
commit | 0956ac21cc6eea59a73e59ae75930701304677bf (patch) | |
tree | d466be45f48e4143563d6ca192eecea0337a8337 /audio/gtkpod | |
parent | 70968551367b2f27347f8d3c15d456ecc98e98cf (diff) | |
download | ports-0956ac21cc6eea59a73e59ae75930701304677bf.tar.gz ports-0956ac21cc6eea59a73e59ae75930701304677bf.zip |
Notes
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 |