Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 324453 - media-video/ffmpeg: fixed x264, X, sdl, added bzip2, static-libs, tools USE flags; small fixes; media-video/mplayer cosmetics
Summary: media-video/ffmpeg: fixed x264, X, sdl, added bzip2, static-libs, tools USE f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-17 13:26 UTC by Nikoli
Modified: 2010-07-22 20:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
some fixes (0001-ffmpeg-fixed-x264-X-sdl-added-bzip2-static-libs-tool.patch,27.99 KB, patch)
2010-06-17 13:27 UTC, Nikoli
Details | Diff
cosmetics (0001-mplayer-cosmetics.patch,3.83 KB, patch)
2010-06-17 13:27 UTC, Nikoli
Details | Diff
splitted by request (ffmpeg.ebuild_patches.tar.lzma,5.93 KB, application/octet-stream)
2010-06-17 17:43 UTC, Nikoli
Details
1 (0001-ffmpeg-cosmetics-i-EAPI.patch,2.62 KB, patch)
2010-06-17 19:12 UTC, Nikoli
Details | Diff
2 (0002-ffmpeg-fix-sed.patch,982 bytes, patch)
2010-06-17 19:12 UTC, Nikoli
Details | Diff
3 (0003-ffmpeg-fix-x264-USE-flag.patch,862 bytes, patch)
2010-06-17 19:12 UTC, Nikoli
Details | Diff
4 (0004-ffmpeg-diff-friendly-configure.patch,1.50 KB, text/plain)
2010-06-17 19:13 UTC, Nikoli
Details
5 (0005-ffmpeg-better-configure.patch,2.84 KB, patch)
2010-06-17 19:13 UTC, Nikoli
Details | Diff
6 (0006-ffmpeg-sort-IUSE-make-zlib.patch,1.28 KB, patch)
2010-06-17 19:13 UTC, Nikoli
Details | Diff
7 (0007-ffmpeg-sorted-and-diff-friendly-DEPEND.patch,1.04 KB, patch)
2010-06-17 19:13 UTC, Nikoli
Details | Diff
8 (0008-ffmpeg-reorganized-RDEPEND-fixed-X-sdl-vaapi-vdpau-U.patch,2.27 KB, patch)
2010-06-17 19:14 UTC, Nikoli
Details | Diff
9 (0009-ffmpeg-static-libs-USE-build-only-shared-libs-by-def.patch,1.32 KB, patch)
2010-06-17 19:14 UTC, Nikoli
Details | Diff
10 (0010-ffmpeg-bzip2-USE-make-it-optional-like-zlib-is.patch,1.55 KB, text/plain)
2010-06-17 19:14 UTC, Nikoli
Details
11 (0011-ffmpeg-add-tools-USE-flag-ability-to-build-libs-only.patch,2.43 KB, text/plain)
2010-06-17 19:14 UTC, Nikoli
Details
12 (0012-ffmpeg-one-line-is-better-in-this-case.patch,945 bytes, patch)
2010-06-17 19:15 UTC, Nikoli
Details | Diff
13 (0013-ffmpeg-use-same-detection-of-live-ebuild-everywhere.patch,1.12 KB, text/plain)
2010-06-17 19:15 UTC, Nikoli
Details
14 (0014-ffmpeg-myconf-myconf-myconf.patch,6.14 KB, patch)
2010-06-17 19:15 UTC, Nikoli
Details | Diff
4-5 (0001-ffmpeg-configure-cosmetics.patch,3.71 KB, patch)
2010-06-18 13:59 UTC, Nikoli
Details | Diff
8 (0002-ffmpeg-RDEPEND-metadata.xml-cosmetics-same-detection.patch,2.83 KB, patch)
2010-06-18 14:00 UTC, Nikoli
Details | Diff
9-10 (0003-ffmpeg-add-bzip2-and-static-libs-USE-flags.patch,1.78 KB, patch)
2010-06-18 14:01 UTC, Nikoli
Details | Diff
11 (0004-ffmpeg-add-tools-USE-flag-ability-to-build-libs-only.patch,2.23 KB, patch)
2010-06-18 14:01 UTC, Nikoli
Details | Diff
tools (0001-ffmpeg-USE-tools-metadata.xml.patch,1.21 KB, patch)
2010-06-18 14:15 UTC, Nikoli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2010-06-17 13:26:26 UTC
also fixed metadata.xml

Reproducible: Always
Comment 1 Nikoli 2010-06-17 13:27:01 UTC
Created attachment 235707 [details, diff]
some fixes
Comment 2 Nikoli 2010-06-17 13:27:29 UTC
Created attachment 235709 [details, diff]
cosmetics
Comment 3 Nikoli 2010-06-17 17:43:28 UTC
Created attachment 235755 [details]
splitted by request
Comment 4 Nikoli 2010-06-17 19:12:32 UTC
Created attachment 235761 [details, diff]
1
Comment 5 Nikoli 2010-06-17 19:12:44 UTC
Created attachment 235763 [details, diff]
2
Comment 6 Nikoli 2010-06-17 19:12:56 UTC
Created attachment 235765 [details, diff]
3
Comment 7 Nikoli 2010-06-17 19:13:06 UTC
Created attachment 235767 [details]
4
Comment 8 Nikoli 2010-06-17 19:13:19 UTC
Created attachment 235769 [details, diff]
5
Comment 9 Nikoli 2010-06-17 19:13:34 UTC
Created attachment 235771 [details, diff]
6
Comment 10 Nikoli 2010-06-17 19:13:50 UTC
Created attachment 235773 [details, diff]
7
Comment 11 Nikoli 2010-06-17 19:14:05 UTC
Created attachment 235775 [details, diff]
8
Comment 12 Nikoli 2010-06-17 19:14:19 UTC
Created attachment 235777 [details, diff]
9
Comment 13 Nikoli 2010-06-17 19:14:36 UTC
Created attachment 235779 [details]
10
Comment 14 Nikoli 2010-06-17 19:14:47 UTC
Created attachment 235781 [details]
11
Comment 15 Nikoli 2010-06-17 19:15:07 UTC
Created attachment 235783 [details, diff]
12
Comment 16 Nikoli 2010-06-17 19:15:18 UTC
Created attachment 235785 [details]
13
Comment 17 Nikoli 2010-06-17 19:15:30 UTC
Created attachment 235787 [details, diff]
14
Comment 18 Alexis Ballier gentoo-dev 2010-06-18 06:39:15 UTC
Comment on attachment 235761 [details, diff]
1

applied that part, thanks
Comment 19 Alexis Ballier gentoo-dev 2010-06-18 06:41:20 UTC
Comment on attachment 235763 [details, diff]
2

and that one too
Comment 20 Alexis Ballier gentoo-dev 2010-06-18 06:42:10 UTC
(In reply to comment #6)
> Created an attachment (id=235765) [details]
> 3
> 

I'm definitely not fan of this one, this is just a hack, you should go and rant upstream to see this fixed; it doesn't belong to -9999 imho
Comment 21 Alexis Ballier gentoo-dev 2010-06-18 06:44:49 UTC
(In reply to comment #7)
> Created an attachment (id=235767) [details]
> 4
> 

-	./configure \
-		--prefix=/usr \
-		--libdir=/usr/$(get_libdir) \
-		--shlibdir=/usr/$(get_libdir) \
-		--mandir=/usr/share/man \
-		--enable-static --enable-shared \
-		--cc="$(tc-getCC)" \
-		${myconf} || die "configure failed"
+	myconf="${myconf}
+		--prefix=/usr
+		--libdir=/usr/$(get_libdir)
+		--shlibdir=/usr/$(get_libdir)
+		--mandir=/usr/share/man
+		--enable-shared
+		--cc=$(tc-getCC)
+		"
+	./configure ${myconf} || die "configure failed"

seems good but please leave --prefix, libdir etc as first arguments to ./configure; that patch makes them last.
Also, how do you handle spaces in CC ? like if tc-getCC returns "distcc gcc" what happens ?
Comment 22 Alexis Ballier gentoo-dev 2010-06-18 06:47:29 UTC
Comment on attachment 235771 [details, diff]
6

applied that one too, thanks
Comment 23 Alexis Ballier gentoo-dev 2010-06-18 06:50:22 UTC
Comment on attachment 235773 [details, diff]
7

applied
Comment 24 Alexis Ballier gentoo-dev 2010-06-18 06:53:30 UTC
(In reply to comment #11)
> Created an attachment (id=235775) [details]
> 8
> 

-		vorbis? ( media-libs/libvorbis media-libs/libogg )
-		theora? ( >=media-libs/libtheora-1.1.1[encode] media-libs/libogg )
+		theora? (
+			>=media-libs/libtheora-1.1.1[encode]
+			media-libs/libogg
+		)

please leave that on one line; I think it's by far more readable when there is only 2 or 3 deps.

+	X? (
+		x11-libs/libX11
+		x11-libs/libXext
+		sdl? ( >=media-libs/libsdl-1.2.10[audio,alsa?,oss?,video,X] )
+		vaapi? ( x11-libs/libva[video_cards_nvidia?] )
+		video_cards_nvidia? (
+			vdpau? ( x11-libs/libvdpau )
+		)
+	)

This is *bad* USE="-X vaapi" will automagically link to libva if present and there will be no dep in the ebuild.
Comment 25 Alexis Ballier gentoo-dev 2010-06-18 06:55:35 UTC
(In reply to comment #12)
> Created an attachment (id=235777) [details]
> 9
> 

sounds good but doesn't apply with the patches I've not merged :(
Comment 26 Alexis Ballier gentoo-dev 2010-06-18 06:57:06 UTC
Comment on attachment 235783 [details, diff]
12

applied, thanks
Comment 27 Alexis Ballier gentoo-dev 2010-06-18 06:58:14 UTC
(In reply to comment #16)
> Created an attachment (id=235785) [details]
> 13
> 

-if [ "${PV#9999}" != "${PV}" ] ; then
-	SCM=subversion
+if [[ ${PV} == *9999* ]]; then
+	SCM="subversion"
 	ESVN_REPO_URI="svn://svn.ffmpeg.org/ffmpeg/trunk"

please do the opposite: replace [[ ]] by [ ${PV#...} != ... ]; this one is more standard.
Comment 28 Alexis Ballier gentoo-dev 2010-06-18 06:59:24 UTC
Comment on attachment 235787 [details, diff]
14

as said on IRC, I really don't like this syntax and it adds nothing here; no go.
Comment 29 Nikoli 2010-06-18 13:59:39 UTC
Created attachment 235849 [details, diff]
4-5

Thank you for finding mistakes :)
Comment 30 Nikoli 2010-06-18 14:00:41 UTC
Created attachment 235851 [details, diff]
8
Comment 31 Nikoli 2010-06-18 14:01:14 UTC
Created attachment 235853 [details, diff]
9-10
Comment 32 Nikoli 2010-06-18 14:01:42 UTC
Created attachment 235855 [details, diff]
11
Comment 33 Nikoli 2010-06-18 14:15:06 UTC
Created attachment 235859 [details, diff]
tools

forgot to do in last patch
Comment 34 Alexis Ballier gentoo-dev 2010-06-18 14:19:21 UTC
Comment on attachment 235849 [details, diff]
4-5

applied, thanks
Comment 35 Alexis Ballier gentoo-dev 2010-06-18 14:21:44 UTC
(In reply to comment #30)
> Created an attachment (id=235851) [details]
> 8
> 

+	sdl? ( >=media-libs/libsdl-1.2.10[audio,alsa?,oss?,video,X] )

why adding those new deps?

+	vaapi? ( x11-libs/libva[video_cards_nvidia?] )

you certainly dont need to propagate that useflag here
Comment 36 Alexis Ballier gentoo-dev 2010-06-18 14:26:40 UTC
(In reply to comment #32)
> Created an attachment (id=235855) [details]
> 11
> 

I'm not fond of disabling these, it has very low benefit and anyway, this can be merged only if all the reverse deps are checked and get appropriate usedeps when needed.
As I told you on IRC, if you really wish to get a small ffmpeg, efforts will be much better spent by adding use expands for every single codec/muxer/etc.
Comment 37 Nikoli 2010-06-18 14:35:47 UTC
>+       sdl? ( >=media-libs/libsdl-1.2.10[audio,alsa?,oss?,video,X] )

>why adding those new deps?

I tested how ffplay works when libsdl is compiled without these flags:
video works only when libsdl is [video,X] (may be last flag should be ',X?')
sound works only when libsdl is [audio,alsa] (I do not use oss).
Please also do 'cd /usr/portage && grep libsdl */*/*.ebuild'

>you certainly dont need to propagate that useflag here
I was not sure about that part, if you dislike it - remove.
Comment 38 Nikoli 2010-06-18 14:41:41 UTC
' tools ' in IUSE can cause problems, but ' +tools ' should not, my opinion from patch №14:
"Most packages (except scripts) need only libs, so installing only shared libraries is useful feature.
'tools' is not global USE and should not be in make.conf, by default ffmpeg will continue installing all binaries, this patch should not break anything."
Comment 39 Alexis Ballier gentoo-dev 2010-06-18 14:46:20 UTC
(In reply to comment #37)
> >+       sdl? ( >=media-libs/libsdl-1.2.10[audio,alsa?,oss?,video,X] )
> 
> >why adding those new deps?
> 
> I tested how ffplay works when libsdl is compiled without these flags:
> video works only when libsdl is [video,X] (may be last flag should be ',X?')

sdl has other video outputs than X

> sound works only when libsdl is [audio,alsa] (I do not use oss).

I would simply make this libsdl[audio,video] then
that's the point of sdl to abstract audio/video output :)
Comment 40 Alexis Ballier gentoo-dev 2010-06-18 14:47:49 UTC
(In reply to comment #38)
> ' tools ' in IUSE can cause problems, but ' +tools ' should not, my opinion
> from patch №14:
> "Most packages (except scripts) need only libs, so installing only shared
> libraries is useful feature.
> 'tools' is not global USE and should not be in make.conf, by default ffmpeg
> will continue installing all binaries, this patch should not break anything."

thats not how it works, use defaults just make the problem less visible; it can be disabled, ebuilds requiring it need to depend on it, period.
Comment 41 Nikoli 2010-06-18 15:13:06 UTC
>I would simply make this libsdl[audio,video] then
>that's the point of sdl to abstract audio/video output :)

When X, alsa or oss are in make.conf only, it will work, but if you have in package.use something like 'media-video/ffmpeg -alsa oss' and media-libs/libsdl is built with alsa only, you will have no sound. However it is not normal case. Apply patch as you think will be better :)

About 'tools': if it will be added as enabled by default ans -tools will be hard masked, nothing will break. The main problem is further fixing of ebuilds depending on ffmpeg.
Comment 42 Alexis Ballier gentoo-dev 2010-06-18 15:26:02 UTC
(In reply to comment #41)
> About 'tools': if it will be added as enabled by default ans -tools will be
> hard masked, nothing will break. The main problem is further fixing of ebuilds
> depending on ffmpeg.

whats the point of having an useflag if we always force-enable it then ?
INSTALL_MASK achieves the same goal.
Comment 43 Alexis Ballier gentoo-dev 2010-07-22 20:31:35 UTC
Comment on attachment 235851 [details, diff]
8

modified version applied, thanks
Comment 44 Alexis Ballier gentoo-dev 2010-07-22 20:43:58 UTC
Comment on attachment 235853 [details, diff]
9-10

applied, thanks
Comment 45 Alexis Ballier gentoo-dev 2010-07-22 20:44:52 UTC
as I see no move on your side for the tools useflag I understand this as you're not willing to do the boring work for making it real, me neither, patch discarded, that bug can be closed.