Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/xmountains/, x11-misc/xmountains/files/
Date: Mon, 27 Jan 2020 04:21:30
Message-Id: 1580098875.610599d8a8ea30956f5c9ce12db2d2f221dc4b34.jer@gentoo
1 commit: 610599d8a8ea30956f5c9ce12db2d2f221dc4b34
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 27 04:20:45 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 27 04:21:15 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=610599d8
7
8 x11-misc/xmountains: Fix CFLAGS=-fno-common
9
10 Package-Manager: Portage-2.3.85, Repoman-2.3.20
11 Closes: https://bugs.gentoo.org/show_bug.cgi?id=706606
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 .../files/xmountains-2.9-fno-common.patch | 20 ++++++++++++
15 .../xmountains/files/xmountains-2.9-global.patch | 26 ++++++++++++++++
16 .../xmountains/files/xmountains-2.9-main.patch | 11 +++++++
17 .../xmountains/files/xmountains-2.9-string.patch | 8 +++++
18 x11-misc/xmountains/xmountains-2.9-r1.ebuild | 36 ++++++++++------------
19 5 files changed, 81 insertions(+), 20 deletions(-)
20
21 diff --git a/x11-misc/xmountains/files/xmountains-2.9-fno-common.patch b/x11-misc/xmountains/files/xmountains-2.9-fno-common.patch
22 new file mode 100644
23 index 00000000000..e7140ca4fad
24 --- /dev/null
25 +++ b/x11-misc/xmountains/files/xmountains-2.9-fno-common.patch
26 @@ -0,0 +1,20 @@
27 +--- a/X_graphics.c
28 ++++ b/X_graphics.c
29 +@@ -10,7 +10,6 @@
30 + #include "paint.h"
31 + char X_graphics_Id[]="$Id: X_graphics.c,v 1.26 2009/08/28 09:09:17 spb Exp $";
32 +
33 +-char *display=NULL; /* name of display to open, NULL for default */
34 + char *geom=NULL; /* geometry of window, NULL for default */
35 +
36 + Atom wm_protocols;
37 +@@ -264,7 +263,8 @@
38 + graph_height = gptr->graph_height;
39 + /*{{{open display*/
40 +
41 +- dpy = XOpenDisplay(display);
42 ++/* display to open, NULL for default */
43 ++ dpy = XOpenDisplay(NULL);
44 +
45 + if( ! dpy )
46 + {
47
48 diff --git a/x11-misc/xmountains/files/xmountains-2.9-global.patch b/x11-misc/xmountains/files/xmountains-2.9-global.patch
49 new file mode 100644
50 index 00000000000..77ce47ac4eb
51 --- /dev/null
52 +++ b/x11-misc/xmountains/files/xmountains-2.9-global.patch
53 @@ -0,0 +1,26 @@
54 +--- a/Makefile.alt.JeR
55 ++++ b/Makefile.alt
56 +@@ -8,17 +8,17 @@
57 +
58 + LOCAL_LIBRARIES = -lX11
59 + SYS_LIBRARIES = -lm
60 +- SRCS = calcalt.c random.c artist.c global.c xmountains.c X_graphics.c print_alg.c
61 +- OBJS = calcalt.o random.o artist.o global.o xmountains.o X_graphics.o print_alg.o
62 +- HDRS = crinkle.h global.h paint.h patchlevel.h copyright.h
63 ++ SRCS = calcalt.c random.c artist.c xmountains.c X_graphics.c print_alg.c
64 ++ OBJS = calcalt.o random.o artist.o xmountains.o X_graphics.o print_alg.o
65 ++ HDRS = crinkle.h paint.h patchlevel.h copyright.h
66 +
67 + xmountains: $(OBJS)
68 + $(CC) $(LDFLAGS) -o xmountains $(OBJS) -lX11 -lm
69 +
70 +
71 + calcalt.o: crinkle.h
72 +-artist.o: global.h paint.h crinkle.h
73 +-global.o: crinkle.h paint.h
74 +-xmountains.o: paint.h global.h patchlevel.h copyright.h crinkle.h
75 ++artist.o: paint.h crinkle.h
76 ++: crinkle.h paint.h
77 ++xmountains.o: paint.h patchlevel.h copyright.h crinkle.h
78 + X_graphics.o: paint.h crinkle.h
79 +
80
81 diff --git a/x11-misc/xmountains/files/xmountains-2.9-main.patch b/x11-misc/xmountains/files/xmountains-2.9-main.patch
82 new file mode 100644
83 index 00000000000..26297783c7e
84 --- /dev/null
85 +++ b/x11-misc/xmountains/files/xmountains-2.9-main.patch
86 @@ -0,0 +1,11 @@
87 +--- a/xmountains.c
88 ++++ b/xmountains.c
89 +@@ -144,7 +144,7 @@
90 + void seed_uni(int ijkl);
91 + void plot_column(Graph *g);
92 +
93 +-main (argc,argv)
94 ++int main (argc,argv)
95 + int argc;
96 + char **argv;
97 + {
98
99 diff --git a/x11-misc/xmountains/files/xmountains-2.9-string.patch b/x11-misc/xmountains/files/xmountains-2.9-string.patch
100 new file mode 100644
101 index 00000000000..c78569a2116
102 --- /dev/null
103 +++ b/x11-misc/xmountains/files/xmountains-2.9-string.patch
104 @@ -0,0 +1,8 @@
105 +--- a/xmountains.c.JeR
106 ++++ b/xmountains.c
107 +@@ -1,4 +1,5 @@
108 +
109 ++#include <string.h> /* strcmp() */
110 + #include <stdio.h>
111 + #include <stdlib.h>
112 + #include <strings.h>
113
114 diff --git a/x11-misc/xmountains/xmountains-2.9-r1.ebuild b/x11-misc/xmountains/xmountains-2.9-r1.ebuild
115 index 712987fe73b..3ba1649dc3f 100644
116 --- a/x11-misc/xmountains/xmountains-2.9-r1.ebuild
117 +++ b/x11-misc/xmountains/xmountains-2.9-r1.ebuild
118 @@ -1,43 +1,39 @@
119 -# Copyright 1999-2018 Gentoo Foundation
120 +# Copyright 1999-2020 Gentoo Authors
121 # Distributed under the terms of the GNU General Public License v2
122
123 -EAPI=6
124 -
125 +EAPI=7
126 inherit toolchain-funcs
127
128 -MY_P=${P/-/_}
129 -
130 DESCRIPTION="Fractal terrains of snow-capped mountains near water"
131 HOMEPAGE="https://spbooth.github.io/xmountains/"
132 -SRC_URI="http://www.epcc.ed.ac.uk/~spb/${PN}/${MY_P}.tar.gz"
133 +SRC_URI="http://www.epcc.ed.ac.uk/~spb/${PN}/${P/-/_}.tar.gz"
134
135 LICENSE="HPND"
136 SLOT="0"
137 KEYWORDS="amd64 ppc x86"
138 -IUSE=""
139
140 RDEPEND="
141 x11-libs/libX11
142 - x11-misc/xbitmaps"
143 -DEPEND="${RDEPEND}
144 - x11-base/xorg-proto"
145 -
146 + x11-misc/xbitmaps
147 +"
148 +DEPEND="
149 + ${RDEPEND}
150 + x11-base/xorg-proto
151 +"
152 +PATCHES=(
153 + "${FILESDIR}"/${PN}-2.9-fno-common.patch
154 + "${FILESDIR}"/${PN}-2.9-global.patch
155 + "${FILESDIR}"/${PN}-2.9-main.patch
156 + "${FILESDIR}"/${PN}-2.9-string.patch
157 +)
158 S=${WORKDIR}
159
160 -src_prepare() {
161 - default
162 - # add missing include for strcmp
163 - sed -i xmountains.c -e '1a#include <string.h> /* strcmp() */' || die
164 - # remove obsolete references to global.*
165 - sed -i Makefile.alt README -e 's|global\..||g' || die
166 -}
167 -
168 src_compile() {
169 emake \
170 -f Makefile.alt \
171 CC="$(tc-getCC)" \
172 CFLAGS="${CFLAGS}" \
173 - LDFLAGS="${LDFLAGS}" \
174 + LDFLAGS="${CFLAGS} ${LDFLAGS}" \
175 ${PN}
176 }