public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Donnie Berkholz <dberkholz@gentoo.org>
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
Date: Tue, 9 Oct 2007 23:37:09 -0700	[thread overview]
Message-ID: <20071010063709.GJ962@supernova> (raw)
In-Reply-To: <E1IfT5V-0007lS-KW@stork.gentoo.org>

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



           reply	other threads:[~2007-10-10  6:51 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <E1IfT5V-0007lS-KW@stork.gentoo.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071010063709.GJ962@supernova \
    --to=dberkholz@gentoo.org \
    --cc=beandog@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox