Fix the gst-register problems when compiling with CPUTYPE set to athlon-*
with -O and p4 for -O and -O2. [1] Add new plugin libcdaudio Add patch to fix playback for the musepack plugin. [2] Bump PORTREVISION Submitted by: lioux (maintainer) [1] Approved by: maintainer (implicit) Obtained from: Gstreamer CVS [2]
This commit is contained in:
parent
932e843527
commit
010b68948d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=124332
6 changed files with 208 additions and 20 deletions
|
@ -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'
|
||||
|
|
|
@ -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;
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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;
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue