SHA256
1
0
forked from pool/gnucap

Accepting request 402847 from electronics

- Fix build with GCC 6 [boo#985099]
  * gnucap-0.35-gcc6.patch

OBS-URL: https://build.opensuse.org/request/show/402847
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnucap?expand=0&rev=5
This commit is contained in:
Dominique Leuenberger 2016-06-19 11:54:13 +00:00 committed by Git OBS Bridge
commit 65c885e0fa
3 changed files with 29 additions and 4 deletions

15
gnucap-0.35-gcc6.patch Normal file
View File

@ -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 */

View File

@ -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 Tue Jun 26 10:29:17 UTC 2012 - lars@linux-schulserver.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package gnucap # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,13 +15,14 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: gnucap Name: gnucap
Version: 0.35 Version: 0.35
Release: 10 Release: 0
License: GPL-2.0+
Summary: Gnu Circuit Analysis Package Summary: Gnu Circuit Analysis Package
Url: http://www.gnu.org/software/gnucap/ License: GPL-2.0+
Group: Productivity/Scientific/Electronics Group: Productivity/Scientific/Electronics
Url: http://www.gnu.org/software/gnucap/
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Source1: gnucap-modelgen.1 Source1: gnucap-modelgen.1
# PATCH-FIX-UPSTREAM -- fix build with GCC 4.3 # PATCH-FIX-UPSTREAM -- fix build with GCC 4.3
@ -32,6 +33,8 @@ Patch2: gnucap-0.34-debian.patch
Patch3: gnucap-docpath.patch Patch3: gnucap-docpath.patch
# PATCH-FIX-OPENSUSE -- from Debian: add shebang, and explicitly call gnucap # PATCH-FIX-OPENSUSE -- from Debian: add shebang, and explicitly call gnucap
Patch4: gnucap-fix_runall.patch Patch4: gnucap-fix_runall.patch
# PATCH-FIX-UPSTREAM -- Fix build with GCC 6
Patch5: gnucap-0.35-gcc6.patch
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
@ -72,6 +75,7 @@ sed -i 's/-ltermcap/-lncurses/g' configure
%patch2 -p1 %patch2 -p1
%patch3 -p0 %patch3 -p0
%patch4 -p0 %patch4 -p0
%patch5 -p1
rm INSTALL rm INSTALL
%build %build