diff options
author | bad <bad@pkgsrc.org> | 2010-10-02 12:14:44 +0000 |
---|---|---|
committer | bad <bad@pkgsrc.org> | 2010-10-02 12:14:44 +0000 |
commit | 26359b19a57b67f0df6d35232ff02d13fd3bb32f (patch) | |
tree | 33c28182bf2e33b9cf558ef4719601b6f99cd464 /graphics | |
parent | edfa04acf3951cac09bc8e6f894da53e0f7d57c8 (diff) | |
download | pkgsrc-26359b19a57b67f0df6d35232ff02d13fd3bb32f.tar.gz |
Account for the fact that NetBSD's realpath(3) doesn't allocate a buffer
iff resolvedname == NULL.
Fixes crashes on startup after first invocation.
PKGREVISION++
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/fotoxx/Makefile | 4 | ||||
-rw-r--r-- | graphics/fotoxx/distinfo | 6 | ||||
-rw-r--r-- | graphics/fotoxx/patches/patch-ac | 14 | ||||
-rw-r--r-- | graphics/fotoxx/patches/patch-ad | 77 |
4 files changed, 67 insertions, 34 deletions
diff --git a/graphics/fotoxx/Makefile b/graphics/fotoxx/Makefile index 6bc5ba68e33..2ec80ca9ebe 100644 --- a/graphics/fotoxx/Makefile +++ b/graphics/fotoxx/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.7 2010/09/14 11:01:57 wiz Exp $ +# $NetBSD: Makefile,v 1.8 2010/10/02 12:14:44 bad Exp $ # DISTNAME= fotoxx-10.8.4 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= graphics MASTER_SITES= http://kornelix.squarespace.com/storage/downloads/ diff --git a/graphics/fotoxx/distinfo b/graphics/fotoxx/distinfo index 408eb30c26c..8ee8de6a993 100644 --- a/graphics/fotoxx/distinfo +++ b/graphics/fotoxx/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.3 2010/08/24 18:58:02 bad Exp $ +$NetBSD: distinfo,v 1.4 2010/10/02 12:14:44 bad Exp $ SHA1 (fotoxx-10.8.4.tar.gz) = 3a1ead13324b5c50811247279c3de43b6e0d776a RMD160 (fotoxx-10.8.4.tar.gz) = fc755d00f6f169bca7de165803a81b9511f5fb4f Size (fotoxx-10.8.4.tar.gz) = 1133275 bytes SHA1 (patch-aa) = 3052ebfdaf7d5c21e1ea15aff5167641f763137c SHA1 (patch-ab) = 3a6cc4a86e4422c62b917a634704650de3c84f48 -SHA1 (patch-ac) = a1c448450a50e6552066797d07eedeb2f214f577 -SHA1 (patch-ad) = f096dc3412c28369278da594ef858e93e4304cd9 +SHA1 (patch-ac) = a0e0c9825d2c3db7b98e81d0a5ca39962cc48f1c +SHA1 (patch-ad) = 7815830a1f5c9a9b24bcd2f79c704d78c1ac5a72 diff --git a/graphics/fotoxx/patches/patch-ac b/graphics/fotoxx/patches/patch-ac index 82244df1205..3ae701a8633 100644 --- a/graphics/fotoxx/patches/patch-ac +++ b/graphics/fotoxx/patches/patch-ac @@ -1,8 +1,16 @@ -$NetBSD: patch-ac,v 1.2 2010/08/24 18:58:03 bad Exp $ +$NetBSD: patch-ac,v 1.3 2010/10/02 12:14:44 bad Exp $ --- zfuncs.h.orig 2010-08-18 11:23:51.000000000 +0000 -+++ zfuncs.h 2010-08-22 23:33:33.000000000 +0000 -@@ -34,9 +34,10 @@ ++++ zfuncs.h 2010-10-02 12:06:46.000000000 +0000 +@@ -22,6 +22,7 @@ + + // zfuncs.h version v.3.8 + ++#include <sys/param.h> + #include <sys/time.h> + #include <sys/stat.h> + #include <unistd.h> +@@ -34,9 +35,10 @@ #include <pthread.h> #include <errno.h> #include <signal.h> diff --git a/graphics/fotoxx/patches/patch-ad b/graphics/fotoxx/patches/patch-ad index 6b6bdb8b13e..b25ba965cbe 100644 --- a/graphics/fotoxx/patches/patch-ad +++ b/graphics/fotoxx/patches/patch-ad @@ -1,7 +1,7 @@ -$NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ +$NetBSD: patch-ad,v 1.2 2010/10/02 12:14:44 bad Exp $ --- fotoxx-10.8.4.cc.orig 2010-08-18 11:23:51.000000000 +0000 -+++ fotoxx-10.8.4.cc 2010-08-22 23:59:53.000000000 +0000 ++++ fotoxx-10.8.4.cc 2010-10-02 12:09:11.000000000 +0000 @@ -145,7 +145,7 @@ int gridy1 = 0, gridy2 = 0, gridny = 0; // Y gridlines int Fslideshow = 0; // slide show mode is active @@ -11,7 +11,32 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ int SBupdate = 0; // request to update status bar int SB_goal = 0, SB_done = 0; // status bar progress tracking char SB_text[100]; // optional status bar text -@@ -985,25 +985,25 @@ +@@ -829,13 +829,23 @@ + "before any edits! (menu Tools -> Convert Tags)"); + } + +- if (image_file) { ++ if (image_file) { // add cwd if needed v.10.7 ++#ifdef __NetBSD__ ++ ppv = zmalloc(MAXPATHLEN+1, "image_file"); ++ if (ppv) { ++ if (realpath(image_file, ppv)) { ++ zfree(image_file); ++ image_file = ppv; ++ } ++ } ++#else + ppv = realpath(image_file,0); // add cwd if needed v.10.7 + if (ppv) { + zfree(image_file); + image_file = strdupz(ppv,0,"imagefile"); // convert to zmalloc() + free(ppv); + } ++#endif + } + + if (image_file) { +@@ -985,25 +995,25 @@ else Mscale = Fzoom; // scale to Fzoom level if (Mscale > pscale) { // zoom increased @@ -45,7 +70,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ if (pincrx > 0 && incrx < 0) incrx = 0; // stop bounce at extremes if (pincrx < 0 && incrx > 0) incrx = 0; pincrx = incrx; -@@ -1019,13 +1019,13 @@ +@@ -1019,13 +1029,13 @@ if (iww == Iww) { // scaled image <= window width Iorgx = 0; // center image in window @@ -61,7 +86,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ } else Dorgy = 0; -@@ -1041,8 +1041,8 @@ +@@ -1041,8 +1051,8 @@ } else pxmtemp2 = PXM_copy_area(Fpxm8,Iorgx,Iorgy,iww,ihh); // no edit, copy PXM-8 @@ -72,7 +97,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ PXM_free(Dpxm8); Dpxm8 = PXM_rescale(pxmtemp2,dww,dhh); PXM_free(pxmtemp2); -@@ -1120,7 +1120,7 @@ +@@ -1120,7 +1130,7 @@ if (SB_goal) // progress monitor v.9.6 { @@ -81,7 +106,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ snprintf(text2,99," done: %d%c",percent_done,'%'); strcat(text1,text2); } -@@ -1477,7 +1477,7 @@ +@@ -1477,7 +1487,7 @@ x2 = Mscale * (ix2-Iorgx); y2 = Mscale * (iy2-Iorgy); @@ -90,7 +115,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ slope = 1.0 * (x2 - x1) / (y2 - y1); if (y2 > y1) { for (pym = y1; pym <= y2; pym++) { -@@ -1548,7 +1548,7 @@ +@@ -1548,7 +1558,7 @@ x2 = Mscale * (ix2-Iorgx); y2 = Mscale * (iy2-Iorgy); @@ -99,7 +124,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ slope = 1.0 * (x2 - x1) / (y2 - y1); if (y2 > y1) { for (pym = y1; pym <= y2; pym++) { -@@ -1865,7 +1865,7 @@ +@@ -1865,7 +1875,7 @@ if (xval < apx[spc][0]) continue; if (xval > apx[spc][nap[spc]-1]) continue; yval = curve_yval(spc,xval); @@ -108,7 +133,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ gdk_draw_point(drawarea->window,gdkgc,px,py); // causes "bumps" in a flat curve } -@@ -1873,8 +1873,8 @@ +@@ -1873,8 +1883,8 @@ { xval = apx[spc][ap]; yval = apy[spc][ap]; @@ -119,7 +144,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ for (qx = -2; qx < 3; qx++) for (qy = -2; qy < 3; qy++) { if (px+qx < 0 || px+qx >= ww) continue; -@@ -1891,7 +1891,7 @@ +@@ -1891,7 +1901,7 @@ if (xval < apx[spc][0]) continue; if (xval > apx[spc][nap[spc]-1]) continue; yval = curve_yval(spc,xval); @@ -128,7 +153,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ gdk_draw_point(drawarea->window,gdkgc,px,py); // causes "bumps" in a flat curve } -@@ -1899,8 +1899,8 @@ +@@ -1899,8 +1909,8 @@ { xval = apx[spc][ap]; yval = apy[spc][ap]; @@ -139,7 +164,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ for (qx = -2; qx < 3; qx++) for (qy = -2; qy < 3; qy++) { if (px+qx < 0 || px+qx >= ww) continue; -@@ -1926,9 +1926,9 @@ +@@ -1926,9 +1936,9 @@ spline1(nap[spc],apx[spc],apy[spc]); // compute curve fitting anchor points @@ -151,7 +176,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ if (kkhi > 1000) kkhi = 1000; for (kk = 0; kk < 1000; kk++) // generate all points for curve -@@ -1990,7 +1990,7 @@ +@@ -1990,7 +2000,7 @@ if (image_file) image_gallery(image_file,"paint1",0,m_gallery2); // force show gallery window v.10.6 else { @@ -160,7 +185,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ if (pp) { image_gallery(pp,"paint1",0,m_gallery2); free(pp); -@@ -3181,7 +3181,7 @@ +@@ -3181,7 +3191,7 @@ zdialog_free(zd); SS_interval = secs; // interval between slides if (zstat != 1) secs = 9999; // cancel, use huge interval @@ -169,7 +194,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ Fslideshow = 1; } -@@ -6531,7 +6531,7 @@ +@@ -6531,7 +6541,7 @@ int ii, click, newseq, thresh; static int drag = 0, mdx0, mdy0, mdx1, mdy1; @@ -178,7 +203,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ click = newseq = 0; if (LMclick || Mxdrag || Mydrag) // left mouse click or mouse drag -@@ -6665,7 +6665,7 @@ +@@ -6665,7 +6675,7 @@ } } @@ -187,7 +212,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ return 0; } -@@ -6689,13 +6689,13 @@ +@@ -6689,13 +6699,13 @@ slope = 1.0 * (px2 - px1) / (py2 - py1); if (py2 > py1) { for (pym = py1; pym <= py2; pym++) { @@ -203,7 +228,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ sa_draw1pix(pxm,pym); } } -@@ -6704,13 +6704,13 @@ +@@ -6704,13 +6714,13 @@ slope = 1.0 * (py2 - py1) / (px2 - px1); if (px2 > px1) { for (pxm = px1; pxm <= px2; pxm++) { @@ -219,7 +244,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ sa_draw1pix(pxm,pym); } } -@@ -6764,7 +6764,7 @@ +@@ -6764,7 +6774,7 @@ { // and perpendicular to p4 - p2 px5 = px4 + ii * dy / dist; py5 = py4 - ii * dx / dist; @@ -228,7 +253,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ if (contrast > maxcontrast) { px6 = px5; // p6 = highest contrast point in p5 py6 = py5; -@@ -6772,13 +6772,13 @@ +@@ -6772,13 +6782,13 @@ } } @@ -244,7 +269,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ return; } -@@ -6913,7 +6913,7 @@ +@@ -6913,7 +6923,7 @@ memset(sa_pixselc,0,cc); radius = sa_colorradius; // use radius from dialog v.10.8 @@ -253,7 +278,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ radius2 = radius * radius; sa_Nmatch = 0; // match color count -@@ -7643,7 +7643,7 @@ +@@ -7643,7 +7653,7 @@ for (nn = 0; nn < Fww * Fhh * 2; nn++) // do random pixels v.9.6 { @@ -262,7 +287,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ if (sa_pixisin[ii] < 2) continue; // ignore outside and edge pixels if (sa_edgedist[ii]) continue; // already calculated py = ii / Fww; -@@ -7710,12 +7710,12 @@ +@@ -7710,12 +7720,12 @@ if (epy > py1) inc = 1; else inc = -1; for (pym = py1; pym != epy; pym += inc) { @@ -277,7 +302,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ sa_edgedist[ii] = dist2; // save SB_done++; } -@@ -7726,12 +7726,12 @@ +@@ -7726,12 +7736,12 @@ if (epx > px1) inc = 1; else inc = -1; for (pxm = px1; pxm != epx; pxm += inc) { @@ -292,7 +317,7 @@ $NetBSD: patch-ad,v 1.1 2010/08/24 18:58:03 bad Exp $ sa_edgedist[ii] = dist2; SB_done++; } -@@ -7770,7 +7770,7 @@ +@@ -7770,7 +7780,7 @@ } kk = py1 * Fww + px1; |