summaryrefslogtreecommitdiff
path: root/graphics/py-gd
diff options
context:
space:
mode:
authorjlam <jlam>1999-11-01 03:34:31 +0000
committerjlam <jlam>1999-11-01 03:34:31 +0000
commitfb9154b2d0b8183ce4abad76d3fa8a57461a1cdc (patch)
tree53ecddabec4d521ba64ef900c7af39e4765ca3b6 /graphics/py-gd
parentec7ef84ff713cbfdd0701545a9d74747678db1d7 (diff)
downloadpkgsrc-fb9154b2d0b8183ce4abad76d3fa8a57461a1cdc.tar.gz
* Modify to support gd-1.7.3.
Diffstat (limited to 'graphics/py-gd')
-rw-r--r--graphics/py-gd/Makefile20
-rw-r--r--graphics/py-gd/files/Setup.in8
-rw-r--r--graphics/py-gd/files/patch-sum3
-rw-r--r--graphics/py-gd/patches/patch-aa76
-rw-r--r--graphics/py-gd/pkg/COMMENT2
-rw-r--r--graphics/py-gd/pkg/DESCR11
6 files changed, 107 insertions, 13 deletions
diff --git a/graphics/py-gd/Makefile b/graphics/py-gd/Makefile
index 7b3f1e5b191..ff977c3168d 100644
--- a/graphics/py-gd/Makefile
+++ b/graphics/py-gd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 1999/05/03 20:25:37 tv Exp $
+# $NetBSD: Makefile,v 1.3 1999/11/01 03:34:31 jlam Exp $
DISTNAME= gdmodule.c
PKGNAME= py-gd-1.3
@@ -9,21 +9,21 @@ DISTFILES= gdmodule.c
MAINTAINER= tsarna@netbsd.org
HOMEPAGE= http://starship.python.net/~richard/gdmodule/
-DEPENDS+= python-1.5.2:../../lang/python \
- gd-1.3p1:../../graphics/gd
+DEPENDS+= python-1.5.2:../../lang/python
+DEPENDS+= gd-1.7.3:../../graphics/gd
-WRKSRC= ${WRKDIR}/build
+NO_WRKSUBDIR= yes
+EXTRACT_CMD= ${CP} ${DISTDIR}/${DISTNAME} ${WRKSRC}
ALL_TARGET= default
-do-extract:
- ${MKDIR} ${WRKSRC}
- ${CP} ${DISTDIR}/${DISTNAME} ${WRKSRC}
- ${SED} -e 's,@PREFIX@,${PREFIX},g' ${FILESDIR}/Setup.in \
- >${WRKSRC}/Setup.in
+post-extract:
+ ${SED} -e 's,@LOCALBASE@,${LOCALBASE},g' \
+ -e 's,@X11BASE@,${X11BASE},g' \
+ ${FILESDIR}/Setup.in > ${WRKSRC}/Setup.in
do-configure:
${CP} ${PREFIX}/lib/python1.5/config/Makefile.pre.in ${WRKSRC}
- (cd ${WRKSRC}; ${MAKE} -f Makefile.pre.in boot)
+ cd ${WRKSRC}; ${MAKE} -f Makefile.pre.in boot
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/py-gd/files/Setup.in b/graphics/py-gd/files/Setup.in
index 3ef8ea3ab61..09b659da996 100644
--- a/graphics/py-gd/files/Setup.in
+++ b/graphics/py-gd/files/Setup.in
@@ -1,4 +1,8 @@
-# $NetBSD: Setup.in,v 1.2 1999/09/21 02:36:31 hubertf Exp $
+# $NetBSD: Setup.in,v 1.3 1999/11/01 03:34:31 jlam Exp $
*shared*
-gd gdmodule.c -I@PREFIX@/include -L@PREFIX@/lib -R@PREFIX@/lib -lgd
+gd gdmodule.c \
+ -I@LOCALBASE@/include -I@X11BASE@/include -I@X11BASE@/include/X11 \
+ -L@LOCALBASE@/lib -Wl,-R@LOCALBASE@/lib \
+ -L@X11BASE@/lib -Wl,-R@X11BASE@/lib \
+ -lgd -lpng -lz -lttf -lintl -lXpm -lX11
diff --git a/graphics/py-gd/files/patch-sum b/graphics/py-gd/files/patch-sum
new file mode 100644
index 00000000000..0fb784a3f92
--- /dev/null
+++ b/graphics/py-gd/files/patch-sum
@@ -0,0 +1,3 @@
+$NetBSD: patch-sum,v 1.1 1999/11/01 03:34:32 jlam Exp $
+
+MD5 (patch-aa) = d6ae51886207a9d68961d5beb42edbd0
diff --git a/graphics/py-gd/patches/patch-aa b/graphics/py-gd/patches/patch-aa
new file mode 100644
index 00000000000..45f85d05c11
--- /dev/null
+++ b/graphics/py-gd/patches/patch-aa
@@ -0,0 +1,76 @@
+$NetBSD: patch-aa,v 1.1 1999/11/01 03:34:32 jlam Exp $
+
+--- gdmodule.c.orig Sun Oct 31 20:13:48 1999
++++ gdmodule.c Sun Oct 31 20:14:43 1999
+@@ -34,8 +34,8 @@
+ static char *gdModuleDocString = "GD module is an interface to the GD library written by Thomas Bouttel.\n\
+ \'It allows your code to quickly draw images complete with lines, arcs,\n\
+ text, multiple colors, cut and paste from other images, and flood fills,\n\
+-and write out the result as a .GIF file. This is particularly useful in\n\
+-World Wide Web applications, where .GIF is the format used for inline images.\'\n\
++and write out the result as a .PNG file. This is particularly useful in\n\
++World Wide Web applications, where .PNG is the format used for inline images.\'\n\
+ It has been extended in some ways from the original GD library.";
+
+ /*
+@@ -84,7 +84,7 @@
+ /*
+ ** Methods for the image type
+ */
+-static PyObject *image_writegif(self, args)
++static PyObject *image_writepng(self, args)
+ imageobject *self;
+ PyObject *args;
+ {
+@@ -94,11 +94,11 @@
+
+ if (PyArg_ParseTuple(args, "O!", &PyFile_Type, &fileobj))
+ {
+- gdImageGif(self->imagedata, PyFile_AsFile(fileobj));
++ gdImagePng(self->imagedata, PyFile_AsFile(fileobj));
+ }
+ else if (PyErr_Clear(), PyArg_ParseTuple(args, "z", &filename))
+ {
+- if (fp = fopen(filename, "wb")) gdImageGif(self->imagedata, fp);
++ if (fp = fopen(filename, "wb")) gdImagePng(self->imagedata, fp);
+ else
+ {
+ PyErr_SetFromErrno(PyExc_IOError);
+@@ -662,8 +662,8 @@
+ }
+
+ static struct PyMethodDef image_methods[] = {
+- {"writeGif", (PyCFunction)image_writegif, 1, "writeGif(f)\n\
+- write the image to f as a GIF, where f is either an open file object or a\n\
++ {"writePng", (PyCFunction)image_writepng, 1, "writePng(f)\n\
++ write the image to f as a PNG, where f is either an open file object or a\n\
+ file name."},
+ {"writeGd", (PyCFunction)image_writegd, 1, "writeGd(f)\n\
+ write the image to f as a GD file, where f is either an open file object\n\
+@@ -802,7 +802,7 @@
+ {
+ if (!(ext = strrchr(filename,'.')))
+ {
+- PyErr_SetString(PyExc_IOError, "need an extension to determine file type (.gif|.gd|.xbm)");
++ PyErr_SetString(PyExc_IOError, "need an extension to determine file type (.png|.gd|.xbm)");
+ Py_DECREF(self);
+ return NULL;
+ }
+@@ -814,7 +814,7 @@
+ Py_DECREF(self);
+ return(NULL);
+ }
+- if (!strcmp(ext,"gif") && (!(self->imagedata = gdImageCreateFromGif(fp)))) {
++ if (!strcmp(ext,"png") && (!(self->imagedata = gdImageCreateFromPng(fp)))) {
+ fclose(fp);
+ Py_DECREF(self);
+ return(NULL);
+@@ -923,7 +923,7 @@
+
+ static struct PyMethodDef gd_methods[] = {
+ {"image", gd_image, 1, "image(image[,(w,h)] | file | file,type | (w,h))\n\
+-create GD image from file.(gif|gd|xbm), file,type (gif|gd|xbm),\n\
++create GD image from file.(png|gd|xbm), file,type (png|gd|xbm),\n\
+ the existing image, optionally resized to width w and height h\n\
+ or blank with width w and height h"},
+ {"fontstrsize", gd_fontSSize, 1, "fontstrsize(font, string)\n\
diff --git a/graphics/py-gd/pkg/COMMENT b/graphics/py-gd/pkg/COMMENT
index e34c809c185..322a7bb35ef 100644
--- a/graphics/py-gd/pkg/COMMENT
+++ b/graphics/py-gd/pkg/COMMENT
@@ -1 +1 @@
-A Python interface to gd
+Python interface to gd graphics library
diff --git a/graphics/py-gd/pkg/DESCR b/graphics/py-gd/pkg/DESCR
index c6d3bbe3475..23ab3f475e7 100644
--- a/graphics/py-gd/pkg/DESCR
+++ b/graphics/py-gd/pkg/DESCR
@@ -1,3 +1,14 @@
+GD module is an interface to the GD library written by Thomas Bouttel.
+
+ "It allows your code to quickly draw images complete with lines,
+ arcs, text, multiple colors, cut and paste from other images, and
+ flood fills, and write out the result as a .PNG file. This is
+ particularly useful in World Wide Web applications, where .PNG is
+ the unencumbered format used for inline images."
+
+It has been extended in some ways from the original GD library.
+
+
GD module is an interface to the GD library written by Thomas Bouttel:
"It allows your code to quickly draw images complete