diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2021-10-20 22:53:51 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2021-10-20 23:38:19 -0400 |
commit | bfdfce2c5717f2fc7a13713dedf92e3141292ce3 (patch) | |
tree | 8228ff8e535d7bd8504f4fea88dd446c7e1528b6 /games-strategy/tornado/tornado-1.4-r3.ebuild | |
parent | games-strategy/tornado: EAPI8 bump, minor improvements (diff) | |
download | gentoo-bfdfce2c5717f2fc7a13713dedf92e3141292ce3.tar.gz gentoo-bfdfce2c5717f2fc7a13713dedf92e3141292ce3.tar.bz2 gentoo-bfdfce2c5717f2fc7a13713dedf92e3141292ce3.zip |
games-strategy/tornado: simplify patch and support prefix
Manual install rather than a 13kB patch that adds DESTDIR
everywhere and ignored EPREFIX.
Also made nls unconditional as it uses libintl.h either way
(but allowing selection through plocale.eclass).
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-strategy/tornado/tornado-1.4-r3.ebuild')
-rw-r--r-- | games-strategy/tornado/tornado-1.4-r3.ebuild | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/games-strategy/tornado/tornado-1.4-r3.ebuild b/games-strategy/tornado/tornado-1.4-r3.ebuild index 082cbe239409..290d8ba78256 100644 --- a/games-strategy/tornado/tornado-1.4-r3.ebuild +++ b/games-strategy/tornado/tornado-1.4-r3.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit toolchain-funcs +inherit plocale toolchain-funcs DESCRIPTION="Clone of a C64 game - destroy the opponent's house" HOMEPAGE="https://github.com/kouya/tornado" @@ -12,34 +12,53 @@ SRC_URI="https://github.com/kouya/tornado/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2+" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="nls" RDEPEND=" acct-group/gamestat sys-libs/ncurses:= - nls? ( virtual/libintl )" + virtual/libintl" DEPEND="${RDEPEND}" BDEPEND=" virtual/pkgconfig - nls? ( sys-devel/gettext )" + sys-devel/gettext" PATCHES=( - "${FILESDIR}"/${P}-r2-gentoo.patch + "${FILESDIR}"/${P}-make.patch ) -src_configure() { - if ! use nls; then - sed -i \ - -e '/^all:/s|locales||g' \ - -e '/^install:/s|install-locale-data||g' \ - Makefile || die - fi +src_prepare() { + default + + sed -i "/SCOREFILE_NAME/s|/|${EPREFIX}/|" scores.h || die +} +src_compile() { tc-export CC PKG_CONFIG + + emake PREFIX="${EPREFIX}/usr" LOCALEPATH="${EPREFIX}/usr/share/locale" } src_install() { - default + dobin tornado + doman doc/man/tornado.6 + + einstalldocs + + tornado_man() { + doman -i18n=${1} doc/man/${1}/${PN}.6 + } + local PLOCALES="de fr it nl no ru" + plocale_for_each_locale tornado_man + + tornado_loc() { + insinto /usr/share/locale/${1}/LC_MESSAGES + newins po/${1}.mo ${PN}.mo + } + PLOCALES+=" es pt" + plocale_for_each_locale tornado_loc + + insinto /var/games + doins ${PN}.scores fowners :gamestat /usr/bin/${PN} /var/games/${PN}.scores fperms g+s /usr/bin/${PN} |