Initial import of py-gd-0.40.

The GD module is an interface to the GD library written by Thomas
Boutell.
This commit is contained in:
xsa 2004-10-27 09:21:46 +00:00
parent 7abf25a6c5
commit e08c6f374b
6 changed files with 106 additions and 0 deletions

46
graphics/py-gd/Makefile Normal file
View File

@ -0,0 +1,46 @@
# $OpenBSD: Makefile,v 1.1.1.1 2004/10/27 09:21:46 xsa Exp $
SHARED_ONLY= Yes
COMMENT= "Python wrapper for the GD library"
DISTNAME= gdmodule-0.40
PKGNAME= py-${DISTNAME:L:S/module//}
CATEGORIES= graphics
HOMEPAGE= http://newcenturycomputers.net/projects/gdmodule.html
MAINTAINER= Xavier Santolaria <xsa@openbsd.org>
# BSD
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://newcenturycomputers.net/projects/download.cgi/
MODULES= lang/python
MODPY_SETUP= Setup.py
LIB_DEPENDS= gd.18::graphics/gd
EXAMPLESDIR= ${PREFIX}/share/examples/py-gd
DOCSDIR= ${PREFIX}/share/doc/py-gd
do-configure:
@perl -pi -e "s,%%LOCALBASE%%,${LOCALBASE},g;" \
-e "s,%%LIBPNG%%,${LOCALBASE}/include/libpng,g" \
${WRKSRC}/${MODPY_SETUP}
@perl -pi -e "s,%%PYTHON%%,python${MODPY_VERSION},g" \
${WRKSRC}/_gdmodule.c
post-install:
${INSTALL_DATA_DIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/gddemo.py ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/adventure.ttf ${EXAMPLESDIR}
${INSTALL_DATA_DIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/gd-ref.html ${DOCSDIR}
.include <bsd.port.mk>

3
graphics/py-gd/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (gdmodule-0.40.tar.gz) = 03abe495106a6dfc20c34c7b8a169d27
RMD160 (gdmodule-0.40.tar.gz) = b1fbbcd9312c48f8e9f8b4bdf8a769bf73ffba49
SHA1 (gdmodule-0.40.tar.gz) = 61d3736e39eebf82f474dbbf763cb7a696a27678

View File

@ -0,0 +1,34 @@
$OpenBSD: patch-Setup_py,v 1.1.1.1 2004/10/27 09:21:46 xsa Exp $
--- Setup.py.orig 2002-09-18 17:14:06.000000000 +0200
+++ Setup.py 2004-04-21 15:25:53.000000000 +0200
@@ -40,17 +40,14 @@ def remove(itm, lst):
# Unixoid OS's I will just look for the usual suspects.
libdirs = dirtest([
- "/usr/lib", "/usr/local/lib",
- "/usr/lib/X11", "/usr/X11R6/lib",
- "/opt/gnome/lib",
+ "/usr/lib", "%%LOCALBASE%%/lib",
])
# include_dirs are also non-portable; same trick here.
incdirs = dirtest([
- "/usr/include", "/usr/local/include",
- "/usr/include/X11", "/usr/X11R6/include",
- "/opt/gnome/include",
+ "/usr/include", "%%LOCALBASE%%/include",
+ "%%LIBPNG%%",
])
# Try to identify our libraries
@@ -58,8 +55,7 @@ incdirs = dirtest([
want_libs = [
"gd",
"jpeg", "png", "z",
- "X11", "Xpm",
- "ttf", "freetype",
+ "ttf",
]
libs = filetest(libdirs, want_libs)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gddemo_py,v 1.1.1.1 2004/10/27 09:21:46 xsa Exp $
--- gddemo.py.orig Wed Sep 18 17:21:21 2002
+++ gddemo.py Wed Oct 27 11:10:06 2004
@@ -4,7 +4,7 @@ import gd, os
os.environ["GDFONTPATH"] = "."
-FONT = "adventure"
+FONT = "adventure.ttf"
def simple():
im = gd.image((200, 200))

2
graphics/py-gd/pkg/DESCR Normal file
View File

@ -0,0 +1,2 @@
The GD module is an interface to the GD library written by Thomas
Boutell.

9
graphics/py-gd/pkg/PLIST Normal file
View File

@ -0,0 +1,9 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/10/27 09:21:46 xsa Exp $
lib/python${MODPY_VERSION}/site-packages/_gd.so
lib/python${MODPY_VERSION}/site-packages/gd.py
lib/python${MODPY_VERSION}/site-packages/gd.pyc
share/doc/py-gd/
share/doc/py-gd/gd-ref.html
share/examples/py-gd/
share/examples/py-gd/adventure.ttf
share/examples/py-gd/gddemo.py