Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/weightwatcher/, sci-astronomy/weightwatcher/files/
Date: Sat, 02 Jan 2021 20:16:55
Message-Id: 1609618592.c66f73c85e12f55cbc2ca4da527101ae3b89b27b.soap@gentoo
1 commit: c66f73c85e12f55cbc2ca4da527101ae3b89b27b
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Sat Jan 2 20:16:32 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 2 20:16:32 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c66f73c8
7
8 sci-astronomy/weightwatcher: Port to EAPI 7
9
10 * Fix direct AR call
11 * Fix build with gcc-10
12
13 Closes: https://bugs.gentoo.org/707594
14 Closes: https://bugs.gentoo.org/725284
15 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
16 Signed-off-by: David Seifert <soap <AT> gentoo.org>
17
18 .../files/weightwatcher-1.12-AR.patch | 11 ++
19 .../files/weightwatcher-1.12-fno-common.patch | 160 +++++++++++++++++++++
20 .../weightwatcher/weightwatcher-1.12.ebuild | 17 ++-
21 3 files changed, 184 insertions(+), 4 deletions(-)
22
23 diff --git a/sci-astronomy/weightwatcher/files/weightwatcher-1.12-AR.patch b/sci-astronomy/weightwatcher/files/weightwatcher-1.12-AR.patch
24 new file mode 100644
25 index 00000000000..6c5b72ffc74
26 --- /dev/null
27 +++ b/sci-astronomy/weightwatcher/files/weightwatcher-1.12-AR.patch
28 @@ -0,0 +1,11 @@
29 +https://bugs.gentoo.org/725284
30 +--- a/configure.ac
31 ++++ b/configure.ac
32 +@@ -78,6 +78,7 @@ fi
33 +
34 + AC_PROG_RANLIB
35 + AC_PROG_INSTALL
36 ++AM_PROG_AR
37 +
38 + # Checks for libraries.
39 + # Replace `main' with a function in -lm:
40
41 diff --git a/sci-astronomy/weightwatcher/files/weightwatcher-1.12-fno-common.patch b/sci-astronomy/weightwatcher/files/weightwatcher-1.12-fno-common.patch
42 new file mode 100644
43 index 00000000000..a9071da8120
44 --- /dev/null
45 +++ b/sci-astronomy/weightwatcher/files/weightwatcher-1.12-fno-common.patch
46 @@ -0,0 +1,160 @@
47 +--- a/src/field.c
48 ++++ b/src/field.c
49 +@@ -42,6 +42,9 @@
50 + #include "prefs.h"
51 + #include "readimage.h"
52 +
53 ++extern prefstruct prefs;
54 ++char gstr[MAXCHAR];
55 ++
56 + /********************************* newfield **********************************/
57 + /*
58 + Returns a pointer to a new field, ready to go!
59 +--- a/src/fits/fitsbody.c
60 ++++ b/src/fits/fitsbody.c
61 +@@ -43,6 +43,7 @@
62 + #include "fitscat_defs.h"
63 + #include "fitscat.h"
64 +
65 ++extern int bswapflag;
66 + size_t body_maxram = BODY_DEFRAM,
67 + body_maxvram = BODY_DEFVRAM,
68 + body_ramleft, body_vramleft, body_ramflag;
69 +--- a/src/fits/fitscat.h
70 ++++ b/src/fits/fitscat.h
71 +@@ -333,6 +333,6 @@ extern void error(int, char *, char *),
72 + warning(char *msg1, char *msg2);
73 +
74 +
75 +-int bswapflag;
76 ++extern int bswapflag;
77 +
78 + #endif
79 +--- a/src/fits/fitscheck.c
80 ++++ b/src/fits/fitscheck.c
81 +@@ -42,6 +42,7 @@
82 + unsigned int exclude[13] = {0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
83 + 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60};
84 +
85 ++extern int bswapflag;
86 + /****** encode_checksum *****************************************************
87 + PROTO void encode_checksum(unsigned int sum, char *str)
88 + PURPOSE Encode a checksum to ASCII
89 +--- a/src/fits/fitskey.c
90 ++++ b/src/fits/fitskey.c
91 +@@ -38,6 +38,7 @@
92 + #include "fitscat_defs.h"
93 + #include "fitscat.h"
94 +
95 ++int bswapflag;
96 + /****** add_key ****************************************************************
97 + PROTO int add_key(keystruct *key, tabstruct *tab, int pos)
98 + PURPOSE Copy a key from one table to another.
99 +--- a/src/fits/fitsread.c
100 ++++ b/src/fits/fitsread.c
101 +@@ -38,6 +38,7 @@
102 + #include "fitscat_defs.h"
103 + #include "fitscat.h"
104 +
105 ++extern int bswapflag;
106 + char padbuf[FBSIZE];
107 +
108 + /****** read_cat ***************************************************************
109 +--- a/src/fits/fitswrite.c
110 ++++ b/src/fits/fitswrite.c
111 +@@ -39,6 +39,7 @@
112 + #include "fitscat_defs.h"
113 + #include "fitscat.h"
114 +
115 ++extern int bswapflag;
116 +
117 + /****** save_cat **************************************************************
118 + PROTO void save_cat(catstruct *cat, char *filename)
119 +--- a/src/globals.h
120 ++++ b/src/globals.h
121 +@@ -30,7 +30,7 @@
122 + #include "types.h"
123 +
124 + /*----------------------- miscellaneous variables ---------------------------*/
125 +-char gstr[MAXCHAR];
126 ++extern char gstr[MAXCHAR];
127 +
128 + /*------------------------------- functions ---------------------------------*/
129 + extern void makeit(void),
130 +--- a/src/main.c
131 ++++ b/src/main.c
132 +@@ -51,6 +51,8 @@ EXECUTABLE " [-c <configuration_file>] [-<keyword> <value>]\n"\
133 + extern const char notokstr[];
134 + time_t thetime, thetime2;
135 +
136 ++extern prefstruct prefs;
137 ++
138 + /********************************** main ************************************/
139 + int main(int argc, char *argv[])
140 +
141 +--- a/src/makeit.c
142 ++++ b/src/makeit.c
143 +@@ -45,6 +45,8 @@
144 + #include "readimage.h"
145 + #include "xml.h"
146 +
147 ++extern prefstruct prefs;
148 ++
149 + /********************************** makeit ***********************************/
150 + void makeit(void)
151 + {
152 +--- a/src/prefs.c
153 ++++ b/src/prefs.c
154 +@@ -51,6 +51,9 @@
155 + #include "prefs.h"
156 + #include "preflist.h"
157 +
158 ++extern int bswapflag;
159 ++prefstruct prefs;
160 ++
161 + /********************************* dumpprefs ********************************/
162 + /*
163 + Print the default preference parameters.
164 +--- a/src/prefs.h
165 ++++ b/src/prefs.h
166 +@@ -86,7 +86,7 @@ typedef struct
167 + double time_diff; /* Execution time */
168 + } prefstruct;
169 +
170 +- prefstruct prefs;
171 ++extern prefstruct prefs;
172 +
173 +
174 + /*-------------------------------- protos -----------------------------------*/
175 +--- a/src/readimage.c
176 ++++ b/src/readimage.c
177 +@@ -39,6 +39,7 @@
178 + #include "fits/fitscat.h"
179 + #include "readimage.h"
180 +
181 ++extern int bswapflag;
182 + /******************************** readdata **********************************/
183 + /*
184 + read and convert input data stream in PIXTYPE (float) format.
185 +--- a/src/vector.c
186 ++++ b/src/vector.c
187 +@@ -46,6 +46,9 @@
188 +
189 + static void chsort(crosstruct *ra, int n);
190 +
191 ++extern char gstr[MAXCHAR];
192 ++extern prefstruct prefs;
193 ++
194 + /********************************** newvec **********************************/
195 + /*
196 + Returns a pointer to a new polygon, and initialize local context buffer:
197 +--- a/src/xml.c
198 ++++ b/src/xml.c
199 +@@ -45,6 +45,7 @@
200 + #include "field.h"
201 + #include "xml.h"
202 +
203 ++extern prefstruct prefs;
204 + extern time_t thetime,thetime2; /* from makeit.c */
205 + extern pkeystruct key[]; /* from preflist.h */
206 + extern char keylist[][32]; /* from preflist.h */
207
208 diff --git a/sci-astronomy/weightwatcher/weightwatcher-1.12.ebuild b/sci-astronomy/weightwatcher/weightwatcher-1.12.ebuild
209 index c423074420a..2aa44a1044b 100644
210 --- a/sci-astronomy/weightwatcher/weightwatcher-1.12.ebuild
211 +++ b/sci-astronomy/weightwatcher/weightwatcher-1.12.ebuild
212 @@ -1,7 +1,9 @@
213 -# Copyright 1999-2020 Gentoo Authors
214 +# Copyright 1999-2021 Gentoo Authors
215 # Distributed under the terms of the GNU General Public License v2
216
217 -EAPI=6
218 +EAPI=7
219 +
220 +inherit autotools
221
222 DESCRIPTION="Combine weight maps and polygon for astronomical images weighting"
223 HOMEPAGE="http://www.astromatic.net/software/weightwatcher/"
224 @@ -12,8 +14,15 @@ LICENSE="GPL-3"
225 SLOT="0"
226 IUSE="doc"
227
228 -RDEPEND=""
229 -DEPEND="${RDEPEND}"
230 +PATCHES=(
231 + "${FILESDIR}"/${P}-AR.patch
232 + "${FILESDIR}"/${P}-fno-common.patch
233 +)
234 +
235 +src_prepare() {
236 + default
237 + eautoreconf
238 +}
239
240 src_install() {
241 default