Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/gwave/files/, sci-electronics/gwave/
Date: Sun, 30 Jun 2019 23:54:26
Message-Id: 1561938846.58b7e8af79445c38cc2dad1129c6d2212fb88ee9.mattst88@gentoo
1 commit: 58b7e8af79445c38cc2dad1129c6d2212fb88ee9
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 30 23:50:54 2019 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 30 23:54:06 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58b7e8af
7
8 sci-electronics/gwave: Version bump to 20190116
9
10 Closes: https://bugs.gentoo.org/680440
11 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
12
13 sci-electronics/gwave/Manifest | 1 +
14 .../gwave/files/gwave-20190116-as-needed.patch | 125 ++++++++++++++++++++
15 .../gwave/files/gwave-20190116-fix-configure.patch | 14 +++
16 .../gwave-20190116-multiple-little-bugfixes.patch | 126 +++++++++++++++++++++
17 sci-electronics/gwave/gwave-20190116.ebuild | 55 +++++++++
18 5 files changed, 321 insertions(+)
19
20 diff --git a/sci-electronics/gwave/Manifest b/sci-electronics/gwave/Manifest
21 index d49f652ce60..3301677fd77 100644
22 --- a/sci-electronics/gwave/Manifest
23 +++ b/sci-electronics/gwave/Manifest
24 @@ -1,2 +1,3 @@
25 +DIST gwave-20190116.tar.gz 472342 BLAKE2B d3781a757d288548600626c2105828162c9eb72930b1a3c741adc63eb275097a98f75fc73c31c4d57bee2e959952ca51e8af54090ff5ea0a2b780ee645da7e4e SHA512 5c83306dfa4aaf7a0e9bb27be3c8a0e9e47d02b15afe78938e23b815d302bb162ab35aab05b67ede132d0a7c51519b15ef64a7f87df4b8da9ca9b93b82410b7b
26 DIST gwave-code-249-trunk.zip 415799 BLAKE2B d128d9497f05f61e334886f0884a745c2cab624131ff2811162dc4ad0d39a244c4f08783dc7ddb12edde3287466744d8f6f8db6a61f77a493811d887ca611a5d SHA512 351e5db7c65a0ff3ff68785986c3c4f16e2fbf2386c944c8ed63ced4b4714e9e00c2d30a12f7180477bb8f1ac56a09208cf6379b0e0074dc92de71ff483d5d87
27 DIST gwave2-20090213.tar.gz 403957 BLAKE2B aeb1db92bfc5977d1a11e0baad89919f4eafd8c9c8ceaf94e29e8a8a6aed29f38f27bec6a340c8610b0acde83c0f8fa3944313417ae3db7d91e155db920fa358 SHA512 9b39ed2923901af18253abe8e3ae1a6f71a660e31181dce31b0d784eb1dd0800a31ff48158b2c68555fcd268029e20295e87626e8e1d4cebc236b3863fe25e8c
28
29 diff --git a/sci-electronics/gwave/files/gwave-20190116-as-needed.patch b/sci-electronics/gwave/files/gwave-20190116-as-needed.patch
30 new file mode 100644
31 index 00000000000..8a0737e6b89
32 --- /dev/null
33 +++ b/sci-electronics/gwave/files/gwave-20190116-as-needed.patch
34 @@ -0,0 +1,125 @@
35 +From d2e4cdc91e3100a6a6598eff93df1b24c6ce661c Mon Sep 17 00:00:00 2001
36 +From: sgtell <sgtell@9168a026-1b44-0410-911b-d774ca5fe8d3>
37 +Date: Thu, 11 Apr 2019 20:52:12 +0000
38 +Subject: [PATCH 2/2] message typo fixes and Makefile.am improvements
39 + contributed by Ahmed El-Mahmoudy Don't monkey with _LDFLAGS when _LDADD will
40 + do; fixes -Wl,--as-needed
41 +
42 +git-svn-id: https://svn.code.sf.net/p/gwave/code/branches/no-ggp-branch@271 9168a026-1b44-0410-911b-d774ca5fe8d3
43 +---
44 + spicefile/Makefile.am | 12 +++++-------
45 + spicefile/ss_hspice.c | 10 +++++-----
46 + spicefile/ss_spice3.c | 2 +-
47 + src/Makefile.am | 5 +----
48 + 4 files changed, 12 insertions(+), 17 deletions(-)
49 +
50 +diff --git a/spicefile/Makefile.am b/spicefile/Makefile.am
51 +index 83f7508..3b69fbb 100644
52 +--- a/spicefile/Makefile.am
53 ++++ b/spicefile/Makefile.am
54 +@@ -9,12 +9,10 @@ libspicefile_a_SOURCES = spicestream.c ss_cazm.c ss_hspice.c ss_spice3.c ss_spic
55 + AM_CFLAGS = @GTK_CFLAGS@
56 +
57 + noinst_PROGRAMS = test_read
58 +-test_read_SOURCES = test_read.c
59 +-test_read_LDFLAGS = @GTK_LIBS@
60 +-test_read_LDADD = libspicefile.a
61 ++test_read_SOURCES = test_read.c
62 ++test_read_LDADD = libspicefile.a @GTK_LIBS@
63 +
64 +-bin_PROGRAMS=sp2sp
65 +-sp2sp_SOURCES=sp2sp.c
66 +-sp2sp_LDFLAGS= @GTK_LIBS@
67 +-sp2sp_LDADD= libspicefile.a
68 ++bin_PROGRAMS = sp2sp
69 ++sp2sp_SOURCES = sp2sp.c
70 ++sp2sp_LDADD = libspicefile.a @GTK_LIBS@
71 +
72 +diff --git a/spicefile/ss_hspice.c b/spicefile/ss_hspice.c
73 +index 421be14..722eaa4 100644
74 +--- a/spicefile/ss_hspice.c
75 ++++ b/spicefile/ss_hspice.c
76 +@@ -316,7 +316,7 @@ sf_rdhdr_hsbin(char *name, FILE *fp)
77 + swap_gint32((gint32*)&hh, sizeof(hh)/sizeof(gint32));
78 + }
79 + if(hh.h1 != 4 || hh.h3 != 4) {
80 +- ss_msg(DBG, "sf_rdhdr_hsbin", "unexepected values in data block header");
81 ++ ss_msg(DBG, "sf_rdhdr_hsbin", "unexpected values in data block header");
82 + goto fail;
83 + }
84 +
85 +@@ -574,7 +574,7 @@ sf_getval_hsbin(SpiceStream *sf, double *dvalp)
86 + sf->flags &= ~SSF_ESWAP;
87 + }
88 + if(hh.h1 != 0x00000004 || hh.h3 != 0x00000004) {
89 +- ss_msg(ERR, "sf_getval_hsbin", "unexepected values in block header at offset 0x%lx", pos);
90 ++ ss_msg(ERR, "sf_getval_hsbin", "unexpected values in block header at offset 0x%lx", pos);
91 + return -1;
92 + }
93 + sf->expected_vals = hh.block_nbytes / sf->floatsize;
94 +@@ -584,7 +584,7 @@ sf_getval_hsbin(SpiceStream *sf, double *dvalp)
95 + if(sf->floatsize == 4) {
96 + if(fread(&fval, sizeof(float), 1, sf->fp) != 1) {
97 + pos = ftello64(sf->fp);
98 +- ss_msg(ERR, "sf_getval_hsbin", "unexepected EOF in data at offset 0x%lx", (long) pos);
99 ++ ss_msg(ERR, "sf_getval_hsbin", "unexpected EOF in data at offset 0x%lx", (long) pos);
100 + return 0;
101 + }
102 + if(sf->flags & SSF_ESWAP) {
103 +@@ -594,7 +594,7 @@ sf_getval_hsbin(SpiceStream *sf, double *dvalp)
104 + } else if(sf->floatsize == 8) {
105 + if(fread(&dval, sf->floatsize, 1, sf->fp) != 1) {
106 + pos = ftello64(sf->fp);
107 +- ss_msg(ERR, "sf_getval_hsbin", "unexepected EOF in data at offset 0x%lx", (long) pos);
108 ++ ss_msg(ERR, "sf_getval_hsbin", "unexpected EOF in data at offset 0x%lx", (long) pos);
109 + return 0;
110 + }
111 + if(sf->flags & SSF_ESWAP) {
112 +@@ -652,7 +652,7 @@ sf_getval_hsascii(SpiceStream *sf, double *val)
113 + if(strlen(vbuf) != sf->avalsize) {
114 + /* incomplete float value - probably truncated or
115 + partialy-written file */
116 +- ss_msg(ERR, "sf_getval_hsascii", "unexepected number \"%s\" near offset 0x%lx", vbuf, (long)ftello64(sf->fp));
117 ++ ss_msg(ERR, "sf_getval_hsascii", "unexpected number \"%s\" near offset 0x%lx", vbuf, (long)ftello64(sf->fp));
118 +
119 + return 0;
120 + }
121 +diff --git a/spicefile/ss_spice3.c b/spicefile/ss_spice3.c
122 +index f95b997..4dfd5b9 100644
123 +--- a/spicefile/ss_spice3.c
124 ++++ b/spicefile/ss_spice3.c
125 +@@ -352,7 +352,7 @@ sf_getval_s3bin(SpiceStream *sf, double *dval)
126 + }
127 + if(fread(&val, sizeof(double), 1, sf->fp) != 1) {
128 + pos = ftello64(sf->fp);
129 +- ss_msg(ERR, "sf_getval_s3bin", "unexepected EOF in data at offset 0x%lx", (long) pos);
130 ++ ss_msg(ERR, "sf_getval_s3bin", "unexpected EOF in data at offset 0x%lx", (long) pos);
131 + return -1;
132 + }
133 + sf->read_vals++;
134 +diff --git a/src/Makefile.am b/src/Makefile.am
135 +index 6efba55..7933bfc 100644
136 +--- a/src/Makefile.am
137 ++++ b/src/Makefile.am
138 +@@ -15,8 +15,7 @@ gwave_SOURCES = cmd.c wavewin.c draw.c gwave.c event.c \
139 + rgeval.c xgserver.c measurebtn.c measurebtn.h \
140 + GtkTable_indel.c GtkTable_indel.h xsnarf.h
141 +
142 +-gwave_LDADD = ../spicefile/libspicefile.a @GTK_LIBS@ -lm
143 +-gwave_LDFLAGS = @GUILE_LDFLAGS@
144 ++gwave_LDADD = ../spicefile/libspicefile.a @GTK_LIBS@ @GUILE_LIBS@ -lm
145 +
146 + AM_CFLAGS = @GTK_CFLAGS@ @GUILE_CFLAGS@ \
147 + -DDATADIR=\"$(datadir)\" -DBINGWAVE=\"$(bindir)/gwave\"
148 +@@ -29,8 +28,6 @@ DOT_DOC_FILES = gwave.doc cmd.doc wavewin.doc wavelist.doc scwm_guile.doc \
149 +
150 + BUILT_SOURCES=init_scheme_string.c $(DOT_X_FILES)
151 +
152 +-#$(DOT_DOC_FILES)
153 +-
154 + init_scheme_string.c: $(top_srcdir)/scheme/minimal.scm
155 + echo "char *init_scheme_string = " > $@
156 + sed -e 's/;.*$$//g' -e 's/"/\\"/g' -e "s/'/\\\\'/g" -e 's/$$/\\n"/' -e 's/^/"/g' < $(top_srcdir)/scheme/minimal.scm >> $@
157 +--
158 +2.21.0
159 +
160
161 diff --git a/sci-electronics/gwave/files/gwave-20190116-fix-configure.patch b/sci-electronics/gwave/files/gwave-20190116-fix-configure.patch
162 new file mode 100644
163 index 00000000000..e0c0c444386
164 --- /dev/null
165 +++ b/sci-electronics/gwave/files/gwave-20190116-fix-configure.patch
166 @@ -0,0 +1,14 @@
167 +diff --git a/configure.ac b/configure.ac
168 +index 7a4f1c4..ffcb326 100644
169 +--- a/configure.ac
170 ++++ b/configure.ac
171 +@@ -86,8 +86,7 @@ AC_CHECK_LIB(termcap, tgoto, [
172 + AC_CHECK_LIB(readline, readline, [
173 + READLINE_LIB="-lreadline -lncurses"
174 + AC_DEFINE(HAVE_READLINE,1,[Define this if you have the readline library])
175 +- AC_CHECK_LIB(readline, add_history, AC_DEFINE(HAVE_HISTORY,1,[Define this if your readline also has add_history]),,"-l
176 +-ncurses")
177 ++ AC_CHECK_LIB(readline, add_history, AC_DEFINE(HAVE_HISTORY,1,[Define this if your readline also has add_history]),,"-lncurses")
178 + ], READLINE_LIB="", "-lncurses")
179 + ], READLINE_LIB=""))
180 +
181
182 diff --git a/sci-electronics/gwave/files/gwave-20190116-multiple-little-bugfixes.patch b/sci-electronics/gwave/files/gwave-20190116-multiple-little-bugfixes.patch
183 new file mode 100644
184 index 00000000000..88243381d2f
185 --- /dev/null
186 +++ b/sci-electronics/gwave/files/gwave-20190116-multiple-little-bugfixes.patch
187 @@ -0,0 +1,126 @@
188 +From ab7e69e688e7868349c1db922fde8dc3da2a4ac8 Mon Sep 17 00:00:00 2001
189 +From: sgtell <sgtell@9168a026-1b44-0410-911b-d774ca5fe8d3>
190 +Date: Thu, 11 Apr 2019 20:24:27 +0000
191 +Subject: [PATCH 1/2] multiple little bugfixes missing "return SCM_UNSPECIFIED"
192 + causes crash in some guile environments fix gwave -s scriptname commandline
193 + startup usage; fix script loading finish testing & fixing the new waveform
194 + status popup
195 +
196 +git-svn-id: https://svn.code.sf.net/p/gwave/code/branches/no-ggp-branch@270 9168a026-1b44-0410-911b-d774ca5fe8d3
197 +---
198 + scheme/cmds.scm | 2 +-
199 + scheme/extra-menus.scm | 4 ++++
200 + scheme/std-args.scm | 2 +-
201 + scheme/visiblewave-ops.scm | 4 +---
202 + spicefile/wavefile.c | 2 --
203 + src/gtkmisc.c | 2 ++
204 + src/wavelist.c | 1 +
205 + 7 files changed, 10 insertions(+), 7 deletions(-)
206 +
207 +diff --git a/scheme/cmds.scm b/scheme/cmds.scm
208 +index 2f94a09..75a41cf 100644
209 +--- a/scheme/cmds.scm
210 ++++ b/scheme/cmds.scm
211 +@@ -351,7 +351,7 @@
212 +
213 + ;; execute a guile script, ignoring any errors.
214 + (define-public (execute-script fname)
215 +- (false-if-exception (load fname))
216 ++ (false-if-exception (primitive-load fname))
217 + )
218 +
219 + ; global to pass target datafile smob to scripts executed
220 +diff --git a/scheme/extra-menus.scm b/scheme/extra-menus.scm
221 +index 0f72e25..d1edf6b 100644
222 +--- a/scheme/extra-menus.scm
223 ++++ b/scheme/extra-menus.scm
224 +@@ -35,6 +35,10 @@
225 +
226 + (define (debug-list-files)
227 + (format #t "wavefile-list: ~a\n" (wavefile-list))
228 ++ (for-each (lambda (wf)
229 ++ (format #t "wavefile ~a " wf)
230 ++ (format #t "file ~s\n" (wavefile-file-name wf)))
231 ++ (wavefile-list))
232 + )
233 +
234 + (define (debug-wave-calc)
235 +diff --git a/scheme/std-args.scm b/scheme/std-args.scm
236 +index bed74d4..d6dddf2 100644
237 +--- a/scheme/std-args.scm
238 ++++ b/scheme/std-args.scm
239 +@@ -83,7 +83,7 @@
240 +
241 + ; execute script specified with -s
242 + (if startup-script
243 +- (load startup-script))
244 ++ (execute-script startup-script))
245 + ))
246 +
247 +
248 +diff --git a/scheme/visiblewave-ops.scm b/scheme/visiblewave-ops.scm
249 +index f800770..42faeff 100644
250 +--- a/scheme/visiblewave-ops.scm
251 ++++ b/scheme/visiblewave-ops.scm
252 +@@ -23,12 +23,10 @@
253 + (define (popup-vw-stats vw)
254 + (popup-text-dialog "wave stats"
255 + (string-append
256 +- (format #f "file: ~s\n" ((wavefile-file-name visiblewave-file vw)))
257 ++ (format #f "file: ~s\n" (wavefile-file-name (visiblewave-file vw)))
258 + (format #f "variable: ~s\n" (visiblewave-varname vw))
259 + (format #f "minimum: ~f\n" (wavevar-min vw))
260 + (format #f "maximum: ~f\n" (wavevar-max vw)))))
261 +-
262 +-
263 +
264 + ; hook called when new VisibleWave is added.
265 + (add-hook!
266 +diff --git a/spicefile/wavefile.c b/spicefile/wavefile.c
267 +index 6a35c04..83f2a8b 100644
268 +--- a/spicefile/wavefile.c
269 ++++ b/spicefile/wavefile.c
270 +@@ -657,8 +657,6 @@ int wf_add_var(WaveFile *wf, char *varname, int ncols, VarType type,
271 +
272 + for(i = 0; i < ncols; i++) {
273 + wf_init_dataset_size(&wv->wds[i], wt->nvalues);
274 +- wds->min = 0.0;
275 +- wds->max = 0.0;
276 + }
277 + }
278 + return 0;
279 +diff --git a/src/gtkmisc.c b/src/gtkmisc.c
280 +index b0484ad..04bfde5 100644
281 +--- a/src/gtkmisc.c
282 ++++ b/src/gtkmisc.c
283 +@@ -392,6 +392,7 @@ SCM_DEFINE(gwgtk_menu_popup, "gwgtk-menu-popup", 3, 0, 0,
284 + // printf("gwgtk_menu_popup %d\n", mbutton);
285 + menu = build_menu_from_scmlist(list);
286 + gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, mbutton, activate_time);
287 ++ return SCM_UNSPECIFIED;
288 + }
289 + #undef FUNC_NAME
290 +
291 +@@ -458,6 +459,7 @@ SCM_DEFINE(popup_text_dialog, "popup-text-dialog", 2, 0, 0,
292 + VALIDATE_ARG_STR_NEWCOPY_USE_NULL(1,title,ctitle);
293 + VALIDATE_ARG_STR_NEWCOPY_USE_NULL(2,text,ctext);
294 + create_gtktextdialog(ctitle, ctext);
295 ++ return SCM_UNSPECIFIED;
296 + }
297 + #undef FUNC_NAME
298 +
299 +diff --git a/src/wavelist.c b/src/wavelist.c
300 +index 142e229..20cf84d 100644
301 +--- a/src/wavelist.c
302 ++++ b/src/wavelist.c
303 +@@ -859,6 +859,7 @@ SCM_DEFINE(new_wavevar_calc_x, "new-wavevar-calc!", 3, 1, 0,
304 + if(df->wlist_win) {
305 + gwfile_add_wv_to_list(wvnew, df);
306 + }
307 ++ return SCM_UNSPECIFIED;
308 + }
309 + #undef FUNC_NAME
310 +
311 +--
312 +2.21.0
313 +
314
315 diff --git a/sci-electronics/gwave/gwave-20190116.ebuild b/sci-electronics/gwave/gwave-20190116.ebuild
316 new file mode 100644
317 index 00000000000..b82fb8c7328
318 --- /dev/null
319 +++ b/sci-electronics/gwave/gwave-20190116.ebuild
320 @@ -0,0 +1,55 @@
321 +# Copyright 1999-2019 Gentoo Authors
322 +# Distributed under the terms of the GNU General Public License v2
323 +
324 +EAPI=7
325 +
326 +inherit autotools desktop gnome2-utils xdg-utils
327 +
328 +DESCRIPTION="Analog waveform viewer for SPICE-like simulations"
329 +HOMEPAGE="http://gwave.sourceforge.net"
330 +SRC_URI="mirror://sourceforge/${PN}/gwave3/${P}.tar.gz"
331 +
332 +LICENSE="GPL-2"
333 +KEYWORDS="~amd64 ~x86"
334 +IUSE="gnuplot plotutils"
335 +SLOT="0"
336 +
337 +DEPEND="
338 + >=dev-scheme/guile-2[networking]
339 + >=x11-libs/gtk+-2.8.0:2=
340 + sys-libs/readline:0=
341 + sys-libs/ncurses:0="
342 +
343 +RDEPEND="${DEPEND}
344 + sci-electronics/electronics-menu
345 + gnuplot? ( sci-visualization/gnuplot )
346 + plotutils? ( media-libs/plotutils )"
347 +
348 +PATCHES=(
349 + "${FILESDIR}"/${P}-multiple-little-bugfixes.patch
350 + "${FILESDIR}"/${P}-as-needed.patch
351 + "${FILESDIR}"/${P}-fix-configure.patch
352 +)
353 +
354 +src_prepare() {
355 + default
356 + eautoreconf
357 +}
358 +
359 +src_install() {
360 + default
361 + newicon icons/wave-drag-ok.xpm gwave.xpm
362 + make_desktop_entry gwave "Gwave" gwave "Electronics"
363 +}
364 +
365 +pkg_postinst() {
366 + xdg_desktop_database_update
367 + xdg_mimeinfo_database_update
368 + gnome2_icon_cache_update
369 +}
370 +
371 +pkg_postrm() {
372 + xdg_desktop_database_update
373 + xdg_mimeinfo_database_update
374 + gnome2_icon_cache_update
375 +}