public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-video/mplayer: ChangeLog mplayer-1.0_rc2.ebuild
       [not found] <E1IfT5V-0007lS-KW@stork.gentoo.org>
@ 2007-10-10  6:37 ` Donnie Berkholz
  0 siblings, 0 replies; only message in thread
From: Donnie Berkholz @ 2007-10-10  6:37 UTC (permalink / raw
  To: gentoo-dev, beandog

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-10  6:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1IfT5V-0007lS-KW@stork.gentoo.org>
2007-10-10  6:37 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-video/mplayer: ChangeLog mplayer-1.0_rc2.ebuild Donnie Berkholz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox