*/*: Bump copyright on files touched this year
[gentoo.git] / sys-apps / dog / dog-1.7-r6.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Dog is better than cat"
9 # the best HOMEPAGE we have.
10 HOMEPAGE="https://packages.gentoo.org/package/sys-apps/dog"
11 SRC_URI="mirror://gentoo/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc64-solaris"
16
17 PATCHES=(
18         "${FILESDIR}"/${P}-check-ctime.diff
19         "${FILESDIR}"/${PV}-manpage-touchup.patch
20         "${FILESDIR}"/${P}-64bit-goodness.patch
21         "${FILESDIR}"/${P}-strfry.patch
22 )
23
24 src_prepare() {
25         default
26
27         if [[ "${CHOST}" == *-solaris* ]]; then
28                 sed -i '/gcc.*-o dog/s/$/ -lsocket -lnsl/' \
29                         Makefile || die "sed Makefile failed"
30         fi
31
32         sed -i \
33                 -e 's,^CFLAGS,#CFLAGS,' \
34                 -e "s,gcc,$(tc-getCC)," \
35                 -e 's:-o dog:$(LDFLAGS) -o dog:g' \
36                 Makefile || die "sed Makefile failed"
37 }
38
39 src_install() {
40         dobin "${PN}"
41         doman "${PN}.1"
42         einstalldocs
43 }