Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-puzzle/xlogical/, games-puzzle/xlogical/files/
Date: Sat, 17 Jul 2021 08:16:30
Message-Id: 1626508728.f419801b327bce7a56f79c4b97c1f4e47141f202.ionen@gentoo
1 commit: f419801b327bce7a56f79c4b97c1f4e47141f202
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 17 02:27:17 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 17 07:58:48 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f419801b
7
8 games-puzzle/xlogical: add 1.0.8, remove alt_gfx, gcc11 fix
9
10 "New" version (from 2006) now uses the alt_gfx pack by default.
11 There's no pack to revert old style (fixes bug #695084).
12
13 Been broken with gcc11 because of "pointer >= 0" (no bug report).
14
15 Also:
16 * added icon
17 * edos2unix removed as it was only used to ease patching
18 * rebased and slightly adjusted gcc4.3 patch due to the above
19 * fixed executable not being gamestat group + relocated score file
20
21 Closes: https://bugs.gentoo.org/695084
22 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
23
24 games-puzzle/xlogical/Manifest | 2 +
25 .../xlogical/files/xlogical-1.0.8-gcc11.patch | 12 +++++
26 .../xlogical/files/xlogical-1.0.8-gcc4.3.patch | 36 +++++++++++++
27 games-puzzle/xlogical/xlogical-1.0.8.ebuild | 61 ++++++++++++++++++++++
28 4 files changed, 111 insertions(+)
29
30 diff --git a/games-puzzle/xlogical/Manifest b/games-puzzle/xlogical/Manifest
31 index 3c5c1d11cb2..ced2bdce6d0 100644
32 --- a/games-puzzle/xlogical/Manifest
33 +++ b/games-puzzle/xlogical/Manifest
34 @@ -1,2 +1,4 @@
35 DIST xlogical-1.0-7.tar.bz2 1853575 BLAKE2B 6f78f92a14313cf65f171b99c28a4377f7685bf73705a91b92fcf370ad1f3555b7aefe99e6004aa32c62cf8b71f2d754d64acadf3bda345cc8cf3e3f91647d02 SHA512 b47aadff91a7d3057fe8657bdda5c16a910f84f6d324bee82f1beba55de7faf6a599231c8d53ed68cc30f9edfe18f57f31dfc9fe06b8e03fa6120905f37c290d
36 +DIST xlogical-1.0-8.tar.bz2 1789699 BLAKE2B 5d33cc7345c43a21bea8e899e36c87ccf57752f8b96aaa52b61a9042f6531adf6944dff9e57684a86a0f759a8e4e24253618fc2c2e3cdd3c70d20a9cb0a27398 SHA512 3cbba38c430b1f2a6786d1d6893249812e75941fd7ab336ca5d111ec526ef61bb7e09d5365dbcaae23f32a336d8ab840c0e343656054d252043c6c7962b39d18
37 +DIST xlogical.png 4477 BLAKE2B 276abddabc3b26c7b9a3322e34079073a517ae1c7477307ff3429739eb3a88f9cc23dc0e3c637cf0a7aed13c9cf5cf12b40cb8858eaa0c67246d5d1bf746dedf SHA512 761953cc61bf1cea1b0d306006b71cabee800c6ea74aae4ed31f2fcf2e5cb9fa672c6c226c5444ab6b0af858a54522dafe0a1eb0351bb0c9f359fa447d0fbfa0
38 DIST xlogical_gfx.zip 347801 BLAKE2B b9c2f963e8ddc5af9fcd7adac691a71c6ee12bc3b3164ce243d076f85c36044b4aa523d27c5dd1480388ff97356ddabd3c7f2c4d223aeeff1a8660fc7c595995 SHA512 14322ae1c8fb7f50513ef47e05372c5dc1ec1b658b33c53477e6b05bbee1de0250b21127891f205d16adc386e7ce37c4b834a62794ee105754b97e49eb5d2a42
39
40 diff --git a/games-puzzle/xlogical/files/xlogical-1.0.8-gcc11.patch b/games-puzzle/xlogical/files/xlogical-1.0.8-gcc11.patch
41 new file mode 100644
42 index 00000000000..f225d41fea0
43 --- /dev/null
44 +++ b/games-puzzle/xlogical/files/xlogical-1.0.8-gcc11.patch
45 @@ -0,0 +1,12 @@
46 +--- a/sdl_audio.cpp
47 ++++ b/sdl_audio.cpp
48 +@@ -60,3 +60,3 @@
49 +
50 +- for( end=aPath+len; end >= 0; end-=1 )
51 ++ for( end=aPath+len; end >= aPath; end-=1 )
52 + {
53 +@@ -64,3 +64,3 @@
54 + }
55 +- for( start=end; start >= 0; start-=1 )
56 ++ for( start=end; start >= aPath; start-=1 )
57 + {
58
59 diff --git a/games-puzzle/xlogical/files/xlogical-1.0.8-gcc4.3.patch b/games-puzzle/xlogical/files/xlogical-1.0.8-gcc4.3.patch
60 new file mode 100644
61 index 00000000000..967754265f4
62 --- /dev/null
63 +++ b/games-puzzle/xlogical/files/xlogical-1.0.8-gcc4.3.patch
64 @@ -0,0 +1,36 @@
65 +--- a/gamelogic.cpp
66 ++++ b/gamelogic.cpp
67 +@@ -27,2 +27,3 @@
68 + #include<cctype>
69 ++#include<cstdlib>
70 +
71 +@@ -156,3 +157,3 @@
72 +
73 +- currentMap = NULL;
74 ++ currentMap = (list< class Clevel_map *>::iterator)NULL;
75 +
76 +--- a/levelmap.cpp
77 ++++ b/levelmap.cpp
78 +@@ -28,2 +28,3 @@
79 + #include <iostream>
80 ++#include <cstdlib>
81 +
82 +--- a/mapedit.cpp
83 ++++ b/mapedit.cpp
84 +@@ -28,2 +28,4 @@
85 + #include<vector>
86 ++#include<cstring>
87 ++#include<cstdlib>
88 +
89 +--- a/modlist.cpp
90 ++++ b/modlist.cpp
91 +@@ -24,2 +24,3 @@
92 + #include <fstream>
93 ++#include <cstdlib>
94 +
95 +--- a/tile_spinner.cpp
96 ++++ b/tile_spinner.cpp
97 +@@ -25,2 +25,3 @@
98 +
99 ++#include <cstdlib>
100 + // Application Includes
101
102 diff --git a/games-puzzle/xlogical/xlogical-1.0.8.ebuild b/games-puzzle/xlogical/xlogical-1.0.8.ebuild
103 new file mode 100644
104 index 00000000000..d0cd804016b
105 --- /dev/null
106 +++ b/games-puzzle/xlogical/xlogical-1.0.8.ebuild
107 @@ -0,0 +1,61 @@
108 +# Copyright 1999-2021 Gentoo Authors
109 +# Distributed under the terms of the GNU General Public License v2
110 +
111 +EAPI=8
112 +
113 +inherit autotools desktop
114 +
115 +MY_P="${PN}-$(ver_rs 2 -)"
116 +
117 +DESCRIPTION="Puzzle game based on the Logical! game released on the Commodore Amiga"
118 +HOMEPAGE="https://changeling.ixionstudios.com/xlogical/"
119 +SRC_URI="
120 + https://changeling.ixionstudios.com/xlogical/downloads/${MY_P}.tar.bz2
121 + https://dev.gentoo.org/~ionen/distfiles/${PN}.png"
122 +S="${WORKDIR}/${MY_P}"
123 +
124 +LICENSE="GPL-2+"
125 +SLOT="0"
126 +KEYWORDS="~amd64 ~x86"
127 +
128 +RDEPEND="
129 + acct-group/gamestat
130 + media-libs/libsdl[sound,video]
131 + media-libs/sdl-image[jpeg]
132 + media-libs/sdl-mixer[mod]"
133 +DEPEND="${RDEPEND}"
134 +
135 +PATCHES=(
136 + "${FILESDIR}"/${P}-gcc4.3.patch
137 + "${FILESDIR}"/${P}-gcc11.patch
138 +)
139 +
140 +src_prepare() {
141 + default
142 +
143 + sed -e "/^CXXFLAGS/d" \
144 + -e "s|@localstatedir@/xlogical|${EPREFIX}/var/games|" \
145 + -i Makefile.am || die
146 +
147 + eautoreconf
148 +}
149 +
150 +src_install() {
151 + dobin ${PN}
152 +
153 + insinto /usr/share/${PN}
154 + doins -r ${PN}.{properties,levels} images music sound
155 + find "${ED}" -name "Makefile*" -delete || die
156 +
157 + insinto /var/games
158 + doins ${PN}.scores
159 +
160 + fowners :gamestat /usr/bin/${PN} /var/games/${PN}.scores
161 + fperms g+s /usr/bin/${PN}
162 + fperms 660 /var/games/${PN}.scores
163 +
164 + einstalldocs
165 +
166 + doicon "${DISTDIR}"/${PN}.png
167 + make_desktop_entry ${PN} "XLogical"
168 +}