Lines 1-18
Link Here
|
1 |
# Copyright 1999-2020 Gentoo Authors |
1 |
# Copyright 2020 Gentoo Authors |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
3 |
|
4 |
EAPI=7 |
4 |
EAPI=7 |
5 |
|
5 |
|
6 |
PYTHON_COMPAT=( python3_{7,8} ) |
6 |
PYTHON_COMPAT=( python3_{6,7,8} ) |
|
|
7 |
LUA_COMPAT=( lua5-1 ) |
7 |
|
8 |
|
8 |
inherit desktop cmake python-any-r1 |
9 |
inherit desktop cmake lua-single python-any-r1 xdg |
9 |
|
10 |
|
10 |
MY_PV="build$(ver_cut 2-)" |
11 |
MY_PV="build$(ver_cut 2-)" |
11 |
MY_P="${PN}-${MY_PV/_/-}" |
12 |
MY_P="${PN}-${MY_PV/_/-}" |
12 |
|
13 |
|
13 |
DESCRIPTION="A game similar to Settlers 2" |
14 |
DESCRIPTION="A game similar to Settlers 2" |
14 |
HOMEPAGE="https://www.widelands.org/" |
15 |
HOMEPAGE="https://www.widelands.org/" |
15 |
SRC_URI="https://launchpad.net/widelands/build$(ver_cut 2)/${MY_PV/_/-}/+download/${MY_P}.tar.bz2" |
16 |
SRC_URI="https://launchpad.net/widelands/build$(ver_cut 2)/${MY_PV/_/-}/+download/${MY_P}-source.tar.gz" |
16 |
|
17 |
|
17 |
LICENSE="GPL-2+" |
18 |
LICENSE="GPL-2+" |
18 |
SLOT="0" |
19 |
SLOT="0" |
Lines 41-56
Link Here
|
41 |
|
42 |
|
42 |
S="${WORKDIR}/${MY_P}" |
43 |
S="${WORKDIR}/${MY_P}" |
43 |
|
44 |
|
44 |
PATCHES=( |
|
|
45 |
"${FILESDIR}"/${PN}-0.20_rc1-cxxflags.patch |
46 |
"${FILESDIR}"/${PN}-0.20-glvnd.patch |
47 |
"${FILESDIR}"/${PN}-0.20-boost-1.73.patch |
48 |
) |
49 |
|
50 |
src_prepare() { |
45 |
src_prepare() { |
51 |
cmake_src_prepare |
46 |
cmake_src_prepare |
52 |
|
47 |
|
53 |
sed -i -e 's:__ppc__:__PPC__:' src/map_io/s2map.cc || die |
48 |
sed -i -e 's:__ppc__:__PPC__:' src/map_io/s2map.cc || die |
|
|
49 |
sed -i -e '/GTK_UPDATE_ICON_CACHE/,$d' xdg/CMakeLists.txt || die |
54 |
} |
50 |
} |
55 |
|
51 |
|
56 |
src_configure() { |
52 |
src_configure() { |
Lines 58-64
Link Here
|
58 |
-DOPTION_BUILD_WEBSITE_TOOLS=OFF |
54 |
-DOPTION_BUILD_WEBSITE_TOOLS=OFF |
59 |
|
55 |
|
60 |
# Upstream's cmake files are totally fscked up... |
56 |
# Upstream's cmake files are totally fscked up... |
61 |
-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/share/doc/${PF} |
57 |
-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/${PF} |
62 |
# Game is NOT happy being moved from /usr/share/games |
58 |
# Game is NOT happy being moved from /usr/share/games |
63 |
-DWL_INSTALL_DATADIR="${EPREFIX}"/usr/share/games/${PN} |
59 |
-DWL_INSTALL_DATADIR="${EPREFIX}"/usr/share/games/${PN} |
64 |
) |
60 |
) |
Lines 70-77
Link Here
|
70 |
|
66 |
|
71 |
# move game binary to correct location |
67 |
# move game binary to correct location |
72 |
dodir /usr/bin |
68 |
dodir /usr/bin |
73 |
mv "${ED}"/usr/share/doc/${PF}/${PN} "${ED}"/usr/bin || die |
69 |
mv "${ED}"/usr/${PF}/${PN} "${ED}"/usr/bin || die |
|
|
70 |
mv "${ED}"/usr/${PF}/COPYING "${ED}"/usr/share/doc/${PF}/ || die |
71 |
mv "${ED}"/usr/${PF}/VERSION "${ED}"/usr/share/doc/${PF}/ || die |
72 |
rm "${ED}"/usr/${PF}/ChangeLog || die |
73 |
rm "${ED}"/usr/${PF}/CREDITS || die |
74 |
rmdir "${ED}"/usr/${PF} || die |
74 |
|
75 |
|
75 |
newicon data/images/logos/wl-ico-128.png ${PN}.png |
76 |
newicon data/images/logos/wl-ico-128.png ${PN}.png |
76 |
make_desktop_entry ${PN} ${PN^} |
77 |
make_desktop_entry ${PN} ${PN^} |
77 |
} |
78 |
} |
|
|
79 |
|
80 |
pkg_postinst() { |
81 |
xdg_icon_cache_update |
82 |
} |
83 |
|
84 |
pkg_postrm() { |
85 |
xdg_icon_cache_update |
86 |
} |