ports/181519: multimedia/gstreamer-ffmpeg: an option to build against system ffmpeg
Jan Beich
jbeich at tormail.org
Sun Aug 25 06:50:00 UTC 2013
>Number: 181519
>Category: ports
>Synopsis: multimedia/gstreamer-ffmpeg: an option to build against system ffmpeg
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Aug 25 06:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Jan Beich
>Release: FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
for some reason internal libav doesn't work in my environment even
before r325059
>Description:
Allow users to build the port against multimedia/ffmpeg (0.7.x API).
This makes it possible to choose a custom set of codecs, easier
debugging with well-tested/patched ffmpeg version and faster build.
>How-To-Repeat:
>Fix:
--- gst-ffmpeg_system.diff begins here ---
Index: multimedia/gstreamer-ffmpeg/Makefile
===================================================================
--- multimedia/gstreamer-ffmpeg/Makefile (revision 325092)
+++ multimedia/gstreamer-ffmpeg/Makefile (working copy)
@@ -6,11 +6,9 @@ PORTNAME= gstreamer
PORTVERSION= 0.10.13
PORTREVISION= 1
CATEGORIES= multimedia
-MASTER_SITES= http://gstreamer.freedesktop.org/src/gst-ffmpeg/:ffmpeg \
- http://libav.org/releases/:libav
+MASTER_SITES= http://gstreamer.freedesktop.org/src/gst-ffmpeg/:gst
PKGNAMESUFFIX= -ffmpeg
-DISTFILES= gst-ffmpeg-${PORTVERSION}.tar.bz2:ffmpeg \
- libav-${LIBAV_VERSION}.tar.xz:libav
+DISTFILES= gst-ffmpeg-${PORTVERSION}.tar.bz2:gst
MAINTAINER= multimedia at FreeBSD.org
COMMENT= GStreamer plug-in for manipulating MPEG video streams
@@ -17,27 +15,37 @@ COMMENT= GStreamer plug-in for manipulating MPEG v
LICENSE= GPLv2
-BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm
LIB_DEPENDS= liborc-0.4.so:${PORTSDIR}/devel/orc
-LIBAV_VERSION= 0.7.7
-WRKSRC= ${WRKDIR}/gst-ffmpeg-${PORTVERSION}
USES= gmake pkgconfig
USE_LDCONFIG= yes
USE_GSTREAMER= yes
GNU_CONFIGURE= yes
+
+PLIST_SUB= VERSION="${PORTVERSION:R}"
+
+LIBAV_VERSION= 0.7.7
+WRKSRC= ${WRKDIR}/gst-ffmpeg-${PORTVERSION}
+
+OPTIONS_DEFINE= FFMPEG
+FFMPEG_DESC?= Use system ffmpeg instead of internal libav
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MFFMPEG}
+LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
+CONFIGURE_ARGS+=--with-system-ffmpeg
+.else
+MASTER_SITES+= http://libav.org/releases/:libav
+DISTFILES+= libav-${LIBAV_VERSION}.tar.xz:libav
+BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
+CONFIGURE_ARGS+=--with-ffmpeg-extra-configure="${FFMPEG_CONFIG}"
FFMPEG_CONFIG= --cc=${CC} \
--enable-runtime-cpudetect \
--enable-pic
LDFLAGS+= -Wl,-Bsymbolic
CFLAGS+= -fno-force-addr
-CONFIGURE_ENV= PKG_CONFIG=${PKG_CONFIG}
-PLIST_SUB= VERSION="${GST_VERSION}"
-
-PKG_CONFIG?="${LOCALBASE}/bin/pkg-config"
-GST_VERSION=${PORTVERSION:C/..$//}
-
# sse hardware vector support
.if defined(MACHINE_CPU) && (${MACHINE_CPU:Msse} == "sse" || ${MACHINE_CPU:Mamd64} == "amd64")
WITH_BUILTIN_VECTOR= yes
@@ -56,21 +64,23 @@ WITHOUT_BUILTIN_VECTOR= yes
CFLAGS+= -msse
.endif
-CONFIGURE_ARGS+= --with-ffmpeg-extra-configure="${FFMPEG_CONFIG}"
-
-.include <bsd.port.pre.mk>
-
.if ${OSVERSION} < 900033
-
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
-MAKE_ENV= COMPILER_PATH=${LOCALBASE}/bin
-
+CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
+MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
.endif
-post-patch:
+.endif # FFMPEG
+
+post-extract:
@${MV} ${WRKSRC}/gst-libs/ext/libav ${WRKSRC}/gst-libs/ext/libav.old
+.if ! ${PORT_OPTIONS:MFFMPEG}
@${MV} ${WRKDIR}/libav-${LIBAV_VERSION} ${WRKSRC}/gst-libs/ext/libav
@${CP} ${WRKSRC}/gst-libs/ext/libav.old/config.* \
${WRKSRC}/gst-libs/ext/libav/
+.endif
-.include <bsd.port.post.mk>
+post-patch:
+ @${REINPLACE_CMD} '/sleep 15/d' ${WRKSRC}/configure
+
+.include <bsd.port.mk>
--- gst-ffmpeg_system.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list