[mythtv] Re: [mythtv-commits] Re: Ticket #265: SVN HEAD mythtv has Undefined Reference (Gentoo brokenness)

Simon Kenyon simon at koala.ie
Tue Aug 30 17:09:02 UTC 2005


On Tuesday 30 August 2005 17:22, Neale Swinnerton wrote:
> This doesn't fix the build problems with Gentoo I'm afraid. /usr/X11R6/lib
> is still appearing before -L../../libs/libmythui in the linker options
> (seen on rev 7185).
>
> Can someone post their svn .ebuild????

attached
--
simon
-------------- next part --------------
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit myth-svn

DESCRIPTION="Homebrew PVR project"
HOMEPAGE="http://www.mythtv.org/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="alsa altivec arts cle266 debug directfb dvb dvd ieee1394 jack joystick lcd
lirc nls nvidia oggvorbis opengl oss profile xv X directx ieee1394"

DEPEND=">=media-libs/freetype-2.0
	>=media-sound/lame-3.93.1
	>=x11-libs/qt-3.1
	dev-db/mysql
	alsa? ( >=media-libs/alsa-lib-0.9 )
	>=sys-apps/sed-4
	arts? ( kde-base/arts )
	directfb? ( dev-libs/DirectFB )
	dvb? ( media-libs/libdvb )
	dvd? ( media-libs/libdvdnav )
	lirc? ( app-misc/lirc )
	nvidia? ( media-video/nvidia-glx )
	jack? ( media-sound/jack-audio-connection-kit )
	ieee1394? ( sys-libs/libraw1394 )
	lcd? ( app-misc/lcdproc )
	oggvorbis? ( media-libs/libvorbis )
	opengl? ( virtual/opengl )
	|| ( >=net-misc/wget-1.9.1 >=media-tv/xmltv-0.5.34 )"

RDEPEND="${DEPEND}
	!media-tv/mythtv
	!media-tv/mythtv-cvs
	!media-tv/mythfrontend
	!media-tv/mythfrontend-cvs
	!media-tv/mythfrontend-svn"

pkg_setup() {

	if ! built_with_use x11-libs/qt mysql ; then
		eerror "Qt is missing MySQL support. Please add"
		eerror "'mysql' to your USE flags, and re-emerge Qt."
		die "Qt needs MySQL support"
	fi

	if use ieee1394; then
		echo
		ewarn "If you want to USE ieee1394, you need to install libiec61883"
		ewarn "which is not available in Portage at this time. Do this at your"
		ewarn "own risk. No Support provided."
		echo
	fi

	if use nvidia; then
		echo
		ewarn "You enabled the 'nvidia' USE flag, you must have a GeForce 4 or"
		ewarn "greater to use this. Otherwise, you'll have crashes with MythTV"
		echo
	fi

}

src_unpack() {
	myth-svn_src_unpack || die "unpack failed"

	cd ${S}
}

setup_pro() {
	return 0
}

src_compile() {
	sed \
		-e "s:libmythui::" \
		-i 'libs/libs.pro' || die "Removing libmythui failed"
	sed \
		-e "s:mythuitest::" \
		-i 'programs/programs.pro' || die "Removing mythuitest failed"
	use cle266 && use nvidia && die "You can not have USE="cle266" and USE="nvidia" at the same time. Must disable one or the other."
	use debug && use profile && die "You can not have USE="debug" and USE="profile" at the same time. Must disable one or the other."

	myconf="
	    $(use_enable alsa audio-alsa)
		$(use_enable altivec)
	    $(use_enable arts audio-arts)
	    $(use_enable directfb)
	    $(use_enable directx)
		$(use_enable dvb)
		$(use_enable dvb dvb-eit)
		$(use_enable dvd)
	    $(use_enable ieee1394 firewire)
	    $(use_enable jack audio-jack)
		$(use_enable joystick joystick-menu)
	    $(use_enable lirc)
		$(use_enable oggvorbis vorbis)
	    $(use_enable opengl opengl-vsync)
		$(use_enable oss audio-oss)
	    $(use_enable xv)
		$(use_enable X x11)
	"

	use cle266 && myconf="${myconf} --enable-xvmc"
	use nvidia && myconf="${myconf} --enable-xvmc"

	use debug && myconf="${myconf} --compile-type=debug"
	use profile && myconf="${myconf} --compile-type=profile"

	myth-svn_src_compile
}

src_install() {
	myth-svn_src_install || die "install failed"
	
	insinto /usr/share/mythtv/database
	doins database/*

	exeinto /usr/share/mythtv
	doexe "${FILESDIR}/mythfilldatabase.cron"

	exeinto /etc/init.d
	newexe "${FILESDIR}/mythbackend.rc6" mythbackend
	insinto /etc/conf.d
	newins "${FILESDIR}/mythbackend.conf" mythbackend

	dodoc keys.txt docs/*.{txt,pdf}
	dohtml docs/*.html

	keepdir /var/{log,run}/mythtv
}
-------------- next part --------------
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit subversion eutils flag-o-matic multilib versionator toolchain-funcs

ECLASS=myth-svn
INHERITED="${INHERITED} ${ECLASS}"
IUSE="${IUSE} nls debug"

#ESVN_FETCH_CMD="svn co"
#ESVN_UPDATE_CMD="svn co"

EXPORT_FUNCTIONS src_unpack src_compile src_install

MYTHPLUGINS="mythbrowser mythcontrols mythdvd mythgallery mythgame mythmusic mythnews mythphone mythvideo mythweather mythweb"

atleast_0.18() {
	[[ $(get_version_component_range 1) > 0 || $(get_version_component_range 2) > 17 ]]
}

_MODULE=${PN/-svn/}

if atleast_0.18 && hasq ${_MODULE} ${MYTHPLUGINS} ; then
	ESVN_REPO_URI="http://cvs.mythtv.org/svn/trunk/mythplugins"
	ESVN_PROJECT=mythplugins
elif [ "${_MODULE}" == "myththemes" ]; then
	ESVN_REPO_URI="http://cvs.mythtv.org/svn/trunk/myththemes"
	ESVN_PROJECT=myththemes
else
	ESVN_REPO_URI="http://cvs.mythtv.org/svn/trunk/mythtv"
	ESVN_PROJECT=${_MODULE/frontend/tv}
fi

S="${WORKDIR}/${_MODULE}"

myth-svn_src_unpack() {
	if atleast_0.18 && hasq ${_MODULE} ${MYTHPLUGINS} ; then
		pkg_pro="mythplugins.pro"
	elif [ "${_MODULE}" == "mythfrontend" ]; then
		pkg_pro="mythtv.pro"
	else
		pkg_pro="${_MODULE}.pro"
	fi

	subversion_src_unpack ; cd ${S}

	if [[ -f settings.pro ]] ; then
		if use debug ; then
			FEATURES="${FEATURES} nostrip"
			sed \
				-e 's:#CONFIG += debug:CONFIG += debug:' \
				-e 's:CONFIG += release:#CONFIG += release:' \
				-i 'settings.pro' || die "Setting debug failed"
		fi

		sed \
			-e "s:PREFIX = /usr/local:PREFIX = /usr:" \
			-i 'settings.pro' || die "Settings PREFIX failed"

		if atleast_0.18 && hasq ${_MODULE} ${MYTHPLUGINS} ; then
			cd ${_MODULE}
		fi
		if !  use nls ; then
			sed \
				-e "s:i18n::" \
				-i ${pkg_pro} || die "Disable i18n failed"
		fi
		setup_pro
	fi
}

myth-svn_src_compile() {
	if atleast_0.18 ; then
		if hasq ${_MODULE} ${MYTHPLUGINS} ; then
			for x in ${MYTHPLUGINS} ; do
				if [[ ${_MODULE} == ${x} ]] ; then
					myconf="${myconf} --enable-${x}"
				else
					myconf="${myconf} --disable-${x}"
				fi
			done
		fi
		econf ${myconf}
	fi

	qmake -o "Makefile" "${S}/${pkg_pro}"
	emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" "${@}" || die
}

myth-svn_src_install() {
	if atleast_0.18 && hasq ${_MODULE} ${MYTHPLUGINS} ; then
		cd ${S}/${_MODULE}
	fi

	einstall INSTALL_ROOT="${D}"
	for doc in AUTHORS COPYING FAQ UPGRADING ChangeLog README; do
		test -e "${doc}" && dodoc ${doc}
	done
}


More information about the mythtv-dev mailing list