summaryrefslogtreecommitdiff
blob: 82f5107300be74b2d9f031e356247da4b5941f24 (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/xfce4.eclass,v 1.21 2005/08/22 16:20:30 swegener Exp $
# Author: Brad Cowan <bcowan@gentoo.org>

# Xfce4 Eclass
#
# Eclass to simplify Xfce4 package installation


if [[ ${BZIPPED} = "1" ]];then
	COMPRESS=".tar.bz2"
	ZIP="-bz2"
else
	COMPRESS=".tar.gz"
	ZIP=""
fi

if [[ ${GOODIES_PLUGIN} = "1" ]]; then
	[[ -z ${MY_P} ]] && MY_P="${PN}-plugin-${PV}"
	SRC_URI="http://download.berlios.de/xfce-goodies/${MY_P}${COMPRESS}"
	[[ -z ${HOMEPAGE} ]] && HOMEPAGE="http://xfce-goodies.berlios.de/"
	[[ -z ${XFCE_VERSION} ]] && XFCE_VERSION="4.2.0"
	RDEPEND="${RDEPEND} >=xfce-base/xfce4-panel-${XFCE_VERSION}"
fi

if [[ ${PLUGIN} = "1" ]]; then
	MY_P="${PN}-plugin-${PV}"
	[[ -z ${XFCE_VERSION} ]] && XFCE_VERSION="4.2.0"
	RDEPEND="${RDEPEND} >=xfce-base/xfce4-panel-${XFCE_VERSION}"
fi

if [[ ${GOODIES} = "1" ]]; then
	SRC_URI="http://download.berlios.de/xfce-goodies/${MY_P:-${P}}${COMPRESS}"
	[[ -z ${HOMEPAGE} ]] && HOMEPAGE="http://xfce-goodies.berlios.de/"
fi

[[ -n ${SRC_URI} ]] \
	|| SRC_URI="http://www.xfce.org/archive/xfce-${PV}/src${ZIP}/${P}${COMPRESS}"

[[ ${XFCE_META} = "1" ]] \
	&& SRC_URI=""

[[ -z ${LICENSE} ]] \
	&& LICENSE="GPL-2"

[[ -z ${HOMEPAGE} ]] \
	&& HOMEPAGE="http://www.xfce.org/"

SLOT="0"
IUSE="debug doc"

RDEPEND="virtual/x11
	>=x11-libs/gtk+-2.2
	dev-libs/libxml2
	x11-libs/startup-notification
	>=dev-libs/dbh-1.0.20
	>=x11-themes/gtk-engines-xfce-2.2.5
	${RDEPEND}"
DEPEND="${RDEPEND}
	dev-util/pkgconfig"

[[ -z ${XFCE_S} ]] \
	&& S="${WORKDIR}/${MY_P:-${P}}" \
	|| S="${XFCE_S}"

xfce4_src_compile() {
	if [[ "${DEBUG_OFF}" = "1" ]] && use debug; then
	    XFCE_CONFIG="${XFCE_CONFIG}"
	elif use debug; then
	    XFCE_CONFIG="${XFCE_CONFIG} --enable-debug=yes"
	fi

	if [[ ${XFCE_META} = "1" ]]; then
	    einfo "Meta Build, Nothing to compile."
	else
	    econf ${XFCE_CONFIG} || die

	    if [[ "${SINGLE_MAKE}" = "1" ]]; then
		emake -j1 || die
	    else
		emake || die
	    fi
	fi
}

xfce4_src_install() {
	if [[ ${XFCE_META} = "1" ]]; then
	    einfo "Meta Build, Nothing to install."
	else
	    if [[ "${WANT_EINSTALL}" = "1" ]]; then
		einstall || die
	    else
		make DESTDIR=${D} install || die
	    fi

	    if use doc; then
		dodoc ${XFCE_DOCS} AUTHORS INSTALL README COPYING ChangeLog HACKING NEWS THANKS TODO
	    fi
	fi
}

EXPORT_FUNCTIONS src_compile src_install