Skip to content

Commit da7cff9

Browse files
committed
RF: factor out URLs, versions to globals
Update png, freetype versions
1 parent a984945 commit da7cff9

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

install.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
44
MACPYTHON_PREFIX=/Library/Frameworks/Python.framework/Versions
5+
# Package versions / URLs for fresh source builds (MacPython only)
6+
FT_BASE_URL=http://sourceforge.net/projects/freetype/files/freetype2
7+
FT_VERSION="2.5.3"
8+
PNG_BASE_URL=http://downloads.sourceforge.net/project/libpng/libpng16
9+
PNG_VERSION="1.6.10"
10+
XQ_BASE_URL=http://xquartz.macosforge.org/downloads/SL
11+
XQUARTZ_VERSION="2.7.4"
512

613
function require_success {
714
STATUS=$?
@@ -116,11 +123,12 @@ function install_mac_python {
116123

117124
function install_freetype {
118125
FT_VERSION=$1
119-
curl -L http://sourceforge.net/projects/freetype/files/freetype2/2.5.0/freetype-2.5.0.1.tar.bz2/download > freetype.tar.bz2
126+
curl -L $FT_BASE_URL/$FT_VERSION/freetype-$FT_VERSION.tar.bz2/download > freetype.tar.bz2
120127
require_success "Failed to download freetype"
121128

122129
tar -xjf freetype.tar.bz2
123130
cd freetype-$FT_VERSION
131+
require_success "Failed to cd to freetype directory"
124132
./configure --enable-shared=no --enable-static=true
125133
make
126134
sudo make install
@@ -131,11 +139,12 @@ function install_freetype {
131139

132140
function install_libpng {
133141
VERSION=$1
134-
curl -L http://downloads.sourceforge.net/project/libpng/libpng16/$VERSION/libpng-$VERSION.tar.gz > libpng.tar.gz
142+
curl -L $PNG_BASE_URL/$VERSION/libpng-$VERSION.tar.gz > libpng.tar.gz
135143
require_success "Failed to download libpng"
136144

137145
tar -xzf libpng.tar.gz
138146
cd libpng-$VERSION
147+
require_success "Failed to cd to libpng directory"
139148
./configure --enable-shared=no --enable-static=true
140149
make
141150
sudo make install
@@ -146,7 +155,7 @@ function install_libpng {
146155

147156
function install_xquartz {
148157
VERSION=$1
149-
curl http://xquartz.macosforge.org/downloads/SL/XQuartz-$VERSION.dmg > xquartz.dmg
158+
curl $XQ_BASE_URL/XQuartz-$VERSION.dmg > xquartz.dmg
150159
require_success "failed to download XQuartz"
151160

152161
hdiutil attach xquartz.dmg -mountpoint /Volumes/XQuartz
@@ -279,9 +288,6 @@ then
279288
elif [ "$TEST" == "macpython27_10.9" ] ; then
280289

281290
PY_VERSION="2.7.6"
282-
FT_VERSION="2.5.0.1"
283-
PNG_VERSION="1.6.3"
284-
XQUARTZ_VERSION="2.7.4"
285291
install_mac_python $PY_VERSION
286292
install_tkl_85
287293
install_libpng $PNG_VERSION
@@ -307,9 +313,6 @@ elif [ "$TEST" == "macpython27_10.9" ] ; then
307313
elif [ "$TEST" == "macpython33_10.9" ] ; then
308314

309315
PY_VERSION="3.3.5"
310-
FT_VERSION="2.5.0.1"
311-
PNG_VERSION="1.6.3"
312-
XQUARTZ_VERSION="2.7.4"
313316
install_mac_python $PY_VERSION
314317
install_tkl_85
315318
install_libpng $PNG_VERSION

0 commit comments

Comments
 (0)