ports/66356: AAC support for gtkpod with mpeg4ip or faad2
Hajimu UMEMOTO
ume at FreeBSD.org
Fri May 7 16:40:22 UTC 2004
>Number: 66356
>Category: ports
>Synopsis: AAC support for gtkpod with mpeg4ip or faad2
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri May 07 09:40:15 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator: Hajimu UMEMOTO
>Release: FreeBSD 5.2-CURRENT i386
>Organization:
Internet Mutual Aid Society, YOKOHAMA
>Environment:
System: FreeBSD lyrics.mahoroba.org 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Sun Apr 25 02:41:03 JST 2004 root at lyrics.mahoroba.org:/ad0s3/usr/obj/usr/src/sys/LYRICS i386
>Description:
Current gtkpod port is disabling AAC support. Since mpeg4ip port
was updated to 1.0, we can build gtkpod with WITH_AAC, now.
But, unfortunately, there is conflict between mpeg4ip and faad2.
>How-To-Repeat:
Install gtkpod with WITH_AAC.
>Fix:
Please apply following patch to ports/audio/gtkpod. This patch
enables WITH_AAC, and adds WITH_FAAD.
diff -urN Makefile.orig Makefile
--- Makefile.orig Fri May 7 18:26:51 2004
+++ Makefile Fri May 7 18:25:01 2004
@@ -18,16 +18,6 @@
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_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 @@
@${INSTALL_DATA} ${WRKSRC}/TODOandBUGS.txt ${DOCSDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -urN files/patch-configure.orig files/patch-configure
--- files/patch-configure.orig Fri Jan 23 03:26:00 2004
+++ files/patch-configure Fri May 7 18:27:19 2004
@@ -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 -urN files/patch-src::mp4file.c.orig files/patch-src::mp4file.c
--- files/patch-src::mp4file.c.orig Fri Jan 23 03:26:00 2004
+++ files/patch-src::mp4file.c Fri May 7 16:56:38 2004
@@ -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 -urN files/systems.h.orig files/systems.h
--- files/systems.h.orig Thu Jan 1 09:00:00 1970
+++ files/systems.h Fri May 7 15:32:48 2004
@@ -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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list