1 |
commit: 889d7e3184a714baccf98482c79ac1a7124c86c7 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 2 00:34:55 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 2 01:27:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=889d7e31 |
7 |
|
8 |
games-strategy/s25rttr: migrate to lua-single.eclass |
9 |
|
10 |
Lua compatibility as per upstream documentation, build-tested without |
11 |
problems. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/752726 |
14 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
15 |
|
16 |
...5rttr-0.9.0_pre20200723-cmake_lua_version.patch | 11 ++ |
17 |
.../s25rttr/s25rttr-0.9.0_pre20200723-r100.ebuild | 134 +++++++++++++++++++++ |
18 |
profiles/package.mask | 1 + |
19 |
3 files changed, 146 insertions(+) |
20 |
|
21 |
diff --git a/games-strategy/s25rttr/files/s25rttr-0.9.0_pre20200723-cmake_lua_version.patch b/games-strategy/s25rttr/files/s25rttr-0.9.0_pre20200723-cmake_lua_version.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..07c8403ffe4 |
24 |
--- /dev/null |
25 |
+++ b/games-strategy/s25rttr/files/s25rttr-0.9.0_pre20200723-cmake_lua_version.patch |
26 |
@@ -0,0 +1,11 @@ |
27 |
+--- a/libs/libGamedata/CMakeLists.txt |
28 |
++++ b/libs/libGamedata/CMakeLists.txt |
29 |
+@@ -11,7 +11,7 @@ |
30 |
+ FILE(GLOB SOURCES_OTHER *.cpp *.h) |
31 |
+ SOURCE_GROUP(other FILES ${SOURCES_OTHER}) |
32 |
+ |
33 |
+-find_package(Lua 5.1 REQUIRED) |
34 |
++find_package(Lua ${LUA_VERSION} EXACT REQUIRED) |
35 |
+ |
36 |
+ include(GatherDll) |
37 |
+ gather_dll(Lua) |
38 |
|
39 |
diff --git a/games-strategy/s25rttr/s25rttr-0.9.0_pre20200723-r100.ebuild b/games-strategy/s25rttr/s25rttr-0.9.0_pre20200723-r100.ebuild |
40 |
new file mode 100644 |
41 |
index 00000000000..0d955827439 |
42 |
--- /dev/null |
43 |
+++ b/games-strategy/s25rttr/s25rttr-0.9.0_pre20200723-r100.ebuild |
44 |
@@ -0,0 +1,134 @@ |
45 |
+# Copyright 1999-2020 Gentoo Authors |
46 |
+# Distributed under the terms of the GNU General Public License v2 |
47 |
+ |
48 |
+EAPI=7 |
49 |
+ |
50 |
+LUA_COMPAT=( lua5-{1..3} ) |
51 |
+ |
52 |
+inherit desktop flag-o-matic toolchain-funcs xdg cmake |
53 |
+ |
54 |
+DESCRIPTION="Open source remake of The Settlers II: Gold Edition (needs original data files)" |
55 |
+HOMEPAGE="https://www.siedler25.org/" |
56 |
+ |
57 |
+# To generate from git repo: |
58 |
+# echo -e "COMMIT=\"$(git rev-parse HEAD)\"\nSRC_URI=\"\n\thttps://github.com/Return-To-The-Roots/s25client/archive/\${COMMIT}.tar.gz -> s25client-\${COMMIT}.tar.gz" && git submodule --quiet foreach --recursive 'url=$(git remote get-url origin); gh=${url#*github.com[:/]}; gh=${gh%.git}; echo -e "\thttps://github.com/${gh}/archive/${sha1}.tar.gz -> \${PN}-${gh##*/}-${sha1}.tar.gz"' | egrep -v "/(dev-tools|libsamplerate|s25update)/" | sort && echo '"' |
59 |
+COMMIT="f0b97b120140c96bbeacae9c22633f899931db69" |
60 |
+SRC_URI=" |
61 |
+ https://github.com/Return-To-The-Roots/s25client/archive/${COMMIT}.tar.gz -> s25client-${COMMIT}.tar.gz |
62 |
+ https://github.com/mat007/turtle/archive/9dcdcf9061b929a03f188531ea5cbd530b6234ab.tar.gz -> ${PN}-turtle-9dcdcf9061b929a03f188531ea5cbd530b6234ab.tar.gz |
63 |
+ https://github.com/Return-To-The-Roots/languages/archive/6906b7ce9cb64242ba406eda34a404fa8eb1e33d.tar.gz -> ${PN}-languages-6906b7ce9cb64242ba406eda34a404fa8eb1e33d.tar.gz |
64 |
+ https://github.com/Return-To-The-Roots/libendian/archive/dd2c11498f679247530b6b7cf7bd5964f539ddfd.tar.gz -> ${PN}-libendian-dd2c11498f679247530b6b7cf7bd5964f539ddfd.tar.gz |
65 |
+ https://github.com/Return-To-The-Roots/liblobby/archive/9275cbfa2303cc8235e96f275829be0d84efd3a4.tar.gz -> ${PN}-liblobby-9275cbfa2303cc8235e96f275829be0d84efd3a4.tar.gz |
66 |
+ https://github.com/Return-To-The-Roots/libsiedler2/archive/5cb9993a32504337c63fd894266991445e0dcd65.tar.gz -> ${PN}-libsiedler2-5cb9993a32504337c63fd894266991445e0dcd65.tar.gz |
67 |
+ https://github.com/Return-To-The-Roots/libutil/archive/6c2ee0fa897541ea766533e03ebd53344908cf16.tar.gz -> ${PN}-libutil-6c2ee0fa897541ea766533e03ebd53344908cf16.tar.gz |
68 |
+ https://github.com/Return-To-The-Roots/mygettext/archive/b2fc5db651542a7fcc069223904f7debc27ec235.tar.gz -> ${PN}-mygettext-b2fc5db651542a7fcc069223904f7debc27ec235.tar.gz |
69 |
+ https://github.com/Return-To-The-Roots/s25edit/archive/677e4b39eaa7f6ecb701e7b50637a0f05fc691db.tar.gz -> ${PN}-s25edit-677e4b39eaa7f6ecb701e7b50637a0f05fc691db.tar.gz |
70 |
+ https://github.com/Return-To-The-Roots/s25maps/archive/5efbd103b19335828cab6e757224e87456c4a1e4.tar.gz -> ${PN}-s25maps-5efbd103b19335828cab6e757224e87456c4a1e4.tar.gz |
71 |
+ https://github.com/satoren/kaguya/archive/38ca7e1d894c138e454bbe5c89048bdd5091545a.tar.gz -> ${PN}-kaguya-38ca7e1d894c138e454bbe5c89048bdd5091545a.tar.gz |
72 |
+" |
73 |
+ |
74 |
+LICENSE="GPL-2+ GPL-3 Boost-1.0" |
75 |
+SLOT="0" |
76 |
+KEYWORDS="~amd64 ~arm64 ~x86" |
77 |
+IUSE="test" |
78 |
+ |
79 |
+REQUIRED_USE="${LUA_REQUIRED_USE}" |
80 |
+ |
81 |
+RESTRICT="!test? ( test )" |
82 |
+ |
83 |
+RDEPEND="${LUA_DEPS} |
84 |
+ app-arch/bzip2 |
85 |
+ >=dev-libs/boost-1.73:0=[nls] |
86 |
+ >=media-libs/libsamplerate-0.1.9 |
87 |
+ >=media-libs/libsdl2-2.0.10-r2[opengl,sound,video] |
88 |
+ media-libs/libsndfile |
89 |
+ media-libs/sdl2-mixer[vorbis,wav] |
90 |
+ net-libs/miniupnpc |
91 |
+ virtual/opengl |
92 |
+" |
93 |
+ |
94 |
+DEPEND=" |
95 |
+ ${RDEPEND} |
96 |
+ test? ( >=sys-devel/clang-5 ) |
97 |
+" |
98 |
+ |
99 |
+BDEPEND=" |
100 |
+ sys-devel/gettext |
101 |
+ virtual/pkgconfig |
102 |
+" |
103 |
+ |
104 |
+PATCHES=( |
105 |
+ "${FILESDIR}"/${PN}-0.9.0_pre20200723-cmake_lua_version.patch |
106 |
+) |
107 |
+ |
108 |
+S="${WORKDIR}/s25client-${COMMIT}" |
109 |
+ |
110 |
+# Build type is checked but blank is valid. |
111 |
+CMAKE_BUILD_TYPE= |
112 |
+ |
113 |
+src_unpack() { |
114 |
+ default |
115 |
+ |
116 |
+ local SRC DST |
117 |
+ for SRC in */; do |
118 |
+ case "${SRC}" in |
119 |
+ s25client-*) |
120 |
+ continue ;; |
121 |
+ s25maps-*) |
122 |
+ DST=data/RTTR/MAPS ;; |
123 |
+ *) |
124 |
+ DST=${SRC%-*} |
125 |
+ DST=external/${DST,,} ;; |
126 |
+ esac |
127 |
+ |
128 |
+ rmdir "${S}/${DST}" || die |
129 |
+ mv "${SRC}" "${S}/${DST}" || die |
130 |
+ done |
131 |
+} |
132 |
+ |
133 |
+src_configure() { |
134 |
+ local mycmakeargs=( |
135 |
+ -DBUILD_TESTING=$(usex test) |
136 |
+ -DCCACHE_PROGRAM=OFF |
137 |
+ -DCMAKE_SKIP_RPATH=ON |
138 |
+ -DRTTR_BUILD_UPDATER=OFF |
139 |
+ -DRTTR_ENABLE_OPTIMIZATIONS=OFF |
140 |
+ -DRTTR_ENABLE_SANITIZERS=$(usex test) |
141 |
+ -DRTTR_INCLUDE_DEVTOOLS=OFF |
142 |
+ -DRTTR_LIBDIR="$(get_libdir)/${PN}" |
143 |
+ -DRTTR_REVISION="${COMMIT}" |
144 |
+ -DRTTR_USE_SYSTEM_LIBSAMPLERATE=ON |
145 |
+ -DRTTR_VERSION="${PV##*_pre}" # Tests expect a date. |
146 |
+ -DLUA_VERSION=$(lua_get_version) |
147 |
+ ) |
148 |
+ |
149 |
+ if use test && tc-is-gcc; then |
150 |
+ # Work around libasan and libsandbox both wanting to be first. |
151 |
+ append-ldflags -static-libasan |
152 |
+ fi |
153 |
+ |
154 |
+ cmake_src_configure |
155 |
+} |
156 |
+ |
157 |
+src_test() { |
158 |
+ SDL_AUDIODRIVER=dummy \ |
159 |
+ SDL_VIDEODRIVER=dummy \ |
160 |
+ cmake_src_test |
161 |
+} |
162 |
+ |
163 |
+src_install() { |
164 |
+ cmake_src_install |
165 |
+ |
166 |
+ doicon -s 64 tools/release/debian/s25rttr.png |
167 |
+ make_desktop_entry s25client "Return to the Roots" |
168 |
+} |
169 |
+ |
170 |
+pkg_postinst() { |
171 |
+ xdg_pkg_postinst |
172 |
+ |
173 |
+ if ! has_version -r games-strategy/settlers-2-gold-data; then |
174 |
+ elog "Install games-strategy/settlers-2-gold-data or manually copy the DATA" |
175 |
+ elog "and GFX directories from original data files into" |
176 |
+ elog "${EPREFIX}/usr/share/${PN}/S2." |
177 |
+ fi |
178 |
+} |
179 |
|
180 |
diff --git a/profiles/package.mask b/profiles/package.mask |
181 |
index 2500cc9f29f..dddcda54f2c 100644 |
182 |
--- a/profiles/package.mask |
183 |
+++ b/profiles/package.mask |
184 |
@@ -582,6 +582,7 @@ dev-lua/luacrypto |
185 |
>=games-strategy/hedgewars-1.0.0-r100 |
186 |
>=games-strategy/naev-0.7.0-r100 |
187 |
>=games-strategy/openra-20190314-r100 |
188 |
+>=games-strategy/s25rttr-0.9.0_pre20200723-r100 |
189 |
>=games-util/slade-3.1.12a-r100 |
190 |
>=mail-filter/imapfilter-2.6.16-r100 |
191 |
>=media-gfx/geeqie-1.5.1-r1 |