diff --git a/.gitignore b/.gitignore index 2e4eac737..3c5d4d3b9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *~ build working +downloads diff --git a/.travis.yml b/.travis.yml index d7a7735b2..c4930464f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: - if [ -n "$LATEST_TAG" ]; then git fetch ; git fetch --tags ; - git checkout `../terryfy/git-latest-tag` ; + git checkout `../terryfy/git-closest-tag` ; fi - python setup.py bdist_wheel - delocate-wheel dist/*.whl diff --git a/archives/zlib-1.2.8.tar.xz b/archives/zlib-1.2.8.tar.xz new file mode 100644 index 000000000..6b4a64bf7 Binary files /dev/null and b/archives/zlib-1.2.8.tar.xz differ diff --git a/library_installers.sh b/library_installers.sh deleted file mode 100755 index 69e74ef45..000000000 --- a/library_installers.sh +++ /dev/null @@ -1,178 +0,0 @@ -# Travis install -# source this script to run the install on travis OSX workers - -# Get needed utilities -source terryfy/travis_tools.sh - -# Package versions for fresh source builds -FT_VERSION="2.5.3" -PNG_VERSION="1.6.12" -JPEG_VERSION=9a -OPENJPEG_VERSION=2.0.0 -TIFF_VERSION=4.0.3 -LCMS_VERSION=2.6 -WEBP_VERSION=0.4.0 - -# Compiler defaults -SYS_CC=clang -SYS_CXX=clang++ -ARCH_FLAGS="-arch i386 -arch x86_64" -MACOSX_DEPLOYMENT_TARGET='10.6' - - -function check_version { - if [ -z "$version" ]; then - echo "Need version" - exit 1 - fi -} - - -function check_var { - if [ -z "$1" ]; then - echo "Undefined required variable" - exit 1 - fi -} - - -function init_vars { - SRC_PREFIX=$PWD/working - BUILD_PREFIX=$PWD/build - export PATH=$BUILD_PREFIX/bin:$PATH - export CPATH=$BUILD_PREFIX/include - export LIBRARY_PATH=$BUILD_PREFIX/lib - export PKG_CONFIG_PATH=$BUILD_PREFIX/lib/pkgconfig -} - - -function clean_builds { - check_var $SRC_PREFIX - check_var $BUILD_PREFIX - rm -rf $SRC_PREFIX - mkdir $SRC_PREFIX - rm -rf $BUILD_PREFIX - mkdir $BUILD_PREFIX - cd Pillow - git clean -fxd - git reset --hard - cd .. -} - - -function install_jpeg { - check_var $JPEG_VERSION - check_var $SRC_PREFIX - check_var $BUILD_PREFIX - local archive_path="archives/jpegsrc.v${JPEG_VERSION}.tar.gz" - tar zxvf $archive_path -C $SRC_PREFIX - cd $SRC_PREFIX/jpeg-$JPEG_VERSION - require_success "Failed to cd to jpeg directory" - CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX - make - make install - require_success "Failed to install jpeg $version" - cd ../.. -} - - -function install_openjpeg { - check_var $OPENJPEG_VERSION - check_var $SRC_PREFIX - check_var $BUILD_PREFIX - local archive_path="archives/openjpeg-${OPENJPEG_VERSION}.tar.gz" - tar zxvf $archive_path -C $SRC_PREFIX - cd $SRC_PREFIX/openjpeg-$OPENJPEG_VERSION - require_success "Failed to cd to openjpeg directory" - CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS \ - CMAKE_INCLUDE_PATH=$CPATH \ - CMAKE_LIBRARY_PATH=$LIBRARY_PATH \ - cmake -DCMAKE_INSTALL_PREFIX:PATH=$BUILD_PREFIX . - make - make install - require_success "Failed to install openjpeg $version" - cd ../.. -} - - -function install_tiff { - check_var $TIFF_VERSION - check_var $SRC_PREFIX - check_var $BUILD_PREFIX - local archive_path="archives/tiff-${TIFF_VERSION}.tar.gz" - tar zxvf $archive_path -C $SRC_PREFIX - cd $SRC_PREFIX/tiff-$TIFF_VERSION - require_success "Failed to cd to tiff directory" - CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX - make - make install - require_success "Failed to install tiff $version" - cd ../.. -} - - -function install_libpng { - check_var $PNG_VERSION - check_var $SRC_PREFIX - check_var $BUILD_PREFIX - local archive_path="archives/libpng-${PNG_VERSION}.tar.gz" - tar zxvf $archive_path -C $SRC_PREFIX - cd $SRC_PREFIX/libpng-$PNG_VERSION - require_success "Failed to cd to png directory" - CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX - make - make install - require_success "Failed to install png $version" - cd ../.. -} - - -function install_freetype { - check_var $FT_VERSION - check_var $SRC_PREFIX - check_var $BUILD_PREFIX - local archive_path="archives/freetype-${FT_VERSION}.tar.gz" - tar zxvf $archive_path -C $SRC_PREFIX - cd $SRC_PREFIX/freetype-$FT_VERSION - require_success "Failed to cd to freetype directory" - CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX - make - make install - require_success "Failed to install freetype $version" - cd ../.. -} - - -function install_lcms2 { - check_var $LCMS_VERSION - check_var $SRC_PREFIX - check_var $BUILD_PREFIX - local archive_path="archives/lcms2-${LCMS_VERSION}.tar.gz" - tar zxvf $archive_path -C $SRC_PREFIX - cd $SRC_PREFIX/lcms2-$LCMS_VERSION - require_success "Failed to cd to lcms2 directory" - CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure --prefix=$BUILD_PREFIX - make - make install - require_success "Failed to install lcms $version" - cd ../.. -} - - -function install_webp { - check_var $WEBP_VERSION - check_var $SRC_PREFIX - check_var $BUILD_PREFIX - local archive_path="archives/libwebp-${WEBP_VERSION}.tar.gz" - tar zxvf $archive_path -C $SRC_PREFIX - cd $SRC_PREFIX/libwebp-$WEBP_VERSION - require_success "Failed to cd to libwebp directory" - CC=${SYS_CC} CXX=${SYS_CXX} CFLAGS=$ARCH_FLAGS ./configure \ - --enable-libwebpmux \ - --enable-libwebpdemux \ - --prefix=$BUILD_PREFIX - make - make install - require_success "Failed to install webp $version" - cd ../.. -} diff --git a/run_install.sh b/run_install.sh index 9d8475a56..6384abbf1 100644 --- a/run_install.sh +++ b/run_install.sh @@ -1,20 +1,32 @@ source terryfy/travis_tools.sh -source library_installers.sh +source terryfy/library_installers.sh + +# Package versions for fresh source builds +FT_VERSION=2.5.3 +PNG_VERSION=1.6.12 +ZLIB_VERSION=1.2.8 +JPEG_VERSION=9a +OPENJPEG_VERSION=2.0.0 +TIFF_VERSION=4.0.3 +LCMS_VERSION=2.6 +WEBP_VERSION=0.4.0 # Need cmake for openjpeg brew install cmake # Need pkg-config for freetype to find libpng brew install pkg-config # Set up build -init_vars clean_builds -install_jpeg -install_tiff -install_libpng -install_lcms2 -install_webp -install_openjpeg +clean_submodule Pillow +standard_install zlib $ZLIB_VERSION .tar.xz +standard_install jpeg $JPEG_VERSION .tar.gz jpegsrc.v +standard_install tiff $TIFF_VERSION +standard_install libpng $PNG_VERSION +standard_install lcms2 $LCMS_VERSION +WEBP_EXTRAS="--enable-libwebpmux --enable-libwebpdemux" +standard_install libwebp $WEBP_VERSION .tar.gz libwebp- "$WEBP_EXTRAS" +standard_install openjpeg $OPENJPEG_VERSION .tar.gz openjpeg- cmake # Fix openjpeg library install id # https://code.google.com/p/openjpeg/issues/detail?id=367 install_name_tool -id $PWD/build/lib/libopenjp2.6.dylib build/lib/libopenjp2.2.0.0.dylib -install_freetype +standard_install freetype $FT_VERSION .tar.gz freetype- "--with-harfbuzz=no" diff --git a/terryfy b/terryfy index 42f19f7a4..1c45b3549 160000 --- a/terryfy +++ b/terryfy @@ -1 +1 @@ -Subproject commit 42f19f7a4ea2bdd5b66282e8641d1a7a65615eda +Subproject commit 1c45b3549b663a037f62ee3a02fd64761806d396