From 0f4de24d60a08f5a2c051be34d28234d7d4304c1 Mon Sep 17 00:00:00 2001 From: winiger Date: Thu, 14 Feb 2008 08:52:51 +0000 Subject: [PATCH] make it possible to install for different python versions ok mbalmer@ msf@ testing by Laurence Tratt --- graphics/py-Imaging/Makefile | 52 +++++++++++++------ graphics/py-Imaging/pkg/DESCR-bin | 1 + graphics/py-Imaging/pkg/DESCR-examples | 1 + graphics/py-Imaging/pkg/{DESCR => DESCR-main} | 0 graphics/py-Imaging/pkg/PLIST-bin | 6 +++ graphics/py-Imaging/pkg/PLIST-examples | 16 ++++++ graphics/py-Imaging/pkg/{PLIST => PLIST-main} | 25 ++------- 7 files changed, 64 insertions(+), 37 deletions(-) create mode 100644 graphics/py-Imaging/pkg/DESCR-bin create mode 100644 graphics/py-Imaging/pkg/DESCR-examples rename graphics/py-Imaging/pkg/{DESCR => DESCR-main} (100%) create mode 100644 graphics/py-Imaging/pkg/PLIST-bin create mode 100644 graphics/py-Imaging/pkg/PLIST-examples rename graphics/py-Imaging/pkg/{PLIST => PLIST-main} (93%) diff --git a/graphics/py-Imaging/Makefile b/graphics/py-Imaging/Makefile index 22dec76448a..6f00578ecb5 100644 --- a/graphics/py-Imaging/Makefile +++ b/graphics/py-Imaging/Makefile @@ -1,16 +1,22 @@ -# $OpenBSD: Makefile,v 1.33 2007/10/08 08:22:41 steven Exp $ +# $OpenBSD: Makefile,v 1.34 2008/02/14 08:52:51 winiger Exp $ -SHARED_ONLY= Yes +SHARED_ONLY= Yes -COMMENT= Python imaging library +COMMENT-main= Python imaging library +COMMENT-examples= example programs for the Python Imaging Library +COMMENT-bin= binaries for the Python Imaging Library -DISTNAME= Imaging-1.1.5 -PKGNAME= py-${DISTNAME}p1 -CATEGORIES= graphics +VERSION= 1.1.5 +DISTNAME= Imaging-${VERSION} +PKGNAME-main= py-${DISTNAME}p2 +FULLPKGNAME-examples= py-Imaging-examples-${VERSION} +FULLPKGNAME-bin= py-Imaging-bin-${VERSION} -HOMEPAGE= http://www.pythonware.com/products/pil/ +CATEGORIES= graphics -MAINTAINER= Aleksander Piotrowski +HOMEPAGE= http://www.pythonware.com/products/pil/ + +MAINTAINER= Aleksander Piotrowski # PIL Software License # Permission to use, copy, modify and distribute freely. @@ -18,18 +24,31 @@ PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= freetype tcl84 z +WANTLIB= freetype tcl84 z -MASTER_SITES= http://effbot.org/media/downloads/ +MASTER_SITES= http://effbot.org/media/downloads/ -MODULES= lang/python +MODULES= lang/python -RUN_DEPENDS= ${MODPY_TKINTER_DEPENDS} -BUILD_DEPENDS= ${RUN_DEPENDS} -LIB_DEPENDS= jpeg.>=62::graphics/jpeg \ - tk84:tk-8.4.*:x11/tk/8.4 +RUN_DEPENDS= ${MODPY_TKINTER_DEPENDS} +BUILD_DEPENDS= ${RUN_DEPENDS} +LIB_DEPENDS= jpeg.>=62::graphics/jpeg \ + tk84:tk-8.4.*:x11/tk/8.4 -USE_X11= Yes +FLAVORS= python2.4 python2.5 +FLAVOR?= python2.5 + +.if ${FLAVOR:L:Mpython2.4} && !${FLAVOR:L:Npython2.4} +MULTI_PACKAGES= -main +.elif ${FLAVOR:L:Mpython2.5} && !${FLAVOR:L:Npython2.5} +MULTI_PACKAGES= -main -examples -bin +.else +ERRORS+= "Fatal: You must select one version: ${FLAVORS}" +.endif + +MODPY_VERSION= ${FLAVOR:S/python//} + +USE_X11= Yes do-configure: @perl -pi -e "s|!LOCALBASE!|${LOCALBASE}|g; s|!X11BASE!|${X11BASE}|g; s|!MODPY_VERSION!|${MODPY_VERSION}|g" \ @@ -44,6 +63,7 @@ post-install: for file in ${WRKSRC}/Scripts/pil*.py; do \ ${INSTALL_SCRIPT} $$file ${PREFIX}/bin/`basename $$file .py`; \ done + find ${WRKINST} -name \*.egg-info -exec rm {} \; do-regress: fake @cd ${WRKSRC} && \ diff --git a/graphics/py-Imaging/pkg/DESCR-bin b/graphics/py-Imaging/pkg/DESCR-bin new file mode 100644 index 00000000000..ad0384a929f --- /dev/null +++ b/graphics/py-Imaging/pkg/DESCR-bin @@ -0,0 +1 @@ +Binaries that use the Python Imaging Library (PIL). diff --git a/graphics/py-Imaging/pkg/DESCR-examples b/graphics/py-Imaging/pkg/DESCR-examples new file mode 100644 index 00000000000..52e707b7519 --- /dev/null +++ b/graphics/py-Imaging/pkg/DESCR-examples @@ -0,0 +1 @@ +Examples for the Python Imaging Library (PIL). diff --git a/graphics/py-Imaging/pkg/DESCR b/graphics/py-Imaging/pkg/DESCR-main similarity index 100% rename from graphics/py-Imaging/pkg/DESCR rename to graphics/py-Imaging/pkg/DESCR-main diff --git a/graphics/py-Imaging/pkg/PLIST-bin b/graphics/py-Imaging/pkg/PLIST-bin new file mode 100644 index 00000000000..3145bea1606 --- /dev/null +++ b/graphics/py-Imaging/pkg/PLIST-bin @@ -0,0 +1,6 @@ +@comment $OpenBSD: PLIST-bin,v 1.1 2008/02/14 08:52:51 winiger Exp $ +bin/pilconvert +bin/pildriver +bin/pilfile +bin/pilfont +bin/pilprint diff --git a/graphics/py-Imaging/pkg/PLIST-examples b/graphics/py-Imaging/pkg/PLIST-examples new file mode 100644 index 00000000000..99c60fed2f3 --- /dev/null +++ b/graphics/py-Imaging/pkg/PLIST-examples @@ -0,0 +1,16 @@ +@comment $OpenBSD: PLIST-examples,v 1.5 2008/02/14 08:52:51 winiger Exp $ +share/examples/py-Imaging/ +share/examples/py-Imaging/README +share/examples/py-Imaging/enhancer.py +share/examples/py-Imaging/explode.py +share/examples/py-Imaging/gifmaker.py +share/examples/py-Imaging/image2py.py +share/examples/py-Imaging/painter.py +share/examples/py-Imaging/pilconvert.py +share/examples/py-Imaging/pildriver.py +share/examples/py-Imaging/pilfile.py +share/examples/py-Imaging/pilfont.py +share/examples/py-Imaging/pilprint.py +share/examples/py-Imaging/player.py +share/examples/py-Imaging/thresholder.py +share/examples/py-Imaging/viewer.py diff --git a/graphics/py-Imaging/pkg/PLIST b/graphics/py-Imaging/pkg/PLIST-main similarity index 93% rename from graphics/py-Imaging/pkg/PLIST rename to graphics/py-Imaging/pkg/PLIST-main index e25b78af730..4ceff922c47 100644 --- a/graphics/py-Imaging/pkg/PLIST +++ b/graphics/py-Imaging/pkg/PLIST-main @@ -1,9 +1,7 @@ -@comment $OpenBSD: PLIST,v 1.7 2005/11/20 13:59:50 alek Exp $ -bin/pilconvert -bin/pildriver -bin/pilfile -bin/pilfont -bin/pilprint +@comment $OpenBSD: PLIST-main,v 1.1 2008/02/14 08:52:51 winiger Exp $ +@option no-default-conflict +@conflict py-Imaging-*-python${MODPY_VERSION} +@pkgpath graphics/py-Imaging lib/python${MODPY_VERSION}/site-packages/PIL/ lib/python${MODPY_VERSION}/site-packages/PIL.pth lib/python${MODPY_VERSION}/site-packages/PIL/ArgImagePlugin.py @@ -157,18 +155,3 @@ lib/python${MODPY_VERSION}/site-packages/PIL/__init__.pyc lib/python${MODPY_VERSION}/site-packages/PIL/_imaging.so lib/python${MODPY_VERSION}/site-packages/PIL/_imagingft.so lib/python${MODPY_VERSION}/site-packages/PIL/_imagingtk.so -share/examples/py-Imaging/ -share/examples/py-Imaging/README -share/examples/py-Imaging/enhancer.py -share/examples/py-Imaging/explode.py -share/examples/py-Imaging/gifmaker.py -share/examples/py-Imaging/image2py.py -share/examples/py-Imaging/painter.py -share/examples/py-Imaging/pilconvert.py -share/examples/py-Imaging/pildriver.py -share/examples/py-Imaging/pilfile.py -share/examples/py-Imaging/pilfont.py -share/examples/py-Imaging/pilprint.py -share/examples/py-Imaging/player.py -share/examples/py-Imaging/thresholder.py -share/examples/py-Imaging/viewer.py