diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-simulation/pmars-sdl | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'games-simulation/pmars-sdl')
-rw-r--r-- | games-simulation/pmars-sdl/Manifest | 4 | ||||
-rw-r--r-- | games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch | 65 | ||||
-rw-r--r-- | games-simulation/pmars-sdl/metadata.xml | 8 | ||||
-rw-r--r-- | games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild | 92 |
4 files changed, 169 insertions, 0 deletions
diff --git a/games-simulation/pmars-sdl/Manifest b/games-simulation/pmars-sdl/Manifest new file mode 100644 index 000000000000..e45bc381d418 --- /dev/null +++ b/games-simulation/pmars-sdl/Manifest @@ -0,0 +1,4 @@ +AUX pmars-sdl-0.9.2e-format.patch 1988 BLAKE2B 57e96f71c6dfb6cea7286421acaa2a576ca26d9e5068a0c840b2d00dabd3ea87b2b482fe28253ef0d1b6c667bb13a2b9b8ad53f59cbb54a98f7d4da6ab1f66bf SHA512 1736220e86c762392e7074674d506fe161308a09c682a7c3cccfa7e58be880f6d44738854eae2c2c6dfc22d819c04c8fb5e9a5db632d00c35de09f4b44347014 +DIST pmars-0.9.2-5.tar.gz 200966 BLAKE2B 398323191290a9e3d57cb371c2070585cf78f845ca4cbadfa09f03045abc80f7b3fb71a58c18bbfdf503a3239d25bd0734b10e784d6570766e6b5c0ec606aadf SHA512 197d1967507199ed5eb075fb232a2f15d9bdf4bec03fc6b1d6df5d6259d6627eb40338c5787852ea10d96858029144348128b08e86c7079d96f10fd09dafc315 +EBUILD pmars-sdl-0.9.2e-r1.ebuild 1796 BLAKE2B 4620393a9697e9f68ac759f7a3e5fc01e0508aa82fd0aa9462b87e58f44471e6ccde75197654a3a7756de2dfa978c6ed360ac00269e50a3a175c190b9b43ef2d SHA512 2c831bc2e06429ffc4dd79a41c26c726cdbc1b9a890cd8551c2726839be867e3de2325d990bbcbdeafd640758364c71819ede81761dbee310bd70306375b589e +MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 diff --git a/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch b/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch new file mode 100644 index 000000000000..4e02da8a82a8 --- /dev/null +++ b/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch @@ -0,0 +1,65 @@ +--- a/src/asm.c.old 2015-10-28 13:23:53.465014342 +0100 ++++ b/src/asm.c 2015-10-28 13:23:10.502813377 +0100 +@@ -652,7 +652,7 @@ + macputs(str); + #else + if (!inCdb) +- fprintf(stderr, str); ++ fprintf(stderr, "%s", str); + #if defined DOSALLGRAPHX + else { + if (displayMode == TEXT) +@@ -833,7 +833,7 @@ + #ifdef __MAC__ + textout(notEnoughMemErr); + #else +- fprintf(stderr, notEnoughMemErr); ++ fprintf(stderr, "%s", notEnoughMemErr); + #endif + Exit(MEMERR); + break; +@@ -916,7 +916,7 @@ + } + + if (ierr >= ERRMAX) { +- sprintf(outs, tooManyMsgErr); ++ sprintf(outs, "%s", tooManyMsgErr); + #ifndef VMS + textout(outs); + #else +--- a/src/cdb.c.old 2015-10-28 13:24:04.669805966 +0100 ++++ b/src/cdb.c 2015-10-28 13:23:10.502813377 +0100 +@@ -2760,7 +2760,7 @@ + fprintf(outp, nameByAuthorScores, warrior[idxV[i]].name, warrior[idxV[i]].authorName, + scrV[idxV[i]]); + if (warriors > 2) { +- fprintf(outp, resultsAre); ++ fprintf(outp, "%s", resultsAre); + for (j = 0; j < warriors; ++j) { + fprintf(outp, " %d", warrior[idxV[i]].score[j]); + } +--- a/src/clparse.c.old 2015-10-28 13:24:10.648694768 +0100 ++++ b/src/clparse.c 2015-10-28 13:23:10.502813377 +0100 +@@ -289,7 +289,7 @@ + if (next_input(filep, inputs)) { + if (!strcmp(inputs, "-")) { + newFile = stdin; +- fprintf(stderr, readingStdin); ++ fprintf(stderr, "%s", readingStdin); + } else { + if ((newFile = fopen(inputs, "r")) == NULL) { + code = FILENAME; /* command file not found */ +@@ -430,11 +430,11 @@ + errout(outs); + break; + case MEMORY: +- sprintf(outs, outOfMemory); ++ sprintf(outs, "%s", outOfMemory); + errout(outs); + break; + case FILENAME: +- sprintf(outs, cannotOpenParameterFile); ++ sprintf(outs, "%s", cannotOpenParameterFile); + errout(outs); + break; + } diff --git a/games-simulation/pmars-sdl/metadata.xml b/games-simulation/pmars-sdl/metadata.xml new file mode 100644 index 000000000000..78274e0fa550 --- /dev/null +++ b/games-simulation/pmars-sdl/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> +</maintainer> +</pkgmetadata> diff --git a/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild new file mode 100644 index 000000000000..b7f96156df97 --- /dev/null +++ b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit readme.gentoo-r1 toolchain-funcs + +MY_PN="${PN/-sdl/}" +MY_PV="${PV/e/-5}" +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="Portable redcode simulator's sdl port for core war" +HOMEPAGE="http://corewar.co.uk/pihlaja/pmars-sdl/" +SRC_URI="http://corewar.co.uk/pihlaja/pmars-sdl/${MY_P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="sdl X" + +RDEPEND=" + sdl? ( x11-libs/libX11 media-libs/libsdl[video] ) + X? ( x11-libs/libX11 ) + !sdl? ( !X? ( sys-libs/ncurses:0= ) ) +" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${FILESDIR}"/${P}-format.patch ) + +DOC_CONTENTS=" + There are some macros in /usr/share/pmars/macros + which you should make accessible to pmars by typing + export PMARSHOME=/usr/share/pmars/macros\n +" + +src_compile() { + CFLAGS="${CFLAGS} -DEXT94 -DPERMUTATE" + LFLAGS="-x" + + if use sdl ; then + CFLAGS="${CFLAGS} -DSDLGRAPHX `sdl-config --cflags`" + LIB=`sdl-config --libs` + elif use X ; then + CFLAGS="${CFLAGS} -DXWINGRAPHX" + LIB="-L/usr/X11R6/lib -lX11" + else + CFLAGS="${CFLAGS} -DCURSESGRAPHX" + LIB="-lcurses" + fi + + cd src + + SRC="asm.c + cdb.c + clparse.c + disasm.c + eval.c + global.c + pmars.c + sim.c + pos.c + str_eng.c + token.c" + + for x in ${SRC}; do + einfo "compiling ${x}" + $(tc-getCC) ${CFLAGS} ${x} -c || die + done + + echo + einfo "linking with LIB: ${LIB}" + $(tc-getCC) ${LDFLAGS} *.o ${LIB} -o ${MY_PN} || die +} + +src_install() { + dobin src/${MY_PN} + doman doc/${MY_PN}.6 + + dodoc AUTHORS CONTRIB ChangeLog README doc/redcode.ref + readme.gentoo_create_doc + + insinto "/usr/share/${MY_PN}/warriors" + doins warriors/* + + insinto "/usr/share/${MY_PN}/macros" + doins config/*.mac +} + +pkg_postinst() { + readme.gentoo_print_elog +} |