summaryrefslogtreecommitdiff
path: root/games-arcade/amphetamine
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-24 15:52:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-24 15:52:10 +0100
commit145ac95c683ecda55a9b2cafc84dced2e9c29e03 (patch)
tree3a7aac2c145afe328a1c610a9ee6d7f5b9fd271d /games-arcade/amphetamine
parentbb17db5f98333b3c74b4194d1c1136144f693add (diff)
gentoo auto-resync : 24:10:2022 - 15:52:09
Diffstat (limited to 'games-arcade/amphetamine')
-rw-r--r--games-arcade/amphetamine/Manifest6
-rw-r--r--games-arcade/amphetamine/amphetamine-0.8.10-r2.ebuild59
-rw-r--r--games-arcade/amphetamine/files/amphetamine-0.8.10-SDL-conversions.patch22
-rw-r--r--games-arcade/amphetamine/files/amphetamine-0.8.10-clang.patch18
-rw-r--r--games-arcade/amphetamine/files/amphetamine-0.8.10-format-string.patch11
5 files changed, 116 insertions, 0 deletions
diff --git a/games-arcade/amphetamine/Manifest b/games-arcade/amphetamine/Manifest
index 27622fdb3cd6..be56f7ca95ac 100644
--- a/games-arcade/amphetamine/Manifest
+++ b/games-arcade/amphetamine/Manifest
@@ -1,10 +1,16 @@
AUX amphetamine-0.8.10-64bit.patch 2708 BLAKE2B 6abc82e1758000b1fbb3e930f51873026a9e6ab0c1558b2f793a9fad75d240b5c31fec6d69f7144a9c3a91eca809fca6860fdb72a1211b8aefd0d4d64480774a SHA512 8216a5b59c52488f35416295256087771c82e8996787e74d03d416829b628267d17b47cc5f6d7bae2ff87b442bdb38aec4f78f14cd130fb045f5c8272f6b4c9d
+AUX amphetamine-0.8.10-SDL-conversions.patch 926 BLAKE2B ac8bf1d9f5af967e08d595200160c3931469856d4f919e9a3b0ce965c2c1d874abdb7348ce073815e62c4f6266536827e2670e222e29f66588068b2a9e509a95 SHA512 a458dab9fb0182afb077cbe89d805d4ee87202c0ab75c2da66a6af70554e10e08a85f6954f645d70b55f3e0c43f193349e12d735f530ca8ae78c68b73dc94e91
AUX amphetamine-0.8.10-bugs.patch 1821 BLAKE2B 3b0870cecaa55879da3d5107e2c23d7c972e49b1289519b2107fa0da48376c562364b8d4c632812dd20a80e4e6a02fc9ddd157aa8e104a3a8e097f238c422ae9 SHA512 30cc93031152e3f244a30cb56430b451ddfb8ccfddde0fc6cd681cbc6bf0ffb4d4801df642b5330fc1462d68cb0fc3e8d8f97f7e4dc87925b5335f5b1707ff8e
AUX amphetamine-0.8.10-build.patch 700 BLAKE2B d63c5a73f065f181a6673feb3d90e852e85befb51446ac003eca6ea6076caa36cbd911ac0e33064b5aa549c9ffee8264c5a31a34bfa7ecc659f8c07687d12130 SHA512 c79c133bb6acfc666e557e09b0ca3b556203331d167b5266217a19880b5af2101776b651a420a81b53fc4fbf790de221d0b758979955632230226581dfa30ced
+AUX amphetamine-0.8.10-clang.patch 485 BLAKE2B 2831c1c9b04fc86c17a2625c03f4d674690532c138d9c7bc076fb19c901b5ea5ea0ff635984fd94323fb072d465dd3e4b7b5125012abb50f836a91bd3a8a102e SHA512 8f12fe93fc14332eb5da4e0d85cba2a879e40a9d72ed6294300cdc58add4167acbba8e28bd68b179e7b8beda9cdaa58e1d9a35d9426a9ca7b8b4270e74a471d9
+AUX amphetamine-0.8.10-format-string.patch 462 BLAKE2B 2ffe4d83cc27511f61379e4e27fb76ac4ccc93d72f8d2b3fae5e6d35eac1392f988ab120977ebd895b7a169db9634dc91233b975110be61acc0fbe8500ac488b SHA512 b240ad18befbfaa03a449718f2327c3f428ddb46b93aed592ab004d842db692f22d1ddc95e1895a8d4268367c8d78d5564fd8e11514f9482de80787e9529c327
AUX amphetamine-0.8.10-missing-headers.patch 457 BLAKE2B 00c50c928487ff0e8fc4bf1c707d77b6ab28b064a9682e1d7f086e6b0555868c662dd68d5b474dca6346a23eb9bc91620b3f92ce18a6e7f0be597c14b41e0c5d SHA512 1f95ac463f600b0e3812afba10682657cdd8b95dd1e77f6a2fb93af7dab60fcb85c85e60613ee4c93421faf7492ca4663d2c94bc96172c52913effe63d259523
AUX amphetamine-0.8.10-newline.patch 11906 BLAKE2B bf505f9f51d800b6b99b4a80d9c8cd30a91c97262e7984f371be16044328475ba5905145297019bc411c5c1394a81ee2c3cc3f753af46254cf4269f8e21449fe SHA512 9bb6e300f5c17a4ae2502162c3a7940a9574fcd6c09274454a6170c5b0cfdfdf3e4668d9c6e7876f7ea48119c94e098aef605836c866f8a475d81a15129d28b1
AUX amphetamine-0.8.10-no-lxt.patch 504 BLAKE2B ab06ee2b2209b293d0a126127c5d0cbc0d51081295d9c53d4805cd386027cd77b94a8c8153c64da6bbf6d4bcf88c0cd79a4730d04d06be4785478ec5b39b8d7b SHA512 6c96aa314cc63de4b3472bfff6e0d0d25407f4f8e8a0974df5d20af9dc44fd95a70974cec3174c642ca01be70223c1a1eaea5d300d2026a35805e03e65028207
DIST amphetamine-0.8.10.tar.bz2 72324 BLAKE2B 39d8f56066e7fbad853198be28375dfe7ee766d7c493a6faf0e2fa321ee2d2d757f5f294418208ac97a440d58bae03d40de2615e421bb8e9fad7a8ba5220d354 SHA512 eb3106df6070e207ffb3293ac4701bba8222603c0e399667505bad29b6f6433dc9ec008499b5180f713a724d3b686fead15536a20927195bc57780be16a860ef
DIST amphetamine-data-0.8.6.tar.bz2 928775 BLAKE2B 078de623c719ebaedae3137fe3876ecd7ba02ad7ec44a64b7775fd173a42b399d137a3862d3fe426780a234638b0876a1f0fc5a06d6ab8f4b3c4ca66df367a49 SHA512 0feb86f420b4816064594756bb30bb6e02ae5062f03ef175b3262a8f30043340933f6f1b1894e2b2cfad70befc76d3ed1e0d2777c2dc2f7461459e8a93efeaf1
+DIST amphetamine-data_0.8.7.orig.tar.gz 955993 BLAKE2B ad14f36ac1d41b9c4ce7dccb9676a562b07400e2d3bf4303e6fbc18fa385453891da35bdcbbf73331989a65379a68329752b0d550951430c2777a3174db8df8f SHA512 623f5c4d02157f55188f4f7f0ea743b613ac846f56fa80c7b875488384341cb6737beecd2ea2322219ff2ff306e1588350e80bf3bcbd0891a3ce0fd514f142e7
+DIST amphetamine.png 95279 BLAKE2B 6403bb35883ce62f672ee3a3859eb580784c8fd5b068a116c6e3606be27893288205011cba5e9b83f2989d7471a65c13789e44acf5905fdf23402bf065f92c31 SHA512 c7698973e0d656187bebb070a1a76669d71d0025b5dc1e53adf221d934db5aac926897b52db257435168d74b622ed83d6fa6938984ec06682fbd9bd08f64521c
EBUILD amphetamine-0.8.10-r1.ebuild 1004 BLAKE2B 11e7a7116ab5a30316a1257f83f4d61cfe972b588e796cb66fe17cdcd5f10a90bfa156dbadc640231813fdb18a1c88d981e2363b4e578806f15efcddee2fec19 SHA512 837a2dabcbfffee5014d88dc541909e44442ed63645b039974b91d19ba93d2c3e3824fb58219a0965753232be309064073601c3e810db85ce470f4f5b454848e
+EBUILD amphetamine-0.8.10-r2.ebuild 1236 BLAKE2B 38dd858e06b7261d05f872bca23f033a8e85dbb8dcb4b7663f28bad6fdea672a8256c57ffa1c38d5bf50914aa7de98b1892690bd2d8d145bb65848b27a1ca168 SHA512 156c108bb2d5f7a9202b8ceead2405115dd1bec1a5c8d4df20860caef3ec7e6d9e955040266372f4c6a45dc3eb4597f8c1ce67c4328fe7b3acd84ad645a1f262
MISC metadata.xml 250 BLAKE2B 8d44bd4c6e7d6491273e2015e36ddac74af7b94a124fd240ff030e16430f5c85e53ab812f0e3e94bb2e6d138f39b512bbe01ff98b0081cacc21a02d648ec7643 SHA512 80ac07a3cac10ad2e72e9989a130b7d2073934fe92914a9db2af4d0e769d4bf537770f8faba0654bbd64a7e85ee38cf1f9d03b4b9cd322864b1b2bb35087d610
diff --git a/games-arcade/amphetamine/amphetamine-0.8.10-r2.ebuild b/games-arcade/amphetamine/amphetamine-0.8.10-r2.ebuild
new file mode 100644
index 000000000000..ac1c0dde9fb1
--- /dev/null
+++ b/games-arcade/amphetamine/amphetamine-0.8.10-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit desktop
+
+DESCRIPTION="A cool Jump'n Run game offering some unique visual effects"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="
+ mirror://gentoo/${P}.tar.bz2
+ mirror://debian/pool/main/a/amphetamine-data/amphetamine-data_0.8.7.orig.tar.gz
+ https://dev.gentoo.org/~pacho/${PN}/${PN}.png
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ media-libs/libsdl[sound,video]
+ x11-libs/libXpm
+"
+DEPEND="${RDEPEND}"
+BDEPEND=""
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-64bit.patch
+
+ # From Debian:
+ "${FILESDIR}"/${P}-no-lxt.patch
+ "${FILESDIR}"/${P}-bugs.patch
+ "${FILESDIR}"/${P}-missing-headers.patch
+ "${FILESDIR}"/${P}-newline.patch
+ "${FILESDIR}"/${P}-format-string.patch
+
+ # From OpenBSD:
+ "${FILESDIR}"/${P}-SDL-conversions.patch
+ "${FILESDIR}"/${P}-clang.patch
+)
+
+src_prepare() {
+ default
+ sed -i -e '55d' src/ObjInfo.cpp || die
+}
+
+src_compile() {
+ emake INSTALL_DIR=/usr/share/${PN}
+}
+
+src_install() {
+ newbin amph ${PN}
+ insinto /usr/share/${PN}
+ doins -r ../amph/*
+ doicon "${DISTDIR}/${PN}.png"
+ make_desktop_entry ${PN} Amphetamine ${PN}
+ einstalldocs
+}
diff --git a/games-arcade/amphetamine/files/amphetamine-0.8.10-SDL-conversions.patch b/games-arcade/amphetamine/files/amphetamine-0.8.10-SDL-conversions.patch
new file mode 100644
index 000000000000..7182eb7acfd0
--- /dev/null
+++ b/games-arcade/amphetamine/files/amphetamine-0.8.10-SDL-conversions.patch
@@ -0,0 +1,22 @@
+--- a/src/SndSys.cpp.orig Sun Mar 24 00:49:09 2002
++++ b/src/SndSys.cpp Sat Jan 24 04:52:38 2009
+@@ -16,7 +16,7 @@ void Mix_Audio(void *udata, Uint8 *stream, int len)
+
+ int InitializeSoundSystem()
+ {
+- SDL_AudioSpec wanted, obtained;
++ SDL_AudioSpec wanted;
+
+ /* Set the audio format */
+ // Not all sounds are of the same sampling rate which is why
+@@ -28,8 +28,8 @@ int InitializeSoundSystem()
+ wanted.callback = Mix_Audio;
+ wanted.userdata = NULL;
+
+- /* Open the audio device, forcing the desired format */
+- if ( SDL_OpenAudio(&wanted, &obtained) < 0 ) {
++ /* Open the audio device, allowing SDL to apply conversions */
++ if ( SDL_OpenAudio(&wanted, NULL) < 0 ) {
+ fprintf(stderr, "InitSoundSystem: Couldn't open audio: %s\n", SDL_GetError());
+ fprintf(stderr, "Sound was disabled. \n");
+ return(-1);
diff --git a/games-arcade/amphetamine/files/amphetamine-0.8.10-clang.patch b/games-arcade/amphetamine/files/amphetamine-0.8.10-clang.patch
new file mode 100644
index 000000000000..d3fcbfdcabff
--- /dev/null
+++ b/games-arcade/amphetamine/files/amphetamine-0.8.10-clang.patch
@@ -0,0 +1,18 @@
+Index: src/Element.cpp
+--- a/src/Element.cpp.orig
++++ b/src/Element.cpp
+@@ -279,7 +279,13 @@ CBackgroundElement::CBackgroundElement(short initx, sh
+
+ void CBackgroundElement::OnAllocate()
+ {
+- short params[5] = {-1, xs, ys, xe - xs, ye - ys};
++ short params[5] = {
++ -1,
++ static_cast<short>(xs),
++ static_cast<short>(ys),
++ static_cast<short>(xe - xs),
++ static_cast<short>(ye - ys)
++ };
+ unsigned char *tmpBmp;
+
+ tmpBmp = gShapeManager->GetBackground(params[1], params[2]);
diff --git a/games-arcade/amphetamine/files/amphetamine-0.8.10-format-string.patch b/games-arcade/amphetamine/files/amphetamine-0.8.10-format-string.patch
new file mode 100644
index 000000000000..50e235a66a85
--- /dev/null
+++ b/games-arcade/amphetamine/files/amphetamine-0.8.10-format-string.patch
@@ -0,0 +1,11 @@
+description: fix a format string issue
+--- a/src/AmpHead.hpp
++++ b/src/AmpHead.hpp
+@@ -183,6 +183,6 @@ typedef struct {
+ #define SWAP(a, b, _t) (a) = (_t)((long)a ^ (long)(b)); (b) = (_t)((long)(a) ^ (long)(b)); (a) = (_t)((long)(a) ^ (long)(b));
+ #define NZ(a, b) ((a) == 0 ? (b) : (a))
+
+-#define MSG(message) if (logFile) fprintf(logFile, message); fflush(logFile)
++#define MSG(message) if (logFile) fprintf(logFile, "%s", message); fflush(logFile)
+
+ #endif