# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ MY_P=AutoQ3DGPL1-36 inherit qt3 qt4 DESCRIPTION="A complete 3D modeling application for computing aided drafting in three dimensions." HOMEPAGE="http://autoq3d.ecuadra.com" SRC_URI="qt4? ( mirror://sourceforge/autoq3d/${MY_P}qt4source.zip ) !qt4? ( qt3? ( mirror://sourceforge/autoq3d/${MY_P}qt3source.zip ) )" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="qt3 qt4" DEPEND="qt4? ( $(qt4_min_version 4) ) !qt4? ( qt3? ( $(qt_min_version 3) ) )" RDEPEND="" RESTRICT="mirror" if use qt4 ; then S=${WORKDIR}/${MY_P}qt4source else S=${WORKDIR}/${MY_P}qt3source fi pkg_setup() { if use qt3 && use qt4; then einfo "You have USE=\"qt3 qt4\" selected, defaulting to USE=\"qt4\"" fi if ! use qt3 && ! use qt4; then eerror "You need to have either qt3 or qt4 in your USE-flag to compile" die "both qt3 and qt4 are missing in USE-flag" fi } src_compile() { if use qt4; then QTDIR="/usr" fi ${QTDIR}/bin/qmake QMAKE=${QTDIR}/bin/qmake || die "qmake failed" emake || die "emake failed" } src_install() { dobin AutoQ3D || die "AutoQ3D could not be installed" insinto /usr/share/AutoQ3D-GPL doins images lan_* qref*.htm insinto /usr/share/AutoQ3D-GPL/images doins images/* dodoc docs/*.txt }