aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2005-02-13 00:31:24 +0800
committerdanfe <danfe@FreeBSD.org>2005-02-13 00:31:24 +0800
commitb79d3ba4783fb020ed7706e2898539c8ef454d28 (patch)
treec9fa84c75ce698864f353e50498c6d2f783ad2ea /graphics
parent74fa67bde4547f9363dc005a6a30e82dedb52b8f (diff)
downloadfreebsd-ports-gnome-b79d3ba4783fb020ed7706e2898539c8ef454d28.tar.gz
freebsd-ports-gnome-b79d3ba4783fb020ed7706e2898539c8ef454d28.tar.zst
freebsd-ports-gnome-b79d3ba4783fb020ed7706e2898539c8ef454d28.zip
- Unbreak the build with recent Imlib2
- Take maintainership
Diffstat (limited to 'graphics')
-rw-r--r--graphics/geist/Makefile6
-rw-r--r--graphics/geist/files/patch-ad117
2 files changed, 118 insertions, 5 deletions
diff --git a/graphics/geist/Makefile b/graphics/geist/Makefile
index 8d84b7499d0a..14294b55ab79 100644
--- a/graphics/geist/Makefile
+++ b/graphics/geist/Makefile
@@ -11,13 +11,9 @@ PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= http://www.linuxbrit.co.uk/downloads/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= danfe@FreeBSD.org
COMMENT= An object-based image creation/layout application
-BROKEN= "Does not build"
-EXPIRATION_DATE=2005-02-18
-DEPRECATED= ${BROKEN}
-
LIB_DEPENDS= Imlib2.2:${PORTSDIR}/graphics/imlib2 \
xml2.5:${PORTSDIR}/textproc/libxml2
diff --git a/graphics/geist/files/patch-ad b/graphics/geist/files/patch-ad
new file mode 100644
index 000000000000..e43c0f908702
--- /dev/null
+++ b/graphics/geist/files/patch-ad
@@ -0,0 +1,117 @@
+--- src/geist_line.c.orig Sun Oct 22 00:05:45 2000
++++ src/geist_line.c Sat Feb 12 20:39:50 2005
+@@ -406,6 +406,114 @@
+
+ }
+
++/*
++ * Recent versions of Imlib2 lack imlib_clip_line() function, which was
++ * around at Imlib2-1.1.0 times. Dig it and some related stuff from
++ * old sources and paste here, so we're buildable again with new Imlib2.
++ */
++
++enum { TOP = 0x1, BOTTOM = 0x2, RIGHT = 0x4, LEFT = 0x8 };
++
++unsigned int
++__imlib_comp_outcode(double x, double y, double xmin,
++ double xmax, double ymin, double ymax)
++{
++ unsigned int code = 0;
++
++ if (y > ymax)
++ code |= TOP;
++ else if (y < ymin)
++ code |= BOTTOM;
++ if (x > xmax)
++ code |= RIGHT;
++ else if (x < xmin)
++ code |= LEFT;
++ return code;
++}
++
++int
++imlib_clip_line(int x0, int y0, int x1, int y1, int xmin, int xmax, int ymin,
++ int ymax, int *clip_x0, int *clip_y0, int *clip_x1,
++ int *clip_y1)
++{
++ unsigned int outcode0, outcode1, outcode_out;
++ unsigned char accept = FALSE, done = FALSE;
++ double dx0, dy0, dx1, dy1;
++
++ dx0 = x0;
++ dx1 = x1;
++ dy0 = y0;
++ dy1 = y1;
++
++ outcode0 = __imlib_comp_outcode(dx0, dy0, xmin, xmax, ymin, ymax);
++ outcode1 = __imlib_comp_outcode(dx1, dy1, xmin, xmax, ymin, ymax);
++
++ do
++ {
++ if (!(outcode0 | outcode1))
++ {
++ accept = TRUE;
++ done = TRUE;
++ }
++ else if (outcode0 & outcode1)
++ done = TRUE;
++ else
++ {
++ double x, y;
++
++ outcode_out = outcode0 ? outcode0 : outcode1;
++ if (outcode_out & TOP)
++ {
++ x = dx0 + (dx1 - dx0) * ((double)ymax - dy0) / (dy1 - dy0);
++ y = ymax;
++ }
++ else if (outcode_out & BOTTOM)
++ {
++ x = dx0 + (dx1 - dx0) * ((double)ymin - dy0) / (dy1 - dy0);
++ y = ymin;
++ }
++ else if (outcode_out & RIGHT)
++ {
++ y = dy0 + (dy1 - dy0) * ((double)xmax - dx0) / (dx1 - dx0);
++ x = xmax;
++ }
++ else
++ {
++ y = dy0 + (dy1 - dy0) * ((double)xmin - dx0) / (dx1 - dx0);
++ x = xmin;
++ }
++ if (outcode_out == outcode0)
++ {
++ dx0 = x;
++ dy0 = y;
++ outcode0 =
++ __imlib_comp_outcode(dx0, dy0, xmin, xmax, ymin, ymax);
++ }
++ else
++ {
++ dx1 = x;
++ dy1 = y;
++ outcode1 =
++ __imlib_comp_outcode(dx1, dy1, xmin, xmax, ymin, ymax);
++ }
++ }
++ }
++ while (done == FALSE);
++
++ /* round up before converting down to ints */
++ dx0 = floor(dx0 + 0.5);
++ dx1 = floor(dx1 + 0.5);
++ dy0 = floor(dy0 + 0.5);
++ dy1 = floor(dy1 + 0.5);
++
++ *clip_x0 = dx0;
++ *clip_y0 = dy0;
++ *clip_x1 = dx1;
++ *clip_y1 = dy1;
++
++ return accept;
++}
++
+ int
+ geist_line_get_clipped_line(geist_line * line, int *clip_x0, int *clip_y0,
+ int *clip_x1, int *clip_y1)