summaryrefslogtreecommitdiff
blob: a902ed82e36d648b4ef808f475bda5ba9bde6546 (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
65
66
67
68
69
70
71
72
73
74
75
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-office/taskjuggler/taskjuggler-2.4.1.ebuild,v 1.2 2008/08/12 04:08:36 dberkholz Exp $

inherit eutils qt3 flag-o-matic

DESCRIPTION="project management tool for Linux and UNIX system-based operating systems"
SRC_URI="http://www.taskjuggler.org/download/${P}.tar.bz2"
HOMEPAGE="http://taskjuggler.org"

LICENSE="GPL-2"
KEYWORDS="~amd64 ~ppc ~x86"

IUSE="arts kde"
SLOT="0"

# Otherwise compilation will break for amd64 or when using -Os
DEPEND="=x11-libs/qt-3*
	kde? ( >=kde-base/kdelibs-3
		|| ( kde-base/libkdepim kde-base/kdepim  )
		|| ( kde-base/libkcal kde-base/kdepim ) )
	app-text/openjade
	dev-libs/libxslt
	>=dev-perl/Class-MethodMaker-2.02
	dev-perl/Date-Calc
	dev-perl/PostScript-Simple
	dev-perl/XML-Parser
	net-print/poster"

src_compile() {
	# 'db2html' does not know '--xencoding utf8' and is called 'docbook2html' in gentoo
	# also 'db2ps --pdf' should be 'docbook2pdf' and 'db2ps' should be 'docbook2ps'
	# see http://lists.suse.com/archive/taskjuggler-devel/2005-Mar/0011.html
	sed -i -e 's/--xencoding utf-8//g' docs/en/Makefile.*
	sed -i -e 's/db2ps --pdf/docbook2pdf/g' docs/en/Makefile.*
	sed -i -e 's/db2ps/docbook2ps/g' docs/en/Makefile.*

	# Need to fake out QT or we'll get sandbox probles
	# from http://www.gentoo.org/cgi-bin/viewcvs.cgi/dev-db/tora/tora-1.3.13.ebuild?r1=1.2&r2=1.3
	REALHOME="$HOME"
	mkdir -p "$T"/fakehome/.kde
	mkdir -p "$T"/fakehome/.qt
	export HOME="$T/fakehome"
	addwrite "${QTDIR}/etc/settings"

	local myconf
	myconf="--with-kde-support"
	use kde \
		&& myconf="${myconf}=yes" \
		|| myconf="${myconf}=no"

	myconf="${myconf} `use_with arts`"

	# http://bugs.gentoo.org/show_bug.cgi?id=35725#c36
	filter-flags -funsafe-math-optimizations -ffast-math

	econf \
		${myconf} \
		|| die "configure failed"

	# don't build docs, fails in docbook2html and docbook2pdf...
	sed -i -e 's/ docs / /g' Makefile

	emake || die "emake failed"
}

src_install() {
#	dodir /usr/share/apps/katepart/syntax
#	doins Contrib/kate/taskjuggler.xml || die
	make install DESTDIR="${D}" || die "install failed"
	if use kde; then
		cd Contrib/kate
		make install DESTDIR="${D}" || die "install kate-addons failed"
	fi
}