1 |
commit: 264ed33695564ee00900e8c6f8ec9fc065e72fe3 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 27 20:42:23 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 28 12:26:12 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=264ed336 |
7 |
|
8 |
games-strategy/freesynd: 0.7.5 version bump, cmake.eclass |
9 |
|
10 |
Package-Manager: Portage-3.0.16, Repoman-3.0.2 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
games-strategy/freesynd/Manifest | 1 + |
14 |
.../freesynd/files/freesynd-0.7.5-cmake.patch | 28 ++++++++ |
15 |
games-strategy/freesynd/freesynd-0.7.5.ebuild | 74 ++++++++++++++++++++++ |
16 |
3 files changed, 103 insertions(+) |
17 |
|
18 |
diff --git a/games-strategy/freesynd/Manifest b/games-strategy/freesynd/Manifest |
19 |
index ec0c30a3ed2..3649211a0f1 100644 |
20 |
--- a/games-strategy/freesynd/Manifest |
21 |
+++ b/games-strategy/freesynd/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST freesynd-0.7.1.tar.gz 2576695 BLAKE2B 11b8f1d25768cdef6cf6894e8141cd13562a133a3253aa5b19034f0c54f114081dd97d41d230c74b5b1aaf66d84ad45d0c09ca5cdc72fb1de00a39ff23ad1272 SHA512 b87e6adaf71206532b4f90cd230ca6be00438fe26f000c5a0bfebf2839fea80d78d98ddc27331a2224874338c3e14ffbfa58b8c5bdbdc53c93bba8d6a9e6b7b4 |
24 |
+DIST freesynd-0.7.5.tar.gz 2622888 BLAKE2B 1fedaa8a4e07c64941f83b0352b84419d61f8ef828cd923947643b9547aa92016bc765b6acc4f8272bf2ca7aafa60bd25c5eaba85a37ab1410c826c0d9d46253 SHA512 70cd28c660c7e000f799746be62dbcdc284a5ab8da8670e5b4f0fca0fdbe265cde1014f08fd6f0ed41fb50188fc1e672c8a4267722715cecaa354f47a8ef746c |
25 |
|
26 |
diff --git a/games-strategy/freesynd/files/freesynd-0.7.5-cmake.patch b/games-strategy/freesynd/files/freesynd-0.7.5-cmake.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..6448271b1f9 |
29 |
--- /dev/null |
30 |
+++ b/games-strategy/freesynd/files/freesynd-0.7.5-cmake.patch |
31 |
@@ -0,0 +1,28 @@ |
32 |
+--- a/CMakeLists.txt |
33 |
++++ b/CMakeLists.txt |
34 |
+@@ -34,6 +34,13 @@ |
35 |
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS}") |
36 |
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS}") |
37 |
+ |
38 |
++option(BUILD_DEV_TOOLS "Build development tools") |
39 |
++option(WITH_DEBUG "Enable debug definitions") |
40 |
++ |
41 |
++if(WITH_DEBUG) |
42 |
++ add_definitions (-D_DEBUG) |
43 |
++endif() |
44 |
++ |
45 |
+ # Set standard definitions for all platforms. |
46 |
+ add_definitions (-DSYSTEM_SDL) |
47 |
+ add_definitions (-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\") |
48 |
+@@ -59,10 +66,7 @@ |
49 |
+ message (FATAL_ERROR "Unable to locate PNG") |
50 |
+ endif () |
51 |
+ |
52 |
+-if (CMAKE_BUILD_TYPE STREQUAL "debug" OR CMAKE_BUILD_TYPE STREQUAL "Debug") |
53 |
+- set (BUILD_DEV_TOOLS TRUE) |
54 |
+-else () |
55 |
+- set (BUILD_DEV_TOOLS FALSE) |
56 |
++if (CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE STREQUAL "debug") |
57 |
+ # We only define an install target if we're doing a release build. |
58 |
+ # Furthermore, on Mac, the data folder is a part of the app bundle. |
59 |
+ if (NOT APPLE) |
60 |
|
61 |
diff --git a/games-strategy/freesynd/freesynd-0.7.5.ebuild b/games-strategy/freesynd/freesynd-0.7.5.ebuild |
62 |
new file mode 100644 |
63 |
index 00000000000..b42449bf582 |
64 |
--- /dev/null |
65 |
+++ b/games-strategy/freesynd/freesynd-0.7.5.ebuild |
66 |
@@ -0,0 +1,74 @@ |
67 |
+# Copyright 1999-2021 Gentoo Authors |
68 |
+# Distributed under the terms of the GNU General Public License v2 |
69 |
+ |
70 |
+EAPI=7 |
71 |
+ |
72 |
+CMAKE_IN_SOURCE_BUILD=1 |
73 |
+inherit cmake desktop xdg-utils readme.gentoo-r1 |
74 |
+ |
75 |
+DESCRIPTION="Portable engine reimplementation for the classic Bullfrog game Syndicate" |
76 |
+HOMEPAGE="https://freesynd.sourceforge.io/" |
77 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
78 |
+ |
79 |
+LICENSE="GPL-3" |
80 |
+SLOT="0" |
81 |
+KEYWORDS="~amd64 ~x86" |
82 |
+IUSE="debug devtools" |
83 |
+ |
84 |
+RDEPEND=" |
85 |
+ media-libs/libogg |
86 |
+ media-libs/libpng:0= |
87 |
+ media-libs/libsdl[X,sound,video] |
88 |
+ media-libs/libvorbis |
89 |
+ media-libs/sdl-mixer[mp3,vorbis] |
90 |
+ media-libs/sdl-image[png] |
91 |
+" |
92 |
+DEPEND="${RDEPEND}" |
93 |
+ |
94 |
+DOCS=( NEWS README INSTALL AUTHORS ) |
95 |
+ |
96 |
+PATCHES=( "${FILESDIR}"/${P}-cmake.patch ) |
97 |
+ |
98 |
+DOC_CONTENTS=" |
99 |
+ You have to set \"data_dir = /my/path/to/synd-data\" |
100 |
+ in \"~/.${PN}/${PN}.ini\". |
101 |
+" |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ cmake_src_prepare |
105 |
+ |
106 |
+ sed -e "s:#freesynd_data_dir = /usr/share/freesynd/data:freesynd_data_dir = /usr/share/${PN}/data:" \ |
107 |
+ -i ${PN}.ini || die |
108 |
+} |
109 |
+ |
110 |
+src_configure() { |
111 |
+ local mycmakeargs=( |
112 |
+ -DWITH_DEBUG=$(usex debug) |
113 |
+ -DBUILD_DEV_TOOLS=$(usex devtools) |
114 |
+ ) |
115 |
+ cmake_src_configure |
116 |
+} |
117 |
+ |
118 |
+src_install() { |
119 |
+ dobin src/${PN} |
120 |
+ use devtools && newbin src/dump ${PN}-dump |
121 |
+ insinto /usr/share/${PN} |
122 |
+ doins -r data |
123 |
+ newicon -s 128 icon/sword.png ${PN}.png |
124 |
+ make_desktop_entry ${PN} |
125 |
+ einstalldocs |
126 |
+ readme.gentoo_create_doc |
127 |
+} |
128 |
+ |
129 |
+pkg_postinst() { |
130 |
+ xdg_icon_cache_update |
131 |
+ if use debug ; then |
132 |
+ ewarn "Debug build is not meant for regular playing," |
133 |
+ ewarn "game speed is higher." |
134 |
+ fi |
135 |
+ readme.gentoo_print_elog |
136 |
+} |
137 |
+ |
138 |
+pkg_postrm() { |
139 |
+ xdg_icon_cache_update |
140 |
+} |