View | Details | Raw Unified
Collapse All | Expand All

(-) /var/portage/app-office/abiword/abiword-2.6.8.ebuild (-51 / +44 lines)
 Lines 1-10    Link Here 
# Copyright 1999-2009 Gentoo Foundation
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-office/abiword/abiword-2.6.8.ebuild,v 1.1 2009/03/15 01:00:27 eva Exp $
# $Header: $
EAPI="1"
EAPI="2"
inherit alternatives eutils gnome2 versionator
inherit alternatives autotools gnome2 versionator
MY_MAJORV=$(get_version_component_range 1-2)
MY_MAJORV=$(get_version_component_range 1-2)
 Lines 15-95    Link Here 
LICENSE="GPL-2"
LICENSE="GPL-2"
SLOT="2"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="debug gnome spell xml"
IUSE="debug gnome spell"
# FIXME: gsf could probably be conditional
RDEPEND="sys-libs/zlib
	>=dev-libs/glib-2.16
RDEPEND="dev-libs/popt
	>=x11-libs/gtk+-2.14
	sys-libs/zlib
	>=x11-libs/pango-1.2[X]
	>=dev-libs/glib-2
	>=x11-libs/cairo-1.8[X]
	>=x11-libs/gtk+-2.6
	x11-libs/libXft
	>=x11-libs/pango-1.2
	>=gnome-base/libglade-2
	>=gnome-base/libgnomeprint-2.2
	>=gnome-base/libgnomeprintui-2.2
	>=x11-libs/goffice-0.4:0.4
	>=media-libs/libpng-1.2
	>=media-libs/libpng-1.2
	>=media-libs/fontconfig-2.1
	>=media-libs/fontconfig-2.1
	>=media-libs/freetype-2.1
	>=app-text/wv-1.2
	>=app-text/wv-1.2
	>=dev-libs/fribidi-0.10.4
	>=dev-libs/fribidi-0.10.4
	xml? ( >=dev-libs/libxml2-2.4.10 )
	dev-libs/expat
	!xml? ( dev-libs/expat )
	>=gnome-base/librsvg-2.16
	>=gnome-extra/libgsf-1.14.9
	spell? ( >=app-text/enchant-1.2 )
	spell? ( >=app-text/enchant-1.2 )
	gnome?	(
	gnome? ( >=gnome-extra/gucharmap-2
		>=gnome-base/libbonobo-2
		 >=x11-libs/goffice-0.6:0.6 )"
		>=gnome-base/libgnomeui-2.2
		>=gnome-extra/gucharmap-1.4
		>=gnome-base/gnome-vfs-2.2 )
	>=gnome-extra/libgsf-1.12.0"
DEPEND="${RDEPEND}
DEPEND="${RDEPEND}
		>=dev-util/pkgconfig-0.9"
	>=dev-util/pkgconfig-0.9"
# FIXME: --enable-libabiword fails to compile
pkg_setup() {
pkg_setup() {
	if ! built_with_use --missing true x11-libs/pango X; then
		eerror "You must rebuild x11-libs/pango with USE='X'"
		die "You must rebuild x11-libs/pango with USE='X'"
	fi
	G2CONF="${G2CONF}
	G2CONF="${G2CONF}
		$(use_enable debug)
		$(use_enable debug)
		$(use_enable debug symbols)
		$(use_enable spell)
		$(use_enable gnome gnomeui)
		--enable-print
		$(use_enable gnome gucharmap)
		--with-gio
		$(use_enable gnome gnomevfs)
		--without-gnomevfs
		$(use_enable spell spellcheck)
		$(use_with gnome goffice)
		$(use_with xml libxml2)
		$(use_with gnome gucharmap)
		$(use_with !xml expat)
		--enable-default-plugins"   # include OpenDocument import/export
		--enable-libabiword
		--enable-printing"
}
}
src_install() {
src_prepare() {
	# Install icon to pixmaps, bug #220097
	gnome2_src_prepare
	sed 's:icondir = $(datadir)/icons:icondir = $(datadir)/pixmaps:'	\
		-i GNUmakefile || die "sed 1 failed"
	# change install locations (bug #220097)
	sed 's:desktopdir = @ABIWORD_DATADIR@/applications:desktopdir = $(datadir)/applications:' \
		-i Makefile.am || die "sed 1 failed"
	sed 's:mimedir = @ABIWORD_DATADIR@/mime-info:mimedir = $(datadir)/mime-info:' \
		-i Makefile.am || die "sed 2 failed"
	sed 's:icondir= @ABIWORD_DATADIR@/icons:icondir = $(datadir)/pixmaps:' \
		-i Makefile.am || die "sed 3 failed"
	sed '/readme\.txt\|abw/d' \
		-i user/wp/Makefile.am || die "sed 4 failed"
	eautoreconf
}
src_install() {
	gnome2_src_install
	gnome2_src_install
	sed "s:Exec=abiword:Exec=abiword-${MY_MAJORV}:" \
	sed "s:Exec=abiword:Exec=abiword-${MY_MAJORV}:" \
		-i "${D}"/usr/share/applications/abiword.desktop || die "sed 2 failed"
		-i "${D}"/usr/share/applications/abiword.desktop || die "sed 5 failed"
	mv "${D}/usr/bin/abiword" "${D}/usr/bin/AbiWord-${MY_MAJORV}"
	mv "${D}/usr/bin/abiword" "${D}/usr/bin/AbiWord-${MY_MAJORV}"
	dosym AbiWord-${MY_MAJORV} /usr/bin/abiword-${MY_MAJORV}
	dosym AbiWord-${MY_MAJORV} /usr/bin/abiword-${MY_MAJORV}
	dodoc *.TXT user/wp/readme.txt
	dodoc AUTHORS user/wp/readme.txt
}
}
pkg_postinst() {
pkg_postinst() {
	gnome2_pkg_postinst
	gnome2_pkg_postinst
	alternatives_auto_makesym "/usr/bin/abiword" "/usr/bin/abiword-[0-9].[0-9]"
	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"
pkg_postrm() {
	elog "into a seperate app-office/abiword-plugins package"
	gnome2_pkg_postrm
	elog "You can install them by running emerge abiword-plugins"
	alternatives_auto_makesym "/usr/bin/abiword" "/usr/bin/abiword-[0-9].[0-9]"
}
}