diff options
author | Azamat H. Hackimov <azamat.hackimov@gmail.com> | 2020-03-04 02:11:01 +0300 |
---|---|---|
committer | Azamat H. Hackimov <azamat.hackimov@gmail.com> | 2020-03-04 02:11:01 +0300 |
commit | e6eba1c51e1ad22bc6c5478ff6fa5b3ecaf88831 (patch) | |
tree | 256ae91417c46e9db28631daf407671bb6a48a6c /games-strategy/curseofwar/curseofwar-1.2.0-r1.ebuild | |
parent | games-strategy/uplink: update package (diff) | |
download | gamerlay-e6eba1c51e1ad22bc6c5478ff6fa5b3ecaf88831.tar.gz gamerlay-e6eba1c51e1ad22bc6c5478ff6fa5b3ecaf88831.tar.bz2 gamerlay-e6eba1c51e1ad22bc6c5478ff6fa5b3ecaf88831.zip |
games-strategy/curseofwar: update package
Fixes compilation with curses, minor fixes.
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
Diffstat (limited to 'games-strategy/curseofwar/curseofwar-1.2.0-r1.ebuild')
-rw-r--r-- | games-strategy/curseofwar/curseofwar-1.2.0-r1.ebuild | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/games-strategy/curseofwar/curseofwar-1.2.0-r1.ebuild b/games-strategy/curseofwar/curseofwar-1.2.0-r1.ebuild new file mode 100644 index 0000000..86934a4 --- /dev/null +++ b/games-strategy/curseofwar/curseofwar-1.2.0-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils + +DESCRIPTION="A fast-paced action strategy game implemented using ncurses user interface." +HOMEPAGE="https://github.com/a-nikolaev/curseofwar/wiki" +SRC_URI="https://github.com/a-nikolaev/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ncurses sdl" +REQUIRED_USE="|| ( ncurses sdl )" + +DEPEND="ncurses? ( sys-libs/ncurses:0 ) + sdl? ( media-libs/libsdl )" +RDEPEND="${DEPEND}" + +src_prepare() { + default + sed -i -e "s:%VERSION%:${PV}:g" ${PN}{,-sdl}.6 + sed -i -e "s:/usr/local/share/:/usr/share/:g" path.c + sed -i -e "s:TARGET_LINK_LIBRARIES( curseofwar \${COMMON_LIBS} ncurses ):TARGET_LINK_LIBRARIES( curseofwar \${COMMON_LIBS} ncurses tinfo ):g" CMakeLists.txt + epatch "${FILESDIR}/${P}-fix-gcc-error-compilation.patch" + cmake-utils_src_prepare +} + +src_configure() { + mycmakeargs=( + -DCW_NCURSE_FRONTEND=$(usex ncurses) + -DCW_SDL_FRONTEND=$(usex sdl) + -DCW_SDL_MULTIPLAYER=$(usex sdl) + ) + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + doicon pixmaps/${PN}-32x32.xpm + if use ncurses ; then + dobin "${BUILD_DIR}/${PN}" + make_desktop_entry ${PN} "Curse of War" ${PN}-32x32 "Game;StrategyGame" "Terminal=true" + doman ${PN}.6 + fi + if use sdl ; then + dobin "${BUILD_DIR}/${PN}-sdl" + make_desktop_entry ${PN}-sdl "Curse of War (SDL)" ${PN}-32x32 + doman ${PN}-sdl.6 + insinto "/usr/share/${PN}" + doins -r images + fi + dodoc CHANGELOG README +} |