--- oprofile-0.9.6.ebuild 2010-10-21 22:59:08.174961582 +0200 +++ oprofile-0.9.6-r1.ebuild 2010-10-21 22:59:18.975961824 +0200 @@ -2,8 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-util/oprofile/oprofile-0.9.6.ebuild,v 1.6 2010/07/18 18:46:07 armin76 Exp $ -EAPI=1 -inherit linux-info +EAPI=2 +inherit linux-info autotools DESCRIPTION="A transparent low-overhead system-wide profiler" HOMEPAGE="http://oprofile.sourceforge.net" @@ -11,12 +11,16 @@ LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~arm hppa ppc ~ppc64 ~sparc x86" -IUSE="" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="qt4" -DEPEND=">=dev-libs/popt-1.7-r1 +RDEPEND="qt4? ( x11-libs/qt-gui[qt3support] )" + +DEPEND="${RDEPEND} + >=dev-libs/popt-1.7-r1 >=sys-devel/binutils-2.14.90.0.6-r3 - >=sys-libs/glibc-2.3.2-r1" + >=sys-libs/glibc-2.3.2-r1 + " pkg_setup() { linux-info_pkg_setup @@ -24,24 +28,33 @@ elog "In order for oprofile to work, you need to configure your kernel" elog "with CONFIG_OPROFILE set to 'm' or 'y'." fi + +} + +src_prepare() { + # don't patch if qt4 is not used + if use qt4 ; then + epatch "${FILESDIR}/oprofile-0.9.6-qt4qt3support.patch" + touch INSTALL NEWS AUTHORS + eautoreconf + fi } -src_compile() { - local myconf="--with-qt-dir=/void --with-x" +src_configure() { + + local myconf case ${KV_FULL} in 2.2.*|2.4.*) myconf="${myconf} --with-linux=${KV_DIR}";; 2.5.*|2.6.*) myconf="${myconf} --with-kernel-support";; *) die "Kernel version '${KV_FULL}' not supported";; esac + myconf="${myconf} $(use_enable qt4)" + echo "${myconf}" econf ${myconf} || die - - local mymake="" - - sed -i -e "s,depmod -a,:,g" Makefile - emake ${mymake} || die } + src_install() { local myinst=""