ports/111335: multimedia/ffmpeg-devel: enable swscaler and threads support.

Thierry Thomas thierry at FreeBSD.org
Fri Apr 6 22:30:05 UTC 2007


>Number:         111335
>Category:       ports
>Synopsis:       multimedia/ffmpeg-devel: enable swscaler and threads support.
>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 Apr 06 22:30:04 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Thierry Thomas
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Jan 28 10:29:56 CET 2007 thierry at graf.pompo.net:/usr/obj/usr/src/sys/GRAF060511 i386


	
>Description:
	The port sysutils/xvidcap uses its embedded ffmpeg, and I'd like
	to switch to the external ffmpeg-devel. But it won't be possible
	unless libswscale is enabled by default.

	The following patch:

	- enables libswscale by default;

	- enables threads by default;

	- sets CONFIGURE_LOG;

	- removes '-O3';

	- changes WWW to the main site.

>How-To-Repeat:
	N/A.

>Fix:
	Please apply the following patch:

--- ffmpeg-devel.diff begins here ---
diff -urN multimedia/ffmpeg-devel.orig/Makefile multimedia/ffmpeg-devel/Makefile
--- multimedia/ffmpeg-devel.orig/Makefile	Fri Apr  6 22:07:53 2007
+++ multimedia/ffmpeg-devel/Makefile	Fri Apr  6 23:12:25 2007
@@ -7,7 +7,7 @@
 
 PORTNAME=	ffmpeg
 DISTVERSION=	2007-03-31
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	multimedia audio ipv6 net
 MASTER_SITES=	${MASTER_SITE_LOCAL}
 MASTER_SITE_SUBDIR=	ahze
@@ -31,6 +31,7 @@
 		--extra-libs="${PTHREAD_LIBS}" \
 		--disable-bktr \
 		--enable-gpl
+CONFIGURE_LOG=	config.err
 MAKE_ENV=	INSTALL="${INSTALL}"
 SHLIB_VER=	1
 PLIST_SUB=	SHLIB_VER=${SHLIB_VER}
@@ -181,6 +182,19 @@
 CONFIGURE_ARGS+=	--enable-xvid
 .endif
 
+# libswscale
+.if !defined(WITHOUT_SWSCALE)
+CONFIGURE_ARGS+=	--enable-swscaler
+PLIST_SUB+=		SWSCALE=""
+.else
+PLIST_SUB+=		SWSCALE="@comment "
+.endif
+
+# Threads
+.if !defined(WITHOUT_THREADS)
+CONFIGURE_ARGS+=	--enable-pthreads
+.endif
+
 pre-everything::
 .ifndef(WITHOUT_A52)
 	@${ECHO_MSG} 'You can disable liba52 support by defining WITHOUT_LIBA52'
@@ -231,8 +245,16 @@
 	@${ECHO_MSG} 'Define WITH_XVID to enable XVID codec'
 	@${ECHO_MSG}
 .endif
+.ifndef(WITHOUT_SWSCALE)
+	@${ECHO_MSG} 'You can disable libswscale support by defining WITHOUT_SWSCALE'
+	@${ECHO_MSG}
+.endif
+.ifndef(WITHOUT_THREADS)
+	@${ECHO_MSG} 'You can disable threading by defining WITHOUT_THREADS'
+	@${ECHO_MSG}
+.endif
 
-post-patch:
+pre-configure:
 # Faad compat
 	@${REINPLACE_CMD} -e 's|faacD|NeAACD|' ${WRKSRC}/libavcodec/faad.c
 # {C,LD}FLAGS safeness
diff -urN multimedia/ffmpeg-devel.orig/files/patch-configure multimedia/ffmpeg-devel/files/patch-configure
--- multimedia/ffmpeg-devel.orig/files/patch-configure	Fri Apr  6 22:07:54 2007
+++ multimedia/ffmpeg-devel/files/patch-configure	Fri Apr  6 23:13:56 2007
@@ -1,5 +1,28 @@
---- configure.orig	Sat Mar 31 00:25:05 2007
-+++ configure	Sun Apr  1 18:59:07 2007
+--- configure.orig	Sat Mar 31 06:25:05 2007
++++ configure	Fri Apr  6 23:13:32 2007
+@@ -1749,14 +1749,14 @@
+ # not all compilers support -Os
+ test "$optimize" = "small" && check_cflags -Os
+ 
+-if enabled optimize; then
+-    if test -n "`$cc -v 2>&1 | grep xlc`"; then
+-        add_cflags  "-O5"
+-        add_ldflags "-O5"
+-    else
+-        add_cflags "-O3"
+-    fi
+-fi
++#if enabled optimize; then
++#    if test -n "`$cc -v 2>&1 | grep xlc`"; then
++#        add_cflags  "-O5"
++#        add_ldflags "-O5"
++#    else
++#        add_cflags "-O3"
++#    fi
++#fi
+ 
+ # PIC flags for shared library objects where they are needed
+ if enabled shared; then
 @@ -1966,15 +1966,15 @@
  if enabled shared; then
    echo "BUILD_SHARED=yes" >> config.mak
diff -urN multimedia/ffmpeg-devel.orig/pkg-descr multimedia/ffmpeg-devel/pkg-descr
--- multimedia/ffmpeg-devel.orig/pkg-descr	Tue Sep 25 21:27:10 2001
+++ multimedia/ffmpeg-devel/pkg-descr	Fri Apr  6 23:39:59 2007
@@ -21,4 +21,4 @@
 * ffserver: high performance live broadcast streaming server based
   on the ffmpeg core encoders.
 
-WWW: http://ffmpeg.sourceforge.net/
+WWW: http://ffmpeg.org/
diff -urN multimedia/ffmpeg-devel.orig/pkg-plist multimedia/ffmpeg-devel/pkg-plist
--- multimedia/ffmpeg-devel.orig/pkg-plist	Fri Apr  6 22:07:54 2007
+++ multimedia/ffmpeg-devel/pkg-plist	Sat Apr  7 00:08:44 2007
@@ -40,6 +40,10 @@
 lib/libpostproc.so
 lib/libpostproc.so.%%SHLIB_VER%%
 lib/libpostproc.so.51.1.0
+%%SWSCALE%%lib/libswscale.a
+%%SWSCALE%%lib/libswscale.so
+%%SWSCALE%%lib/libswscale.so.%%SHLIB_VER%%
+%%SWSCALE%%lib/libswscale.so.0.5.0
 lib/vhook/fish.so
 lib/vhook/null.so
 lib/vhook/ppm.so
--- ffmpeg-devel.diff ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list