summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2020-08-22 19:54:22 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-08-22 19:56:06 +0100
commit5d2f78d167fffec5220f4df32464501eaefecf03 (patch)
tree58fcae17ae4d06210563023c6304f0e1c225216d /games-arcade/opentyrian
parentgames-arcade/opentyrian: remove old (diff)
downloadgentoo-5d2f78d167fffec5220f4df32464501eaefecf03.tar.gz
gentoo-5d2f78d167fffec5220f4df32464501eaefecf03.tar.bz2
gentoo-5d2f78d167fffec5220f4df32464501eaefecf03.zip
games-arcade/opentyrian: More miscellaneous improvements
* Depend on libsdl[video] * Delete Windows files earlier * Respect CC * Support prefix * Simplify symlink * Remove unneeded die * Clean up icon handling Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-arcade/opentyrian')
-rw-r--r--games-arcade/opentyrian/opentyrian-2.1.20130907-r2.ebuild32
1 files changed, 20 insertions, 12 deletions
diff --git a/games-arcade/opentyrian/opentyrian-2.1.20130907-r2.ebuild b/games-arcade/opentyrian/opentyrian-2.1.20130907-r2.ebuild
index fb021768080b..74fce946ff85 100644
--- a/games-arcade/opentyrian/opentyrian-2.1.20130907-r2.ebuild
+++ b/games-arcade/opentyrian/opentyrian-2.1.20130907-r2.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit desktop xdg-utils
+inherit desktop toolchain-funcs xdg-utils
DESCRIPTION="Open-source port of the DOS game Tyrian, vertical scrolling shooter"
HOMEPAGE="https://github.com/opentyrian/opentyrian"
@@ -14,7 +14,7 @@ LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-DEPEND="media-libs/libsdl
+DEPEND="media-libs/libsdl[video]
media-libs/sdl-net"
RDEPEND="${DEPEND}"
BDEPEND="app-arch/unzip"
@@ -25,24 +25,32 @@ PATCHES=(
"${FILESDIR}/${PV}-gcc10.patch"
)
+src_prepare() {
+ default
+ rm "${WORKDIR}"/tyrian21/{*.exe,dpmi16bi.ovl,loudness.awe} || die "Failed to remove win32 binaries"
+}
+
src_compile() {
- emake DATA_PATH="/usr/share/${PN}"
+ emake \
+ CC="$(tc-getCC)" \
+ DATA_PATH="${EPREFIX}/usr/share/${PN}"
}
src_install() {
dobin opentyrian
- dosym ../../usr/bin/opentyrian /usr/bin/tyrian
+ dosym opentyrian /usr/bin/tyrian
dodoc CREDITS NEWS README
- domenu linux/opentyrian.desktop || die "Failed to install desktop file"
+ domenu linux/opentyrian.desktop
+
+ local size
for i in linux/icons/*.png ; do
- local size=`echo ${i} | sed -e 's:.*-\([0-9]\+\).png:\1:'`
- insinto /usr/share/icons/hicolor/${size}x${size}/apps
- newins ${i} opentyrian.png
+ size=${i%.png}
+ size=${size##*-}
+ newicon -s "${size}" "${i}" opentyrian.png
done
- insinto "/usr/share/${PN}"
- cd "${WORKDIR}/tyrian21"
- rm *.exe dpmi16bi.ovl loudness.awe || die "Failed to remove win32 binaries"
- doins *
+
+ insinto /usr/share/"${PN}"
+ doins "${WORKDIR}"/tyrian21/*
}
pkg_postinst() {