1 |
commit: c4fa2142be333dc8177959fe71d88d8dfda52a7b |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 1 18:34:57 2018 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 1 19:35:46 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4fa2142 |
7 |
|
8 |
games-simulation/pmars-sdl: Stop using games.eclass |
9 |
|
10 |
Package-Manager: Portage-2.3.31, Repoman-2.3.9 |
11 |
|
12 |
.../pmars-sdl/files/pmars-sdl-0.9.2e-format.patch | 12 +-- |
13 |
.../pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild | 92 ++++++++++++++++++++++ |
14 |
2 files changed, 98 insertions(+), 6 deletions(-) |
15 |
|
16 |
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 |
17 |
index d8c588a3220..4e02da8a82a 100644 |
18 |
--- a/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch |
19 |
+++ b/games-simulation/pmars-sdl/files/pmars-sdl-0.9.2e-format.patch |
20 |
@@ -1,5 +1,5 @@ |
21 |
---- src/asm.c.old 2015-10-28 13:23:53.465014342 +0100 |
22 |
-+++ src/asm.c 2015-10-28 13:23:10.502813377 +0100 |
23 |
+--- a/src/asm.c.old 2015-10-28 13:23:53.465014342 +0100 |
24 |
++++ b/src/asm.c 2015-10-28 13:23:10.502813377 +0100 |
25 |
@@ -652,7 +652,7 @@ |
26 |
macputs(str); |
27 |
#else |
28 |
@@ -27,8 +27,8 @@ |
29 |
#ifndef VMS |
30 |
textout(outs); |
31 |
#else |
32 |
---- src/cdb.c.old 2015-10-28 13:24:04.669805966 +0100 |
33 |
-+++ src/cdb.c 2015-10-28 13:23:10.502813377 +0100 |
34 |
+--- a/src/cdb.c.old 2015-10-28 13:24:04.669805966 +0100 |
35 |
++++ b/src/cdb.c 2015-10-28 13:23:10.502813377 +0100 |
36 |
@@ -2760,7 +2760,7 @@ |
37 |
fprintf(outp, nameByAuthorScores, warrior[idxV[i]].name, warrior[idxV[i]].authorName, |
38 |
scrV[idxV[i]]); |
39 |
@@ -38,8 +38,8 @@ |
40 |
for (j = 0; j < warriors; ++j) { |
41 |
fprintf(outp, " %d", warrior[idxV[i]].score[j]); |
42 |
} |
43 |
---- src/clparse.c.old 2015-10-28 13:24:10.648694768 +0100 |
44 |
-+++ src/clparse.c 2015-10-28 13:23:10.502813377 +0100 |
45 |
+--- a/src/clparse.c.old 2015-10-28 13:24:10.648694768 +0100 |
46 |
++++ b/src/clparse.c 2015-10-28 13:23:10.502813377 +0100 |
47 |
@@ -289,7 +289,7 @@ |
48 |
if (next_input(filep, inputs)) { |
49 |
if (!strcmp(inputs, "-")) { |
50 |
|
51 |
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 |
52 |
new file mode 100644 |
53 |
index 00000000000..05129c0d1c7 |
54 |
--- /dev/null |
55 |
+++ b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild |
56 |
@@ -0,0 +1,92 @@ |
57 |
+# Copyright 1999-2018 Gentoo Foundation |
58 |
+# Distributed under the terms of the GNU General Public License v2 |
59 |
+ |
60 |
+EAPI=6 |
61 |
+inherit readme.gentoo-r1 toolchain-funcs |
62 |
+ |
63 |
+MY_PN="${PN/-sdl/}" |
64 |
+MY_PV="${PV/e/-5}" |
65 |
+MY_P="${MY_PN}-${MY_PV}" |
66 |
+ |
67 |
+DESCRIPTION="Portable redcode simulator's sdl port for core war" |
68 |
+HOMEPAGE="http://corewar.co.uk/pihlaja/pmars-sdl/" |
69 |
+SRC_URI="http://corewar.co.uk/pihlaja/pmars-sdl/${MY_P}.tar.gz" |
70 |
+ |
71 |
+LICENSE="BSD GPL-2" |
72 |
+SLOT="0" |
73 |
+KEYWORDS="~amd64 ~x86" |
74 |
+IUSE="sdl X" |
75 |
+ |
76 |
+RDEPEND=" |
77 |
+ sdl? ( x11-libs/libX11 media-libs/libsdl[video] ) |
78 |
+ X? ( x11-libs/libX11 ) |
79 |
+ !sdl? ( !X? ( sys-libs/ncurses:0= ) ) |
80 |
+" |
81 |
+DEPEND="${RDEPEND}" |
82 |
+ |
83 |
+S="${WORKDIR}/${MY_P}" |
84 |
+ |
85 |
+PATCHES=( "${FILESDIR}"/${P}-format.patch ) |
86 |
+ |
87 |
+DOC_CONTENTS=" |
88 |
+ There are some macros in ${GAMES_DATADIR}/${MY_PN}/macros |
89 |
+ which you should make accessible to pmars by typing |
90 |
+ export PMARSHOME=${GAMES_DATADIR}/${MY_PN}/macros\n |
91 |
+" |
92 |
+ |
93 |
+src_compile() { |
94 |
+ CFLAGS="${CFLAGS} -DEXT94 -DPERMUTATE" |
95 |
+ LFLAGS="-x" |
96 |
+ |
97 |
+ if use sdl ; then |
98 |
+ CFLAGS="${CFLAGS} -DSDLGRAPHX `sdl-config --cflags`" |
99 |
+ LIB=`sdl-config --libs` |
100 |
+ elif use X ; then |
101 |
+ CFLAGS="${CFLAGS} -DXWINGRAPHX" |
102 |
+ LIB="-L/usr/X11R6/lib -lX11" |
103 |
+ else |
104 |
+ CFLAGS="${CFLAGS} -DCURSESGRAPHX" |
105 |
+ LIB="-lcurses" |
106 |
+ fi |
107 |
+ |
108 |
+ cd src |
109 |
+ |
110 |
+ SRC="asm.c |
111 |
+ cdb.c |
112 |
+ clparse.c |
113 |
+ disasm.c |
114 |
+ eval.c |
115 |
+ global.c |
116 |
+ pmars.c |
117 |
+ sim.c |
118 |
+ pos.c |
119 |
+ str_eng.c |
120 |
+ token.c" |
121 |
+ |
122 |
+ for x in ${SRC}; do |
123 |
+ einfo "compiling ${x}" |
124 |
+ $(tc-getCC) ${CFLAGS} ${x} -c || die |
125 |
+ done |
126 |
+ |
127 |
+ echo |
128 |
+ einfo "linking with LIB: ${LIB}" |
129 |
+ $(tc-getCC) ${LDFLAGS} *.o ${LIB} -o ${MY_PN} || die |
130 |
+} |
131 |
+ |
132 |
+src_install() { |
133 |
+ dobin src/${MY_PN} |
134 |
+ doman doc/${MY_PN}.6 |
135 |
+ |
136 |
+ dodoc AUTHORS CONTRIB ChangeLog README doc/redcode.ref |
137 |
+ readme.gentoo_create_doc |
138 |
+ |
139 |
+ insinto "/usr/share/${MY_PN}/warriors" |
140 |
+ doins warriors/* |
141 |
+ |
142 |
+ insinto "/usr/share/${MY_PN}/macros" |
143 |
+ doins config/*.mac |
144 |
+} |
145 |
+ |
146 |
+pkg_postinst() { |
147 |
+ readme.gentoo_print_elog |
148 |
+} |