From dc03a8b1de47b0bd93eae32ad5c1a30eb9cc304db99750646f0b1c18dfdf699c Mon Sep 17 00:00:00 2001 From: Dmitry Roshchin Date: Thu, 5 Jun 2014 20:48:55 +0000 Subject: [PATCH 1/2] osc copypac from project:Education package:gnucap revision:7 OBS-URL: https://build.opensuse.org/package/show/electronics/gnucap?expand=0&rev=1 From 2b624d95f4e5339e9e06d3ddf931705e83ebb341d71b67f805b7d13472ccff28 Mon Sep 17 00:00:00 2001 From: Dmitry Roshchin Date: Fri, 17 Jun 2016 06:47:27 +0000 Subject: [PATCH 2/2] - Fix build with GCC 6 [boo#985099] * gnucap-0.35-gcc6.patch OBS-URL: https://build.opensuse.org/package/show/electronics/gnucap?expand=0&rev=2 --- gnucap-0.35-gcc6.patch | 15 +++++++++++++++ gnucap.changes | 6 ++++++ gnucap.spec | 12 ++++++++---- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 gnucap-0.35-gcc6.patch diff --git a/gnucap-0.35-gcc6.patch b/gnucap-0.35-gcc6.patch new file mode 100644 index 0000000..7296594 --- /dev/null +++ b/gnucap-0.35-gcc6.patch @@ -0,0 +1,15 @@ +diff -up gnucap-0.35/src/plot.cc~ gnucap-0.35/src/plot.cc +--- gnucap-0.35/src/plot.cc~ 2016-04-26 09:16:25.000000000 +0200 ++++ gnucap-0.35/src/plot.cc 2016-04-26 09:18:43.392162278 +0200 +@@ -231,9 +231,9 @@ static void plotarg( + double yhi, + double zhi) + { +- auto char adata[MAXWIDTH+1]; /* actual data. copy emptydata, insert */ ++ char adata[MAXWIDTH+1]; /* actual data. copy emptydata, insert */ + char *xxs; /* string representation of xx */ +- memcpy(adata, emptydata, MAXWIDTH); /* copy prototype */ ++ memcpy(adata, emptydata, MAXWIDTH + 1); /* copy prototype */ + xxs = ftos( xx, 11, 5, IO::formaat ); + if (zz != NOT_VALID) { + adata[point(zz,zlo,zhi,CONSSCALE,0,1)] = '+';/* zap data into string */ diff --git a/gnucap.changes b/gnucap.changes index 2ecfda4..ec21a82 100644 --- a/gnucap.changes +++ b/gnucap.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 17 06:46:39 UTC 2016 - dmitry_r@opensuse.org + +- Fix build with GCC 6 [boo#985099] + * gnucap-0.35-gcc6.patch + ------------------------------------------------------------------- Tue Jun 26 10:29:17 UTC 2012 - lars@linux-schulserver.de diff --git a/gnucap.spec b/gnucap.spec index 924c069..2b213db 100644 --- a/gnucap.spec +++ b/gnucap.spec @@ -1,7 +1,7 @@ # # spec file for package gnucap # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,13 +15,14 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: gnucap Version: 0.35 -Release: 10 -License: GPL-2.0+ +Release: 0 Summary: Gnu Circuit Analysis Package -Url: http://www.gnu.org/software/gnucap/ +License: GPL-2.0+ Group: Productivity/Scientific/Electronics +Url: http://www.gnu.org/software/gnucap/ Source: %{name}-%{version}.tar.bz2 Source1: gnucap-modelgen.1 # PATCH-FIX-UPSTREAM -- fix build with GCC 4.3 @@ -32,6 +33,8 @@ Patch2: gnucap-0.34-debian.patch Patch3: gnucap-docpath.patch # PATCH-FIX-OPENSUSE -- from Debian: add shebang, and explicitly call gnucap Patch4: gnucap-fix_runall.patch +# PATCH-FIX-UPSTREAM -- Fix build with GCC 6 +Patch5: gnucap-0.35-gcc6.patch BuildRequires: gcc-c++ BuildRequires: libpng-devel BuildRequires: ncurses-devel @@ -72,6 +75,7 @@ sed -i 's/-ltermcap/-lncurses/g' configure %patch2 -p1 %patch3 -p0 %patch4 -p0 +%patch5 -p1 rm INSTALL %build