summaryrefslogtreecommitdiff
blob: 1678cbd2494dc7b2da6e97217b6eb5a0ec053a81 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit common-lisp-3

DESCRIPTION="LOCAL-TIME is a development library for manipulating date and time information."
HOMEPAGE="http://common-lisp.net/project/local-time/"
SRC_URI="https://common-lisp.net/project/${PN}/${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="doc postgres"

DEPEND="sys-apps/texinfo
		doc? ( virtual/texi2dvi )"
RDEPEND="sys-libs/timezone-data
		dev-lisp/cl-fad"
PDEPEND="postgres? ( dev-lisp/postmodern )"

install_postgresql_files() {
	common-lisp-install-sources src/integration/cl-postgres.lisp
	common-lisp-install-asdf cl-postgres+local-time.asd
}

src_prepare() {
	epatch "${FILESDIR}"/${PV}-gentoo-use-system-zonedata.patch
}

src_compile() {
	cd doc
	if use doc ; then
		VARTEXFONTS="${T}"/fonts \
			texi2pdf ${PN}.texinfo -o ${PN}.pdf || die "Cannot build PDF docs"
	fi
}

src_install() {
	common-lisp-install-sources src/*.lisp test
	common-lisp-install-asdf local-time.asd local-time.test.asd

	use postgres && install_postgresql_files
	dodoc CREDITS README TODO
	doinfo doc/${PN}.info
	use doc && dodoc doc/${PN}.pdf
}