1 $NetBSD: patch-aa,v 1.7 2009/01/28 14:42:28 joerg Exp $
3 --- setup.py.orig 2008-09-11 15:01:16.000000000 +0200
5 @@ -255,21 +255,9 @@ def main():
6 infoline( '################################################')
7 infoline( '#Attempting install of _renderPM')
8 infoline( '#extensions from %r'%RENDERPM)
9 - LIBART_DIR=pjoin(RENDERPM,'libart_lgpl')
10 MACROS=[('ROBIN_DEBUG',None)]
12 - def libart_version():
13 - K = ('LIBART_MAJOR_VERSION','LIBART_MINOR_VERSION','LIBART_MICRO_VERSION')
15 - for l in open(pjoin(LIBART_DIR,'configure.in'),'r').readlines():
16 - l = l.strip().split('=')
17 - if len(l)>1 and l[0].strip() in K:
18 - D[l[0].strip()] = l[1].strip()
20 - return (sys.platform == 'win32' and '\\"%s\\"' or '"%s"') % '.'.join(map(lambda k,D=D: D.get(k,'?'),K))
21 - LIBART_VERSION = libart_version()
22 SOURCES=[pjoin(RENDERPM,'_renderPM.c')]
23 - LIBART_SRCS=glob.glob(pjoin(LIBART_DIR, 'art_*.c'))
24 GT1_DIR=pjoin(RENDERPM,'gt1')
25 LIBS = [] #assume empty libraries list
27 @@ -314,14 +302,6 @@ def main():
28 infoline('# installing without freetype no ttf, sorry!')
31 - ('_renderPM_libart',
33 - 'sources': LIBART_SRCS,
34 - 'include_dirs': [RENDERPM,LIBART_DIR,],
35 - 'macros': [('LIBART_COMPILATION',None),]+BIGENDIAN('WORDS_BIGENDIAN')+MACROS,
36 - #'extra_compile_args':['/Z7'],
41 'sources': pfxJoin(GT1_DIR,'gt1-dict.c','gt1-namecontext.c','gt1-parset1.c','gt1-region.c','parseAFM.c'),
42 @@ -334,13 +314,13 @@ def main():
44 EXT_MODULES += [Extension( '_renderPM',
46 - include_dirs=[RENDERPM,LIBART_DIR,GT1_DIR]+FT_INC_DIR,
47 - define_macros=FT_MACROS+[('LIBART_COMPILATION',None)]+MACROS+[('LIBART_VERSION',LIBART_VERSION)],
48 + include_dirs=[RENDERPM,GT1_DIR]+FT_INC_DIR,
49 + define_macros=FT_MACROS+MACROS,
50 library_dirs=[]+FT_LIB_DIR,
52 # libraries to link against
53 - libraries=LIBS+FT_LIB,
54 - #extra_objects=['gt1.lib','libart.lib',],
55 + libraries=LIBS+FT_LIB+['art_lgpl_2'],
56 + #extra_objects=['gt1.lib'],
57 #extra_compile_args=['/Z7'],