forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-action/towbowl-tactics: port to EAPI 7, games.eclass--
Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
7291245
commit fd2c42c
Showing
2 changed files
with
34 additions
and
23 deletions.
There are no files selected for viewing
10 changes: 4 additions & 6 deletions
10
games-action/towbowl-tactics/files/towbowl-tactics-0.5-gentoo.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 30 additions & 17 deletions
47
...owbowl-tactics/towbowl-tactics-0.5.ebuild → ...owl-tactics/towbowl-tactics-0.5-r1.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,64 @@ | ||
# Copyright 1999-2015 Gentoo Foundation | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=5 | ||
inherit eutils games | ||
EAPI=7 | ||
|
||
inherit desktop edos2unix toolchain-funcs | ||
|
||
DESCRIPTION="Tow Bowl Tactics is a game based on Games Workshop's Blood Bowl" | ||
HOMEPAGE="http://www.towbowltactics.com/index_en.html" | ||
SRC_URI="http://www.towbowltactics.com/download/tbt.${PV}.src.zip" | ||
S="${WORKDIR}"/tbt/src | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="" | ||
|
||
RDEPEND="dev-libs/libxml2 | ||
RDEPEND=" | ||
dev-libs/libxml2 | ||
media-libs/smpeg | ||
media-libs/libsdl[sound,video] | ||
media-libs/sdl-net | ||
media-libs/sdl-image[jpeg,png] | ||
media-libs/sdl-mixer" | ||
DEPEND="${RDEPEND} | ||
app-arch/unzip" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND="app-arch/unzip" | ||
|
||
S=${WORKDIR}/tbt/src | ||
PATCHES=( | ||
"${FILESDIR}"/${P}-gentoo.patch | ||
) | ||
|
||
src_prepare() { | ||
cd .. | ||
cd .. || die | ||
|
||
edos2unix $(find src -type f) config.xml | ||
epatch "${FILESDIR}"/${P}-gentoo.patch | ||
|
||
default | ||
|
||
sed -i \ | ||
-e "/^TBTHOME/ s:/.*:${GAMES_DATADIR}/tbt:" \ | ||
-e "/^TBTHOME/ s:/.*:/usr/share/tbt:" \ | ||
src/Makefile || die | ||
sed -i \ | ||
-e "/tbt.ico/ s:\"\./:TBTHOME \"/:" \ | ||
src/Main.cpp || die | ||
sed -i \ | ||
-e "s:TBTHOME \"/config.xml:\"${GAMES_SYSCONFDIR}/tbt/config.xml:g" \ | ||
-e "s:TBTHOME \"/config.xml:\"/etc/tbt/config.xml:g" \ | ||
src/global.h || die | ||
} | ||
|
||
src_configure() { | ||
tc-export CXX | ||
} | ||
|
||
src_install() { | ||
dogamesbin tbt | ||
dodir "${GAMES_DATADIR}/tbt" | ||
cp -r ../data ../tbt.ico "${D}${GAMES_DATADIR}/tbt" || die | ||
insinto "${GAMES_SYSCONFDIR}/tbt" | ||
dobin tbt | ||
|
||
dodir /usr/share/tbt | ||
cp -r ../data ../tbt.ico "${ED}"/usr/share/tbt || die | ||
|
||
insinto /etc/tbt | ||
doins ../config.xml | ||
|
||
newicon ../data/images/panel/turn.png ${PN}.png | ||
make_desktop_entry tbt "Tow Bowl Tactics" | ||
prepgamesdirs | ||
} |