summaryrefslogtreecommitdiff
blob: 9222b4fe13645e96cd616ace3457258d976d60cd (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
76
77
78
79
80
81
82
83
84
85
86
87
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-office/abiword/abiword-2.6.0.ebuild,v 1.3 2008/04/04 23:55:19 eva Exp $

inherit alternatives eutils gnome2 versionator

MY_MAJORV=$(get_version_component_range 1-2)

DESCRIPTION="Fully featured yet light and fast cross platform word processor"
HOMEPAGE="http://www.abisource.com/"
SRC_URI="http://www.abisource.com/downloads/${PN}/${PV}/source/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="debug gnome spell xml"

# FIXME: gsf could probably we conditional

RDEPEND="virtual/xft
	dev-libs/popt
	sys-libs/zlib
	>=dev-libs/glib-2
	>=x11-libs/gtk+-2.6
	>=x11-libs/pango-1.2
	>=gnome-base/libglade-2
	>=gnome-base/libgnomeprint-2.2
	>=gnome-base/libgnomeprintui-2.2
	>=x11-libs/goffice-0.4
	>=media-libs/libpng-1.2
	>=media-libs/fontconfig-2.1
	>=media-libs/freetype-2.1
	>=x11-libs/pango-1.2
	>=app-text/wv-1.2
	>=dev-libs/fribidi-0.10.4
	xml? ( >=dev-libs/libxml2-2.4.10 )
	!xml? ( dev-libs/expat )
	spell? ( >=app-text/enchant-1.2 )
	gnome?	(
		>=gnome-base/libbonobo-2
		>=gnome-base/libgnomeui-2.2
		>=gnome-extra/gucharmap-1.4
		>=gnome-base/gnome-vfs-2.2 )
	>=gnome-extra/libgsf-1.12.0"

DEPEND="${RDEPEND}
		>=dev-util/pkgconfig-0.9"

# FIXME: --enable-libabiword fails to compile

pkg_setup() {
	G2CONF="${G2CONF}
		$(use_enable debug)
		$(use_enable debug symbols)
		$(use_enable gnome gnomeui)
		$(use_enable gnome gucharmap)
		$(use_enable gnome gnomevfs)
		$(use_enable spell spellcheck)
		$(use_with xml libxml2)
		$(use_with !xml expat)
		--disable-libabiword
		--enable-printing
		--enable-threads
		--disable-scripting
		--enable-symbols"
}

src_install() {
	gnome2_src_install

	sed -i "s:Exec=abiword:Exec=abiword-${MY_MAJORV}:" "${D}"/usr/share/applications/abiword.desktop

	mv "${D}/usr/bin/abiword" "${D}/usr/bin/AbiWord-${MY_MAJORV}"
	dosym AbiWord-${MY_MAJORV} /usr/bin/abiword-${MY_MAJORV}

	dodoc *.TXT user/wp/readme.txt
}

pkg_postinst() {
	gnome2_pkg_postinst

	alternatives_auto_makesym "/usr/bin/abiword" "/usr/bin/abiword-[0-9].[0-9]"

	elog "As of version 2.4, all abiword plugins have been moved"
	elog "into a seperate app-office/abiword-plugins package"
	elog "You can install them by running emerge abiword-plugins"
}