From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IfVPm-0007zJ-Ds for garchives@archives.gentoo.org; Wed, 10 Oct 2007 06:51:30 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l9A6eOvL000740; Wed, 10 Oct 2007 06:40:24 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l9A6bBx4028443 for ; Wed, 10 Oct 2007 06:37:12 GMT Received: from gentoo.org (c-67-171-150-177.hsd1.or.comcast.net [67.171.150.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id DC5166559D; Wed, 10 Oct 2007 06:37:10 +0000 (UTC) Date: Tue, 9 Oct 2007 23:37:09 -0700 From: Donnie Berkholz To: gentoo-dev@lists.gentoo.org, beandog@gentoo.org Subject: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-video/mplayer: ChangeLog mplayer-1.0_rc2.ebuild Message-ID: <20071010063709.GJ962@supernova> References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-Archives-Salt: 5663cbd6-cd85-4c1b-999b-838f54262872 X-Archives-Hash: 1514dbfade41248827eaa49f8285da04 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 -- gentoo-dev@gentoo.org mailing list