summaryrefslogtreecommitdiff
blob: 3761dc3063e42e2bc22052b4ddee99bc2c00b8da (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit wxwidgets eutils

KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"

DESCRIPTION="wxWidgets GUI for PostgreSQL."
HOMEPAGE="http://www.pgadmin.org/"
SRC_URI="mirror://postgresql/pgadmin3/release/v${PV}/src/${P}.tar.gz"
SLOT="0"
LICENSE="Artistic"
IUSE="debug"

DEPEND="=x11-libs/wxGTK-2.6*
		>=dev-db/libpq-7.4
		>=dev-libs/libxml2-2.5
		>=dev-libs/libxslt-1.1"
RDEPEND="${DEPEND}"

pkg_setup() {
	export WX_GTK_VER=2.6
	export WX_HOME=/usr
	need-wxwidgets unicode
}

src_compile() {
	cd "${S}"

	# pgadmin3 inserts WX_HOME before the WX_CONFIG path below, so we have to strip "/usr" from it
	econf \
		--with-wx-config=${WX_CONFIG/\/usr} \
		$(use_enable debug) \
		|| die "econf failed"
	emake || die "emake failed"
}

src_install() {
	cd "${S}"

	einstall || die "einstall failed"

	insinto /usr/share/pixmaps
	newins "${S}/src/include/images/elephant48.xpm" pgadmin3.xpm

	insinto /usr/share/pgadmin3
	newins "${S}/src/include/images/elephant48.xpm" pgadmin3.xpm

	insinto /usr/share/applications
	doins "${S}/pkg/pgadmin3.desktop"
}