From 94dfb040a50b42aa8a2cc5707b6e2484b4d58f4c Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Jan 18 2018 00:57:06 +0000 Subject: Cherry-pick patch from upstream to fix generator segfault --- diff --git a/sip-4.19.6-fix_segfault.patch b/sip-4.19.6-fix_segfault.patch new file mode 100644 index 0000000..7e94eb6 --- /dev/null +++ b/sip-4.19.6-fix_segfault.patch @@ -0,0 +1,21 @@ + +# HG changeset patch +# User Phil Thompson +# Date 1515952150 0 +# Node ID 8f9c478295d36b07066fba1c2ac8daacf632dde7 +# Parent e37301b91a57db62ed77ad5c912fcda30d85c997 +Fixed the generated of a default value that is a global unscoped enum. + +diff -r e37301b91a57 -r 8f9c478295d3 sipgen/gencode.c +--- a/sipgen/gencode.c Tue Jan 09 14:16:47 2018 +0000 ++++ b/sipgen/gencode.c Sun Jan 14 17:49:10 2018 +0000 +@@ -7585,7 +7585,7 @@ + { + if (isScopedEnum(ed)) + prcode(fp, "%E", ed); +- else ++ else if (ed->ecd != NULL) + prEnumMemberScope(ed->members, fp); + + prcode(fp, "::%s", ed->members->cname); + diff --git a/sip.spec b/sip.spec index 8efbc4f..686e4af 100644 --- a/sip.spec +++ b/sip.spec @@ -17,7 +17,7 @@ Summary: SIP - Python/C++ Bindings Generator Name: sip Version: 4.19.6 -Release: 4%{?dist} +Release: 5%{?dist} # sipgen/parser.{c.h} is GPLv3+ with exceptions (bison) License: GPLv2 or GPLv3 and (GPLv3+ with exceptions) @@ -27,6 +27,8 @@ Source0: http://downloads.sourceforge.net/pyqt/sip-%{version}%{?snap:-snapshot- #Source0: http://www.riverbankcomputing.com/static/Downloads/sip4/sip-%{version}.tar.gz ## upstream patches +# fix a segfault when running sip generator +Patch1: sip-4.19.6-fix_segfault.patch ## upstreamable patches # make install should not strip (by default), kills -debuginfo @@ -122,6 +124,7 @@ classes library. %setup -q -n %{name}-%{version}%{?snap:-snapshot-%{snap}} +%patch1 -p1 -b .fix_segfault %patch50 -p1 -b .no_strip %patch51 -p1 -b .no_rpath @@ -204,6 +207,9 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip %changelog +* Thu Jan 18 2018 Scott Talbert - 4.19.6-5 +- Cherry-pick patch from upstream to fix generator segfault + * Mon Dec 25 2017 Rex Dieter - 4.19.6-4 - python2-sip-devel: fix dep on base pkg