Skip to content

Commit c2af9c6

Browse files
committed
Amend, rather than override, CFLAGS
1 parent d102d39 commit c2af9c6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setupext.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,13 +996,16 @@ def do_custom_build(self):
996996
raise IOError("{0} does not match expected hash.".format(tarball))
997997

998998
print("Building {0}".format(tarball))
999+
cflags = 'CFLAGS="{0} -fPIC" '.format(os.environ.get('CFLAGS', ''))
1000+
9991001
subprocess.check_call(
10001002
['tar zxf {0}'.format(tarball)], shell=True, cwd='build')
10011003
subprocess.check_call(
1002-
['CFLAGS=-fPIC ./configure --without-zlib --without-bzip2 --without-png'],
1004+
[cflags +
1005+
'./configure --without-zlib --without-bzip2 --without-png'],
10031006
shell=True, cwd=src_path)
10041007
subprocess.check_call(
1005-
['CFLAGS=-fPIC make'], shell=True, cwd=src_path)
1008+
[cflags + 'make'], shell=True, cwd=src_path)
10061009

10071010

10081011
class FT2Font(SetupPackage):

0 commit comments

Comments
 (0)