diff options
author | Thomas Gellekum <tg@FreeBSD.org> | 2003-08-11 13:46:37 +0000 |
---|---|---|
committer | Thomas Gellekum <tg@FreeBSD.org> | 2003-08-11 13:46:37 +0000 |
commit | 0167a113cf29058410a6aaac71b5da03e26e9962 (patch) | |
tree | 818d52626006969f90fdf5df4e8872865bef47d6 /graphics/py-imaging | |
parent | Upgrade to v. 7.00, integrate it into Gnome/KDE (diff) |
- Add freetype2 support
- Use distutils when building for Python-2.x
PR: 55399
Submitted by: Geoffrey Mainland <mainland@apeiron.net>
Notes
Notes:
svn path=/head/; revision=86757
Diffstat (limited to 'graphics/py-imaging')
-rw-r--r-- | graphics/py-imaging/Makefile | 27 | ||||
-rw-r--r-- | graphics/py-imaging/files/Setup | 1 | ||||
-rw-r--r-- | graphics/py-imaging/files/patch-Makefile.pre.in | 13 | ||||
-rw-r--r-- | graphics/py-imaging/files/patch-setup.py | 51 | ||||
-rw-r--r-- | graphics/py-imaging/pkg-plist | 5 |
5 files changed, 89 insertions, 8 deletions
diff --git a/graphics/py-imaging/Makefile b/graphics/py-imaging/Makefile index e85e70160eed..74f9b6d7439f 100644 --- a/graphics/py-imaging/Makefile +++ b/graphics/py-imaging/Makefile @@ -8,7 +8,9 @@ PORTNAME= imaging PORTVERSION= 1.1.4 CATEGORIES= graphics python -MASTER_SITES= http://effbot.org/downloads/ +MASTER_SITES= http://www.pythonware.com/downloads/ \ + ftp://www.python.org/pub/python/src/ \ + ftp://ftp.cwi.nl/pub/python/src/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= Imaging-${PORTVERSION} @@ -16,7 +18,8 @@ MAINTAINER= tg@FreeBSD.org COMMENT= The Python Imaging Library BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter -LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg +LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ + freetype.9:${PORTSDIR}/print/freetype2 RUN_DEPENDS= ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter DIST_SUBDIR= python @@ -27,11 +30,27 @@ CONFIGURE_ARGS= --with-jpeg=${PREFIX}/lib CONFIGURE_ENV= PYTHON=${PYTHON_CMD} MAKE_FLAGS= OPT="${CFLAGS}" +.include <bsd.port.pre.mk> + PILDIR= ${PYTHON_SITELIBDIR}/PIL PILDOCDIR= ${PREFIX}/share/doc/PIL PILEXDIR= ${PREFIX}/share/examples/PIL PILINCDIR= ${PREFIX}/include/${PYTHON_VERSION} +.if ${PYTHON_REL} > 200 +post-build: + @(cd ${WRKSRC}/..; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} build ${PYDISTUTILS_BUILDARGS}) + +do-install: + @(cd ${WRKSRC}/..; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} install ${PYDISTUTILS_INSTALLARGS}) + @${MKDIR} ${PILDOCDIR} + ${INSTALL_DATA} ${WRKSRC}/../README ${PILDOCDIR} + @${MKDIR} ${PILEXDIR} + ${INSTALL_DATA} ${WRKSRC}/../Scripts/* ${PILEXDIR} +.for file in ImConfig.h ImPlatform.h Imaging.h + ${INSTALL_DATA} ${WRKSRC}/${file} ${PILINCDIR} +.endfor +.else post-extract: @${CP} ${FILESDIR}/Setup ${WRKSRC}/.. @@ -55,5 +74,5 @@ do-install: .for file in ImConfig.h ImPlatform.h Imaging.h ${INSTALL_DATA} ${WRKSRC}/${file} ${PILINCDIR} .endfor - -.include <bsd.port.mk> +.endif +.include <bsd.port.post.mk> diff --git a/graphics/py-imaging/files/Setup b/graphics/py-imaging/files/Setup index aa2692a24e15..ef1e8b816ae1 100644 --- a/graphics/py-imaging/files/Setup +++ b/graphics/py-imaging/files/Setup @@ -1,4 +1,5 @@ *shared* _imaging _imaging.c decode.c encode.c map.c display.c outline.c path.c -IlibImaging libImaging/libImaging.a -I${PREFIX}/include -L${PREFIX}/lib -ljpeg -lz +_imagingft _imagingft.c -IlibImaging -I${PREFIX}/include -I${PREFIX}/include/freetype2 -L${PREFIX}/lib -lfreetype _imagingtk _imagingtk.c Tk/tkImaging.c -IlibImaging -I${X11BASE}/include -I${PREFIX}/include/tcl8.4 -I${PREFIX}/include/tk8.4 -L${PREFIX}/lib -ltk84 -ltcl84 -L${X11BASE}/lib -lX11 diff --git a/graphics/py-imaging/files/patch-Makefile.pre.in b/graphics/py-imaging/files/patch-Makefile.pre.in index 21d12ce9f926..7a5691be3aed 100644 --- a/graphics/py-imaging/files/patch-Makefile.pre.in +++ b/graphics/py-imaging/files/patch-Makefile.pre.in @@ -1,5 +1,5 @@ ---- ../Makefile.pre.in.orig Wed Apr 23 00:11:24 2003 -+++ ../Makefile.pre.in Sat Aug 2 13:56:42 2003 +--- ../Makefile.pre.in.orig Tue Apr 22 09:11:24 2003 ++++ ../Makefile.pre.in Fri Aug 8 12:08:07 2003 @@ -92,7 +92,7 @@ TARGET= python @@ -18,3 +18,12 @@ LIBS= @LIBS@ LIBM= @LIBM@ LIBC= @LIBC@ +@@ -153,7 +153,7 @@ + INCLUDEPY= $(INCLUDEDIR)/python$(VERSION) + EXECINCLUDEPY= $(exec_installdir)/include/python$(VERSION) + LIBP= $(exec_installdir)/lib/python$(VERSION) +-DESTSHARED= $(BINLIBDEST)/site-packages ++DESTSHARED= $(BINLIBDEST)/site-packages/PIL + + LIBPL= $(LIBP)/config + diff --git a/graphics/py-imaging/files/patch-setup.py b/graphics/py-imaging/files/patch-setup.py new file mode 100644 index 000000000000..8c341248cddf --- /dev/null +++ b/graphics/py-imaging/files/patch-setup.py @@ -0,0 +1,51 @@ +--- ../setup.py.orig Fri May 9 05:00:56 2003 ++++ ../setup.py Wed Aug 6 10:40:45 2003 +@@ -51,6 +51,9 @@ + if os.path.exists('/sw/lib'): + LIBRARY_DIRS.append('/sw/lib') + ++INCLUDE_DIRS.append(os.path.join(os.getenv("PREFIX"), "include")) ++LIBRARY_DIRS.append(os.path.join(os.getenv("PREFIX"), "lib")) ++ + HAVE_LIBJPEG = 0 + HAVE_LIBTIFF = 0 + HAVE_LIBZ = 0 +@@ -126,7 +129,13 @@ + pass + else: + INCLUDE_DIRS = ["libImaging"] ++ INCLUDE_DIRS.append(os.path.join(os.getenv("X11BASE"), "include")) ++ INCLUDE_DIRS.append(os.path.join(os.getenv("PREFIX"), ++ "include/tcl%s" % TCL_VERSION)) ++ INCLUDE_DIRS.append(os.path.join(os.getenv("PREFIX"), ++ "include/tk%s" % TCL_VERSION)) + LIBRARY_DIRS = ["libImaging"] ++ LIBRARY_DIRS.append(os.path.join(os.getenv("PREFIX"), "lib")) + LIBRARIES = ["Imaging"] + EXTRA_COMPILE_ARGS = None + EXTRA_LINK_ARGS = None +@@ -206,7 +215,8 @@ + + if not tk_framework_found: + # assume the libraries are installed in the default location +- LIBRARIES.extend(["tk" + TCL_VERSION, "tcl" + TCL_VERSION]) ++ version = TCL_VERSION[0] + TCL_VERSION[2] ++ LIBRARIES.extend(["tk" + version, "tcl" + version]) + HAVE_TCLTK = 1 + + if HAVE_TCLTK: +@@ -266,6 +276,14 @@ + # FIXME: search for libraries + LIBRARIES.append("freetype") + INCLUDE_DIRS.append("/usr/include/freetype2") ++ elif os.path.isdir("/usr/local/include/freetype2"): ++ # assume that the freetype library is installed in a ++ # standard location ++ # FIXME: search for libraries ++ LIBRARIES.append("freetype") ++ INCLUDE_DIRS.append("/usr/local/include") ++ INCLUDE_DIRS.append("/usr/local/include/freetype2") ++ LIBRARY_DIRS.append("/usr/local/lib") + elif os.path.isdir("/sw/include/freetype2"): + # assume that the freetype library is installed in a + # standard location diff --git a/graphics/py-imaging/pkg-plist b/graphics/py-imaging/pkg-plist index 1e92eee07f18..b285eadf6912 100644 --- a/graphics/py-imaging/pkg-plist +++ b/graphics/py-imaging/pkg-plist @@ -199,12 +199,13 @@ lib/%%PYTHON_VERSION%%/site-packages/PIL/XbmImagePlugin.pyo lib/%%PYTHON_VERSION%%/site-packages/PIL/XpmImagePlugin.py lib/%%PYTHON_VERSION%%/site-packages/PIL/XpmImagePlugin.pyc lib/%%PYTHON_VERSION%%/site-packages/PIL/XpmImagePlugin.pyo +lib/%%PYTHON_VERSION%%/site-packages/PIL/_imaging.so +lib/%%PYTHON_VERSION%%/site-packages/PIL/_imagingft.so +lib/%%PYTHON_VERSION%%/site-packages/PIL/_imagingtk.so lib/%%PYTHON_VERSION%%/site-packages/PIL/__init__.py lib/%%PYTHON_VERSION%%/site-packages/PIL/__init__.pyc lib/%%PYTHON_VERSION%%/site-packages/PIL/__init__.pyo lib/%%PYTHON_VERSION%%/site-packages/PIL.pth -lib/%%PYTHON_VERSION%%/site-packages/_imaging.so -lib/%%PYTHON_VERSION%%/site-packages/_imagingtk.so share/doc/PIL/README share/examples/PIL/README share/examples/PIL/bdf2pil.py |