1 |
David Harel schreef: |
2 |
> Jonathan, Thanks for your explanation. |
3 |
> |
4 |
> I still don't get it. The command emerge should have done the |
5 |
> dependent packages before doing the desirable package anyway. |
6 |
|
7 |
It will, but not if you haven't specified support for it via USE flags. |
8 |
Meaning: |
9 |
|
10 |
1) The Win32 codec support in mPlayer is *optional* (many people don't |
11 |
need or use it, and it is your choice as to whether to use it, because |
12 |
it is not essential to the main functionality of the program; |
13 |
|
14 |
2) Optional support means by definition that it will not be available if |
15 |
you don't specify that you want the option enabled, by enabling the USE |
16 |
flag representing that option; |
17 |
|
18 |
2) The USE flags available and active for any given package can be |
19 |
viewed prior to emerging with the --verbose flag, which Jonathan gave |
20 |
you an example of for mPlayer: |
21 |
|
22 |
>> jwright on jonathan [ ~ ] --> emerge -pv mplayer |
23 |
>> |
24 |
>> These are the packages that I would merge, in order: |
25 |
>> |
26 |
>> Calculating dependencies ...done! [ebuild U ] |
27 |
>> media-video/mplayer-1.0_pre7-r1 [1.0_pre7] -3dfx +3dnow +3dnowext |
28 |
>> +X -aac -aalib +alsa (-altivec) -arts -bidi -bl +cdparanoia |
29 |
>> +cpudetection -custom-cflags -debug +dga -directfb +divx4linux -doc |
30 |
>> +dts +dv -dvb +dvd +dvdread -edl +encode -esd +fbcon -ggi +gif |
31 |
>> +gtk -i8x0 -ipv6 -jack -joystick +jpeg -libcaca -lirc -live -lzo |
32 |
>> -mad -matroska -matrox +mmx +mmxext -mythtv -nas -nls +nvidia |
33 |
>> +opengl -oss +png +real +rtc +samba -sdl +sse -sse2 -svga -tga |
34 |
>> -theora +truetype -v4l -v4l2 -vorbis +win32codecs -xanim -xinerama |
35 |
>> -xmms +xv +xvid -xvmc 7,613 kB |
36 |
>> |
37 |
|
38 |
Jonathan would emerge mplayer with support for the functiions marked |
39 |
with a '+" (such as 3dnow, X, dvd, divx, xvid, win32codecs), and without |
40 |
support for those functions marked with a "-" (such as 3dfx-- guess he |
41 |
doesn't have a Voodoo card :) -- directfb, bidi --guess he's not |
42 |
Japanese or Hebrew either, not needing bi-directional text support-- |
43 |
xinerama -- no dual-head display? ;) , etc). This is how he customizes |
44 |
mPlayer for his particular system. I also have mplayer installed, and my |
45 |
USE flags are almost the same, except I have -nvidia where he has |
46 |
+nvidia, because I have an ATI card and nvidia support does me no good |
47 |
whatsoever, whereas I guess Jonathan has an nvidia card. |
48 |
|
49 |
If we take a particular USE flag-- let's say xvid-- and consider the |
50 |
effects of having it turned on and off. Now, if you don't use mPlayer to |
51 |
play xvid-encoded *.avi files, you don't need to set this flag, because |
52 |
you'll never miss having xvid support in mplayer (because you never try |
53 |
to play the kinds of files that need such support). However, if you do |
54 |
need such support, and you set the flag, mplayer will emerge xvid before |
55 |
itself, because by setting the USE flag, you have made xvid a dependency |
56 |
of mplayer (since obviously, xvid must be installed for mplayer to |
57 |
compile xvid support into itself). |
58 |
|
59 |
However, if you install xvid alone, and emerge mplayer -xvid, you still |
60 |
won't be able to play divx/xvid *.avi files--despite xvid being |
61 |
installed-- *because you have not told mplayer via the USE flag to look |
62 |
for xvid and use it if available*. |
63 |
|
64 |
This is what USE flags are all about-- the ability to customize your |
65 |
system to your specific needs, without reference to some general user |
66 |
standard or guess by the development team (as is done under a binary |
67 |
distribution), and without reference to what other users using the same |
68 |
program might need. |
69 |
|
70 |
I don't need nvidia support for my programs, but Jonathan does, so he |
71 |
compiles his apps with it, I compile mine without it. But we have, I'm |
72 |
sure, a lot of the same apps on our system. If we were both using a |
73 |
binary distribution that came with precompiled packages, mplayer would |
74 |
likely have nvidia support compiled in (since the maintainer 'guesses' |
75 |
that 'most people' likely need this support), which is fine for |
76 |
Jonathan, but unnecessary for me (and might in fact cause me problems). |
77 |
|
78 |
> Also, if I have to specify additional packages while doing mplayer, |
79 |
> how do I add them? but last thing. I did emerge win32codec and THEN |
80 |
> mplayer and that didn't work. |
81 |
|
82 |
Use emerge -pv program_name to see what USE flags are available for the |
83 |
program, then add or remove them by adding a line to |
84 |
/etc/portage/package.use such as |
85 |
|
86 |
cat-egory/program_name +flag1 -flag2 |
87 |
|
88 |
+flag1 meaning any flag which is not enabled (displayed as - and blue in |
89 |
the previous output) which you want enabled, and -flag2 meaning any flag |
90 |
which is enabled (displayed as + and red or green with a * in the |
91 |
previous output) that you do not want enabled. |
92 |
|
93 |
For example, my custom USE entry in /etc/portage/package.use for mplayer |
94 |
looks like this: |
95 |
|
96 |
media-video/mplayer 3dnowext aac cdparanoia dts dvb dvdread edl matroska |
97 |
mmxext real rtc -sse2 tga theora v4l2 win32codecs xanim xvmc |
98 |
|
99 |
I add 3dnowext because I have an AMD CPU which can use it, remove SSE2, |
100 |
because I have an AMD CPU which can't use it, and add the others because |
101 |
either I know I use them or because it's possible that my usage habits |
102 |
may change so that I need them (I've come across a few matroska files, |
103 |
and I might use cdparanoia at some point, though when I get around to |
104 |
ripping my audio CDs, I may well use another program. But I'd rather the |
105 |
support be available than not, so I enable it). |
106 |
|
107 |
If you can't figure out what a USE flag does, you can look in |
108 |
/usr/portage/profiles/use.desc or /usr/portage/profiles/use.local.desc, |
109 |
but I find it easier to use an alias to a command provided on this ML |
110 |
that does the searching for me (since by myself I can't hardly grep at all): |
111 |
|
112 |
alias useflag='grep /usr/portage/profiles/use.*desc -e' |
113 |
|
114 |
When added to ~/.bashrc, and after re-sourcing ~/.bashrc, it then allows |
115 |
the following: |
116 |
|
117 |
useflag matroska |
118 |
/usr/portage/profiles/use.desc:matroska - Adds support for the matroska |
119 |
container format |
120 |
|
121 |
zo 09/25/05 11:58 |
122 |
/usr/local |
123 |
motub -> useflag theora |
124 |
/usr/portage/profiles/use.desc:theora - Adds support for the Theora |
125 |
Video Compression Codec |
126 |
|
127 |
zo 09/25/05 11:58 |
128 |
/usr/local |
129 |
motub -> useflag sse2 |
130 |
/usr/portage/profiles/use.local.desc:media-video/mplayer:sse2 - Enables |
131 |
sse2 support |
132 |
/usr/portage/profiles/use.local.desc:media-video/transcode:sse2 - |
133 |
Enables sse2 support |
134 |
/usr/portage/profiles/use.local.desc:sci-libs/acml:sse2 - Enables sse2 |
135 |
support |
136 |
/usr/portage/profiles/use.local.desc:sci-libs/fftw:sse2 - Enables sse2 |
137 |
support |
138 |
/usr/portage/profiles/use.local.desc:x11-themes/polymer:sse2 - Enables |
139 |
sse2 support. |
140 |
|
141 |
as you see, it searches the aboved named files for the useflag you've |
142 |
questioned, and prints out the description. If this is insufficient, |
143 |
there's always Google Linux ( http://www.google.com/linux? ), which is |
144 |
where I had to look to find out that the *.mkv files I had were |
145 |
Matroska-encoded in the first place. |
146 |
|
147 |
|
148 |
Anyway this is what Gentoo is all about, in a nutshell. You (or your |
149 |
admin) are responsible for knowing your system and how it is used, and |
150 |
finding out how to customize it for maximum efficiency. The information |
151 |
is all made available to you (man pages, descriptions), and if you need |
152 |
more information, there's always a link to the package's homepage |
153 |
readily available, and of course, there's always Google. The whole |
154 |
system is designed to flow together as seamlessly as possible, but you |
155 |
do have to use it for it to do so :) . |
156 |
|
157 |
So what you probably need to do in this particular situation is: |
158 |
|
159 |
1) edit /etc/make.conf to read just 'x86' in the ACCEPT_KEYWORDS field. |
160 |
|
161 |
2) add the following line to /etc/portage/package.keywords: |
162 |
|
163 |
media-video/mplayer ~x86 |
164 |
|
165 |
3) unmerge win32codecs (emerge -C win32codecs) |
166 |
|
167 |
4) run emerge -pv mplayer and see what USE flags are currently enabled |
168 |
or disabled. My bet is that win32codecs is disabled for mPlayer, whereas |
169 |
you want it enabled. |
170 |
|
171 |
5) add the following line to /etc/portage/package.use |
172 |
|
173 |
media-video/mplayer win32codecs flag1 flag2 -flag3 |
174 |
|
175 |
adding and subtracting any other USE flags you might want or want removed. |
176 |
|
177 |
6) run emerge -av mplayer. You should now see win32codecs both enabled |
178 |
for mplayer, and the package being called as an emerge dependency |
179 |
(that's why we removed it, both so that we would see how it works, and |
180 |
so that win32codecs would be out of your world file as a dependency |
181 |
should be). |
182 |
|
183 |
If everything is OK, then just say 'yes' to the emerge. If not, say |
184 |
'no', make your adjustments and then run emerge --ask --verbose mplayer |
185 |
again. Rinse and repeat until you're comfortable saying 'yes' to the emerge. |
186 |
|
187 |
When emerged, mplayer should then run the Win32-encoded files as expected. |
188 |
|
189 |
Hope this helps, |
190 |
Holly |
191 |
-- |
192 |
gentoo-user@g.o mailing list |