games-simulation/micropolis: add 1.0_p20250628

Update to EAPI 8.
Various upstream fixes for modern gcc/clang, our clang patch is
obsolete.

Closes: https://bugs.gentoo.org/944444
Signed-off-by: Hanno Böck <hanno@gentoo.org>
This commit is contained in:
Hanno Böck
2025-07-04 09:51:17 +02:00
parent 8ef7bc36fb
commit 7e5a636eaa
2 changed files with 62 additions and 0 deletions

View File

@@ -1,2 +1,3 @@
DIST micropolis-176c45720f3b9e5555fe1084d3e6ea59488c1785.tar.bz2 4110965 BLAKE2B 38f7ae9e91c862460faf7417dac7e3a9eabf51f3e4ba0c804c47c1190fba8c74cc31c9cd9d6132f01af4fbc1b6df47c1ed9fa16b439267bd7293ee8048193b9d SHA512 8ef1ed48efacd0803a6cb4055e9c2ac6f1bd051beef73360cc3ae4d8f4b8d9824730ca6a1f989534d83f4961b2e249a8fb3cb4eb7138e9bd765325f9a2ebb98e
DIST micropolis-6f873e16d6a1a8f6f59c1e5a75ec5f52ce5c89b6.tar.bz2 6725237 BLAKE2B 0ab99ecc3e418f6df3e35aacfd99c1077aeab877ab446d788b42c8ebc95a704e37ba3cdf8fa2d1a54ad182da08f18a15dfc6baeacdf5a6216054fe6b5a162b37 SHA512 ae399d530b9ddbf5da76d6b6b2bec9b9156e0941e7106cc5b393f4758891fdce4b6b5e25fbf0ecddc4d02f346a4b03bfe9bf91e60bea7d667c1005df9f53b5db
DIST micropolis-cc31822e4ebe54c0109623ac0c5cdf0e3acad755.tar.bz2 6725746 BLAKE2B a916389a1ccf63e1a13b5b6ea533939fdb14d814480c9e528c8b1bb89cbefbbad9ad067821c1de199f337692e226d35b3219354dc32612486d013cc20f21c5bc SHA512 1b5f644f6d7d7cb78965d0e0edcfcc0bdab7a103dd5dc3ce97a0048da9fa29d8757063d6681febab3d03182433cfe8a7bf1b8145a21e067a4c754af3b5af8e00

View File

@@ -0,0 +1,61 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop flag-o-matic toolchain-funcs wrapper
COMMIT="176c45720f3b9e5555fe1084d3e6ea59488c1785"
DESCRIPTION="Free version of the well-known city building simulation"
HOMEPAGE="https://www.donhopkins.com/home/micropolis/"
SRC_URI="https://gitlab.com/stargo/micropolis/-/archive/${COMMIT}/micropolis-${COMMIT}.tar.bz2"
S="${WORKDIR}/${PN}-${COMMIT}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="
media-libs/libsdl
media-libs/sdl-mixer
x11-libs/libX11
x11-libs/libXpm"
DEPEND="${RDEPEND}"
BDEPEND="app-alternatives/yacc"
# parallel build is broken
MAKEOPTS="-j1"
src_prepare() {
default
# -Werror=strict-aliasing
# https://bugs.gentoo.org/859223
# https://gitlab.com/stargo/micropolis/-/issues/1
#
# Do not trust with LTO either.
append-flags -fno-strict-aliasing
filter-lto
sed -i -e "s|-O3|${CFLAGS}|" \
src/tclx/config.mk src/{sim,tcl,tk}/makefile || die
sed -i -e "s|XLDFLAGS=|&${LDFLAGS}|" \
src/tclx/config.mk || die
}
src_compile() {
emake -C src LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)"
}
src_install() {
local dir=/usr/share/${PN}
exeinto "${dir}/res"
doexe src/sim/sim
insinto "${dir}"
doins -r activity cities images manual res
make_wrapper micropolis res/sim "${dir}"
doicon Micropolis.png
make_desktop_entry micropolis "Micropolis" Micropolis
}