summaryrefslogtreecommitdiff
blob: fab5ef11985ecf0b2a1509e53f5f5e0f9eb31cb2 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/swl/swl-0.4.0_rc5-r2.ebuild,v 1.2 2005/08/03 01:38:36 trapni Exp $

inherit flag-o-matic multilib

DESCRIPTION="SWL is a C++ cross platform library."
HOMEPAGE="http://battousai.mylair.de/yacs/"
SRC_URI="http://battousai.mylair.de/dist/yacs/yacs-${PV}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0.6"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc multislot"

RDEPEND=">=dev-libs/swl-0.5.0_pre20070201
		 >=dev-libs/libyacsutil-${PV}"

DEPEND="${RDEPEND}
		doc? ( >=app-doc/doxygen-1.3.9.1 )"

BASE_DIR=${BASE_DIR:-/usr}

S="${WORKDIR}/yacs-${PV}"

src_compile() {
	use debug && append-flags -O0 -g3
	use debug || append-flags -DNDEBUG=1

	useq multislot && [[ $BASE_DIR = "/usr" ]] && BASE_DIR="${BASE_DIR}/yacs/${SLOT}"

	einfo "Configuring for prefix ${BASE_DIR} ..."

	./autogen.sh || die "autogen.sh failed"

	./configure \
		--prefix="${BASE_DIR}" \
		--host="${CHOST}" \
		--libdir="${BASE_DIR}/$(get_libdir)" \
		--without-libyacsutil \
		--without-server \
		--with-libyacsclient \
		|| die "./configure for ABI ${ABI} failed"

	cd clients/${PN} || die

	emake || die "make for ABI ${ABI} failed"

	if use doc; then
		#ewarn "TODO: generate docs {html,man} via doxygen"
		#make -C doc api-docs
		# XXX: install example/test files?
		true
	fi
}

src_install() {
	cd clients/${PN} || die

	make install DESTDIR="${D}" || die

	if use doc; then
		#ewarn "TODO: install man-pages and html version via doxygen"
		#dodoc -r doc/html
		true
	fi

	dodoc AUTHORS ChangeLog* NEWS README* TODO
}

# vim:ai:noet:ts=4:nowrap