--- kdiff3-0.9.95.ebuild 2009-10-18 20:35:45.000000000 +0200 +++ kdiff3-0.9.95-r1.ebuild 2010-02-25 22:36:39.000000000 +0100 @@ -4,26 +4,56 @@ EAPI="2" +KDE_REQUIRED="optional" KDE_LINGUAS="ar bg br cs cy da de el en_GB es et fr ga gl hi hu it ja ka lt nb nds nl pl pt pt_BR ro ru rw sv ta tg tr uk zh_CN" inherit kde4-base +inherit qt4-r2 -DESCRIPTION="KDE-based frontend to diff3" +DESCRIPTION="Qt- or KDE-based frontend to diff3" HOMEPAGE="http://kdiff3.sourceforge.net/" SRC_URI="mirror://sourceforge/kdiff3/${P}.tar.gz" SLOT="1" LICENSE="GPL-2" KEYWORDS="amd64 ~ppc ~ppc64 x86" -IUSE="debug handbook konqueror" +IUSE="debug handbook kde konqueror" PATCHES=( "${FILESDIR}/${P}-desktop-entry.patch" ) -RDEPEND="konqueror? ( >=kde-base/libkonq-${KDE_MINIMAL} ) +DEPEND=">=x11-libs/qt-core-4.4.0 + >=x11-libs/qt-gui-4.4.0 + kde? ( + >= kde-base/kde-libs-${KDE_MINIMAL} + konqueror? ( >=kde-base/libkonq-${KDE_MINIMAL} ) + )" + +RDEPEND="${DEPEND} sys-apps/diffutils !kde-misc/kdiff3:0" +pkg_setup() { + if use kde; then + kde4-base_pkg_setup + fi +} + src_configure() { - mycmakeargs="${mycmakeargs} $(cmake-utils_use_with konqueror LibKonq)" - kde4-base_src_configure + if use kde; then + mycmakeargs="${mycmakeargs} $(cmake-utils_use_with konqueror LibKonq)" + kde4-base_src_configure + else + # adapt to Gentoo paths + sed -e s,documentation.path.*$,documentation.path\ =\ /usr/share/doc/${PF}, \ + -e s,target.path.*$,target.path\ =\ /usr/bin, \ + "${S}"/src-QT4/kdiff3.pro > "${S}"/src-QT4/kdiff3_fixed.pro + eqmake4 "${S}"/src-QT4/kdiff3_fixed.pro + fi +} + +pkg_postinst() { + # circumvent warning about missing KDE stuff + if use kde; then + kde4-base_pkg_postinst + fi }