You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.2 KiB
60 lines
1.2 KiB
5 years ago
|
# Copyright 1999-2019 Gentoo Authors
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
5 years ago
|
EAPI=7
|
||
13 years ago
|
|
||
5 years ago
|
inherit toolchain-funcs
|
||
|
|
||
|
MY_P="${PN}-v${PV}"
|
||
13 years ago
|
DESCRIPTION="An ncurses-based Nibbles clone"
|
||
|
HOMEPAGE="http://www.earth.li/projectpurple/progs/nibbles.html"
|
||
|
SRC_URI="http://www.earth.li/projectpurple/files/${MY_P}.tar.gz"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~ppc64 ~x86 ~x86-fbsd ~x86-linux ~ppc-macos"
|
||
13 years ago
|
IUSE=""
|
||
|
|
||
5 years ago
|
DEPEND="sys-libs/ncurses:0="
|
||
|
RDEPEND="${DEPEND}"
|
||
|
BDEPEND="virtual/pkgconfig"
|
||
|
|
||
|
GAMES_DATADIR="/usr/share"
|
||
|
GAMES_STATEDIR="/var/games/${PN}"
|
||
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}-as-needed.patch
|
||
|
)
|
||
10 years ago
|
|
||
5 years ago
|
S="${WORKDIR}/${MY_P}"
|
||
13 years ago
|
|
||
|
src_prepare() {
|
||
5 years ago
|
default
|
||
|
|
||
13 years ago
|
sed -i \
|
||
|
-e "s#/usr/local/games/nibbles.levels#${GAMES_DATADIR}/${PN}#" \
|
||
10 years ago
|
nibbles.h || die
|
||
13 years ago
|
|
||
|
sed -i \
|
||
|
-e "s#/var/lib/games/nibbles.score#${GAMES_STATEDIR}/nibbles.scores#" \
|
||
10 years ago
|
scoring.h || die
|
||
5 years ago
|
}
|
||
10 years ago
|
|
||
5 years ago
|
src_compile() {
|
||
|
PKGCONFIG="$(tc-getPKG_CONFIG)" emake
|
||
13 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
5 years ago
|
dobin nibbles
|
||
13 years ago
|
|
||
|
insinto "${GAMES_DATADIR}/${PN}"
|
||
10 years ago
|
doins nibbles.levels/*
|
||
13 years ago
|
|
||
|
dodir "${GAMES_STATEDIR}"
|
||
5 years ago
|
touch "${ED}${GAMES_STATEDIR}/nibbles.scores"
|
||
13 years ago
|
|
||
|
dodoc HISTORY CREDITS TODO README
|
||
|
|
||
|
fperms 664 "${GAMES_STATEDIR}/nibbles.scores"
|
||
|
}
|