Scribus: Optionally depend on qt-webkit
[gentoo-overlay-ibormuth.git] / app-office / scribus / scribus-9999.ebuild
Commit [+]AuthorDateLineData
035c8fb8 Ingo Bormuth2009-02-25 15:33:38 +01001# Copyright 1999-2009 Gentoo Foundation
dfea8e16
IB
Ingo Bormuth2008-09-04 19:18:26 +02002# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
dfea8e16
IB
Ingo Bormuth2008-09-04 19:18:26 +02005EAPI=1
6
78b098b1 Ingo Bormuth2009-06-04 22:18:30 +02007inherit qt4 eutils subversion
dfea8e16 Ingo Bormuth2008-09-04 19:18:26 +02008
d5dd4895
IB
Ingo Bormuth2009-06-06 19:25:57 +02009ESVN_REPO_URI="svn://scribus.info/Scribus/trunk/Scribus"
10
dfea8e16
IB
Ingo Bormuth2008-09-04 19:18:26 +020011DESCRIPTION="Desktop Publishing (DTP) and Layout program for Linux."
12HOMEPAGE="http://www.scribus.net"
d5dd4895 Ingo Bormuth2009-06-06 19:25:57 +020013SRC_URI=""
dfea8e16
IB
Ingo Bormuth2008-09-04 19:18:26 +020014SLOT="svn"
15LICENSE="GPL-2"
16KEYWORDS=""
9e03849a Ingo Bormuth2009-08-12 21:12:27 +020017IUSE="doc latex gnuplot spell webkit"
dfea8e16 Ingo Bormuth2008-09-04 19:18:26 +020018
035c8fb8 Ingo Bormuth2009-02-25 15:33:38 +010019DEPEND="dev-util/cmake
ff85530d Ingo Bormuth2009-08-12 20:49:03 +020020 >=x11-libs/qt-gui-4.4
9e03849a Ingo Bormuth2009-08-12 21:12:27 +020021 webkit? ( x11-libs/qt-webkit )
035c8fb8
IB
Ingo Bormuth2009-02-25 15:33:38 +010022 media-libs/freetype
23 x11-libs/cairo
24 media-libs/tiff
a78e277d
IB
Ingo Bormuth2008-11-16 00:57:52 +010025 >=media-libs/lcms-1.15
26 media-libs/jpeg
27 media-libs/libpng
035c8fb8
IB
Ingo Bormuth2009-02-25 15:33:38 +010028 dev-libs/libxml2
29 media-libs/libart_lgpl
30 spell? ( app-text/aspell )
31 latex? ( virtual/latex-base )
32 gnuplot? ( sci-visualization/gnuplot )"
dfea8e16
IB
Ingo Bormuth2008-09-04 19:18:26 +020033
34RDEPEND="${DEPEND}
35 virtual/ghostscript"
36
37pkg_setup() {
38 if ! built_with_use 'x11-libs/cairo' 'X' 'svg'; then
39 eerror "You must build cairo with X and svg support"
40 die "x11-libs/cairo built without X and/or svg"
41 fi
42}
43
44src_compile() {
78b098b1
IB
Ingo Bormuth2009-06-04 22:18:30 +020045 # Install into /opt/scribus-svn to avoid slot collision:
46 cmake -DCMAKE_INSTALL_PREFIX:PATH=/optsvn || die "cmake failed"
dfea8e16
IB
Ingo Bormuth2008-09-04 19:18:26 +020047 emake || die "make failed"
48
49}
50
51src_install() {
52 emake DESTDIR="${D}" install || die "install failed"
53
54 dodoc AUTHORS ChangeLog README TODO
55
56 if use doc ; then
57 emake -C devel-doc || die "make docs failed"
58 dohtml -r devel-doc/*
59 fi
60
61 # Rename additional files to avoid slot collision:
26c265df
IB
Ingo Bormuth2008-11-16 13:54:59 +010062 cp scribus/icons/scribus.png scribus-svn.png && \
63 doicon scribus-svn.png && \
dfea8e16 Ingo Bormuth2008-09-04 19:18:26 +020064 sed -e 's/Name=Scribus/Name=Scribus-SVN/' -i scribus.desktop && \
26c265df Ingo Bormuth2008-11-16 13:54:59 +010065 sed -e 's/Icon=scribus/Icon=scribus-svn/' -i scribus.desktop && \
dfea8e16 Ingo Bormuth2008-09-04 19:18:26 +020066 mv scribus.desktop scribus-svn.desktop && \
26c265df Ingo Bormuth2008-11-16 13:54:59 +010067 domenu scribus-svn.desktop || \
035c8fb8 Ingo Bormuth2009-02-25 15:33:38 +010068 eerror "Failed to generate menu entry."
dfea8e16
IB
Ingo Bormuth2008-09-04 19:18:26 +020069}
70
71pkg_postrm() {
035c8fb8
IB
Ingo Bormuth2009-02-25 15:33:38 +010072 ewarn "BIG FAT WARNING: This development version of scribus."
73 echo
dfea8e16
IB
Ingo Bormuth2008-09-04 19:18:26 +020074 ewarn "The file format of scribus >=1.3.4 is _NOT_ backwards compatible"
75 ewarn "with the stable 1.3.3.x versions !!!"
76}