summaryrefslogtreecommitdiff
path: root/www-apps/sblg/sblg-0.6.1.ebuild
blob: 22f8f89f18ca48d5b05857733987040009c6e1a0 (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
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

DESCRIPTION="A utility for creating static blogs"
HOMEPAGE="https://kristaps.bsd.lv/sblg/"
SRC_URI="https://kristaps.bsd.lv/sblg/snapshots/${P}.tar.gz"

LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples"

DEPEND="dev-libs/expat"
RDEPEND="${DEPEND}"

# oconfigure specifically tests for BSD functionality on Linux
QA_CONFIG_IMPL_DECL_SKIP=(
	crypt_newhash
	crypt_checkpass
	warnc
	errc
	getexecname
	getprogname
	memset_s
	pledge
	recallocarray
	strtonum
	TAILQ_FOREACH_SAFE
	timingsafe_bcmp
	timingsafe_memcmp
	unveil
)

src_prepare() {
	default

	sed -ie '/^CFLAGS=/s: -g : :' configure || die
}

src_configure() {
	tc-export CC AR

	./configure \
		PREFIX="${EPREFIX}/usr" \
		MANDIR="${EPREFIX}/usr/share/man" \
		LDFLAGS="${LDFLAGS}" \
		CPPFLAGS="${CPPFLAGS}" \
		LIBDIR="/usr/$(get_libdir)" \
		|| die "./configure failed"
}

src_install() {
	emake DESTDIR="${D}" install

	if ! use examples; then
		rm -rf "${ED}/usr/share/${PN}/examples" || die
	fi
}

src_test() {
	emake regress
}