1- PYTHON = C:/Python26/python.exe
1+ PYDIR = C:/Python26
2+ PYTHON = ${PYDIR}/python.exe
23SRCDIR = ${PWD}
34WINSRCDIR = ` ${PWD} /data/mingw_path.sh ${PWD} `
45ZLIBVERSION = 1.2.3
5- PNGVERSION = 1.2.23
6+ PNGVERSION = 1.2.36
67FREETYPEVERSION = 2.3.9
7- # TCLTKVERSION = 8.4.19
88TCLTKVERSION = 8.5.7
9- MPLVERSION = 0.98.6svn
9+ MPLVERSION = 0.98.5.3
1010
1111# # You shouldn't need to configure past this point
1212
13- CFLAGS = -Os
14- CFLAGS += -I${SRCDIR}/zlib-${ZLIBVERSION}
15- CFLAGS += -I${SRCDIR}/libpng-${PNGVERSION}
16- CFLAGS += -I${SRCDIR}/freetype-${FREETYPEVERSION}/include
17- CFLAGS += -I${SRCDIR}/tcl${TCLTKVERSION}-src/generic
18- CFLAGS += -I${SRCDIR}/tcl${TCLTKVERSION}-src/win
19- CFLAGS += -I${SRCDIR}/tk${TCLTKVERSION}-src/generic
20- CFLAGS += -I${SRCDIR}/tk${TCLTKVERSION}-src/win
21- CFLAGS += -I${SRCDIR}/tk${TCLTKVERSION}-src/X11
13+ CFLAGS = -Os
2214
23- LDFLAGS = -L${SRCDIR}/zlib-${ZLIBVERSION}
24- LDFLAGS += -L${SRCDIR}/libpng-${PNGVERSION}
25- LDFLAGS += -L${SRCDIR}/freetype-${FREETYPEVERSION}
2615
2716PY_INCLUDE = "${WINSRCDIR}\\zlib-${ZLIBVERSION};${WINSRCDIR}/libpng-${PNGVERSION};${WINSRCDIR}/freetype-${FREETYPEVERSION}/include;${WINSRCDIR}/tcl${TCLTKVERSION}/generic;${WINSRCDIR}/tcl${TCLTKVERSION}/win;${WINSRCDIR}/tk${TCLTKVERSION}/generic;${WINSRCDIR}/tk${TCLTKVERSION}/win;${WINSRCDIR}/tk${TCLTKVERSION}/xlib"
2817
@@ -47,15 +36,21 @@ zlib:
4736 rm -rf zlib-${ZLIBVERSION}
4837 tar xvfz zlib-${ZLIBVERSION} .tar.gz
4938 cd zlib-${ZLIBVERSION} && \
39+ export CFLAGS=${CFLAGS} && \
5040 ./configure && \
5141 make -j3
5242
43+ # for reasons not clear to me, part of png compilation was failing
44+ # because it could not find zlib.h, even with the CFLAGS which point
45+ # to it and even with tryting to pass --includedir to configure. So I
46+ # manually copy the zlib *.h files into the png dir - JDH
5347png : zlib
5448 rm -rf libpng-${PNGVERSION}
55- tar xvfj libpng-${PNGVERSION} .tar.bz2
49+ tar xvfj libpng-${PNGVERSION} .tar.bz2
5650 cd libpng-${PNGVERSION} && \
57- export CFLAGS=" ${CFLAGS} " && \
58- export LDFLAGS=" ${LDFLAGS} " && \
51+ cp ${SRCDIR} /zlib-${ZLIBVERSION} /* .h . && \
52+ export CFLAGS=" ${CFLAGS} -I${SRCDIR} /zlib-${ZLIBVERSION} " && \
53+ export LDFLAGS=" -L${SRCDIR} /zlib-${ZLIBVERSION} " && \
5954 ./configure --disable-shared && \
6055 make -j3 && \
6156 cp .libs/libpng.a .
@@ -69,6 +64,16 @@ freetype:
6964 mingw32-make -j3 && \
7065 cp objs/libfreetype.a .
7166
67+ freetype_hide :
68+ rm -rf freetype-${FREETYPEVERSION}
69+ tar xvfj freetype-${FREETYPEVERSION} .tar.bz2
70+ cd freetype-${FREETYPEVERSION} && \
71+ export CFLAGS=${CFLAGS} && \
72+ ./configure --disable-shared && \
73+ cp builds/win32/w32-mingw32.mk config.mk && \
74+ make -j3 && \
75+ cp objs/libfreetype.a .
76+
7277tcltk :
7378 rm -rf tcl${TCLTKVERSION}
7479 rm -rf tk${TCLTKVERSION}
@@ -83,7 +88,21 @@ installers:
8388 cd matplotlib-${MPLVERSION} && \
8489 rm -rf build && \
8590 cp ../data/setup* .* . && \
86- ${PYTHON} setupwin.py build_ext -c mingw32 -I ${PY_INCLUDE} -L ${PY_LINKER} bdist_wininst && \
91+ ${PYTHON} setupwin.py build_ext -c mingw32 -I ${PY_INCLUDE} -L ${PY_LINKER} bdist_wininst
8792 ${PYTHON} setupwinegg.py build_ext -c mingw32 -I ${PY_INCLUDE} -L ${PY_LINKER} bdist_egg
8893
94+
95+ inplace :
96+ # rm -rf matplotlib-${MPLVERSION}
97+ # tar xvzf matplotlib-${MPLVERSION}.tar.gz
98+ cd matplotlib-${MPLVERSION} && \
99+ rm -rf build lib/matplotlib/* .pyd lib/matplotlib/* .pyc lib/matplotlib/backends/* .pyd lib/matplotlib/backends/* .pyc && \
100+ cp ../data/setup* .* . && \
101+ ${PYTHON} setup.py build_ext -c mingw32 -I ${PY_INCLUDE} -L ${PY_LINKER} --inplace
102+ cd matplotlib-${MPLVERSION} /lib && \
103+ ${PYTHON} -c ' import matplotlib; matplotlib.use("Agg"); from pylab import *; print matplotlib.__file__; plot([1,2,3]); savefig("test.png")'
104+
105+ test :
106+ ${PYTHON} -c ' import matplotlib; matplotlib.use("Agg"); from pylab import *; print matplotlib.__file__; plot([1,2,3]); savefig("test.png")'
107+
89108all : fetch_deps dependencies installers
0 commit comments