1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7,8} )
8 inherit desktop cmake python-any-r1
10 MY_PV="build$(ver_cut 2-)"
11 MY_P="${PN}-${MY_PV/_/-}"
13 DESCRIPTION="A game similar to Settlers 2"
14 HOMEPAGE="http://www.widelands.org/"
15 SRC_URI="https://launchpad.net/widelands/build$(ver_cut 2)/${MY_PV/_/-}/+download/${MY_P}.tar.bz2"
19 KEYWORDS="~amd64 ~x86"
23 >=dev-libs/boost-1.48:=
28 media-libs/libsdl2[video]
29 media-libs/sdl2-image[jpeg,png]
30 media-libs/sdl2-mixer[vorbis]
32 sys-libs/zlib:=[minizip]"
41 CMAKE_BUILD_TYPE="Release"
43 S="${WORKDIR}/${MY_P}"
46 "${FILESDIR}/${PN}-0.20_rc1-cxxflags.patch"
47 "${FILESDIR}/${PN}-0.20-glvnd.patch"
53 sed -i -e 's:__ppc__:__PPC__:' src/map_io/s2map.cc || die
58 -DOPTION_BUILD_WEBSITE_TOOLS=OFF
60 # Upstream's cmake files are totally fscked up...
61 -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/share/doc/${PF}
62 # Game is NOT happy being moved from /usr/share/games
63 -DWL_INSTALL_DATADIR="${EPREFIX}"/usr/share/games/${PN}
71 # move game binary to correct location
73 mv "${ED}"/usr/share/doc/${PF}/${PN} "${ED}"/usr/bin || die
75 newicon data/images/logos/wl-ico-128.png ${PN}.png
76 make_desktop_entry ${PN} ${PN^}