Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/simutrans/, games-simulation/simutrans/files/
Date: Fri, 30 Jun 2017 13:16:53
Message-Id: 1498828599.cf8b49e07c8f4729742111b899f0cd1b4dbf0716.monsieurp@gentoo
1 commit: cf8b49e07c8f4729742111b899f0cd1b4dbf0716
2 Author: Sergey Alirzaev <zl29ah <AT> gmail <DOT> com>
3 AuthorDate: Wed Jun 7 22:44:53 2017 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 30 13:16:39 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf8b49e0
7
8 games-simulation/simutrans: version bump.
9
10 Closes: https://github.com/gentoo/gentoo/pull/4882
11
12 games-simulation/simutrans/Manifest | 2 +
13 .../files/simutrans-0.120.2.2-Makefile.patch | 89 ++++++++++++++++++++++
14 .../simutrans/simutrans-0.120.2.2.ebuild | 73 ++++++++++++++++++
15 3 files changed, 164 insertions(+)
16
17 diff --git a/games-simulation/simutrans/Manifest b/games-simulation/simutrans/Manifest
18 index 345785e75cf..50f00c64c63 100644
19 --- a/games-simulation/simutrans/Manifest
20 +++ b/games-simulation/simutrans/Manifest
21 @@ -1,5 +1,7 @@
22 DIST language_pack-Base+texts.zip 1097263 SHA256 3d2e637eb6018ccb5da99614dae7fc6ae1bdb0d8db4b2beea85d7e36ea5edf7c SHA512 015caafaeace03bd5475e66c93bb433d9b07b600c3fcf125a4bda9b2856ba41dc43b923e032920df4a060087ead7180df59092f23ab6dcf12579b580827b1248 WHIRLPOOL 679efda1f4bfa0bf71b2f4aa955cee287ee6e9c10d6b3f9070cb799eae5c7acd3651e59f3d8d46688f56ee9781e102e485ab59b6a16a4ee556b18c95b2c35fb3
23 DIST simupak64-120-0-1.zip 4051769 SHA256 02a709dfa4b0c22e0b463ebcbd9684548356de1c61566cff9c127a79990dbb78 SHA512 21badd251b9018bef55531923e23cb1935c3831784fab028febd3879384330e843329499ab08a08e71238fb92bf7db36e18ecbbc4e719a942e427f58fc634afc WHIRLPOOL 5ae84653b5a138b5a987b7ca6512994f3ba8dff48fffbb94f6fe0bf4845d5537e93734f73174eb328f20b6c9986235ae6c461c55b5efde53a4b81620a3b1da83
24 DIST simupak64-120-1-2.zip 4308534 SHA256 125fa5c13a51bb0630ca651fddb8af06a823e8c4d4638bfa1bb2d89e92cc1d54 SHA512 ddc75ad1cafa23d9a7387dc38b14de7414ea7c8bb7caa2afde6d8cdf9c3f5251719966b2274c5bc4ecc9915ec764d517e24b79d5ef199904e3d9185214cba129 WHIRLPOOL 4f91de57be620849f2a278df5510ea390d737a4f063dc659ed2d5f488ce0e631b1c15d6282554574b89316b3b968e4b850db8764b24b714df1a3c5e642e34907
25 +DIST simupak64-120-2.zip 4453079 SHA256 b3ce4fc99468e6a2601a606251f156e554d2d78f2cc5679c0d9a64a5f50561e8 SHA512 c7f819142b66c093c8631fcfe8e70c3be667680d745a66eab65e06979f849592d2c09ed18eb33ca2e359b2830f57874ae23d989ab5aa901eece69de83180f357 WHIRLPOOL 332137593544e88e81f69ab1887a2388df07a8610805d6a77af7760ff42f49c11f55cdb7bc7879aa9840106f41e01b2c090859a2499422cdcb8b82555c5b8049
26 DIST simutrans-src-120-0-1.zip 3909005 SHA256 010a6e3765891e1821364e54f6bcdfb2911b627ffca3acae8350e06e53113683 SHA512 6f32b6f1c12f45125de8a12c4a034387a784e21fd8cdedcf7b1daefd9174d9a94825e8f68effa2ff1436cce2e2bc8cb5707161f3fa004185ae158400840dc450 WHIRLPOOL 36155184f5806a9cfab742f26e3fc78d5d7d928f99cddabbaf36c7c90d065dab02bb174c07d9633958f8b891b0db8cc5c94e45fd4f22d917b9a037c51a99b69a
27 DIST simutrans-src-120-1-3.zip 3447115 SHA256 2d29b849fc39d25a0580091e1377270bddb2cae36c0fc32bd7c2d0f1d7ccfb84 SHA512 ae31dda7bdbd057aaf9c40914eb7ec0c60b21d2790d1ca12aa8db698cd112043a291934f6f460b1d5a8a1984b7defb4a0c4bc9839c81c674834062cc1e49c8bd WHIRLPOOL 273aa58b6e6d7e53a67e092ff5d0a4ef9f00ef3c96bdaf8393a01511c8b655956085f6c94a3f74ab5eeffbe312a4d3d9596a4cfbef57a7053ddd7a1f4d4fbd1d
28 +DIST simutrans-src-120-2-2.zip 3900947 SHA256 7f22c144377abf1a0ee49432f3f6f5eb9a620567960df31d2ea6399b17cf26fa SHA512 db9797be132bb1936d8c3192e536523d1249d20a513f3758037097ef46c2bab40d4be8adb68cb21eda2b4820369e89bd0a6e2abc4fe2bbcefe40bb414a3d1ab2 WHIRLPOOL ebf7496939a79e58983ba81ff15e1f9118ec0d2ba6ca0aae177602505ef78e1d3c9747436cb2bc7653b3fb574934333da802962b048d2efd172000f3c4a05303
29
30 diff --git a/games-simulation/simutrans/files/simutrans-0.120.2.2-Makefile.patch b/games-simulation/simutrans/files/simutrans-0.120.2.2-Makefile.patch
31 new file mode 100644
32 index 00000000000..f9fb48ab682
33 --- /dev/null
34 +++ b/games-simulation/simutrans/files/simutrans-0.120.2.2-Makefile.patch
35 @@ -0,0 +1,89 @@
36 +--- a/Makefile 2017-03-29 12:04:15.000000000 +0300
37 ++++ b/Makefile 2017-06-08 01:41:32.605031258 +0300
38 +@@ -87,8 +87,6 @@
39 + CFLAGS += -minline-all-stringops
40 + endif
41 + endif
42 +-else
43 +- CFLAGS += -O
44 + endif
45 +
46 + ifdef DEBUG
47 +@@ -110,6 +108,7 @@
48 + endif
49 + else
50 + CFLAGS += -DNDEBUG
51 ++ CXXFLAGS += -DNDEBUG
52 + endif
53 +
54 + ifdef MSG_LEVEL
55 +@@ -127,6 +126,7 @@
56 + ifneq ($(MULTI_THREAD),)
57 + ifeq ($(shell expr $(MULTI_THREAD) \>= 1), 1)
58 + CFLAGS += -DMULTI_THREAD
59 ++ CXXFLAGS += -DMULTI_THREAD
60 + ifneq ($(OSTYPE),haiku)
61 + LDFLAGS += -lpthread
62 + endif
63 +@@ -142,11 +142,13 @@
64 + endif
65 + ifneq ($(REV),)
66 + CFLAGS += -DREVISION="$(REV)"
67 ++ CXXFLAGS += -DREVISION="$(REV)"
68 + endif
69 + endif
70 + endif
71 +
72 + CFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS)
73 ++CXXFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(FLAGS)
74 + CCFLAGS += -ansi -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
75 +
76 +
77 +@@ -514,6 +516,7 @@
78 + endif
79 + endif
80 + CFLAGS += $(SDL_CFLAGS)
81 ++ CXXFLAGS += $(SDL_CFLAGS)
82 + LIBS += $(SDL_LDFLAGS)
83 + endif
84 +
85 +@@ -553,6 +556,7 @@
86 + endif
87 + endif
88 + CFLAGS += $(SDL_CFLAGS)
89 ++ CXXFLAGS += $(SDL_CFLAGS)
90 + LIBS += $(SDL_LDFLAGS)
91 + endif
92 +
93 +@@ -568,6 +572,7 @@
94 + SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
95 + endif
96 + CFLAGS += $(SDL_CFLAGS)
97 ++ CXXFLAGS += $(SDL_CFLAGS)
98 + LIBS += $(SDL_LDFLAGS) -lSDL_mixer
99 + endif
100 +
101 +@@ -594,6 +599,7 @@
102 + SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
103 + endif
104 + CFLAGS += $(SDL_CFLAGS)
105 ++ CXXFLAGS += $(SDL_CFLAGS)
106 + LIBS += $(SDL_LDFLAGS) -lglew32
107 + ifeq ($(OSTYPE),mingw)
108 + LIBS += -lopengl32
109 +@@ -609,6 +615,7 @@
110 + endif
111 +
112 + CFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH)
113 ++CXXFLAGS += -DCOLOUR_DEPTH=$(COLOUR_DEPTH)
114 +
115 + ifneq ($(findstring $(OSTYPE), cygwin mingw),)
116 + SOURCES += simres.rc
117 +@@ -616,7 +623,6 @@
118 + endif
119 +
120 + CCFLAGS += $(CFLAGS)
121 +-CXXFLAGS += $(CFLAGS)
122 +
123 + BUILDDIR ?= build/$(CFG)
124 + PROGDIR ?= $(BUILDDIR)
125
126 diff --git a/games-simulation/simutrans/simutrans-0.120.2.2.ebuild b/games-simulation/simutrans/simutrans-0.120.2.2.ebuild
127 new file mode 100644
128 index 00000000000..aab9fb8ef31
129 --- /dev/null
130 +++ b/games-simulation/simutrans/simutrans-0.120.2.2.ebuild
131 @@ -0,0 +1,73 @@
132 +# Copyright 1999-2016 Gentoo Foundation
133 +# Distributed under the terms of the GNU General Public License v2
134 +
135 +EAPI=6
136 +
137 +inherit flag-o-matic eutils
138 +
139 +MY_PV=${PV/0./}
140 +MY_PV=${MY_PV//./-}
141 +SIMUPAK="simupak64-${MY_PV%-[0-9]*}.zip"
142 +
143 +DESCRIPTION="A free Transport Tycoon clone"
144 +HOMEPAGE="http://www.simutrans.com/"
145 +SRC_URI="mirror://sourceforge/simutrans/simutrans-src-${MY_PV}.zip
146 + http://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip
147 + mirror://sourceforge/simutrans/${SIMUPAK}"
148 +
149 +LICENSE="Artistic"
150 +SLOT="0"
151 +KEYWORDS="-* ~amd64 ~x86"
152 +IUSE=""
153 +
154 +RDEPEND="
155 + sys-libs/zlib
156 + app-arch/bzip2
157 + media-libs/sdl-mixer
158 + media-libs/libpng:0
159 + media-libs/libsdl[sound,video]"
160 +
161 +DEPEND="
162 + ${RDEPEND}
163 + app-arch/unzip"
164 +
165 +S=${WORKDIR}
166 +
167 +PATCHES=(
168 + "${FILESDIR}"/${P}-Makefile.patch
169 +)
170 +
171 +src_unpack() {
172 + unpack simutrans-src-${MY_PV}.zip
173 + unpack "${SIMUPAK}"
174 +
175 + # Bundled text files are incomplete, bug #580948
176 + cd "${S}/simutrans/text" || die
177 + unpack language_pack-Base+texts.zip
178 +}
179 +
180 +src_prepare() {
181 + default
182 +
183 + strip-flags # bug #293927
184 + echo "BACKEND=mixer_sdl
185 +COLOUR_DEPTH=16
186 +OSTYPE=linux
187 +VERBOSE=1" > config.default || die
188 +
189 + # make it look in the install location for the data
190 + sed -i \
191 + -e "s:argv\[0\]:\"/usr/share/${PN}/\":" \
192 + simmain.cc || die
193 +
194 + rm -v simutrans/{simutrans,*.txt} || die
195 +}
196 +
197 +src_install() {
198 + newbin build/default/sim ${PN}
199 + insinto /usr/share/${PN}
200 + doins -r simutrans/*
201 + dodoc documentation/*
202 + doicon simutrans.ico
203 + make_desktop_entry simutrans Simutrans /usr/share/pixmaps/simutrans.ico
204 +}