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

EAPI=7

DESCRIPTION="Minimalistic personal calendar program"
HOMEPAGE="http://www.lightandmatter.com/when/when.html"
SRC_URI="http://www.lightandmatter.com/when/when.tar.gz -> ${P}.tar.gz"

LICENSE="Artistic"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"

DEPEND="dev-lang/perl"
RDEPEND="${DEPEND}"

S="${WORKDIR}/when_dist"

DOCS=( README )

RESTRICT="test"

src_prepare() {
	default

	# Fix path for tests
	sed -i 's,^	when,	./when,' Makefile || die 'sed failed'
}

src_compile() { :; }

src_test() {
	# The when command requires these files, or attempts to run setup function.
	mkdir "${HOME}"/.when || die 'mkdir failed'
	touch "${HOME}"/.when/{calendar,preferences} || die 'touch failed'
	emake test
}

src_install() {
	dobin "${PN}"
	doman "${PN}.1"
	einstalldocs
}