summaryrefslogtreecommitdiff
blob: ce7497550023057ab76a08b9ef7a9e9c34ce5072 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

WX_GTK_VER="3.0"
inherit wxwidgets

DESCRIPTION="C++ wrapper around the public domain SQLite 3.x database"
HOMEPAGE="http://wxcode.sourceforge.net/components/wxsqlite3/"
SRC_URI="mirror://sourceforge/wxcode/${P}.tar.gz"

LICENSE="wxWinLL-3"
SLOT="0"
KEYWORDS="amd64 x86"

RDEPEND="
	x11-libs/wxGTK:${WX_GTK_VER}[X]
	dev-db/sqlite:3"
DEPEND="${RDEPEND}"

src_prepare() {
	default

	rm -r sqlite3 || die
	cp configure30 configure || die
	sed \
		-e "s:@WXVERSION@:${WX_GTK_VER}:g" \
		-e "s:@LIBDIR@:$(get_libdir):g" \
		-e "s:@VERSION@:${PV}:g" \
		"${FILESDIR}"/${P}.pc.in > ${PN}.pc || die
}

src_configure() {
	setup-wxwidgets
	econf \
		--enable-shared \
		--enable-unicode \
		--with-wx-config="${WX_CONFIG}" \
		--with-wxshared \
		--with-sqlite3-prefix="${ESYSROOT}"/usr
}

src_install() {
	HTML_DOCS=( docs/html/. )
	default

	dodoc Readme.txt
	dodoc -r samples

	insinto /usr/$(get_libdir)/pkgconfig
	doins ${PN}.pc
}