freebsd-ports/graphics/py-magick/files/patch-aa
Hye-Shik Chang ab0d20a62a Add port for py-magick 0.5, a python binding for ImageMagick.
PR:		58843
Submitted by:	Tim Hemel <tim@n2it.net>
2003-11-10 14:57:37 +00:00

41 lines
1.1 KiB
Text

--- setup.py.orig Sun Apr 13 00:48:35 2003
+++ setup.py Sun Nov 2 20:18:56 2003
@@ -1,6 +1,7 @@
from distutils.core import setup, Extension
import commands
import os
+import re
import sys
if sys.platform != 'win32':
@@ -15,15 +16,27 @@
except:
raise SystemExit
val = commands.getoutput('Magick-config --prefix')
- libs = ['Magick']
+
+ libs = commands.getoutput('Magick-config --libs')
+ libs = re.split('\s+',libs)
+ libs = map(lambda x:x[2:], libs)
+
+ incdir = commands.getoutput('Magick-config --cppflags')
+ incdir = re.split('\s+',incdir)
+ incdir = map(lambda x:x[2:], incdir)
+
+ libdir = commands.getoutput('Magick-config --ldflags')
+ libdir = re.split('\s+',libdir)
+ libdir = map(lambda x:x[2:], libdir)
+
else:
libs = ['CORE_RL_magick_']
val = os.environ.get('MAGICK_HOME')
if not val:
raise SystemExit, "ImageMagick not installed correctly"
+ libdir =[os.path.join(val,'lib')]
+ incdir =[os.path.join(val,'include')]
-libdir =[os.path.join(val,'lib')]
-incdir =[os.path.join(val,'include')]
setup(name = "magick",
version = "0.5",