summaryrefslogtreecommitdiff
blob: 0489b00d7f16cef473c1163ac3ddf2d688cdf214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/xxdiff/xxdiff-3.0.2-r1.ebuild,v 1.5 2005/08/23 16:56:19 agriffis Exp $

inherit eutils kde-functions

DESCRIPTION="A graphical file and directories comparator and merge tool."
HOMEPAGE="http://xxdiff.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"

SLOT="0"
KEYWORDS="~alpha ~amd64 ia64 ~ppc sparc x86"
IUSE="kde"

DEPEND="=x11-libs/qt-3*
	kde? ( >=kde-base/kdelibs-3.1 )"

RDEPEND="${DEPEND}
	sys-apps/diffutils"

DEPEND="${DEPEND}
	=dev-util/tmake-1.8*"

set-qtdir 3
set-kdedir 3

src_unpack()
{
	unpack ${A}

	if use kde; then
		cd ${S}/src
		cp ${FILESDIR}/kdesupport.patch ${T}/
		sed -i -e "s:/usr/kde/3.1:${KDEDIR}:g" ${T}/kdesupport.patch
		epatch ${T}/kdesupport.patch
	fi
}

src_compile() {
	cd src
	tmake -o Makefile xxdiff.pro

	### borrowed from kde.eclass #
	#
	# fix the sandbox errors "can't writ to .kde or .qt" problems.
	# this is a fake homedir that is writeable under the sandbox, so that the build
	# process can do anything it wants with it.
	REALHOME="${HOME}"
	mkdir -p ${T}/fakehome/.kde
	mkdir -p ${T}/fakehome/.qt
	export HOME="${T}/fakehome"

	# things that should access the real homedir
	[ -d "${REALHOME}/.ccache" ] && ln -sf "${REALHOME}/.ccache" "${HOME}/"

	emake || die
}

src_install () {
	dobin bin/xxdiff bin/xxdiff-cvs-diff bin/xxdiff-encrypted bin/xxdiff-find-grep-sed bin/xxdiff-match
	doman src/xxdiff.1
	dodoc README CHANGES TODO
}