commit e91f06e636d4efabbf93c3270302a5525d4eb087 Author: Erinn Clark erinn@torproject.org Date: Sat Oct 29 14:02:57 2011 +0100
add a patch for zlib's windows makefile and update the tbb makefile target to build it automatically --- build-scripts/patch-any-src.sh | 6 +++ build-scripts/patch-firefox-src.sh | 6 --- build-scripts/windows.mk | 11 +++--- .../zlib/0001-zlib-update-Makefile.patch | 38 ++++++++++++++++++++ 4 files changed, 50 insertions(+), 11 deletions(-)
diff --git a/build-scripts/patch-any-src.sh b/build-scripts/patch-any-src.sh new file mode 100755 index 0000000..602612a --- /dev/null +++ b/build-scripts/patch-any-src.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Cycle through available patches for Firefox and apply them in order. Fail if +# any of them don't apply cleanly. + +for i in *patch; do patch -tp1 <$i || exit 1; done diff --git a/build-scripts/patch-firefox-src.sh b/build-scripts/patch-firefox-src.sh deleted file mode 100755 index 602612a..0000000 --- a/build-scripts/patch-firefox-src.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# Cycle through available patches for Firefox and apply them in order. Fail if -# any of them don't apply cleanly. - -for i in *patch; do patch -tp1 <$i || exit 1; done diff --git a/build-scripts/windows.mk b/build-scripts/windows.mk index 380596e..13d608d 100644 --- a/build-scripts/windows.mk +++ b/build-scripts/windows.mk @@ -67,12 +67,13 @@ source-dance: fetch-source unpack-source echo "We're ready for building now."
ZLIB_DIR=$(FETCH_DIR)/zlib-$(ZLIB_VER) -ZLIB_OPTS=--prefix=$(BUILT_DIR) -ZLIB_LDFLAGS="-Wl,--nxcompat -Wl,--dynamicbase" build-zlib: - cd $(ZLIB_DIR) && LDFLAGS=$(ZLIB_LDFLAGS) ./configure $(ZLIB_OPTS) - cd $(ZLIB_DIR) && make - cd $(ZLIB_DIR) && make install + cp ../src/current-patches/zlib/* $(ZLIB_DIR) + cp patch-any-src.sh $(ZLIB_DIR) + cd $(ZLIB_DIR) && ./patch-any-src.sh + cd $(ZLIB_DIR) && sed -i -e "s%prefix = /usr/local%prefix = ${BUILT_DIR}%" win32/Makefile.gcc + cd $(ZLIB_DIR) && make -f win32/Makefile.gcc + cd $(ZLIB_DIR) && make -f win32/Makefile.gcc install
OPENSSL_DIR=$(FETCH_DIR)/openssl-$(OPENSSL_VER) OPENSSL_OPTS=-no-idea -no-rc5 -no-md2 shared zlib --prefix=$(BUILT_DIR) --openssldir=$(BUILT_DIR) -L$(BUILT_DIR)/lib -Wl,--nxcompat -Wl,--dynamicbase -I$(BUILT_DIR)/include diff --git a/src/current-patches/zlib/0001-zlib-update-Makefile.patch b/src/current-patches/zlib/0001-zlib-update-Makefile.patch new file mode 100644 index 0000000..07b9d48 --- /dev/null +++ b/src/current-patches/zlib/0001-zlib-update-Makefile.patch @@ -0,0 +1,38 @@ +From b45561038c1819c5d6264b025e872c82b7adf94f Mon Sep 17 00:00:00 2001 +From: Erinn Clark erinn@torproject.org +Date: Sat, 29 Oct 2011 01:59:59 +0100 +Subject: [PATCH] update zlib Makefile.gcc + +zlib's Makefile is inadequate for building TBB from source, so patch it to use +DEP/ASLR build options and have some actually working include and library +paths. + +--- + win32/Makefile.gcc | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/win32/Makefile.gcc b/win32/Makefile.gcc +index 0a33bf6..79cad54 100644 +--- a/win32/Makefile.gcc ++++ b/win32/Makefile.gcc +@@ -44,7 +44,7 @@ AS = $(CC) + ASFLAGS = $(LOC) -Wall + + LD = $(CC) +-LDFLAGS = $(LOC) ++LDFLAGS = $(LOC) -Wl,--nxcompat -Wl,--dynamicbase + + AR = $(PREFIX)ar + ARFLAGS = rcs +@@ -113,6 +113,8 @@ zlibrc.o: win32/zlib1.rc + + + # BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set. ++INCLUDE_PATH=$(prefix)/include ++LIBRARY_PATH=$(prefix)/lib + + .PHONY: install uninstall clean + +-- +1.7.5.4 +