1
- PYTHON = C:/Python26/python.exe
1
+ PYDIR = C:/Python26
2
+ PYTHON = ${PYDIR}/python.exe
2
3
SRCDIR = ${PWD}
3
4
WINSRCDIR = ` ${PWD} /data/mingw_path.sh ${PWD} `
4
5
ZLIBVERSION = 1.2.3
5
- PNGVERSION = 1.2.23
6
+ PNGVERSION = 1.2.36
6
7
FREETYPEVERSION = 2.3.9
7
- # TCLTKVERSION = 8.4.19
8
8
TCLTKVERSION = 8.5.7
9
- MPLVERSION = 0.98.6svn
9
+ MPLVERSION = 0.98.5.3
10
10
11
11
# # You shouldn't need to configure past this point
12
12
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
22
14
23
- LDFLAGS = -L${SRCDIR}/zlib-${ZLIBVERSION}
24
- LDFLAGS += -L${SRCDIR}/libpng-${PNGVERSION}
25
- LDFLAGS += -L${SRCDIR}/freetype-${FREETYPEVERSION}
26
15
27
16
PY_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"
28
17
@@ -47,15 +36,21 @@ zlib:
47
36
rm -rf zlib-${ZLIBVERSION}
48
37
tar xvfz zlib-${ZLIBVERSION} .tar.gz
49
38
cd zlib-${ZLIBVERSION} && \
39
+ export CFLAGS=${CFLAGS} && \
50
40
./configure && \
51
41
make -j3
52
42
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
53
47
png : zlib
54
48
rm -rf libpng-${PNGVERSION}
55
- tar xvfj libpng-${PNGVERSION} .tar.bz2
49
+ tar xvfj libpng-${PNGVERSION} .tar.bz2
56
50
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} " && \
59
54
./configure --disable-shared && \
60
55
make -j3 && \
61
56
cp .libs/libpng.a .
@@ -69,6 +64,16 @@ freetype:
69
64
mingw32-make -j3 && \
70
65
cp objs/libfreetype.a .
71
66
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
+
72
77
tcltk :
73
78
rm -rf tcl${TCLTKVERSION}
74
79
rm -rf tk${TCLTKVERSION}
@@ -83,7 +88,21 @@ installers:
83
88
cd matplotlib-${MPLVERSION} && \
84
89
rm -rf build && \
85
90
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
87
92
${PYTHON} setupwinegg.py build_ext -c mingw32 -I ${PY_INCLUDE} -L ${PY_LINKER} bdist_egg
88
93
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
+
89
108
all : fetch_deps dependencies installers
0 commit comments