1 include ../Makefile.include
6 SOURCE=$(LIBNAME)-$(VERSION)
7 ARCHIVE=$(SOURCE).tar.bz2
9 # configuration settings
11 CONFIGURE=./configure --prefix=$(PREFIX) \
12 --enable-shared --disable-toolbox-glue --enable-unicode=ucs4
14 LIBDYLIB=$(SOURCE)/libpython2.6.dylib
16 all: $(LIBDYLIB) .installed
18 $(TARBALLS_LOCATION)/$(ARCHIVE):
19 $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
21 $(LIBDYLIB): $(TARBALLS_LOCATION)/$(ARCHIVE)
23 $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
24 echo $(SOURCE) > .gitignore
25 # http://bugs.python.org/issue6869
26 cd $(SOURCE); patch -p1 < ../Python-2.6-ctypes.patch
27 cd $(SOURCE); $(CONFIGURE)
28 # python2.6 has an issue detecting and using the same version of openssl in configure and setup.py
29 # this forces python2.6 hashlib to be compatible with osx 10.4 boxes.
30 sed -ie "s|openssl_ver >= 0x00907000)|openssl_ver >= 0x00907000 and False)|" "$(SOURCE)/setup.py"
31 sed -ie "s|(openssl_ver < 0x00908000)|(True or openssl_ver < 0x00908000)|" "$(SOURCE)/setup.py"
32 cd $(SOURCE); make -j $(MAKE_JOBS)
35 cd $(SOURCE); make install
36 find $(PREFIX)/lib/python2.6 -type f -name *.pyc -exec rm -f {} \;
37 find $(PREFIX)/lib/python2.6 -type f -name *.pyo -exec rm -f {} \;
41 rm -rf $(SOURCE) .installed
44 rm -rf $(SOURCE) .installed