aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--multimedia/gstreamer-plugins/Makefile52
-rw-r--r--multimedia/gstreamer-plugins/files/patch-ext_musepack_gstmusepackdec.cpp61
-rw-r--r--multimedia/gstreamer-plugins/pkg-plist1
-rw-r--r--multimedia/gstreamer-plugins80/Makefile52
-rw-r--r--multimedia/gstreamer-plugins80/files/patch-ext_musepack_gstmusepackdec.cpp61
-rw-r--r--multimedia/gstreamer-plugins80/pkg-plist1
6 files changed, 208 insertions, 20 deletions
diff --git a/multimedia/gstreamer-plugins/Makefile b/multimedia/gstreamer-plugins/Makefile
index ed56a5cffd48..2ae3721285c4 100644
--- a/multimedia/gstreamer-plugins/Makefile
+++ b/multimedia/gstreamer-plugins/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gstreamer
PORTVERSION= 0.8.6
+PORTREVISION= 1
CATEGORIES= multimedia audio
MASTER_SITES= http://gstreamer.freedesktop.org/src/gst-plugins/ \
${MASTER_SITE_GNOME}
@@ -94,11 +95,15 @@ post-extract:
# MD5 (MPlayer-1.0pre4.tar.bz2) = 83ebac0f05b192516a41fca2350ca01a
@${CP} ${FILESDIR}/bsdi_dvd.h ${WRKSRC}/sys/vcd/
+.include <bsd.port.pre.mk>
+
post-patch:
+.if ${CXXFLAGS:M*=athlon-4} || ${CXXFLAGS:M*=athlon-mp} || ${CXXFLAGS:M*=athlon-xp}
# Fix gst-register when using -O -march=athlon-xp
@${REINPLACE_CMD} -e 's|@CXXF|-fgcse @CXXF|g' \
${WRKSRC}/gst/modplug/Makefile.in \
${WRKSRC}/gst/modplug/libmodplug/Makefile.in
+.endif
# as of this writing, FreeBSD does not support lrint* C99 math functions
@${REINPLACE_CMD} -E -e \
's|^#define.*LRINT.*$$||' \
@@ -141,8 +146,6 @@ post-patch:
@${REINPLACE_CMD} -e 's|/usr/include/musepack|${LOCALBASE}/include/musepack|g' \
${WRKSRC}/configure
-.include <bsd.port.pre.mk>
-
# hermes is required for gstreamer-player to work
# since it is currently the only colorspace plugin available
# XXX However, it currently does not work on sparc64.
@@ -263,6 +266,11 @@ WITH_LIBA52=yes
WITH_LIBAUDIOFILE=yes
.endif
+# libcdaudio
+.if exists(${LOCALBASE}/lib/libcdaudio.a)
+WITH_LIBCDAUDIO=yes
+.endif
+
# libdv
.if exists(${LOCALBASE}/lib/libdv.a)
WITH_LIBDV=yes
@@ -379,7 +387,7 @@ WITH_SPEEX=yes
.endif
# swfdec
-.if exists(${X11BASE}/lib/libswfdec.a)
+.if exists(${X11BASE}/lib/libswfdec-0.3.a)
WITH_SWFDEC=yes
.endif
@@ -635,6 +643,16 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libcaca.a:${PORTSDIR}/graphics/libcaca
PLIST_SUB+= LIBCACA=""
.endif
+# libcdaudio
+.ifndef(WITH_LIBCDAUDIO)
+CONFIGURE_ARGS+= --disable-cdaudio
+PLIST_SUB+= LIBCDAUDIO="@comment "
+.else
+LIB_DEPENDS+= cdaudio.1:${PORTSDIR}/audio/libcdaudio
+
+PLIST_SUB+= LIBCDAUDIO=""
+.endif
+
# libdv
.ifndef(WITH_LIBDV)
CONFIGURE_ARGS+= --disable-libdv
@@ -894,15 +912,15 @@ PLIST_SUB+= SPEEX="@comment "
#.endif
# swfdec
-#.ifndef(WITH_SWFDEC)
+.ifndef(WITH_SWFDEC)
CONFIGURE_ARGS+= --disable-swfdec
PLIST_SUB+= SWFDEC="@comment "
-#.else
-#LIB_DEPENDS+= swfdec.0:${PORTSDIR}/graphics/swfdec
-#
-#CONFIGURE_ARGS+= --enable-swfdec
-#PLIST_SUB+= SWFDEC=""
-#.endif
+.else
+LIB_DEPENDS+= swfdec-0.3.0:${PORTSDIR}/graphics/swfdec
+
+CONFIGURE_ARGS+= --enable-swfdec
+PLIST_SUB+= SWFDEC=""
+.endif
# vorbis
.ifndef(WITH_VORBIS)
@@ -947,6 +965,16 @@ LIB_DEPENDS+= xvidcore.4:${PORTSDIR}/multimedia/xvid
PLIST_SUB+= XVID=""
.endif
+pre-build:
+# This port cannot be CFLAGS safe, using p4 optimizations
+# break the mod plugin
+ @${REINPLACE_CMD} -E \
+ -e 's|(-march=pentiu)m4|\1m3|g' \
+ -e 's|(-mcpu=pentiu)m4|\1m3|g' \
+ -e 's|(-mtune=pentiu)m)4|\1m3|g' \
+ ${WRKSRC}/gst/modplug/Makefile \
+ ${WRKSRC}/gst/modplug/libmodplug/Makefile
+
post-build:
.ifdef(EXTRA_BUILD_DIR)
. for dir in ${EXTRA_BUILD_DIR}
@@ -1060,6 +1088,10 @@ pre-everything::
@${ECHO_MSG} '===>'
@${ECHO_MSG} '===> Define WITH_LIBCACA to enable libcaca Video plugin'
.endif
+.ifndef(WITH_LIBCDAUDIO)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> Define WITH_LIBCDAUDIO to enable libcdaudio Audio plugin'
+.endif
.ifndef(WITH_LIBDV)
@${ECHO_MSG} '===>'
@${ECHO_MSG} '===> Define WITH_LIBDV to enable libdv Video plugin'
diff --git a/multimedia/gstreamer-plugins/files/patch-ext_musepack_gstmusepackdec.cpp b/multimedia/gstreamer-plugins/files/patch-ext_musepack_gstmusepackdec.cpp
new file mode 100644
index 000000000000..1b1799ca9a98
--- /dev/null
+++ b/multimedia/gstreamer-plugins/files/patch-ext_musepack_gstmusepackdec.cpp
@@ -0,0 +1,61 @@
+--- ext/musepack/gstmusepackdec.cpp.orig Sun Nov 7 19:30:06 2004
++++ ext/musepack/gstmusepackdec.cpp Thu Dec 16 16:31:42 2004
+@@ -30,14 +30,24 @@
+ GST_STATIC_CAPS ("audio/x-musepack")
+ );
+
++#ifdef MPC_FIXED_POINT
++#define BASE_CAPS \
++ "audio/x-raw-int, " \
++ "signed = (bool) TRUE, " \
++ "width = (int) 32, " \
++ "depth = (int) 32"
++#else
++#define BASE_CAPS \
++ "audio/x-raw-float, " \
++ "width = (int) 32, " \
++ "buffer-frames = (int) 0"
++#endif
++
+ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+- GST_STATIC_CAPS ("audio/x-raw-int, "
++ GST_STATIC_CAPS (BASE_CAPS ", "
+ "endianness = (int) BYTE_ORDER, "
+- "signed = (bool) TRUE, "
+- "width = (int) 32, "
+- "depth = (int) 32, "
+ "rate = (int) [ 8000, 96000 ], "
+ "channels = (int) [ 1, 2 ]")
+ );
+@@ -352,6 +362,7 @@
+ gst_musepack_stream_init (GstMusepackDec * musepackdec)
+ {
+ StreamInfo si = StreamInfo ();
++ GstCaps *caps;
+
+ if (musepackdec->dec)
+ delete musepackdec->dec;
+@@ -379,15 +390,12 @@
+ return FALSE;
+ }
+
+- if (!gst_pad_set_explicit_caps (musepackdec->srcpad,
+- gst_caps_new_simple ("audio/x-raw-int",
+- "width", G_TYPE_INT, 32,
+- "depth", G_TYPE_INT, 32,
+- "endianness", G_TYPE_INT, G_BYTE_ORDER,
+- "channels", G_TYPE_INT, si.simple.Channels,
+- "rate", G_TYPE_INT, si.simple.SampleFreq,
+- "signed", G_TYPE_BOOLEAN, TRUE,
+- NULL))) {
++ caps = gst_caps_from_string (BASE_CAPS);
++ gst_caps_set_simple (caps,
++ "endianness", G_TYPE_INT, G_BYTE_ORDER,
++ "channels", G_TYPE_INT, si.simple.Channels,
++ "rate", G_TYPE_INT, si.simple.SampleFreq, NULL);
++ if (!gst_pad_set_explicit_caps (musepackdec->srcpad, caps)) {
+ GST_ELEMENT_ERROR (musepackdec, CORE, NEGOTIATION, (NULL), (NULL));
+ delete musepackdec->dec;
+ musepackdec->dec = NULL;
diff --git a/multimedia/gstreamer-plugins/pkg-plist b/multimedia/gstreamer-plugins/pkg-plist
index 9b9e9c58dd08..b258cd10acaf 100644
--- a/multimedia/gstreamer-plugins/pkg-plist
+++ b/multimedia/gstreamer-plugins/pkg-plist
@@ -49,6 +49,7 @@ lib/gstreamer-%%VERSION%%/libgstaudioscale.so
lib/gstreamer-%%VERSION%%/libgstauparse.so
lib/gstreamer-%%VERSION%%/libgstavi.so
%%LIBCACA%%lib/gstreamer-%%VERSION%%/libgstcacasink.so
+%%LIBCDAUDIO%%lib/gstreamer-%%VERSION%%/libgstcdaudio.so
%%CDPARANOIA%%lib/gstreamer-%%VERSION%%/libgstcdparanoia.so
lib/gstreamer-%%VERSION%%/libgstcdplayer.so
lib/gstreamer-%%VERSION%%/libgstcdxaparse.so
diff --git a/multimedia/gstreamer-plugins80/Makefile b/multimedia/gstreamer-plugins80/Makefile
index ed56a5cffd48..2ae3721285c4 100644
--- a/multimedia/gstreamer-plugins80/Makefile
+++ b/multimedia/gstreamer-plugins80/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gstreamer
PORTVERSION= 0.8.6
+PORTREVISION= 1
CATEGORIES= multimedia audio
MASTER_SITES= http://gstreamer.freedesktop.org/src/gst-plugins/ \
${MASTER_SITE_GNOME}
@@ -94,11 +95,15 @@ post-extract:
# MD5 (MPlayer-1.0pre4.tar.bz2) = 83ebac0f05b192516a41fca2350ca01a
@${CP} ${FILESDIR}/bsdi_dvd.h ${WRKSRC}/sys/vcd/
+.include <bsd.port.pre.mk>
+
post-patch:
+.if ${CXXFLAGS:M*=athlon-4} || ${CXXFLAGS:M*=athlon-mp} || ${CXXFLAGS:M*=athlon-xp}
# Fix gst-register when using -O -march=athlon-xp
@${REINPLACE_CMD} -e 's|@CXXF|-fgcse @CXXF|g' \
${WRKSRC}/gst/modplug/Makefile.in \
${WRKSRC}/gst/modplug/libmodplug/Makefile.in
+.endif
# as of this writing, FreeBSD does not support lrint* C99 math functions
@${REINPLACE_CMD} -E -e \
's|^#define.*LRINT.*$$||' \
@@ -141,8 +146,6 @@ post-patch:
@${REINPLACE_CMD} -e 's|/usr/include/musepack|${LOCALBASE}/include/musepack|g' \
${WRKSRC}/configure
-.include <bsd.port.pre.mk>
-
# hermes is required for gstreamer-player to work
# since it is currently the only colorspace plugin available
# XXX However, it currently does not work on sparc64.
@@ -263,6 +266,11 @@ WITH_LIBA52=yes
WITH_LIBAUDIOFILE=yes
.endif
+# libcdaudio
+.if exists(${LOCALBASE}/lib/libcdaudio.a)
+WITH_LIBCDAUDIO=yes
+.endif
+
# libdv
.if exists(${LOCALBASE}/lib/libdv.a)
WITH_LIBDV=yes
@@ -379,7 +387,7 @@ WITH_SPEEX=yes
.endif
# swfdec
-.if exists(${X11BASE}/lib/libswfdec.a)
+.if exists(${X11BASE}/lib/libswfdec-0.3.a)
WITH_SWFDEC=yes
.endif
@@ -635,6 +643,16 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libcaca.a:${PORTSDIR}/graphics/libcaca
PLIST_SUB+= LIBCACA=""
.endif
+# libcdaudio
+.ifndef(WITH_LIBCDAUDIO)
+CONFIGURE_ARGS+= --disable-cdaudio
+PLIST_SUB+= LIBCDAUDIO="@comment "
+.else
+LIB_DEPENDS+= cdaudio.1:${PORTSDIR}/audio/libcdaudio
+
+PLIST_SUB+= LIBCDAUDIO=""
+.endif
+
# libdv
.ifndef(WITH_LIBDV)
CONFIGURE_ARGS+= --disable-libdv
@@ -894,15 +912,15 @@ PLIST_SUB+= SPEEX="@comment "
#.endif
# swfdec
-#.ifndef(WITH_SWFDEC)
+.ifndef(WITH_SWFDEC)
CONFIGURE_ARGS+= --disable-swfdec
PLIST_SUB+= SWFDEC="@comment "
-#.else
-#LIB_DEPENDS+= swfdec.0:${PORTSDIR}/graphics/swfdec
-#
-#CONFIGURE_ARGS+= --enable-swfdec
-#PLIST_SUB+= SWFDEC=""
-#.endif
+.else
+LIB_DEPENDS+= swfdec-0.3.0:${PORTSDIR}/graphics/swfdec
+
+CONFIGURE_ARGS+= --enable-swfdec
+PLIST_SUB+= SWFDEC=""
+.endif
# vorbis
.ifndef(WITH_VORBIS)
@@ -947,6 +965,16 @@ LIB_DEPENDS+= xvidcore.4:${PORTSDIR}/multimedia/xvid
PLIST_SUB+= XVID=""
.endif
+pre-build:
+# This port cannot be CFLAGS safe, using p4 optimizations
+# break the mod plugin
+ @${REINPLACE_CMD} -E \
+ -e 's|(-march=pentiu)m4|\1m3|g' \
+ -e 's|(-mcpu=pentiu)m4|\1m3|g' \
+ -e 's|(-mtune=pentiu)m)4|\1m3|g' \
+ ${WRKSRC}/gst/modplug/Makefile \
+ ${WRKSRC}/gst/modplug/libmodplug/Makefile
+
post-build:
.ifdef(EXTRA_BUILD_DIR)
. for dir in ${EXTRA_BUILD_DIR}
@@ -1060,6 +1088,10 @@ pre-everything::
@${ECHO_MSG} '===>'
@${ECHO_MSG} '===> Define WITH_LIBCACA to enable libcaca Video plugin'
.endif
+.ifndef(WITH_LIBCDAUDIO)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> Define WITH_LIBCDAUDIO to enable libcdaudio Audio plugin'
+.endif
.ifndef(WITH_LIBDV)
@${ECHO_MSG} '===>'
@${ECHO_MSG} '===> Define WITH_LIBDV to enable libdv Video plugin'
diff --git a/multimedia/gstreamer-plugins80/files/patch-ext_musepack_gstmusepackdec.cpp b/multimedia/gstreamer-plugins80/files/patch-ext_musepack_gstmusepackdec.cpp
new file mode 100644
index 000000000000..1b1799ca9a98
--- /dev/null
+++ b/multimedia/gstreamer-plugins80/files/patch-ext_musepack_gstmusepackdec.cpp
@@ -0,0 +1,61 @@
+--- ext/musepack/gstmusepackdec.cpp.orig Sun Nov 7 19:30:06 2004
++++ ext/musepack/gstmusepackdec.cpp Thu Dec 16 16:31:42 2004
+@@ -30,14 +30,24 @@
+ GST_STATIC_CAPS ("audio/x-musepack")
+ );
+
++#ifdef MPC_FIXED_POINT
++#define BASE_CAPS \
++ "audio/x-raw-int, " \
++ "signed = (bool) TRUE, " \
++ "width = (int) 32, " \
++ "depth = (int) 32"
++#else
++#define BASE_CAPS \
++ "audio/x-raw-float, " \
++ "width = (int) 32, " \
++ "buffer-frames = (int) 0"
++#endif
++
+ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+- GST_STATIC_CAPS ("audio/x-raw-int, "
++ GST_STATIC_CAPS (BASE_CAPS ", "
+ "endianness = (int) BYTE_ORDER, "
+- "signed = (bool) TRUE, "
+- "width = (int) 32, "
+- "depth = (int) 32, "
+ "rate = (int) [ 8000, 96000 ], "
+ "channels = (int) [ 1, 2 ]")
+ );
+@@ -352,6 +362,7 @@
+ gst_musepack_stream_init (GstMusepackDec * musepackdec)
+ {
+ StreamInfo si = StreamInfo ();
++ GstCaps *caps;
+
+ if (musepackdec->dec)
+ delete musepackdec->dec;
+@@ -379,15 +390,12 @@
+ return FALSE;
+ }
+
+- if (!gst_pad_set_explicit_caps (musepackdec->srcpad,
+- gst_caps_new_simple ("audio/x-raw-int",
+- "width", G_TYPE_INT, 32,
+- "depth", G_TYPE_INT, 32,
+- "endianness", G_TYPE_INT, G_BYTE_ORDER,
+- "channels", G_TYPE_INT, si.simple.Channels,
+- "rate", G_TYPE_INT, si.simple.SampleFreq,
+- "signed", G_TYPE_BOOLEAN, TRUE,
+- NULL))) {
++ caps = gst_caps_from_string (BASE_CAPS);
++ gst_caps_set_simple (caps,
++ "endianness", G_TYPE_INT, G_BYTE_ORDER,
++ "channels", G_TYPE_INT, si.simple.Channels,
++ "rate", G_TYPE_INT, si.simple.SampleFreq, NULL);
++ if (!gst_pad_set_explicit_caps (musepackdec->srcpad, caps)) {
+ GST_ELEMENT_ERROR (musepackdec, CORE, NEGOTIATION, (NULL), (NULL));
+ delete musepackdec->dec;
+ musepackdec->dec = NULL;
diff --git a/multimedia/gstreamer-plugins80/pkg-plist b/multimedia/gstreamer-plugins80/pkg-plist
index 9b9e9c58dd08..b258cd10acaf 100644
--- a/multimedia/gstreamer-plugins80/pkg-plist
+++ b/multimedia/gstreamer-plugins80/pkg-plist
@@ -49,6 +49,7 @@ lib/gstreamer-%%VERSION%%/libgstaudioscale.so
lib/gstreamer-%%VERSION%%/libgstauparse.so
lib/gstreamer-%%VERSION%%/libgstavi.so
%%LIBCACA%%lib/gstreamer-%%VERSION%%/libgstcacasink.so
+%%LIBCDAUDIO%%lib/gstreamer-%%VERSION%%/libgstcdaudio.so
%%CDPARANOIA%%lib/gstreamer-%%VERSION%%/libgstcdparanoia.so
lib/gstreamer-%%VERSION%%/libgstcdplayer.so
lib/gstreamer-%%VERSION%%/libgstcdxaparse.so