summaryrefslogtreecommitdiff
blob: 21293f58ae2c1d66af39fad591f5bf789039e6ec (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-print/gnome-cups-manager/gnome-cups-manager-0.33-r2.ebuild,v 1.1 2010/08/29 21:21:53 eva Exp $

EAPI="2"
GCONF_DEBUG="no"

inherit autotools eutils gnome2 flag-o-matic

DESCRIPTION="GNOME CUPS Printer Management Interface"
HOMEPAGE="http://www.gnome.org/"

SRC_URI="${SRC_URI}
	mirror://gentoo/${PN}-patches-${PV}-r1.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
IUSE="samba"

# FIXME: samba support is automatic
COMMON=">=x11-libs/gtk+-2.3.1
	>=dev-libs/glib-2.3.1
	>=gnome-base/libgnome-2.14
	>=gnome-base/libgnomeui-2.14
	>=gnome-base/libglade-2
	>=gnome-base/libbonobo-2
	>=net-print/libgnomecups-0.2.3
	gnome-base/gnome-keyring
	samba? ( net-fs/samba[smbclient] )"

RDEPEND="${COMMON}
	x11-libs/gksu"

DEPEND="${COMMON}
	>=dev-util/pkgconfig-0.9
	>=dev-util/intltool-0.35"

DOCS="ChangeLog NEWS README"

pkg_setup() {
	G2CONF="${G2CONF} --disable-static $(use_enable samba)"
}

src_prepare() {
	gnome2_src_prepare

	# Do not add CFLAGS to CPPFLAGS, bug #234028
	epatch "${FILESDIR}/${PN}-0.33-cxxflags-separation.patch"

	# Fix automagic samba support, bug #288392
	epatch "${FILESDIR}/${PN}-0.33-automagic-samba.patch"

	# Apply ubuntu patchset
	rm "${WORKDIR}"/patches/140_all_ui_tooltip.patch || \
		die "removing patch failed"
	export EPATCH_SOURCE="${WORKDIR}/patches" \
		EPATCH_SUFFIX="patch" \
		EPATCH_MULTI_MSG="Applying Ubuntu patches (enhancements) ..."
	epatch

	intltoolize --force --copy --automake || die
	eautoreconf
}

src_install() {
	gnome2_src_install
	# debian-specific.
	rm "${D}"/usr/sbin/gnome-cups-switch
}