pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/inkscape
Module Name: pkgsrc
Committed By: jperkin
Date: Mon Nov 4 10:10:57 UTC 2024
Modified Files:
pkgsrc/graphics/inkscape: distinfo
Added Files:
pkgsrc/graphics/inkscape/patches: patch-src_path_splinefit_splinefit.c
patch-src_path_splinefit_splinefont.c
patch-src_path_splinefit_splinefont.h
Log Message:
inkscape: Fix build on SunOS.
To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 pkgsrc/graphics/inkscape/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefit.c \
pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefont.c \
pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefont.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/inkscape/distinfo
diff -u pkgsrc/graphics/inkscape/distinfo:1.101 pkgsrc/graphics/inkscape/distinfo:1.102
--- pkgsrc/graphics/inkscape/distinfo:1.101 Tue Oct 22 09:00:10 2024
+++ pkgsrc/graphics/inkscape/distinfo Mon Nov 4 10:10:57 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.101 2024/10/22 09:00:10 wiz Exp $
+$NetBSD: distinfo,v 1.102 2024/11/04 10:10:57 jperkin Exp $
BLAKE2s (inkscape-1.4.tar.xz) = 4ff593a28645a46cf060fbcbe6c1275dd1ff331220ef99634588e46471deffd2
SHA512 (inkscape-1.4.tar.xz) = 3b81306b81416597073e7eda2a103112cee63493bcf96fa737bb1edfbd682ebb329e415bbbbfda877aef2a78dc376460040ebc5c0cc2c90c0fe60db5d7d12368
@@ -7,3 +7,6 @@ SHA1 (patch-CMakeScripts_DefineDependsan
SHA1 (patch-src_extension_implementation_script.cpp) = da46549f688da5c9c0ecbeaeac7962e4f261cae4
SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.cpp) = 62c3782eeed40d2dadc71aeee4a38af1288534b5
SHA1 (patch-src_extension_internal_pdfinput_pdf-parser.h) = 9a8c7daff94c368249ecc53fe7571b2446e8b1e8
+SHA1 (patch-src_path_splinefit_splinefit.c) = 6c4482891567215a9b2cb5b2a4fb63ca54b24f9f
+SHA1 (patch-src_path_splinefit_splinefont.c) = 43f67ea3c25d64d323899718d6adf26225f24da0
+SHA1 (patch-src_path_splinefit_splinefont.h) = 170bec433cfbf98f54717e09433f6def5a7a9afe
Added files:
Index: pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefit.c
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefit.c:1.1
--- /dev/null Mon Nov 4 10:10:57 2024
+++ pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefit.c Mon Nov 4 10:10:57 2024
@@ -0,0 +1,39 @@
+$NetBSD: patch-src_path_splinefit_splinefit.c,v 1.1 2024/11/04 10:10:57 jperkin Exp $
+
+Avoid conflict with incompatible "extended" typedef on SunOS.
+
+--- src/path/splinefit/splinefit.c.orig 2024-11-04 10:01:57.620685475 +0000
++++ src/path/splinefit/splinefit.c
+@@ -408,7 +408,7 @@ static bigreal ClosestSplineSolve(Spline
+ /* We want to find t so that spline(t) = sought */
+ /* find the value which is closest to close_to_t */
+ /* on error return closetot */
+- extended ts[3];
++ xtended ts[3];
+ int i;
+ bigreal t, best, test;
+
+@@ -436,7 +436,7 @@ static bigreal SigmaDeltas(Spline *splin
+ int i;
+ bigreal xdiff, ydiff, sum, temp, t;
+ SplinePoint *to = spline->to, *from = spline->from;
+- extended ts[2], x,y;
++ xtended ts[2], x,y;
+ struct dotbounds db2;
+ bigreal dot;
+ int near_vert, near_horiz;
+@@ -888,11 +888,11 @@ return( SplineMake3(from,to));
+ *bunit.y-75*bunit.x*bunit.x*f*f*aunit.y);
+ quad.e = 80*bunit.y*(42*bunit.y*m-25*f*(bunit.y-bunit.x*f));
+ }
+- extended solutions[4] = {-999999,-999999,-999999,-999999};
++ xtended solutions[4] = {-999999,-999999,-999999,-999999};
+ _QuarticSolve(&quad,solutions);
+- extended abSolutions[10][2]; /* there are at most 4+4+1+1=10 solutions of pairs of a and b (quartic=0,derivative=0,b=0.01,a=0.01) */
++ xtended abSolutions[10][2]; /* there are at most 4+4+1+1=10 solutions of pairs of a and b (quartic=0,derivative=0,b=0.01,a=0.01) */
+ numberOfSolutions = 0;
+- extended a,b;
++ xtended a,b;
+ for( int i = 0; i < 4; i++ ){
+ a = solutions[i];
+ if ( a >= 0 && a < aMax ) {
Index: pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefont.c
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefont.c:1.1
--- /dev/null Mon Nov 4 10:10:57 2024
+++ pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefont.c Mon Nov 4 10:10:57 2024
@@ -0,0 +1,171 @@
+$NetBSD: patch-src_path_splinefit_splinefont.c,v 1.1 2024/11/04 10:10:57 jperkin Exp $
+
+Avoid conflict with incompatible "extended" typedef on SunOS.
+
+--- src/path/splinefit/splinefont.c.orig 2024-11-04 10:00:10.828146677 +0000
++++ src/path/splinefit/splinefont.c
+@@ -339,9 +339,9 @@ return( t );
+ return( t );
+ }
+
+-void SplineFindExtrema(const Spline1D *sp, extended *_t1, extended *_t2 ) {
+- extended t1= -1, t2= -1;
+- extended b2_fourac;
++void SplineFindExtrema(const Spline1D *sp, xtended *_t1, xtended *_t2 ) {
++ xtended t1= -1, t2= -1;
++ xtended b2_fourac;
+
+ /* Find the extreme points on the curve */
+ /* Set to -1 if there are none or if they are outside the range [0,1] */
+@@ -351,14 +351,14 @@ void SplineFindExtrema(const Spline1D *s
+ /* (Does not check to see if d/dt==0 points are inflection points (rather than extrema) */
+ if ( sp->a!=0 ) {
+ /* cubic, possibly 2 extrema (possibly none) */
+- b2_fourac = 4*(extended) sp->b*sp->b - 12*(extended) sp->a*sp->c;
++ b2_fourac = 4*(xtended) sp->b*sp->b - 12*(xtended) sp->a*sp->c;
+ if ( b2_fourac>=0 ) {
+ b2_fourac = sqrt(b2_fourac);
+ t1 = (-2*sp->b - b2_fourac) / (6*sp->a);
+ t2 = (-2*sp->b + b2_fourac) / (6*sp->a);
+ t1 = CheckExtremaForSingleBitErrors(sp,t1,t2);
+ t2 = CheckExtremaForSingleBitErrors(sp,t2,t1);
+- if ( t1>t2 ) { extended temp = t1; t1 = t2; t2 = temp; }
++ if ( t1>t2 ) { xtended temp = t1; t1 = t2; t2 = temp; }
+ else if ( t1==t2 ) t2 = -1;
+ if ( RealNear(t1,0)) t1=0; else if ( RealNear(t1,1)) t1=1;
+ if ( RealNear(t2,0)) t2=0; else if ( RealNear(t2,1)) t2=1;
+@@ -367,7 +367,7 @@ void SplineFindExtrema(const Spline1D *s
+ }
+ } else if ( sp->b!=0 ) {
+ /* Quadratic, at most one extremum */
+- t1 = -sp->c/(2.0*(extended) sp->b);
++ t1 = -sp->c/(2.0*(xtended) sp->b);
+ if ( t1<=0 || t1>=1 ) t1 = -1;
+ } else /*if ( sp->c!=0 )*/ {
+ /* linear, no extrema */
+@@ -421,10 +421,10 @@ int IntersectLines(BasePoint *inter,
+ }
+
+ static int MinMaxWithin(Spline *spline) {
+- extended dx, dy;
++ xtended dx, dy;
+ int which;
+- extended t1, t2;
+- extended w;
++ xtended t1, t2;
++ xtended w;
+ /* We know that this "spline" is basically one dimensional. As long as its*/
+ /* extrema are between the start and end points on that line then we can */
+ /* treat it as a line. If the extrema are way outside the line segment */
+@@ -719,9 +719,9 @@ return( -1 );
+ /* I use -999999 as an error flag, since we're really only interested in */
+ /* solns near 0 and 1 that should be ok. -1 is perhaps a little too close */
+ /* Sigh. When solutions are near 0, the rounding errors are appalling. */
+-int _CubicSolve(const Spline1D *sp,bigreal sought, extended ts[3]) {
+- extended d, xN, yN, delta2, temp, delta, h, t2, t3, theta;
+- extended sa=sp->a, sb=sp->b, sc=sp->c, sd=sp->d-sought;
++int _CubicSolve(const Spline1D *sp,bigreal sought, xtended ts[3]) {
++ xtended d, xN, yN, delta2, temp, delta, h, t2, t3, theta;
++ xtended sa=sp->a, sb=sp->b, sc=sp->c, sd=sp->d-sought;
+ int i=0;
+
+ ts[0] = ts[1] = ts[2] = -999999;
+@@ -729,24 +729,24 @@ int _CubicSolve(const Spline1D *sp,bigre
+ /* one of the roots is 0, the other two are the soln of a quadratic */
+ ts[0] = 0;
+ if ( sc==0 ) {
+- ts[1] = -sb/(extended) sa; /* two zero roots */
++ ts[1] = -sb/(xtended) sa; /* two zero roots */
+ } else {
+- temp = sb*(extended) sb-4*(extended) sa*sc;
++ temp = sb*(xtended) sb-4*(xtended) sa*sc;
+ if ( RealNear(temp,0))
+- ts[1] = -sb/(2*(extended) sa);
++ ts[1] = -sb/(2*(xtended) sa);
+ else if ( temp>=0 ) {
+ temp = sqrt(temp);
+- ts[1] = (-sb+temp)/(2*(extended) sa);
+- ts[2] = (-sb-temp)/(2*(extended) sa);
++ ts[1] = (-sb+temp)/(2*(xtended) sa);
++ ts[2] = (-sb-temp)/(2*(xtended) sa);
+ }
+ }
+ } else if ( sa!=0 ) {
+ /* http://www.m-a.org.uk/eb/mg/mg077ch.pdf */
+ /* this nifty solution to the cubic neatly avoids complex arithmetic */
+- xN = -sb/(3*(extended) sa);
++ xN = -sb/(3*(xtended) sa);
+ yN = ((sa*xN + sb)*xN+sc)*xN + sd;
+
+- delta2 = (sb*(extended) sb-3*(extended) sa*sc)/(9*(extended) sa*sa);
++ delta2 = (sb*(xtended) sb-3*(xtended) sa*sc)/(9*(xtended) sa*sa);
+ /*if ( RealWithin(delta2,0,.00000001) ) delta2 = 0;*/
+
+ /* the descriminant is yN^2-h^2, but delta might be <0 so avoid using h */
+@@ -782,23 +782,23 @@ int _CubicSolve(const Spline1D *sp,bigre
+ if ( xN>=-0.0001 && xN<=1.0001 ) ts[0] = xN;
+ }
+ } else if ( sb!=0 ) {
+- extended d = sc*(extended) sc-4*(extended) sb*sd;
++ xtended d = sc*(xtended) sc-4*(xtended) sb*sd;
+ if ( d<0 && RealNear(d,0)) d=0;
+ if ( d<0 )
+ return(false); /* All roots imaginary */
+ d = sqrt(d);
+- ts[0] = (-sc-d)/(2*(extended) sb);
+- ts[1] = (-sc+d)/(2*(extended) sb);
++ ts[0] = (-sc-d)/(2*(xtended) sb);
++ ts[1] = (-sc+d)/(2*(xtended) sb);
+ } else if ( sc!=0 ) {
+- ts[0] = -sd/(extended) sc;
++ ts[0] = -sd/(xtended) sc;
+ } else {
+ /* If it's a point then either everything is a solution, or nothing */
+ }
+ return( ts[0]!=-999999 );
+ }
+
+-int _QuarticSolve(Quartic *q,extended ts[4]) {
+- extended extrema[5];
++int _QuarticSolve(Quartic *q,xtended ts[4]) {
++ xtended extrema[5];
+ Spline1D sp;
+ int ecnt = 0, i, zcnt;
+
+@@ -828,15 +828,15 @@ return( _CubicSolve(&sp,0,ts+1)+1);
+ if ( extrema[1]!=-999999 ) {
+ ecnt = 2;
+ if ( extrema[1]<extrema[0] ) {
+- extended temp = extrema[1]; extrema[1] = extrema[0]; extrema[0]=temp;
++ xtended temp = extrema[1]; extrema[1] = extrema[0]; extrema[0]=temp;
+ }
+ if ( extrema[2]!=-999999 ) {
+ ecnt = 3;
+ if ( extrema[2]<extrema[0] ) {
+- extended temp = extrema[2]; extrema[2] = extrema[0]; extrema[0]=temp;
++ xtended temp = extrema[2]; extrema[2] = extrema[0]; extrema[0]=temp;
+ }
+ if ( extrema[2]<extrema[1] ) {
+- extended temp = extrema[2]; extrema[2] = extrema[1]; extrema[1]=temp;
++ xtended temp = extrema[2]; extrema[2] = extrema[1]; extrema[1]=temp;
+ }
+ }
+ }
+@@ -849,14 +849,14 @@ return( _CubicSolve(&sp,0,ts+1)+1);
+ ecnt += 2;
+ /* divide into monotonic sections & use binary search to find zeroes */
+ for ( i=zcnt=0; i<ecnt-1; ++i ) {
+- extended top, bottom, val;
+- extended topt, bottomt, t;
++ xtended top, bottom, val;
++ xtended topt, bottomt, t;
+ topt = extrema[i+1];
+ bottomt = extrema[i];
+ top = (((q->a*topt+q->b)*topt+q->c)*topt+q->d)*topt+q->e;
+ bottom = (((q->a*bottomt+q->b)*bottomt+q->c)*bottomt+q->d)*bottomt+q->e;
+ if ( top<bottom ) {
+- extended temp = top; top = bottom; bottom = temp;
++ xtended temp = top; top = bottom; bottom = temp;
+ temp = topt; topt = bottomt; bottomt = temp;
+ }
+ if ( bottom>.001 ) /* this monotonic is all above 0 */
Index: pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefont.h
diff -u /dev/null pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefont.h:1.1
--- /dev/null Mon Nov 4 10:10:57 2024
+++ pkgsrc/graphics/inkscape/patches/patch-src_path_splinefit_splinefont.h Mon Nov 4 10:10:57 2024
@@ -0,0 +1,35 @@
+$NetBSD: patch-src_path_splinefit_splinefont.h,v 1.1 2024/11/04 10:10:57 jperkin Exp $
+
+Avoid conflict with incompatible "extended" typedef on SunOS.
+
+--- src/path/splinefit/splinefont.h.orig 2024-11-04 09:53:31.013145555 +0000
++++ src/path/splinefit/splinefont.h
+@@ -7,7 +7,7 @@
+
+ typedef double real;
+ typedef double bigreal;
+-typedef double extended;
++typedef double xtended;
+ typedef int BOOL;
+
+ #define chunkalloc(size) calloc(1,size)
+@@ -123,7 +123,7 @@ SplinePoint *SplinePointCreate(real x, r
+ void SplineRefigure3(Spline *spline);
+ void SplineRefigure(Spline *spline);
+ int SplineIsLinear(Spline *spline);
+-void SplineFindExtrema(const Spline1D *sp, extended *_t1, extended *_t2 );
++void SplineFindExtrema(const Spline1D *sp, xtended *_t1, xtended *_t2 );
+ bigreal SplineMinDistanceToPoint(Spline *s, BasePoint *p);
+
+ void SplinePointFree(SplinePoint *sp);
+@@ -134,8 +134,8 @@ bigreal BPDot(BasePoint v1, BasePoint v2
+ bigreal BPCross(BasePoint v1, BasePoint v2);
+ BasePoint BPRev(BasePoint v);
+
+-int _CubicSolve(const Spline1D *sp,bigreal sought, extended ts[3]);
+-int _QuarticSolve(Quartic *q,extended ts[4]);
++int _CubicSolve(const Spline1D *sp,bigreal sought, xtended ts[3]);
++int _QuarticSolve(Quartic *q,xtended ts[4]);
+ int IntersectLines(BasePoint *inter,
+ BasePoint *line1_1, BasePoint *line1_2,
+ BasePoint *line2_1, BasePoint *line2_2);
Home |
Main Index |
Thread Index |
Old Index