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

EAPI=7

inherit toolchain-funcs

DESCRIPTION="A simple pager docklet for the WindowMaker window manager"
HOMEPAGE="https://wmpager.sourceforge.net/"
SRC_URI="mirror://sourceforge/wmpager/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~sparc x86"

RDEPEND="x11-libs/libX11
	x11-libs/libXpm
	x11-libs/libXext"
DEPEND="${RDEPEND}"

src_prepare() {
	default
	sed -i "s:\(WMPAGER_DEFAULT_INSTALL_DIR \).*:\1\"/usr/share/wmpager\":" \
		src/wmpager.c || die

	#Honour Gentoo CC, CFLAGS and LDFLAGS, see bug #337604 and #726286
	sed -i -e "s/-g/\${CFLAGS}/" \
		-e "s/\${LIBS}/\${LIBS} \${LDFLAGS}/" \
		-e "s/gcc/\$(CC)/" \
		src/Makefile || die
}

src_compile() {
	emake CC="$(tc-getCC)"
}

src_install() {
	emake INSTALLDIR="${ED}/usr" install
	rm -rf "${ED}"/usr/man || die
	doman man/man1/*.1x
	dodoc README
}