On 04:22 Wed 10 Oct , Steve Dibb (beandog) wrote: > 1.1 media-video/mplayer/mplayer-1.0_rc2.ebuild > > file : > http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc2.ebuild?rev=1.1&view=markup > plain: > http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc2.ebuild?rev=1.1&content-type=text/plain
> if use encode; then > use aac || myconf="${myconf} --disable-faac" > use dv || myconf="${myconf} --disable-libdv" > use x264 || myconf="${myconf} --disable-x264" > else > myconf="${myconf} --disable-mencoder --disable-libdv > --disable-x264 \ > --disable-faac" > fi This could be: if use encode; then myconf="${myconf} --enable-mencoder $(use_enable aac faac) $(use_enable dv libdv) $(use_enable x264)" fi > use lirc || myconf="${myconf} --disable-lirc --disable-lircc" > myconf="${myconf} $(use_enable joystick)" > use ipv6 || myconf="${myconf} --disable-inet6" > use rar || myconf="${myconf} --disable-unrarlib" > use rtc || myconf="${myconf} --disable-rtc" > use samba || myconf="${myconf} --disable-smb" This could be more use_enable()'s. Does mplayer's build die if you pass a redundant --enable-foo or something? > # DVB / Video4Linux / Radio support > if { use dvb || use v4l || use v4l2 || use radio; }; then > use dvb || myconf="${myconf} --disable-dvb --disable-dvbhead" > use v4l || myconf="${myconf} --disable-tv-v4l1" > use v4l2 || myconf="${myconf} --disable-tv-v4l2" > use teletext || myconf="${myconf} --disable-tv-teletext" > use pvr || myconf="${myconf} --disable-pvr" > if use radio && { use dvb || use v4l || use v4l2; }; then > myconf="${myconf} --enable-radio $(use_enable encode > radio-capture)" > else > myconf="${myconf} --disable-radio-v4l2 > --disable-radio-bsdbt848" > fi > else > myconf="${myconf} --disable-tv --disable-tv-v4l1 > --disable-tv-v4l2 \ > --disable-radio --disable-radio-v4l2 > --disable-radio-bsdbt848 \ > --disable-dvb --disable-dvbhead --disable-tv-teletext \ > --disable-pvr" > fi Here's one other way to do this (leaving out myconf etc): $(use_enable dvb) $(use_enable dvb dvbhead) $(use_enable v4l tv-v4l1) $(use_enable v4l2 tv-v4l2) $(use_enable teletext tv-teletext) $(use_enable pvr) if use dvb || use v4l || use v4l2; then $(use_enable radio) $(use_enable radio radio-bsdbt848) $(use_enable radio radio-v4l2) # etc... fi > use aac || myconf="${myconf} --disable-faad-internal" > use amrnb || myconf="${myconf} --disable-libamr_nb" > use amrwb || myconf="${myconf} --disable-libamr_wb" > use dts || myconf="${myconf} --disable-libdca" > ! use png && ! use gtk && myconf="${myconf} --disable-png" > use lzo || myconf="${myconf} --disable-liblzo" > use encode && use mp2 || myconf="${myconf} --disable-twolame \ > --disable-toolame" > use mp3 || myconf="${myconf} --disable-mp3lib" > use quicktime || myconf="${myconf} --disable-qtx" > use vorbis || myconf="${myconf} --disable-libvorbis" > use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods" Again, use_enable() would be cleaner in many cases. > use aalib || myconf="${myconf} --disable-aa" > use dga || myconf="${myconf} --disable-dga1 --disable-dga2" > use fbcon || myconf="${myconf} --disable-fbdev" > use fbcon && use video_cards_s3virge && myconf="${myconf} --enable-s3fb" > use libcaca || myconf="${myconf} --disable-caca" > use opengl || myconf="${myconf} --disable-gl" > use video_cards_vesa || myconf="${myconf} --disable-vesa" > use vidix || myconf="${myconf} --disable-vidix-internal \ > --disable-vidix-external" > use zoran || myconf="${myconf} --disable-zr" And again > if use xv; then > if use xvmc; then > myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCW" > else > myconf="${myconf} --disable-xvmc" > fi > else > myconf="${myconf} --disable-xv --disable-xvmc" > fi Something along these lines might do: $(use_enable xv) $(use xv && $(use_enable xvmc)) $(use xv && $(use_with xvmc with-xvmclib XvMCW)) Would this kind of cleanup work? Thanks, Donnie -- [EMAIL PROTECTED] mailing list