--- /var/db/repos/gentoo/games-strategy/widelands/widelands-0.20-r1.ebuild 2021-01-31 01:43:04.000000000 +0100 +++ widelands-0.21-r101.ebuild 2021-02-01 17:18:08.188740826 +0100 @@ -1,18 +1,19 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7,8} ) +PYTHON_COMPAT=( python3_{6,7,8} ) +LUA_COMPAT=( lua5-1 ) -inherit desktop cmake python-any-r1 +inherit desktop cmake lua-single python-any-r1 xdg MY_PV="build$(ver_cut 2-)" MY_P="${PN}-${MY_PV/_/-}" DESCRIPTION="A game similar to Settlers 2" HOMEPAGE="https://www.widelands.org/" -SRC_URI="https://launchpad.net/widelands/build$(ver_cut 2)/${MY_PV/_/-}/+download/${MY_P}.tar.bz2" +SRC_URI="https://launchpad.net/widelands/build$(ver_cut 2)/${MY_PV/_/-}/+download/${MY_P}-source.tar.gz" LICENSE="GPL-2+" SLOT="0" @@ -41,16 +42,11 @@ S="${WORKDIR}/${MY_P}" -PATCHES=( - "${FILESDIR}"/${PN}-0.20_rc1-cxxflags.patch - "${FILESDIR}"/${PN}-0.20-glvnd.patch - "${FILESDIR}"/${PN}-0.20-boost-1.73.patch -) - src_prepare() { cmake_src_prepare sed -i -e 's:__ppc__:__PPC__:' src/map_io/s2map.cc || die + sed -i -e '/GTK_UPDATE_ICON_CACHE/,$d' xdg/CMakeLists.txt || die } src_configure() { @@ -58,7 +54,7 @@ -DOPTION_BUILD_WEBSITE_TOOLS=OFF # Upstream's cmake files are totally fscked up... - -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/share/doc/${PF} + -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/${PF} # Game is NOT happy being moved from /usr/share/games -DWL_INSTALL_DATADIR="${EPREFIX}"/usr/share/games/${PN} ) @@ -70,8 +66,21 @@ # move game binary to correct location dodir /usr/bin - mv "${ED}"/usr/share/doc/${PF}/${PN} "${ED}"/usr/bin || die + mv "${ED}"/usr/${PF}/${PN} "${ED}"/usr/bin || die + mv "${ED}"/usr/${PF}/COPYING "${ED}"/usr/share/doc/${PF}/ || die + mv "${ED}"/usr/${PF}/VERSION "${ED}"/usr/share/doc/${PF}/ || die + rm "${ED}"/usr/${PF}/ChangeLog || die + rm "${ED}"/usr/${PF}/CREDITS || die + rmdir "${ED}"/usr/${PF} || die newicon data/images/logos/wl-ico-128.png ${PN}.png make_desktop_entry ${PN} ${PN^} } + +pkg_postinst() { + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_icon_cache_update +}