pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/print/scribus
Module Name: pkgsrc
Committed By: joerg
Date: Tue Feb 21 16:01:36 UTC 2017
Modified Files:
pkgsrc/print/scribus: Makefile distinfo
Added Files:
pkgsrc/print/scribus/patches: patch-scribus_util.cpp
Log Message:
Cut down the number of loops in the roman number parser. The existing
logic triggers a super-linear memory use path in Clang and is generally
overcomplicated. Bump revision because it is still a code change.
To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 pkgsrc/print/scribus/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/print/scribus/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/print/scribus/patches/patch-scribus_util.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/print/scribus/Makefile
diff -u pkgsrc/print/scribus/Makefile:1.107 pkgsrc/print/scribus/Makefile:1.108
--- pkgsrc/print/scribus/Makefile:1.107 Sun Jan 1 14:43:54 2017
+++ pkgsrc/print/scribus/Makefile Tue Feb 21 16:01:36 2017
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.107 2017/01/01 14:43:54 wiz Exp $
+# $NetBSD: Makefile,v 1.108 2017/02/21 16:01:36 joerg Exp $
DISTNAME= scribus-1.3.3.14
-PKGREVISION= 26
+PKGREVISION= 27
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=scribus/}
EXTRACT_SUFX= .tar.bz2
Index: pkgsrc/print/scribus/distinfo
diff -u pkgsrc/print/scribus/distinfo:1.27 pkgsrc/print/scribus/distinfo:1.28
--- pkgsrc/print/scribus/distinfo:1.27 Fri Apr 1 16:59:38 2016
+++ pkgsrc/print/scribus/distinfo Tue Feb 21 16:01:36 2017
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.27 2016/04/01 16:59:38 jperkin Exp $
+$NetBSD: distinfo,v 1.28 2017/02/21 16:01:36 joerg Exp $
SHA1 (scribus-1.3.3.14.tar.bz2) = 3ad5341fb815e2782aa4d817025d74af4a7c78e1
RMD160 (scribus-1.3.3.14.tar.bz2) = b0f35060eb61f033cb86ee644d5c88222b534596
@@ -15,3 +15,4 @@ SHA1 (patch-scribus_cupsoptions.cpp) = 9
SHA1 (patch-scribus_plugins_scriptplugin_runscriptdialog.cpp) = 75e9dfbc1b0c6fce3f9c5dc1f1eba62e4a1525a0
SHA1 (patch-scribus_plugins_scriptplugin_runscriptdialog.h) = f4399a4b9352b61ca5a0c8e3f3be908f3d925b55
SHA1 (patch-scribus_printerutil.cpp) = 5a6d7b3d7dc327473b14dc5dcbe74f4fdb8a724b
+SHA1 (patch-scribus_util.cpp) = bea28ff335251984dce41bd1023573b9f2ac21ce
Added files:
Index: pkgsrc/print/scribus/patches/patch-scribus_util.cpp
diff -u /dev/null pkgsrc/print/scribus/patches/patch-scribus_util.cpp:1.1
--- /dev/null Tue Feb 21 16:01:36 2017
+++ pkgsrc/print/scribus/patches/patch-scribus_util.cpp Tue Feb 21 16:01:36 2017
@@ -0,0 +1,120 @@
+$NetBSD: patch-scribus_util.cpp,v 1.1 2017/02/21 16:01:36 joerg Exp $
+
+Simplify logic to avoid expensive nested loop handling in Clang.
+
+--- scribus/util.cpp.orig 2017-02-21 14:56:16.278339690 +0000
++++ scribus/util.cpp
+@@ -1412,15 +1412,15 @@ const QString arabicToRoman(uint i)
+ roman += "m";
+ arabic -= 1000000;
+ }
+- while (arabic - 900000 >= 0){
++ if (arabic - 900000 >= 0){
+ roman += "cm";
+ arabic -= 900000;
+ }
+- while (arabic - 500000 >= 0){
++ if (arabic - 500000 >= 0){
+ roman += "d";
+ arabic -= 500000;
+ }
+- while (arabic - 400000 >= 0){
++ if (arabic - 400000 >= 0){
+ roman += "cd";
+ arabic -= 400000;
+ }
+@@ -1428,15 +1428,15 @@ const QString arabicToRoman(uint i)
+ roman += "c";
+ arabic -= 100000;
+ }
+- while (arabic - 90000 >= 0){
++ if (arabic - 90000 >= 0){
+ roman += "xc";
+ arabic -= 90000;
+ }
+- while (arabic - 50000 >= 0){
++ if (arabic - 50000 >= 0){
+ roman += "l";
+ arabic -= 50000;
+ }
+- while (arabic - 40000 >= 0){
++ if (arabic - 40000 >= 0){
+ roman += "xl";
+ arabic -= 40000;
+ }
+@@ -1444,15 +1444,15 @@ const QString arabicToRoman(uint i)
+ roman += "x";
+ arabic -= 10000;
+ }
+- while (arabic - 9000 >= 0){
++ if (arabic - 9000 >= 0){
+ roman += "Mx";
+ arabic -= 9000;
+ }
+- while (arabic - 5000 >= 0){
++ if (arabic - 5000 >= 0){
+ roman += "v";
+ arabic -= 5000;
+ }
+- while (arabic - 4000 >= 0){
++ if (arabic - 4000 >= 0){
+ roman += "Mv";
+ arabic -= 4000;
+ }
+@@ -1460,15 +1460,15 @@ const QString arabicToRoman(uint i)
+ roman += "M";
+ arabic -= 1000;
+ }
+- while (arabic - 900 >= 0){
++ if (arabic - 900 >= 0){
+ roman += "CM";
+ arabic -= 900;
+ }
+- while (arabic - 500 >= 0){
++ if (arabic - 500 >= 0){
+ roman += "D";
+ arabic -= 500;
+ }
+- while (arabic - 400 >= 0){
++ if (arabic - 400 >= 0){
+ roman += "CD";
+ arabic -= 400;
+ }
+@@ -1476,15 +1476,15 @@ const QString arabicToRoman(uint i)
+ roman += "C";
+ arabic -= 100;
+ }
+- while (arabic - 90 >= 0){
++ if (arabic - 90 >= 0){
+ roman += "XC";
+ arabic -= 90;
+ }
+- while (arabic - 50 >= 0){
++ if (arabic - 50 >= 0){
+ roman += "L";
+ arabic -= 50;
+ }
+- while (arabic - 40 >= 0){
++ if (arabic - 40 >= 0){
+ roman += "XL";
+ arabic -= 40;
+ }
+@@ -1492,15 +1492,15 @@ const QString arabicToRoman(uint i)
+ roman += "X";
+ arabic -= 10;
+ }
+- while (arabic - 9 >= 0){
++ if (arabic - 9 >= 0){
+ roman += "IX";
+ arabic -= 9;
+ }
+- while (arabic - 5 >= 0){
++ if (arabic - 5 >= 0){
+ roman += "V";
+ arabic -= 5;
+ }
+- while (arabic - 4 >= 0){
++ if (arabic - 4 >= 0){
+ roman += "IV";
+ arabic -= 4;
+ }
Home |
Main Index |
Thread Index |
Old Index