pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45900: pkgsrc ffmpeg duplicated and missing options in

>Number:         45900
>Category:       pkg
>Synopsis:       pkgsrc ffmpeg duplicated and missing options in
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 31 21:15:01 +0000 2012
>Originator:     Gianni D'Aprile
>Release:        NetBSD 5.99.60 amd64

System: NetBSD 5.99.60 (GENERIC) #0: Mon Jan 16 01:59:19 UTC 2012


AFAIK ffmpeg uses libavcodec to decode supported media formats.  External 
libraries (like libvpx, libvorbis, liblame, etc) are only used if a user 
requires a proven, specialized encoder.  Currently this package pulls in lame, 
libvorbis and x264 in the pkgsrc Makefile, even though libvorbis and x264 are 
both also defined in the file.  I am proposing a new option called 
lame needs to be introduced and that references to libvorbis and x264 need to 
be removed from the pkgsrc Makefile.  This allows building ffmpeg without any 
external libraries by setting:

PKG_OPTIONS.ffmpeg=     -lame -libvpx -theora -vorbis -x264 -xvid

While here, sort options and explicitly pull in lame, vorbis and x264 so 
default behavior is the same.
Tested on amd64.


Don't really do this!  This is just to prove a point.

pkg_delete -f lame
pkg_delete -f libvorbis
pkg_delete -f x264-devel
pkg_delete -f ffmpeg

cd /usr/pkgsrc/multimedia/ffmpeg
make clean
make install


--- ffmpeg.patch begins here ---
Index: Makefile
RCS file: /cvsroot/pkgsrc/multimedia/ffmpeg/Makefile,v
retrieving revision 1.83
diff -u -r1.83 Makefile
--- Makefile    31 Jan 2012 12:00:25 -0000      1.83
+++ Makefile    31 Jan 2012 19:07:38 -0000
@@ -13,9 +13,6 @@
 CONFIGURE_ARGS+=       --enable-avfilter
 #CONFIGURE_ARGS+=      --enable-avfilter-lavf
 CONFIGURE_ARGS+=       --enable-postproc
-CONFIGURE_ARGS+=       --enable-libvorbis
-CONFIGURE_ARGS+=       --enable-libmp3lame
-CONFIGURE_ARGS+=       --enable-libx264
 INSTALLATION_DIRS=     lib share/examples/ffmpeg share/doc/ffmpeg
@@ -40,15 +37,10 @@
 .include ""
-# "lame-3.98" isn't compatible with "ffmpeg" which breaks audio encoding.
-BUILDLINK_ABI_DEPENDS.lame+=   lame>=3.98.2nb1
 .include "../../mk/"
 .if !empty(PKGSRC_COMPILER:Mclang)
 CFLAGS+=       -no-integrated-as
-.include "../../audio/lame/"
-.include "../../audio/libvorbis/"
 .include "../../multimedia/ffmpeg/Makefile.common"
RCS file: /cvsroot/pkgsrc/multimedia/ffmpeg/,v
retrieving revision 1.23
diff -u -r1.23
---  9 Jan 2012 17:08:52 -0000       1.23
+++  31 Jan 2012 19:07:38 -0000
@@ -3,8 +3,8 @@
 # Global and legacy options
-PKG_SUPPORTED_OPTIONS= theora vorbis xvid faac x264 opencore-amr libvpx
-PKG_SUGGESTED_OPTIONS= theora vorbis xvid x264 libvpx
+PKG_SUPPORTED_OPTIONS= faac lame libvpx opencore-amr theora vorbis x264 xvid
+PKG_SUGGESTED_OPTIONS= lame libvpx theora vorbis x264 xvid
 #PKG_OPTIONS_GROUP.aac-decoder=        faac
@@ -67,6 +67,16 @@
+### LAME MP3 encoder
+.if !empty(PKG_OPTIONS:Mlame)
+# "lame-3.98" isn't compatible with "ffmpeg" which breaks audio encoding.
+BUILDLINK_ABI_DEPENDS.lame+=  lame>=3.98.2nb1
+CONFIGURE_ARGS+=       --enable-libmp3lame
+.include "../../audio/lame/"
 ### XviD support
 .if !empty(PKG_OPTIONS:Mxvid)
--- ffmpeg.patch ends here ---

Home | Main Index | Thread Index | Old Index