diff --git a/sip-hg1297.patch b/sip-hg1297.patch new file mode 100644 index 0000000..c43b3e0 --- /dev/null +++ b/sip-hg1297.patch @@ -0,0 +1,90 @@ +# HG changeset patch +# User Phil Thompson +# Date 1401630727 -3600 +# Sun Jun 01 14:52:07 2014 +0100 +# Branch 4.16-maint +# Node ID d9229cce7220be17f92fafaaafbf28d3d9697042 +# Parent 2a310fa9719ad1b1731f27eb7e80ef9a6bda6982 +Fixed a regression in the creating of the build file when generating individual +source files. + +diff -r 2a310fa9719a -r d9229cce7220 sipgen/gencode.c +--- a/sipgen/gencode.c Mon May 26 11:36:04 2014 +0100 ++++ b/sipgen/gencode.c Sun Jun 01 14:52:07 2014 +0100 +@@ -282,6 +282,7 @@ + static virtErrorHandler *getVirtErrorHandler(sipSpec *pt, overDef *od, + classDef *cd, moduleDef *mod); + static int hasOptionalArgs(overDef *od); ++static int emptyIfaceFile(sipSpec *pt, ifaceFileDef *iff); + + + /* +@@ -429,6 +430,9 @@ + if (iff->type == exception_iface) + continue; + ++ if (emptyIfaceFile(pt, iff)) ++ continue; ++ + if (iff->api_range != NULL) + prcode(fp, " sip%s%F_%d%s", mname, iff->fqcname, iff->api_range->index, srcSuffix); + else +@@ -3673,6 +3677,26 @@ + + + /* ++ * See if an interface file has any content. ++ */ ++static int emptyIfaceFile(sipSpec *pt, ifaceFileDef *iff) ++{ ++ classDef *cd; ++ mappedTypeDef *mtd; ++ ++ for (cd = pt->classes; cd != NULL; cd = cd->next) ++ if (!isProtectedClass(cd) && !isExternal(cd) && cd->iff == iff) ++ return FALSE; ++ ++ for (mtd = pt->mappedtypes; mtd != NULL; mtd = mtd->next) ++ if (mtd->iff == iff) ++ return FALSE; ++ ++ return TRUE; ++} ++ ++ ++/* + * Generate the C/C++ code for an interface. + */ + static void generateIfaceCpp(sipSpec *pt, ifaceFileDef *iff, int need_postinc, +@@ -3684,30 +3708,12 @@ + classDef *cd; + mappedTypeDef *mtd; + FILE *fp; +- int empty; + + /* + * Check that there will be something in the file so that we don't get + * warning messages from ranlib. + */ +- empty = TRUE; +- +- for (cd = pt->classes; cd != NULL; cd = cd->next) +- if (!isProtectedClass(cd) && !isExternal(cd) && cd->iff == iff) +- { +- empty = FALSE; +- break; +- } +- +- if (empty) +- for (mtd = pt->mappedtypes; mtd != NULL; mtd = mtd->next) +- if (mtd->iff == iff) +- { +- empty = FALSE; +- break; +- } +- +- if (empty) ++ if (emptyIfaceFile(pt, iff)) + return; + + if (master == NULL) diff --git a/sip.spec b/sip.spec index b575979..8c864dc 100644 --- a/sip.spec +++ b/sip.spec @@ -17,7 +17,7 @@ Summary: SIP - Python/C++ Bindings Generator Name: sip Version: 4.16 -Release: 1%{?dist} +Release: 2%{?dist} # sipgen/parser.{c.h} is GPLv3+ with exceptions (bison) License: GPLv2 or GPLv3 and (GPLv3+ with exceptions) @@ -31,6 +31,10 @@ Patch50: sip-4.12.1-no_strip.patch # try not to rpath the world Patch51: sip-4.13.3-no_rpath.patch +## upstream patches +# fixes regression ftbfs PyQt-4.11 +Patch100: sip-hg1297.patch + # extracted from sip.h, SIP_API_MAJOR_NR SIP_API_MINOR_NR defines Source1: macros.sip %global _sip_api_major 11 @@ -114,6 +118,7 @@ classes library. %patch50 -p1 -b .no_strip %patch51 -p1 -b .no_rpath +%patch100 -p1 -b .hg1297 %if 0%{?with_python3} rm -rf %{py3dir} @@ -184,6 +189,9 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip %changelog +* Sun Jun 01 2014 Rex Dieter 4.16-2 +- pull in upstream fix for PyQt-4.11.1 ftbfs + * Wed May 28 2014 Rex Dieter 4.16-1 - sip-4.16, sip-api(11)=11.1