diff options
author | tv <tv@pkgsrc.org> | 2005-11-04 20:11:47 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2005-11-04 20:11:47 +0000 |
commit | 0f8b64736d796b9d8d4c414d652b38087d47e2db (patch) | |
tree | 138ec25488a743a332ce7ce1cd5fb16488cb9d66 /graphics/imlib2 | |
parent | 8ab0dedc95ebe6bd5a86021ed9fc3026665250d0 (diff) | |
download | pkgsrc-0f8b64736d796b9d8d4c414d652b38087d47e2db.tar.gz |
Use my_lround() on Interix too.
Add minimalist #ifndef blocks to rip out XShm support on Interix.
Diffstat (limited to 'graphics/imlib2')
-rw-r--r-- | graphics/imlib2/distinfo | 7 | ||||
-rw-r--r-- | graphics/imlib2/patches/patch-ab | 4 | ||||
-rw-r--r-- | graphics/imlib2/patches/patch-ac | 71 | ||||
-rw-r--r-- | graphics/imlib2/patches/patch-ad | 35 | ||||
-rw-r--r-- | graphics/imlib2/patches/patch-ae | 45 |
5 files changed, 158 insertions, 4 deletions
diff --git a/graphics/imlib2/distinfo b/graphics/imlib2/distinfo index 56cc8da0ecc..31b4f89a06d 100644 --- a/graphics/imlib2/distinfo +++ b/graphics/imlib2/distinfo @@ -1,10 +1,13 @@ -$NetBSD: distinfo,v 1.14 2005/11/02 00:45:02 hiramatsu Exp $ +$NetBSD: distinfo,v 1.15 2005/11/04 20:11:47 tv Exp $ SHA1 (imlib2-1.2.0.tar.gz) = 54f8ef83b0eac3f8e7f2218705e02a425fa73118 RMD160 (imlib2-1.2.0.tar.gz) = 158ed1bd7c59b8d1db2c00db98027d9c5c0abec3 Size (imlib2-1.2.0.tar.gz) = 890457 bytes SHA1 (patch-aa) = 73e23778f6aaee5de213865aa64f9c5a4af6ba24 -SHA1 (patch-ab) = 93b6cee1242ac971926df4418699a68d999e5482 +SHA1 (patch-ab) = 191ab0083b410ef9892fbf6f4c4aede0e15dc9e2 +SHA1 (patch-ac) = da65ecd50753c37e267c2fd3de7f1dcef8dab1f1 +SHA1 (patch-ad) = adf301fe0179aa1ab05fc54bb7ab706ee97ab7a7 +SHA1 (patch-ae) = 6503e4cbc9bbb93f971ab2ae9fd7d50ddee9e0e8 SHA1 (patch-ba) = 0a3937fc4d017356ba5d33f957426f9befc94730 SHA1 (patch-bb) = 9df1e76c3023c6f9714906b226293bc3e026baca SHA1 (patch-bc) = 29365da268d210b4eb7bb431f815a78bcf22f1e3 diff --git a/graphics/imlib2/patches/patch-ab b/graphics/imlib2/patches/patch-ab index cd9b608b724..d843ca20e17 100644 --- a/graphics/imlib2/patches/patch-ab +++ b/graphics/imlib2/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.9 2005/11/02 00:45:02 hiramatsu Exp $ +$NetBSD: patch-ab,v 1.10 2005/11/04 20:11:47 tv Exp $ This patch makes imlib2 compile on systems that don't have an lround function, which is defined in C99. @@ -14,7 +14,7 @@ Needed at least for NetBSD-1.6.2 and NetBSD-2.0. +#include <sys/param.h> +#endif + -+#if defined(__NetBSD__) || defined(__OpenBSD__) || \ ++#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__INTERIX) || \ + (defined(__DragonFly__) && __DragonFly_version <= 130002) +#define lround(x) my_lround(x) +static long my_lround(double x) diff --git a/graphics/imlib2/patches/patch-ac b/graphics/imlib2/patches/patch-ac new file mode 100644 index 00000000000..57f8b9a9848 --- /dev/null +++ b/graphics/imlib2/patches/patch-ac @@ -0,0 +1,71 @@ +$NetBSD: patch-ac,v 1.4 2005/11/04 20:11:47 tv Exp $ + +--- src/lib/grab.c.orig 2004-11-01 04:39:42.000000000 -0500 ++++ src/lib/grab.c +@@ -412,7 +412,9 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + int i; + int src_x, src_y, src_w, src_h, origw, origh; + int width, height, clipx, clipy; ++#ifndef __INTERIX + XShmSegmentInfo shminfo, mshminfo; ++#endif /* !__INTERIX */ + XImage *xim = NULL, *mxim = NULL; + static signed char x_does_shm = -1; + XColor cols[256]; +@@ -545,14 +547,17 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + /* Create an Ximage (shared or not) */ + if (x_does_shm < 0) + { ++#ifndef __INTERIX + if (XShmQueryExtension(d)) + x_does_shm = 1; + else ++#endif /* !__INTERIX */ + x_does_shm = 0; + } + + prev_erh = XSetErrorHandler((XErrorHandler) Tmp_HandleXError); + ++#ifndef __INTERIX + if (x_does_shm) + { + _x_err = 0; +@@ -599,12 +604,14 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + } + } + } ++#endif /* !__INTERIX */ + if (!is_shm) + xim = XGetImage(d, p, x, y, w, h, 0xffffffff, ZPixmap); + + if ((m) && (domask)) + { + _x_err = 0; ++#ifndef __INTERIX + if (x_does_shm) + { + mxim = XShmCreateImage(d, v, 1, ZPixmap, NULL, &mshminfo, w, h); +@@ -652,6 +659,7 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + } + } + } ++#endif /* !__INTERIX */ + if (!is_mshm) + mxim = XGetImage(d, m, 0, 0, w, h, 0xffffffff, ZPixmap); + } +@@ -705,6 +713,7 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + d, xim, mxim, v, xatt.depth, x, y, w, h, 0); + + /* destroy the Ximage */ ++#ifndef __INTERIX + if (is_shm) + { + XSync(d, False); +@@ -718,6 +727,7 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + shmdt(mshminfo.shmaddr); + shmctl(mshminfo.shmid, IPC_RMID, 0); + } ++#endif /* !__INTERIX */ + XDestroyImage(xim); + if (created_mask) + XFreePixmap(d, m); diff --git a/graphics/imlib2/patches/patch-ad b/graphics/imlib2/patches/patch-ad new file mode 100644 index 00000000000..90b31aee863 --- /dev/null +++ b/graphics/imlib2/patches/patch-ad @@ -0,0 +1,35 @@ +$NetBSD: patch-ad,v 1.4 2005/11/04 20:11:47 tv Exp $ + +--- src/lib/rend.c.orig 2004-11-01 04:39:42.000000000 -0500 ++++ src/lib/rend.c +@@ -495,24 +495,30 @@ __imlib_RenderImage(Display * d, ImlibIm + gcm = XCreateGC(d, m, GCGraphicsExposures, &gcv); + } + /* write the mask */ ++#ifndef __INTERIX + if (shm) + /* write shm XImage */ + XShmPutImage(d, m, gcm, mxim, 0, 0, dx, dy, dw, dh, False); + /* write regular XImage */ + else ++#endif /* !__INTERIX */ + XPutImage(d, m, gcm, mxim, 0, 0, dx, dy, dw, dh); + } + /* write the image */ ++#ifndef __INTERIX + if (shm) + /* write shm XImage */ + XShmPutImage(d, w, gc, xim, 0, 0, dx, dy, dw, dh, False); + /* write regular XImage */ + else ++#endif /* !__INTERIX */ + XPutImage(d, w, gc, xim, 0, 0, dx, dy, dw, dh); + /* free the XImage and put onto our free list */ + /* wait for the write to be done */ ++#ifndef __INTERIX + if (shm) + XSync(d, False); ++#endif /* !__INTERIX */ + __imlib_ConsumeXImage(d, xim); + if (m) + __imlib_ConsumeXImage(d, mxim); diff --git a/graphics/imlib2/patches/patch-ae b/graphics/imlib2/patches/patch-ae new file mode 100644 index 00000000000..4604f19d628 --- /dev/null +++ b/graphics/imlib2/patches/patch-ae @@ -0,0 +1,45 @@ +$NetBSD: patch-ae,v 1.4 2005/11/04 20:11:47 tv Exp $ + +--- src/lib/ximage.c.orig 2004-11-01 04:39:42.000000000 -0500 ++++ src/lib/ximage.c +@@ -81,8 +81,10 @@ __imlib_FlushXImage(Display * d) + + xim = list_xim[i]; + list_mem_use -= xim->bytes_per_line * xim->height; ++#ifndef __INTERIX + if (list_si[i]) + XShmDetach(d, list_si[i]); ++#endif /* !__INTERIX */ + XDestroyImage(xim); + if (list_si[i]) + { +@@ -163,11 +165,13 @@ __imlib_ProduceXImage(Display * d, Visua + /* if we havent check the shm extension before - see if its there */ + if (x_does_shm < 0) + { ++#ifndef __INTERIX + /* if its there set dose_xhm flag */ + if (XShmQueryExtension(d)) + x_does_shm = 1; + /* clear the flag - no shm at all */ + else ++#endif + x_does_shm = 0; + } + /* find a cached XImage (to avoid server to & fro) that is big enough */ +@@ -219,6 +223,7 @@ __imlib_ProduceXImage(Display * d, Visua + + /* work on making a shared image */ + xim = NULL; ++#ifndef __INTERIX + /* if the server does shm */ + if (x_does_shm) + { +@@ -301,6 +306,7 @@ __imlib_ProduceXImage(Display * d, Visua + } + } + } ++#endif /* !__INTERIX */ + /* ok if xim == NULL it all failed - fall back to XImages */ + if (!xim) + { |