Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 272097
Collapse All | Expand All

(-)/var/portage/app-office/abiword/abiword-2.6.8.ebuild (-51 / +44 lines)
Lines 1-10 Link Here
1
# Copyright 1999-2009 Gentoo Foundation
1
# Copyright 1999-2009 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/app-office/abiword/abiword-2.6.8.ebuild,v 1.1 2009/03/15 01:00:27 eva Exp $
3
# $Header: $
4
4
5
EAPI="1"
5
EAPI="2"
6
6
7
inherit alternatives eutils gnome2 versionator
7
inherit alternatives autotools gnome2 versionator
8
8
9
MY_MAJORV=$(get_version_component_range 1-2)
9
MY_MAJORV=$(get_version_component_range 1-2)
10
10
Lines 15-95 Link Here
15
LICENSE="GPL-2"
15
LICENSE="GPL-2"
16
SLOT="2"
16
SLOT="2"
17
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
17
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
18
IUSE="debug gnome spell xml"
18
IUSE="debug gnome spell"
19
19
20
# FIXME: gsf could probably be conditional
20
RDEPEND="sys-libs/zlib
21
21
	>=dev-libs/glib-2.16
22
RDEPEND="dev-libs/popt
22
	>=x11-libs/gtk+-2.14
23
	sys-libs/zlib
23
	>=x11-libs/pango-1.2[X]
24
	>=dev-libs/glib-2
24
	>=x11-libs/cairo-1.8[X]
25
	>=x11-libs/gtk+-2.6
26
	x11-libs/libXft
27
	>=x11-libs/pango-1.2
28
	>=gnome-base/libglade-2
29
	>=gnome-base/libgnomeprint-2.2
30
	>=gnome-base/libgnomeprintui-2.2
31
	>=x11-libs/goffice-0.4:0.4
32
	>=media-libs/libpng-1.2
25
	>=media-libs/libpng-1.2
33
	>=media-libs/fontconfig-2.1
26
	>=media-libs/fontconfig-2.1
34
	>=media-libs/freetype-2.1
35
	>=app-text/wv-1.2
27
	>=app-text/wv-1.2
36
	>=dev-libs/fribidi-0.10.4
28
	>=dev-libs/fribidi-0.10.4
37
	xml? ( >=dev-libs/libxml2-2.4.10 )
29
	dev-libs/expat
38
	!xml? ( dev-libs/expat )
30
	>=gnome-base/librsvg-2.16
31
	>=gnome-extra/libgsf-1.14.9
39
	spell? ( >=app-text/enchant-1.2 )
32
	spell? ( >=app-text/enchant-1.2 )
40
	gnome?	(
33
	gnome? ( >=gnome-extra/gucharmap-2
41
		>=gnome-base/libbonobo-2
34
		 >=x11-libs/goffice-0.6:0.6 )"
42
		>=gnome-base/libgnomeui-2.2
43
		>=gnome-extra/gucharmap-1.4
44
		>=gnome-base/gnome-vfs-2.2 )
45
	>=gnome-extra/libgsf-1.12.0"
46
35
47
DEPEND="${RDEPEND}
36
DEPEND="${RDEPEND}
48
		>=dev-util/pkgconfig-0.9"
37
	>=dev-util/pkgconfig-0.9"
49
50
# FIXME: --enable-libabiword fails to compile
51
38
52
pkg_setup() {
39
pkg_setup() {
53
	if ! built_with_use --missing true x11-libs/pango X; then
54
		eerror "You must rebuild x11-libs/pango with USE='X'"
55
		die "You must rebuild x11-libs/pango with USE='X'"
56
	fi
57
58
	G2CONF="${G2CONF}
40
	G2CONF="${G2CONF}
59
		$(use_enable debug)
41
		$(use_enable debug)
60
		$(use_enable debug symbols)
42
		$(use_enable spell)
61
		$(use_enable gnome gnomeui)
43
		--enable-print
62
		$(use_enable gnome gucharmap)
44
		--with-gio
63
		$(use_enable gnome gnomevfs)
45
		--without-gnomevfs
64
		$(use_enable spell spellcheck)
46
		$(use_with gnome goffice)
65
		$(use_with xml libxml2)
47
		$(use_with gnome gucharmap)
66
		$(use_with !xml expat)
48
		--enable-default-plugins"   # include OpenDocument import/export
67
		--enable-libabiword
68
		--enable-printing"
69
}
49
}
70
50
71
src_install() {
51
src_prepare() {
72
	# Install icon to pixmaps, bug #220097
52
	gnome2_src_prepare
73
	sed 's:icondir = $(datadir)/icons:icondir = $(datadir)/pixmaps:'	\
53
74
		-i GNUmakefile || die "sed 1 failed"
54
	# change install locations (bug #220097)
55
	sed 's:desktopdir = @ABIWORD_DATADIR@/applications:desktopdir = $(datadir)/applications:' \
56
		-i Makefile.am || die "sed 1 failed"
57
	sed 's:mimedir = @ABIWORD_DATADIR@/mime-info:mimedir = $(datadir)/mime-info:' \
58
		-i Makefile.am || die "sed 2 failed"
59
	sed 's:icondir= @ABIWORD_DATADIR@/icons:icondir = $(datadir)/pixmaps:' \
60
		-i Makefile.am || die "sed 3 failed"
61
	sed '/readme\.txt\|abw/d' \
62
		-i user/wp/Makefile.am || die "sed 4 failed"
63
	eautoreconf
64
}
75
65
66
src_install() {
76
	gnome2_src_install
67
	gnome2_src_install
77
68
78
	sed "s:Exec=abiword:Exec=abiword-${MY_MAJORV}:" \
69
	sed "s:Exec=abiword:Exec=abiword-${MY_MAJORV}:" \
79
		-i "${D}"/usr/share/applications/abiword.desktop || die "sed 2 failed"
70
		-i "${D}"/usr/share/applications/abiword.desktop || die "sed 5 failed"
80
71
81
	mv "${D}/usr/bin/abiword" "${D}/usr/bin/AbiWord-${MY_MAJORV}"
72
	mv "${D}/usr/bin/abiword" "${D}/usr/bin/AbiWord-${MY_MAJORV}"
82
	dosym AbiWord-${MY_MAJORV} /usr/bin/abiword-${MY_MAJORV}
73
	dosym AbiWord-${MY_MAJORV} /usr/bin/abiword-${MY_MAJORV}
83
74
84
	dodoc *.TXT user/wp/readme.txt
75
	dodoc AUTHORS user/wp/readme.txt
85
}
76
}
86
77
87
pkg_postinst() {
78
pkg_postinst() {
88
	gnome2_pkg_postinst
79
	gnome2_pkg_postinst
89
80
90
	alternatives_auto_makesym "/usr/bin/abiword" "/usr/bin/abiword-[0-9].[0-9]"
81
	alternatives_auto_makesym "/usr/bin/abiword" "/usr/bin/abiword-[0-9].[0-9]"
82
}
91
83
92
	elog "As of version 2.4, all abiword plugins have been moved"
84
pkg_postrm() {
93
	elog "into a seperate app-office/abiword-plugins package"
85
	gnome2_pkg_postrm
94
	elog "You can install them by running emerge abiword-plugins"
86
87
	alternatives_auto_makesym "/usr/bin/abiword" "/usr/bin/abiword-[0-9].[0-9]"
95
}
88
}

Return to bug 272097