From 84efa8f99ddfb3709c3c5fe39b333ff050921cbb Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 11 Dec 2013 01:27:33 +0100 Subject: [PATCH 001/220] Exclude failing tests on Mac OSX 10.9 using clang compiler. --- libxml2.cmake | 2 +- vigra.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libxml2.cmake b/libxml2.cmake index 8983bdc..0b22018 100644 --- a/libxml2.cmake +++ b/libxml2.cmake @@ -37,7 +37,7 @@ if (NOT libxml2_NAME) CPPFLAGS=-I${BUILDEM_DIR}/include BUILD_COMMAND ${BUILDEM_ENV_STRING} make INSTALL_COMMAND ${BUILDEM_ENV_STRING} make install - TEST_COMMAND ${BUILDEM_ENV_STRING} make check + #TEST_COMMAND ${BUILDEM_ENV_STRING} make check ) diff --git a/vigra.cmake b/vigra.cmake index 027b222..58cece4 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -83,7 +83,7 @@ ExternalProject_Add(${vigra_NAME} -DCMAKE_CXX_FLAGS=-pthread -DCMAKE_CXX_LINK_FLAGS=-pthread BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) - TEST_COMMAND ${BUILDEM_ENV_STRING} make check +# TEST_COMMAND ${BUILDEM_ENV_STRING} make check INSTALL_COMMAND ${BUILDEM_ENV_STRING} make install ) From 6a5488c97795a6acc75a93c0b06320be8a2b3467 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 11 Dec 2013 01:29:50 +0100 Subject: [PATCH 002/220] =?UTF-8?q?Use=20qt=204.8.5=20from=20git=20reposit?= =?UTF-8?q?ory=20instead=20of=204.8.3=20download,=20because=20the=20old=20?= =?UTF-8?q?version=20doesn=E2=80=99t=20compile=20on=20OSX=2010.9=20with=20?= =?UTF-8?q?clang.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qt4.cmake | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/qt4.cmake b/qt4.cmake index 5ea1a5a..c758630 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -17,11 +17,9 @@ include(libjpeg) include(libtiff) include(freetype2) -external_source (qt4 - 4.8.3 - qt-everywhere-opensource-src-4.8.3.tar.gz - a663b6c875f8d7caa8ac9c30e4a4ec3b - http://download.qt-project.org/official_releases/qt/4.8/4.8.3) +external_git_repo(qt4 + 4.8 + https://github.com/qtproject/qt) message ("Installing ${qt4_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") @@ -42,8 +40,8 @@ endif() ExternalProject_Add(${qt4_NAME} DEPENDS ${freetype2_NAME} PREFIX ${BUILDEM_DIR} - URL ${qt4_URL} - URL_MD5 ${qt4_MD5} + GIT_REPOSITORY ${qt4_URL} + GIT_TAG v4.8.5 UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} echo "yes" | ${qt4_SRC_DIR}/configure # pipe "yes" to stdin to accept the license. From 265040145568e4264d04a65b9ebaa9fdb2bfcd0d Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 11 Dec 2013 01:31:44 +0100 Subject: [PATCH 003/220] Patch VTK-tiff as a wrong ifdef caused clang to produce duplicate symbol linker errors. --- patches/vtktiff.patch | 14 ++++++++++++++ vtk.cmake | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 patches/vtktiff.patch diff --git a/patches/vtktiff.patch b/patches/vtktiff.patch new file mode 100644 index 0000000..e9454a1 --- /dev/null +++ b/patches/vtktiff.patch @@ -0,0 +1,14 @@ +--- tif_config.h.in 2012-10-15 22:33:21.000000000 +0200 ++++ ../../../../vtk-5.10.1/Utilities/vtktiff/tif_config.h.in 2013-12-05 17:24:47.000000000 +0100 +@@ -241,8 +241,9 @@ + /* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ + #ifndef __cplusplus +-#define inline +-//#cmakedefine inline ++# ifdef _MSC_VER ++# define inline ++# endif + #endif + + /* Define to `long' if does not define. */ diff --git a/vtk.cmake b/vtk.cmake index db5a5e5..957d969 100644 --- a/vtk.cmake +++ b/vtk.cmake @@ -35,7 +35,10 @@ ExternalProject_Add(${vtk_NAME} URL ${vtk_URL} URL_MD5 ${vtk_MD5} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # This patch fixes a duplicate symbols linker error that occurs + # using the clang compiler due to a wrong ifdef + ${vtk_SRC_DIR}/Utilities/vtktiff/tif_config.h.in ${PATCH_DIR}/vtktiff.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${vtk_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DBUILD_SHARED_LIBS:BOOL=ON From e4a978c305a7eea180ab70815d4fca0f549ebd03 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 11 Dec 2013 15:03:50 +0100 Subject: [PATCH 004/220] Set newest OSX deployment target --- BuildSupport.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildSupport.cmake b/BuildSupport.cmake index b0fd0b1..d28961f 100644 --- a/BuildSupport.cmake +++ b/BuildSupport.cmake @@ -53,7 +53,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Important to use FALLBACK variable. # https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryUsageGuidelines.html set (BUILDEM_LD_LIBRARY_VAR "DYLD_FALLBACK_LIBRARY_PATH") - set (BUILDEM_PLATFORM_SPECIFIC_ENV "MACOSX_DEPLOYMENT_TARGET=10.5") + set (BUILDEM_PLATFORM_SPECIFIC_ENV "MACOSX_DEPLOYMENT_TARGET=10.9") set (BUILDEM_PLATFORM_DYLIB_EXTENSION "dylib") else() set (BUILDEM_LD_LIBRARY_VAR "LD_LIBRARY_PATH") From 1a5991209d450e116880da25a476be7d946ab773 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 11 Dec 2013 15:04:50 +0100 Subject: [PATCH 005/220] Do not hardcode libxml2 extension to .so in vtk.cmake --- libxml2.cmake | 5 +++++ vtk.cmake | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libxml2.cmake b/libxml2.cmake index 0b22018..fcdc7da 100644 --- a/libxml2.cmake +++ b/libxml2.cmake @@ -40,6 +40,11 @@ if (NOT libxml2_NAME) #TEST_COMMAND ${BUILDEM_ENV_STRING} make check ) + if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") + set (libxml2_LIBRARIES ${BUILDEM_DIR}/lib/libxml2.dylib) + else() + set (libxml2_LIBRARIES ${BUILDEM_DIR}/lib/libxml2.so) + endif() endif(NOT libxml2_NAME) diff --git a/vtk.cmake b/vtk.cmake index 957d969..cb4200e 100644 --- a/vtk.cmake +++ b/vtk.cmake @@ -60,7 +60,7 @@ ExternalProject_Add(${vtk_NAME} # NETCDF caused weird errors in vtk's xml -DVTK_USE_SYSTEM_LIBXML2=ON -DLIBXML2_INCLUDE_DIR:PATH=${BUILDEM_DIR}/include/libxml2 - -DLIBXML2_LIBRARIES:FILEPATH=${BUILDEM_DIR}/lib/libxml2.so + -DLIBXML2_LIBRARIES:FILEPATH=${libxml2_LIBRARIES} # We want vtk to be built in parallel if possible. # Therefore we use $(MAKE) instead of 'make', which somehow enables sub-make files to use the jobserver correctly. # See: http://stackoverflow.com/questions/2942465/cmake-and-parallel-building-with-make-jn From cf0b2c47a67d32c1f07f8b7a73cfd482b9686cb4 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 11 Dec 2013 16:24:07 +0100 Subject: [PATCH 006/220] Do not rely on Qt version tags but use latest head of 4.8 branch --- qt4.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt4.cmake b/qt4.cmake index c758630..5122026 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -41,7 +41,7 @@ ExternalProject_Add(${qt4_NAME} DEPENDS ${freetype2_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${qt4_URL} - GIT_TAG v4.8.5 + GIT_TAG 4.8 UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} echo "yes" | ${qt4_SRC_DIR}/configure # pipe "yes" to stdin to accept the license. From a79ca7447b5f87325be84827888b4cc99f6bfead Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 12 Dec 2013 16:03:59 +0100 Subject: [PATCH 007/220] Vigra tests pass, include them again in the build. --- vigra.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vigra.cmake b/vigra.cmake index 58cece4..027b222 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -83,7 +83,7 @@ ExternalProject_Add(${vigra_NAME} -DCMAKE_CXX_FLAGS=-pthread -DCMAKE_CXX_LINK_FLAGS=-pthread BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) -# TEST_COMMAND ${BUILDEM_ENV_STRING} make check + TEST_COMMAND ${BUILDEM_ENV_STRING} make check INSTALL_COMMAND ${BUILDEM_ENV_STRING} make install ) From 2e07e5aac94c19b917984045fb0a99f0715a80fd Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 16 Jan 2014 13:30:40 +0100 Subject: [PATCH 008/220] =?UTF-8?q?Patch=20python=E2=80=99s=20way=20of=20q?= =?UTF-8?q?uerying=20the=20number=20of=20CPUs,=20which=20lead=20to=20segfa?= =?UTF-8?q?ults=20from=20time=20to=20time.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patches/python2.7.patch | 15 +++++++++++++++ python.cmake | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 patches/python2.7.patch diff --git a/patches/python2.7.patch b/patches/python2.7.patch new file mode 100644 index 0000000..15db1b4 --- /dev/null +++ b/patches/python2.7.patch @@ -0,0 +1,15 @@ +--- __init__.py 2014-01-16 13:26:31.000000000 +0100 ++++ __init__.py.orig 2014-01-16 13:22:07.000000000 +0100 +@@ -116,9 +116,10 @@ + except (ValueError, KeyError): + num = 0 + elif 'bsd' in sys.platform or sys.platform == 'darwin': +- comm = '/sbin/sysctl -n hw.ncpu' + if sys.platform == 'darwin': +- comm = '/usr/' + comm ++ comm = '/usr/sbin/sysctl -n hw.activecpu' ++ else: ++ comm = '/sbin/sysctl -n hw.ncpu' + try: + with os.popen(comm) as p: + num = int(p.read()) diff --git a/python.cmake b/python.cmake index 3bd3bf9..9d23225 100644 --- a/python.cmake +++ b/python.cmake @@ -53,7 +53,7 @@ ExternalProject_Add(${python_NAME} URL ${python_URL} URL_MD5 ${python_MD5} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} ${vtk_SRC_DIR}/Lib/multiprocessing/__init__.py ${PATCH_DIR}/python2.7.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${python_SRC_DIR}/configure --prefix=${BUILDEM_DIR} ${PYTHON_BINARY_TYPE_ARG} From 2b1befb4a3474f27e3c0e31f2eeb4f40d019c361 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 16 Jan 2014 13:35:59 +0100 Subject: [PATCH 009/220] =?UTF-8?q?Configure=20VIGRA=20to=20use=20a=20high?= =?UTF-8?q?er=20template=20depth=20if=20we=E2=80=99re=20about=20to=20compi?= =?UTF-8?q?le=20using=20clang.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vigra.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vigra.cmake b/vigra.cmake index 2672db8..1428986 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -49,6 +49,11 @@ else() set(VIGRA_UPDATE_COMMAND git checkout ${VIGRA_VERSION}) endif() +set(VIGRA_CXX_FLAGS "") +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(VIGRA_CXX_FLAGS "-ftemplate-depth=1024") +endif() + message ("Installing ${vigra_NAME}/${VIGRA_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${vigra_NAME} DEPENDS ${libjpeg_NAME} ${libtiff_NAME} ${libpng_NAME} ${openexr_NAME} ${libfftw_NAME} @@ -80,7 +85,7 @@ ExternalProject_Add(${vigra_NAME} -DFFTW3F_LIBRARY= -DFFTW3_INCLUDE_DIR=${BUILDEM_DIR}/include -DFFTW3_LIBRARY=${BUILDEM_DIR}/lib/libfftw3.${BUILDEM_PLATFORM_DYLIB_EXTENSION} - -DCMAKE_CXX_FLAGS=-pthread + -DCMAKE_CXX_FLAGS=-pthread ${VIGRA_CXX_FLAGS} -DCMAKE_CXX_LINK_FLAGS=-pthread BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check From fe7a7dbbee1f22604a827a849b463ca9d18b3f1d Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 16 Jan 2014 14:36:17 +0100 Subject: [PATCH 010/220] Disable libxml tests on OSX again. --- libxml2.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libxml2.cmake b/libxml2.cmake index b528546..e3e5386 100644 --- a/libxml2.cmake +++ b/libxml2.cmake @@ -37,7 +37,7 @@ if (NOT libxml2_NAME) CPPFLAGS=-I${BUILDEM_DIR}/include BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install - TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + #TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check ) if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") From dc5d34f24466367af3837f189a5cc5449789da76 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 16 Jan 2014 15:14:19 +0100 Subject: [PATCH 011/220] Automatically create symlinks for Qt Frameworks after installing --- qt4.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qt4.cmake b/qt4.cmake index 0940379..2be2a9c 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -96,6 +96,13 @@ ExternalProject_Add(${qt4_NAME} INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + ExternalProject_Add_Step(${qt4_NAME} ${qt4_NAME}-create-symlinks + COMMAND "for i in `ls ${BUILDEM_DIR}/lib | grep \.framework`; do ln -s ${BUILDEM_DIR}/lib/$i/Headers ${BUILDEM_DIR}/include/`echo $i | sed 's/\.framework//g'`; done" + DEPENDEES install + ) +endif() + set_target_properties(${qt4_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) endif (NOT qt4_NAME) From 318221cca143929e70741a24c45cbd526a3350d3 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 16 Jan 2014 15:29:14 +0100 Subject: [PATCH 012/220] =?UTF-8?q?Fix=20escaped=20=E2=80=98\=E2=80=99=20i?= =?UTF-8?q?n=20when=20creating=20symlinks=20for=20qt4=20headers.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qt4.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt4.cmake b/qt4.cmake index 2be2a9c..3eb5143 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -98,7 +98,7 @@ ExternalProject_Add(${qt4_NAME} if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ExternalProject_Add_Step(${qt4_NAME} ${qt4_NAME}-create-symlinks - COMMAND "for i in `ls ${BUILDEM_DIR}/lib | grep \.framework`; do ln -s ${BUILDEM_DIR}/lib/$i/Headers ${BUILDEM_DIR}/include/`echo $i | sed 's/\.framework//g'`; done" + COMMAND "for i in `ls ${BUILDEM_DIR}/lib | grep \\.framework`; do ln -s ${BUILDEM_DIR}/lib/$i/Headers ${BUILDEM_DIR}/include/`echo $i | sed 's/\\.framework//g'`; done" DEPENDEES install ) endif() From fc282246cc205c6418d6fa8887650fe4d844dcd5 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 16 Jan 2014 16:38:50 +0100 Subject: [PATCH 013/220] Automatically create symlinks to Qt framework headers within BUILDEM_DIR/include on Mac --- patches/qt4-create-symlinks.sh | 9 +++++++++ qt4.cmake | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 patches/qt4-create-symlinks.sh diff --git a/patches/qt4-create-symlinks.sh b/patches/qt4-create-symlinks.sh new file mode 100644 index 0000000..5cfdab7 --- /dev/null +++ b/patches/qt4-create-symlinks.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +BUILDEM_DIR=$1 +FRAMEWORKS=$(ls ${BUILDEM_DIR}/lib | grep framework$) + +for i in ${FRAMEWORKS} +do + ln -s ${BUILDEM_DIR}/lib/$i/Headers ${BUILDEM_DIR}/include/`echo \$i | sed 's/.framework//g'` +done \ No newline at end of file diff --git a/qt4.cmake b/qt4.cmake index 3eb5143..15ae8e6 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -98,7 +98,7 @@ ExternalProject_Add(${qt4_NAME} if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ExternalProject_Add_Step(${qt4_NAME} ${qt4_NAME}-create-symlinks - COMMAND "for i in `ls ${BUILDEM_DIR}/lib | grep \\.framework`; do ln -s ${BUILDEM_DIR}/lib/$i/Headers ${BUILDEM_DIR}/include/`echo $i | sed 's/\\.framework//g'`; done" + COMMAND bash ${PATCH_DIR}/qt4-create-symlinks.sh ${BUILDEM_DIR} DEPENDEES install ) endif() From ce7d587e416222f6dee8e6e3a12a3f8d1667e1f8 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Fri, 17 Jan 2014 14:01:04 +0100 Subject: [PATCH 014/220] =?UTF-8?q?Introduce=20the=20variable=20BUILDEM=5F?= =?UTF-8?q?ADDITIONAL=5FCXX=5FFLAGS=20which=20contains=20-stdlib=3Dlibstdc?= =?UTF-8?q?++=20if=20we=E2=80=99re=20building=20on=20OSX10.9=20using=20cla?= =?UTF-8?q?ng.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BuildSupport.cmake | 4 ++++ ann.cmake | 1 + blockedarray.cmake | 1 + boost.cmake | 4 ++-- chatty.cmake | 1 + cylemon.cmake | 2 +- dlib.cmake | 1 + fontconfig.cmake | 3 ++- freetype2.cmake | 4 ++-- gmp.cmake | 4 ++-- gtest.cmake | 1 + hdf5.cmake | 1 + ilastik.cmake | 1 + ilmbase.cmake | 4 ++-- lemon.cmake | 9 +++++++++ libfftw.cmake | 6 +++--- libjpeg.cmake | 4 ++-- libpng.cmake | 1 + libtiff.cmake | 5 +++-- libxml2.cmake | 4 ++-- opencv.cmake | 1 + openexr.cmake | 4 ++-- opengm.cmake | 1 + pgmlink.cmake | 1 + python.cmake | 4 ++-- qt4.cmake | 2 +- snappy.cmake | 4 ++-- thrift.cmake | 4 ++-- vigra.cmake | 4 ++-- vtk.cmake | 1 + 30 files changed, 57 insertions(+), 30 deletions(-) diff --git a/BuildSupport.cmake b/BuildSupport.cmake index d28961f..d29cb50 100644 --- a/BuildSupport.cmake +++ b/BuildSupport.cmake @@ -49,6 +49,10 @@ if (NOT EXISTS ${BUILDEM_SRC_DIR}) file (MAKE_DIRECTORY ${BUILDEM_SRC_DIR}) endif () +if (NOT EXISTS /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk) + message (FATAL_ERROR "ERROR: XCode and the OSX 10.9 SDK have to be installed. Please install XCode from the AppStore") +endif () + if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Important to use FALLBACK variable. # https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryUsageGuidelines.html diff --git a/ann.cmake b/ann.cmake index 9928c54..dbe0ee6 100644 --- a/ann.cmake +++ b/ann.cmake @@ -32,6 +32,7 @@ ExternalProject_Add(${ann_NAME} -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) diff --git a/blockedarray.cmake b/blockedarray.cmake index 47dea10..646bbc7 100644 --- a/blockedarray.cmake +++ b/blockedarray.cmake @@ -30,6 +30,7 @@ ExternalProject_Add(${blockedarray_NAME} PATCH_COMMAND "" CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXE} diff --git a/boost.cmake b/boost.cmake index 6526bdb..d2531ad 100644 --- a/boost.cmake +++ b/boost.cmake @@ -45,8 +45,8 @@ ExternalProject_Add(${boost_NAME} --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread,program_options,chrono --with-python=${PYTHON_EXE} --prefix=${BUILDEM_DIR} - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} ./b2 --layout=tagged -sNO_BZIP2=1 diff --git a/chatty.cmake b/chatty.cmake index cdc1687..6c4a57c 100644 --- a/chatty.cmake +++ b/chatty.cmake @@ -32,6 +32,7 @@ ExternalProject_Add(${chatty_NAME} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -DPYTHON_EXECUTABLE=${PYTHON_EXE} -DPYTHON_INCLUDE_DIR=${PYTHON_PREFIX}/include/python2.7 "-DPYTHON_LIBRARY=${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}" diff --git a/cylemon.cmake b/cylemon.cmake index 469c4ff..bb4abfc 100644 --- a/cylemon.cmake +++ b/cylemon.cmake @@ -31,7 +31,7 @@ ExternalProject_Add(${cylemon_NAME} GIT_REPOSITORY ${cylemon_URL} UPDATE_COMMAND "" CONFIGURE_COMMAND "" - BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} + BUILD_COMMAND ${BUILDEM_ENV_STRING} env "CPPFLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS}" "LDFLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS}" ${PYTHON_EXE} setup.py --no-extra-includes ${cylemon_SPECIAL_SETUP} build build_ext -I${BUILDEM_INCLUDE_DIR} -L${BUILDEM_LIB_DIR} BUILD_IN_SOURCE 1 INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install diff --git a/dlib.cmake b/dlib.cmake index f20e40f..7bb3c6e 100644 --- a/dlib.cmake +++ b/dlib.cmake @@ -31,6 +31,7 @@ ExternalProject_Add(${dlib_NAME} -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) diff --git a/fontconfig.cmake b/fontconfig.cmake index 4c3f3a5..524aaab 100644 --- a/fontconfig.cmake +++ b/fontconfig.cmake @@ -35,7 +35,8 @@ if (NOT fontconfig_NAME) --prefix=${BUILDEM_DIR} --enable-shared --enable-libxml2 - LDFLAGS=-L${BUILDEM_DIR}/lib + "LDFLAGS=-L${BUILDEM_DIR}/lib ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLags=${BUILDEM_ADDITIONAL_CXX_FLAGS}" LIBXML2_CFLAGS=-I${BUILDEM_DIR}/include/libxml2 LIBXML2_LIBS=-lxml2 FREETYPE_CFLAGS=-I${BUILDEM_DIR}/include/freetype2 FREETYPE_LIBS=-lfreetype BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) diff --git a/freetype2.cmake b/freetype2.cmake index 6c97dc4..c05dfb9 100644 --- a/freetype2.cmake +++ b/freetype2.cmake @@ -28,8 +28,8 @@ ExternalProject_Add(${freetype2_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ./configure --prefix=${BUILDEM_DIR} --enable-shared - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) BUILD_IN_SOURCE 1 INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install diff --git a/gmp.cmake b/gmp.cmake index e2d9de7..f77559e 100644 --- a/gmp.cmake +++ b/gmp.cmake @@ -25,8 +25,8 @@ ExternalProject_Add(${gmp_NAME} PATCH_COMMAND "" CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${gmp_SRC_DIR}/configure --prefix=${BUILDEM_DIR} - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}"" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) BUILD_IN_SOURCE 1 TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check diff --git a/gtest.cmake b/gtest.cmake index 2e8c5fa..0a4c703 100644 --- a/gtest.cmake +++ b/gtest.cmake @@ -26,6 +26,7 @@ ExternalProject_Add(${gtest_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${gtest_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) BUILD_IN_SOURCE 1 INSTALL_COMMAND "" diff --git a/hdf5.cmake b/hdf5.cmake index 66f1e0e..3f71413 100644 --- a/hdf5.cmake +++ b/hdf5.cmake @@ -34,6 +34,7 @@ ExternalProject_Add(${hdf5_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${hdf5_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -DHDF5_BUILD_HL_LIB=ON -DHDF_BUILD_CPP_LIB=ON -DBUILD_SHARED_LIBS=ON diff --git a/ilastik.cmake b/ilastik.cmake index 66125f8..3f35621 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -83,6 +83,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") -DLIBRARY_OUTPUT_PATH=${lazyflow_SRC_DIR}/lazyflow/drtile -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXE} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -DPYTHON_INCLUDE_DIR=${PYTHON_PREFIX}/include/python2.7 "-DPYTHON_LIBRARY=${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}" -DPYTHON_NUMPY_INCLUDE_DIR=${PYTHON_PREFIX}/lib/python2.7/site-packages/numpy/core/include diff --git a/ilmbase.cmake b/ilmbase.cmake index c60a94b..e2fe7fa 100644 --- a/ilmbase.cmake +++ b/ilmbase.cmake @@ -39,8 +39,8 @@ ExternalProject_Add(${ilmbase_NAME} PATCH_COMMAND ${ilmbase_PATCH_COMMAND} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${ilmbase_SRC_DIR}/configure --prefix=${BUILDEM_DIR} - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) diff --git a/lemon.cmake b/lemon.cmake index 7a4eead..f8cef82 100644 --- a/lemon.cmake +++ b/lemon.cmake @@ -16,6 +16,13 @@ external_source (lemon lemon-1.2.4.tar.gz fd89e8bf5035b02e2622a48ac7fe0641 http://lemon.cs.elte.hu/pub/sources) + +if((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")) + set(LEMON_OSX_CONFIG -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 + -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk) +else() + set(LEMON_OSX_CONFIG "") +endif() message ("Installing ${lemon_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${lemon_NAME} @@ -42,6 +49,8 @@ ExternalProject_Add(${lemon_NAME} -DGLPK_LIBRARY= -DGLPK_INCLUDE_DIR= -DGLPK_ROOT_DIR= + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} + ${LEMON_OSX_CONFIG} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install diff --git a/libfftw.cmake b/libfftw.cmake index d903cb9..78c6755 100644 --- a/libfftw.cmake +++ b/libfftw.cmake @@ -27,7 +27,7 @@ ExternalProject_Add(${libfftw_NAME} --prefix=${BUILDEM_DIR} --enable-shared LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) @@ -42,8 +42,8 @@ ExternalProject_Add_Step(${libfftw_NAME} singlefloat-configure --prefix=${BUILDEM_DIR} --enable-shared --enable-float # This creates libfftw3f single-precision libraries INSTEAD OF the default double libraries. - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" ) # build single-precision diff --git a/libjpeg.cmake b/libjpeg.cmake index f2af00a..e71bc55 100644 --- a/libjpeg.cmake +++ b/libjpeg.cmake @@ -25,8 +25,8 @@ ExternalProject_Add(${libjpeg_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ./configure --prefix=${BUILDEM_DIR} --enable-shared - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) LIBTOOL=./libtool # Must use the libtool that is built in place by the libjpeg Makfile (not the system libtool!) BUILD_IN_SOURCE 1 TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check diff --git a/libpng.cmake b/libpng.cmake index e253c09..464b74c 100644 --- a/libpng.cmake +++ b/libpng.cmake @@ -36,6 +36,7 @@ ExternalProject_Add(${libpng_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${libpng_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) diff --git a/libtiff.cmake b/libtiff.cmake index 3575da9..cc59ed0 100644 --- a/libtiff.cmake +++ b/libtiff.cmake @@ -36,9 +36,10 @@ ExternalProject_Add(${libtiff_NAME} PATCH_COMMAND ${libtiff_PATCH_COMMAND} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ./configure --prefix=${BUILDEM_DIR} - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} ${BUILDEM_LDFLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" --disable-jbig + --disable-cxx BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) BUILD_IN_SOURCE 1 INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install diff --git a/libxml2.cmake b/libxml2.cmake index e3e5386..d6106dc 100644 --- a/libxml2.cmake +++ b/libxml2.cmake @@ -33,8 +33,8 @@ if (NOT libxml2_NAME) --enable-shared --without-python --with-sax1 - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install #TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check diff --git a/opencv.cmake b/opencv.cmake index 10e64b8..7318eed 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -37,6 +37,7 @@ ExternalProject_Add(${opencv_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opencv_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) # TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install diff --git a/openexr.cmake b/openexr.cmake index ec6bf17..921363e 100644 --- a/openexr.cmake +++ b/openexr.cmake @@ -50,8 +50,8 @@ ExternalProject_Add(${openexr_NAME} --prefix=${BUILDEM_DIR} --disable-ilmbasetest PKG_CONFIG_PATH=${BUILDEM_PKGCONFIG_DIR} - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) diff --git a/opengm.cmake b/opengm.cmake index c966d7f..6dd62c5 100644 --- a/opengm.cmake +++ b/opengm.cmake @@ -30,6 +30,7 @@ ExternalProject_Add(${opengm_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opengm_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -DWITH_CPLEX=ON -DWITH_BOOST=ON ${CMAKE_CPLEX_ROOT_DIR} diff --git a/pgmlink.cmake b/pgmlink.cmake index e64bb17..287526c 100644 --- a/pgmlink.cmake +++ b/pgmlink.cmake @@ -56,6 +56,7 @@ else() CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${pgmlink_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -DWITH_PYTHON=ON -DWITH_TESTS=ON -DWITH_CHECKED_STL=OFF diff --git a/python.cmake b/python.cmake index 9d23225..9d61a40 100644 --- a/python.cmake +++ b/python.cmake @@ -58,8 +58,8 @@ ExternalProject_Add(${python_NAME} --prefix=${BUILDEM_DIR} ${PYTHON_BINARY_TYPE_ARG} ${PYTHON_DEBUG_CONFIG_ARGS} - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PYTHONAPPSDIR=${BUILDEM_BIN_DIR}/${python_NAME} install diff --git a/qt4.cmake b/qt4.cmake index 15ae8e6..cbcfba0 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -44,7 +44,7 @@ ExternalProject_Add(${qt4_NAME} GIT_TAG 4.8 UPDATE_COMMAND "" PATCH_COMMAND "" - CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} echo "yes" | ${qt4_SRC_DIR}/configure # pipe "yes" to stdin to accept the license. + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} env CXXFLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} echo "yes" | ${qt4_SRC_DIR}/configure # pipe "yes" to stdin to accept the license. --prefix=${BUILDEM_DIR} -opensource -arch x86_64 diff --git a/snappy.cmake b/snappy.cmake index 1fc9450..3ef38d6 100644 --- a/snappy.cmake +++ b/snappy.cmake @@ -27,8 +27,8 @@ ExternalProject_Add(${snappy_NAME} --prefix=${BUILDEM_DIR} --enable-shared --enable-static - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) BUILD_IN_SOURCE 1 TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check diff --git a/thrift.cmake b/thrift.cmake index 509a786..845ad87 100644 --- a/thrift.cmake +++ b/thrift.cmake @@ -44,8 +44,8 @@ ExternalProject_Add(${thrift_NAME} --with-perl=no --with-ruby=no PY_PREFIX=${PYTHON_PREFIX} - LDFLAGS=${BUILDEM_LDFLAGS} - CPPFLAGS=-I${BUILDEM_DIR}/include + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) BUILD_IN_SOURCE 1 INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install diff --git a/vigra.cmake b/vigra.cmake index 1428986..b5de59d 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -85,8 +85,8 @@ ExternalProject_Add(${vigra_NAME} -DFFTW3F_LIBRARY= -DFFTW3_INCLUDE_DIR=${BUILDEM_DIR}/include -DFFTW3_LIBRARY=${BUILDEM_DIR}/lib/libfftw3.${BUILDEM_PLATFORM_DYLIB_EXTENSION} - -DCMAKE_CXX_FLAGS=-pthread ${VIGRA_CXX_FLAGS} - -DCMAKE_CXX_LINK_FLAGS=-pthread + -DCMAKE_CXX_FLAGS=-pthread ${VIGRA_CXX_FLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS} + -DCMAKE_CXX_LINK_FLAGS=-pthread ${BUILDEM_ADDITIONAL_CXX_FLAGS} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install diff --git a/vtk.cmake b/vtk.cmake index 0dab10a..25d7e9e 100644 --- a/vtk.cmake +++ b/vtk.cmake @@ -42,6 +42,7 @@ ExternalProject_Add(${vtk_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${vtk_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DBUILD_SHARED_LIBS:BOOL=ON + -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} # These python settings must be manually specified for the mac build (maybe not for linux, but it shouldn't hurt) -DVTK_PYTHON_SETUP_ARGS=--prefix=${PYTHON_PREFIX} -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_PATH} From 7c7a0f4b40597f3b415c16e391b958b219bbba59 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Fri, 17 Jan 2014 16:50:41 +0100 Subject: [PATCH 015/220] Fix copy&paste error in python.cmake --- python.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python.cmake b/python.cmake index 9d61a40..7b02aa1 100644 --- a/python.cmake +++ b/python.cmake @@ -53,7 +53,7 @@ ExternalProject_Add(${python_NAME} URL ${python_URL} URL_MD5 ${python_MD5} UPDATE_COMMAND "" - PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} ${vtk_SRC_DIR}/Lib/multiprocessing/__init__.py ${PATCH_DIR}/python2.7.patch + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} ${python_SRC_DIR}/Lib/multiprocessing/__init__.py ${PATCH_DIR}/python2.7.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${python_SRC_DIR}/configure --prefix=${BUILDEM_DIR} ${PYTHON_BINARY_TYPE_ARG} From 695a5f31aed61b72d3921c5a97edd0d24b3e7e12 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Fri, 17 Jan 2014 17:06:29 +0100 Subject: [PATCH 016/220] Fix python patch, old one was not applied successfully. --- patches/python2.7.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/python2.7.patch b/patches/python2.7.patch index 15db1b4..917efdb 100644 --- a/patches/python2.7.patch +++ b/patches/python2.7.patch @@ -1,15 +1,15 @@ ---- __init__.py 2014-01-16 13:26:31.000000000 +0100 -+++ __init__.py.orig 2014-01-16 13:22:07.000000000 +0100 +--- __init__.py.orig 2014-01-17 17:02:03.000000000 +0100 ++++ __init__.py 2014-01-17 17:03:27.000000000 +0100 @@ -116,9 +116,10 @@ except (ValueError, KeyError): num = 0 elif 'bsd' in sys.platform or sys.platform == 'darwin': - comm = '/sbin/sysctl -n hw.ncpu' if sys.platform == 'darwin': -- comm = '/usr/' + comm +- comm = '/usr' + comm + comm = '/usr/sbin/sysctl -n hw.activecpu' + else: -+ comm = '/sbin/sysctl -n hw.ncpu' ++ comm = '/sbin/sysctl -n hw.ncpu' try: with os.popen(comm) as p: num = int(p.read()) From 62153eb326a07fc2f8ed9345ecc5d26de08c29ee Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Fri, 17 Jan 2014 17:56:06 +0100 Subject: [PATCH 017/220] Hacky solution to enforce passing our stdlib flag to the linker through libtool without breaking anything else in the configure script. --- ilmbase.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ilmbase.cmake b/ilmbase.cmake index e2fe7fa..d5faccc 100644 --- a/ilmbase.cmake +++ b/ilmbase.cmake @@ -39,8 +39,9 @@ ExternalProject_Add(${ilmbase_NAME} PATCH_COMMAND ${ilmbase_PATCH_COMMAND} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${ilmbase_SRC_DIR}/configure --prefix=${BUILDEM_DIR} - "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" - "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "LDFLAGS=${BUILDEM_LDFLAGS}" + "LIBS=-Wc,${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CXXFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) From c58ad61175744bb6d049f6551170b2d4db5c8d8e Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Fri, 17 Jan 2014 18:10:37 +0100 Subject: [PATCH 018/220] Replace Python patch as it did not consistently fix the error. This one here does by removing readline.so -> interactive mode with this python version does not accept arrow keys at all! * We should probably update to python 2.7.6 where this is fixed --- patches/python-fix-readline-bug.sh | 3 +++ patches/python2.7.patch | 15 --------------- python.cmake | 9 ++++++++- 3 files changed, 11 insertions(+), 16 deletions(-) create mode 100644 patches/python-fix-readline-bug.sh delete mode 100644 patches/python2.7.patch diff --git a/patches/python-fix-readline-bug.sh b/patches/python-fix-readline-bug.sh new file mode 100644 index 0000000..d024a6b --- /dev/null +++ b/patches/python-fix-readline-bug.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mv $1/lib/python2.7/lib-dynload/readline.so $1/lib/python2.7/lib-dynload/readline.so.disabled \ No newline at end of file diff --git a/patches/python2.7.patch b/patches/python2.7.patch deleted file mode 100644 index 917efdb..0000000 --- a/patches/python2.7.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- __init__.py.orig 2014-01-17 17:02:03.000000000 +0100 -+++ __init__.py 2014-01-17 17:03:27.000000000 +0100 -@@ -116,9 +116,10 @@ - except (ValueError, KeyError): - num = 0 - elif 'bsd' in sys.platform or sys.platform == 'darwin': -- comm = '/sbin/sysctl -n hw.ncpu' - if sys.platform == 'darwin': -- comm = '/usr' + comm -+ comm = '/usr/sbin/sysctl -n hw.activecpu' -+ else: -+ comm = '/sbin/sysctl -n hw.ncpu' - try: - with os.popen(comm) as p: - num = int(p.read()) diff --git a/python.cmake b/python.cmake index 7b02aa1..c22ae77 100644 --- a/python.cmake +++ b/python.cmake @@ -53,7 +53,7 @@ ExternalProject_Add(${python_NAME} URL ${python_URL} URL_MD5 ${python_MD5} UPDATE_COMMAND "" - PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} ${python_SRC_DIR}/Lib/multiprocessing/__init__.py ${PATCH_DIR}/python2.7.patch + PATCH_COMMAND "" CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${python_SRC_DIR}/configure --prefix=${BUILDEM_DIR} ${PYTHON_BINARY_TYPE_ARG} @@ -66,6 +66,13 @@ ExternalProject_Add(${python_NAME} BUILD_IN_SOURCE 1 # Required for Mac ) +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + ExternalProject_Add_Step(${python_NAME} ${python_NAME}-fix-readline-bug + COMMAND bash ${PATCH_DIR}/python-fix-readline-bug.sh ${PYTHON_PREFIX} + DEPENDEES install + ) +endif() + set (PYTHON_INCLUDE_PATH ${PYTHON_PREFIX}/include/python2.7) set (PYTHON_LIBRARY_FILE ${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}) set (PYTHON_EXE ${PYTHON_PREFIX}/bin/python) From 547327f2317ae01c7f62e7ac21c2f253d72d7d12 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Mon, 20 Jan 2014 09:48:47 +0100 Subject: [PATCH 019/220] Do not link against rt for the combilp-test of opengm on mac. --- opengm.cmake | 4 +++- patches/opengm-toggle-rt.patch | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 patches/opengm-toggle-rt.patch diff --git a/opengm.cmake b/opengm.cmake index 6dd62c5..bf16a4f 100644 --- a/opengm.cmake +++ b/opengm.cmake @@ -25,7 +25,9 @@ ExternalProject_Add(${opengm_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${opengm_URL} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # This patch disables linking against the rt-lib on Mac for the combilp test + ${opengm_SRC_DIR}/src/unittest/inference/CMakeLists.txt ${PATCH_DIR}/opengm-toggle-rt.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opengm_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} diff --git a/patches/opengm-toggle-rt.patch b/patches/opengm-toggle-rt.patch new file mode 100644 index 0000000..4566805 --- /dev/null +++ b/patches/opengm-toggle-rt.patch @@ -0,0 +1,18 @@ +diff --git a/src/unittest/inference/CMakeLists.txt b/src/unittest/inference/CMakeLists.txt +index d2d3970..73cc575 100644 +--- a/src/unittest/inference/CMakeLists.txt ++++ b/src/unittest/inference/CMakeLists.txt +@@ -127,7 +127,12 @@ if(WITH_CPLEX) + else() + target_link_libraries(test-lpcplex ${CMAKE_THREAD_LIBS_INIT} ${CPLEX_LIBRARIES} ) + #target_link_libraries(test-lpcplex2 ${CMAKE_THREAD_LIBS_INIT} ${CPLEX_LIBRARIES} +- target_link_libraries(test-combilp ${CMAKE_THREAD_LIBS_INIT} ${CPLEX_LIBRARIES} ${HDF5_LIBRARIES} rt) ++ ++ if(LINK_RT) ++ target_link_libraries(test-combilp ${CMAKE_THREAD_LIBS_INIT} ${CPLEX_LIBRARIES} ${HDF5_LIBRARIES} rt) ++ else() ++ target_link_libraries(test-combilp ${CMAKE_THREAD_LIBS_INIT} ${CPLEX_LIBRARIES} ${HDF5_LIBRARIES}) ++ endif() + endif() + add_test(test-lpcplex ${CMAKE_CURRENT_BINARY_DIR}/test-lpcplex) + #add_test(test-lpcplex2 ${CMAKE_CURRENT_BINARY_DIR}/test-lpcplex2) From 8f9f802d78bf9804c132bd22e29cdc8af9c22e90 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Mon, 20 Jan 2014 10:06:02 +0100 Subject: [PATCH 020/220] Fix openexr linking against libstdc++ --- openexr.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openexr.cmake b/openexr.cmake index 921363e..093732b 100644 --- a/openexr.cmake +++ b/openexr.cmake @@ -50,7 +50,8 @@ ExternalProject_Add(${openexr_NAME} --prefix=${BUILDEM_DIR} --disable-ilmbasetest PKG_CONFIG_PATH=${BUILDEM_PKGCONFIG_DIR} - "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "LDFLAGS=${BUILDEM_LDFLAGS}" + "LIBS=${BUILDEM_ADDITIONAL_CXX_FLAGS}" "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install From d9a4b534ab32d0322684608a1b3517d570f7410b Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Mon, 20 Jan 2014 10:39:17 +0100 Subject: [PATCH 021/220] Make ilmbase compile on a clean machine as well, by adding stdlib to the LDFLAGS --- ilmbase.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ilmbase.cmake b/ilmbase.cmake index d5faccc..c77cc33 100644 --- a/ilmbase.cmake +++ b/ilmbase.cmake @@ -39,7 +39,7 @@ ExternalProject_Add(${ilmbase_NAME} PATCH_COMMAND ${ilmbase_PATCH_COMMAND} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${ilmbase_SRC_DIR}/configure --prefix=${BUILDEM_DIR} - "LDFLAGS=${BUILDEM_LDFLAGS}" + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" "LIBS=-Wc,${BUILDEM_ADDITIONAL_CXX_FLAGS}" "CXXFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) @@ -48,4 +48,4 @@ ExternalProject_Add(${ilmbase_NAME} set_target_properties(${ilmbase_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT ilmbase_NAME) \ No newline at end of file +endif (NOT ilmbase_NAME) From c2ddc0cb172b78f2e0d25b35227c7e526301c855 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Mon, 20 Jan 2014 10:57:38 +0100 Subject: [PATCH 022/220] Add openexr config stdlib flag to LDFLAGS --- openexr.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openexr.cmake b/openexr.cmake index 093732b..5fd9183 100644 --- a/openexr.cmake +++ b/openexr.cmake @@ -50,7 +50,7 @@ ExternalProject_Add(${openexr_NAME} --prefix=${BUILDEM_DIR} --disable-ilmbasetest PKG_CONFIG_PATH=${BUILDEM_PKGCONFIG_DIR} - "LDFLAGS=${BUILDEM_LDFLAGS}" + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" "LIBS=${BUILDEM_ADDITIONAL_CXX_FLAGS}" "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) @@ -59,4 +59,4 @@ ExternalProject_Add(${openexr_NAME} set_target_properties(${openexr_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT openexr_NAME) \ No newline at end of file +endif (NOT openexr_NAME) From 3b27664a48d32da9eec8651880c09d43769e4237 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Mon, 20 Jan 2014 12:08:39 +0100 Subject: [PATCH 023/220] =?UTF-8?q?Help=20VTK=20find=20libpng15,=20althoug?= =?UTF-8?q?h=20use=5Fsystem=5Fpng=20is=20switched=20to=20OFF.=20Apparently?= =?UTF-8?q?=20something=20in=20VTK=E2=80=99s=20CMakeLists=20is=20wrong.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vtk.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/vtk.cmake b/vtk.cmake index 25d7e9e..1a8cbdd 100644 --- a/vtk.cmake +++ b/vtk.cmake @@ -62,6 +62,7 @@ ExternalProject_Add(${vtk_NAME} -DVTK_USE_SYSTEM_LIBXML2=ON -DLIBXML2_INCLUDE_DIR:PATH=${BUILDEM_DIR}/include/libxml2 -DLIBXML2_LIBRARIES:FILEPATH=${libxml2_LIBRARIES} + -DCMAKE_EXE_LINKER_FLAGS=-L${BUILDEM_DIR}/lib # We want vtk to be built in parallel if possible. # Therefore we use $(MAKE) instead of 'make', which somehow enables sub-make files to use the jobserver correctly. # See: http://stackoverflow.com/questions/2942465/cmake-and-parallel-building-with-make-jn From a45ecab54ecf904fc945cdd55230adc820e4a8f0 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Mon, 20 Jan 2014 14:18:14 +0100 Subject: [PATCH 024/220] Properly compile boost against libstdc++ instead of libc++ --- boost.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boost.cmake b/boost.cmake index d2531ad..22e81b2 100644 --- a/boost.cmake +++ b/boost.cmake @@ -45,15 +45,15 @@ ExternalProject_Add(${boost_NAME} --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread,program_options,chrono --with-python=${PYTHON_EXE} --prefix=${BUILDEM_DIR} - "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" - "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" - BUILD_COMMAND ${BUILDEM_ENV_STRING} ./b2 + BUILD_COMMAND ${BUILDEM_ENV_STRING} ./b2 + cxxflags="${BUILDEM_ADDITIONAL_CXX_FLAGS}" linkflags="${BUILDEM_ADDITIONAL_CXX_FLAGS}" --layout=tagged -sNO_BZIP2=1 -sZLIB_INCLUDE=${BUILDEM_DIR}/include -sZLIB_SOURCE=${zlib_SRC_DIR} install BUILD_IN_SOURCE 1 - INSTALL_COMMAND ${BUILDEM_ENV_STRING} ./b2 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ./b2 + cxxflags="${BUILDEM_ADDITIONAL_CXX_FLAGS}" linkflags="${BUILDEM_ADDITIONAL_CXX_FLAGS}" -sNO_BZIP2=1 -sZLIB_INCLUDE=${BUILDEM_DIR}/include -sZLIB_SOURCE=${zlib_SRC_DIR} install From 0cb85a33ab011a944a58513806c06a4080deceb0 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Mon, 20 Jan 2014 17:29:39 +0100 Subject: [PATCH 025/220] Fix for the added stdlib parameters for VIGRA - quotation marks were missing. --- vigra.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vigra.cmake b/vigra.cmake index b5de59d..dc46eae 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -85,8 +85,8 @@ ExternalProject_Add(${vigra_NAME} -DFFTW3F_LIBRARY= -DFFTW3_INCLUDE_DIR=${BUILDEM_DIR}/include -DFFTW3_LIBRARY=${BUILDEM_DIR}/lib/libfftw3.${BUILDEM_PLATFORM_DYLIB_EXTENSION} - -DCMAKE_CXX_FLAGS=-pthread ${VIGRA_CXX_FLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS} - -DCMAKE_CXX_LINK_FLAGS=-pthread ${BUILDEM_ADDITIONAL_CXX_FLAGS} + "-DCMAKE_CXX_FLAGS=-pthread ${VIGRA_CXX_FLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "-DCMAKE_CXX_LINK_FLAGS=-pthread ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install From 5b0a3575fbf45aaa64d31df732c30b48cbd155e8 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Mon, 20 Jan 2014 22:28:28 +0100 Subject: [PATCH 026/220] Prevent pgmlink from overwriting the CXX_FLAGS --- pgmlink.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pgmlink.cmake b/pgmlink.cmake index 287526c..7a5302a 100644 --- a/pgmlink.cmake +++ b/pgmlink.cmake @@ -56,7 +56,9 @@ else() CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${pgmlink_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} - -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} + "-DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -ftemplate-depth=512" + -DCMAKE_EXE_LINKER_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} + -DCMAKE_SHARED_LINKER_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -DWITH_PYTHON=ON -DWITH_TESTS=ON -DWITH_CHECKED_STL=OFF From ef1bf095794bbc3717659225e48e0a21ff34b92d Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Tue, 21 Jan 2014 15:15:05 +0100 Subject: [PATCH 027/220] =?UTF-8?q?Patch=20qt4=E2=80=99s=20drawEllipse=20m?= =?UTF-8?q?ethod=20which=20caused=20numerous=20crashes=20on=20OSX.=20Fix?= =?UTF-8?q?=20the=20git=20commit=20which=20is=20checked=20out,=20so=20the?= =?UTF-8?q?=20patch=20keeps=20working=20in=20the=20future.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patches/qt4-osx-draw-ellipse.patch | 19 +++++++++++++++++++ qt4.cmake | 7 ++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 patches/qt4-osx-draw-ellipse.patch diff --git a/patches/qt4-osx-draw-ellipse.patch b/patches/qt4-osx-draw-ellipse.patch new file mode 100644 index 0000000..f108994 --- /dev/null +++ b/patches/qt4-osx-draw-ellipse.patch @@ -0,0 +1,19 @@ +diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp +index 47e51b4..92822a9 100644 +--- a/src/gui/painting/qpaintengine_mac.cpp ++++ b/src/gui/painting/qpaintengine_mac.cpp +@@ -914,8 +914,14 @@ QCoreGraphicsPaintEngine::drawEllipse(const QRectF &r) + if (state->compositionMode() == QPainter::CompositionMode_Destination) + return; + ++ // only call CGPathAddArc if the positions x and y are valid ++ CGRect rect = CGRectMake(r.x(), r.y(), r.width(), r.height()); ++ if (CGRectIsEmpty(rect) || CGRectIsInfinite(rect)) ++ return; ++ + CGMutablePathRef path = CGPathCreateMutable(); + CGAffineTransform transform = CGAffineTransformMakeScale(r.width() / r.height(), 1); ++ + CGPathAddArc(path, &transform,(r.x() + (r.width() / 2)) / (r.width() / r.height()), + r.y() + (r.height() / 2), r.height() / 2, 0, (2 * M_PI), false); + d->drawPath(QCoreGraphicsPaintEnginePrivate::CGFill | QCoreGraphicsPaintEnginePrivate::CGStroke, diff --git a/qt4.cmake b/qt4.cmake index cbcfba0..34a5df2 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -18,7 +18,7 @@ include(libtiff) include(freetype2) external_git_repo(qt4 - 4.8 + 682ed9df439481e1f8e8651c4aa06f1b455a2080 https://github.com/qtproject/qt) message ("Installing ${qt4_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") @@ -41,9 +41,10 @@ ExternalProject_Add(${qt4_NAME} DEPENDS ${freetype2_NAME} ${zlib_NAME} ${libpng_NAME} ${libjpeg_NAME} ${libtiff_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${qt4_URL} - GIT_TAG 4.8 UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # This patch fixes ilastik crashes on OSX due to an ill-shaped ellipse + ${qt4_SRC_DIR}/src/gui/painting/qpaintengine_mac.cpp ${PATCH_DIR}/qt4-osx-draw-ellipse.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} env CXXFLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} echo "yes" | ${qt4_SRC_DIR}/configure # pipe "yes" to stdin to accept the license. --prefix=${BUILDEM_DIR} -opensource From a0f69853ed28902331d704d60e587d29336f4244 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Tue, 21 Jan 2014 17:18:55 +0100 Subject: [PATCH 028/220] Fix checking out qt4 again. Still need to figure out how to use commit SHAs --- qt4.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt4.cmake b/qt4.cmake index 34a5df2..b215b45 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -18,7 +18,7 @@ include(libtiff) include(freetype2) external_git_repo(qt4 - 682ed9df439481e1f8e8651c4aa06f1b455a2080 + 4.8 #682ed9df439481e1f8e8651c4aa06f1b455a2080 https://github.com/qtproject/qt) message ("Installing ${qt4_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") @@ -41,6 +41,7 @@ ExternalProject_Add(${qt4_NAME} DEPENDS ${freetype2_NAME} ${zlib_NAME} ${libpng_NAME} ${libjpeg_NAME} ${libtiff_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${qt4_URL} + GIT_TAG 4.8 UPDATE_COMMAND "" PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} # This patch fixes ilastik crashes on OSX due to an ill-shaped ellipse From 894bacfa69845a433379b0dec17cc14c472f4312 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 22 Jan 2014 08:58:36 +0100 Subject: [PATCH 029/220] Fix ilm Makefiles directly as specifying parameters through CMake always produces conflicts --- ilmbase.cmake | 10 ++++++++-- patches/ilmbase-fix-makefiles-stdlib.sh | 12 ++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 patches/ilmbase-fix-makefiles-stdlib.sh diff --git a/ilmbase.cmake b/ilmbase.cmake index c77cc33..a65b206 100644 --- a/ilmbase.cmake +++ b/ilmbase.cmake @@ -39,13 +39,19 @@ ExternalProject_Add(${ilmbase_NAME} PATCH_COMMAND ${ilmbase_PATCH_COMMAND} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${ilmbase_SRC_DIR}/configure --prefix=${BUILDEM_DIR} - "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" - "LIBS=-Wc,${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "LDFLAGS=${BUILDEM_LDFLAGS}" "CXXFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) +if (${BUILDEM_ADDITIONAL_CXX_FLAGS} MATCHES "libstdc") + ExternalProject_Add_Step(${ilmbase_NAME} ${ilmbase_NAME}-configure-stdlib + COMMAND bash ${PATCH_DIR}/ilmbase-fix-makefiles-stdlib.sh ${ilmbase_SRC_DIR}${ilmbase_BINARY_DIR}/../ilmbase-1.0.2-build + DEPENDEES configure + ) +endif() + set_target_properties(${ilmbase_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) endif (NOT ilmbase_NAME) diff --git a/patches/ilmbase-fix-makefiles-stdlib.sh b/patches/ilmbase-fix-makefiles-stdlib.sh new file mode 100644 index 0000000..1dca402 --- /dev/null +++ b/patches/ilmbase-fix-makefiles-stdlib.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +echo "IlmBase source path: $1" + +sed -i .bkup '283s/-rpath/-Wc,-stdlib=libstdc\+\+ -rpath/g' $1/Half/Makefile +sed -i .bkup '270s/-rpath/-Wc,-stdlib=libstdc\+\+ -rpath/g' $1/Iex/Makefile +sed -i .bkup '290s/-rpath/-Wc,-stdlib=libstdc\+\+ -rpath/g' $1/Imath/Makefile +sed -i .bkup '282s/-rpath/-Wc,-stdlib=libstdc\+\+ -rpath/g' $1/IlmThread/Makefile +rm $1/Half/Makefile.bkup +rm $1/Iex/Makefile.bkup +rm $1/Imath/Makefile.bkup +rm $1/IlmThread/Makefile.bkup \ No newline at end of file From 75db7486e11147a9c8ca8396c79d7f750d8f4723 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 22 Jan 2014 09:28:21 +0100 Subject: [PATCH 030/220] Apply a similar patch to openexr as it has the same makefile structure. Clean up the IlmPatch --- ilmbase.cmake | 2 +- openexr.cmake | 10 ++++++++-- patches/ilmbase-fix-makefiles-stdlib.sh | 2 -- patches/openexr-fix-makefiles-stdlib.sh | 4 ++++ 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 patches/openexr-fix-makefiles-stdlib.sh diff --git a/ilmbase.cmake b/ilmbase.cmake index a65b206..6bbbd53 100644 --- a/ilmbase.cmake +++ b/ilmbase.cmake @@ -47,7 +47,7 @@ ExternalProject_Add(${ilmbase_NAME} if (${BUILDEM_ADDITIONAL_CXX_FLAGS} MATCHES "libstdc") ExternalProject_Add_Step(${ilmbase_NAME} ${ilmbase_NAME}-configure-stdlib - COMMAND bash ${PATCH_DIR}/ilmbase-fix-makefiles-stdlib.sh ${ilmbase_SRC_DIR}${ilmbase_BINARY_DIR}/../ilmbase-1.0.2-build + COMMAND bash ${PATCH_DIR}/ilmbase-fix-makefiles-stdlib.sh ${ilmbase_SRC_DIR}${ilmbase_BINARY_DIR} DEPENDEES configure ) endif() diff --git a/openexr.cmake b/openexr.cmake index 5fd9183..004961e 100644 --- a/openexr.cmake +++ b/openexr.cmake @@ -50,13 +50,19 @@ ExternalProject_Add(${openexr_NAME} --prefix=${BUILDEM_DIR} --disable-ilmbasetest PKG_CONFIG_PATH=${BUILDEM_PKGCONFIG_DIR} - "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" - "LIBS=${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "LDFLAGS=${BUILDEM_LDFLAGS}" "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) +if (${BUILDEM_ADDITIONAL_CXX_FLAGS} MATCHES "libstdc") + ExternalProject_Add_Step(${openexr_NAME} ${openexr_NAME}-configure-stdlib + COMMAND bash ${PATCH_DIR}/openexr-fix-makefiles-stdlib.sh ${openexr_SRC_DIR}${openexr_BINARY_DIR} + DEPENDEES configure + ) +endif() + set_target_properties(${openexr_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) endif (NOT openexr_NAME) diff --git a/patches/ilmbase-fix-makefiles-stdlib.sh b/patches/ilmbase-fix-makefiles-stdlib.sh index 1dca402..5502aaa 100644 --- a/patches/ilmbase-fix-makefiles-stdlib.sh +++ b/patches/ilmbase-fix-makefiles-stdlib.sh @@ -1,7 +1,5 @@ #!/bin/bash -echo "IlmBase source path: $1" - sed -i .bkup '283s/-rpath/-Wc,-stdlib=libstdc\+\+ -rpath/g' $1/Half/Makefile sed -i .bkup '270s/-rpath/-Wc,-stdlib=libstdc\+\+ -rpath/g' $1/Iex/Makefile sed -i .bkup '290s/-rpath/-Wc,-stdlib=libstdc\+\+ -rpath/g' $1/Imath/Makefile diff --git a/patches/openexr-fix-makefiles-stdlib.sh b/patches/openexr-fix-makefiles-stdlib.sh new file mode 100644 index 0000000..ddbbc8d --- /dev/null +++ b/patches/openexr-fix-makefiles-stdlib.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +sed -i .bkup '402s/-rpath/-Wc,-stdlib=libstdc\+\+ -rpath/g' $1/IlmImf/Makefile +rm $1/IlmImf/Makefile.bkup From cc4d03497aaa03aa45447e48d7054d286cded03e Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 22 Jan 2014 09:31:28 +0100 Subject: [PATCH 031/220] =?UTF-8?q?Apparently=20using=20the=20BINARY=5FDIR?= =?UTF-8?q?=20doesn=E2=80=99t=20work=20properly.=20Use=20hardcoded=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ilmbase.cmake | 2 +- openexr.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ilmbase.cmake b/ilmbase.cmake index 6bbbd53..eea276d 100644 --- a/ilmbase.cmake +++ b/ilmbase.cmake @@ -47,7 +47,7 @@ ExternalProject_Add(${ilmbase_NAME} if (${BUILDEM_ADDITIONAL_CXX_FLAGS} MATCHES "libstdc") ExternalProject_Add_Step(${ilmbase_NAME} ${ilmbase_NAME}-configure-stdlib - COMMAND bash ${PATCH_DIR}/ilmbase-fix-makefiles-stdlib.sh ${ilmbase_SRC_DIR}${ilmbase_BINARY_DIR} + COMMAND bash ${PATCH_DIR}/ilmbase-fix-makefiles-stdlib.sh ${ilmbase_SRC_DIR}/../ilmbase-1.0.2-build DEPENDEES configure ) endif() diff --git a/openexr.cmake b/openexr.cmake index 004961e..651be9c 100644 --- a/openexr.cmake +++ b/openexr.cmake @@ -58,7 +58,7 @@ ExternalProject_Add(${openexr_NAME} if (${BUILDEM_ADDITIONAL_CXX_FLAGS} MATCHES "libstdc") ExternalProject_Add_Step(${openexr_NAME} ${openexr_NAME}-configure-stdlib - COMMAND bash ${PATCH_DIR}/openexr-fix-makefiles-stdlib.sh ${openexr_SRC_DIR}${openexr_BINARY_DIR} + COMMAND bash ${PATCH_DIR}/openexr-fix-makefiles-stdlib.sh ${openexr_SRC_DIR}/../openexr-1.6.1-build DEPENDEES configure ) endif() From db6f6059cdc4d4bbe6b6a9373a5d12aeb5f0f040 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 22 Jan 2014 09:41:11 +0100 Subject: [PATCH 032/220] Adding the stdlib parameter to openexr's LDFLAGS again --- openexr.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openexr.cmake b/openexr.cmake index 651be9c..3c83bad 100644 --- a/openexr.cmake +++ b/openexr.cmake @@ -50,7 +50,7 @@ ExternalProject_Add(${openexr_NAME} --prefix=${BUILDEM_DIR} --disable-ilmbasetest PKG_CONFIG_PATH=${BUILDEM_PKGCONFIG_DIR} - "LDFLAGS=${BUILDEM_LDFLAGS}" + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install From 48d06c68fbfee11888db81bfd7f74ecf8282a7ed Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 22 Jan 2014 11:45:38 +0100 Subject: [PATCH 033/220] =?UTF-8?q?Patch=20pgmlink=E2=80=99s=20Makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patches/pgmlink-cmake.patch | 13 +++++++++++++ pgmlink.cmake | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 patches/pgmlink-cmake.patch diff --git a/patches/pgmlink-cmake.patch b/patches/pgmlink-cmake.patch new file mode 100644 index 0000000..93df56e --- /dev/null +++ b/patches/pgmlink-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f548f8f..aa4c603 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -110,7 +110,7 @@ if(NOT CMAKE_BUILD_TYPE) + endif(NOT CMAKE_BUILD_TYPE) + + if(NOT MSVC) +- set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wfatal-errors -std=c++98 -pedantic -pthread") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wfatal-errors -std=c++98 -pedantic -pthread") + set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # Clang is too strict to use -Werror (boost::serialization has warnings...) diff --git a/pgmlink.cmake b/pgmlink.cmake index 7a5302a..ab7a768 100644 --- a/pgmlink.cmake +++ b/pgmlink.cmake @@ -51,7 +51,9 @@ else() PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${pgmlink_URL} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Patch CMakeLists as it just overwrote the CXX_FLAGS + ${pgmlink_SRC_DIR}/CMakeLists.txt ${PATCH_DIR}/pgmlink-cmake.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${pgmlink_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} From b72b9a4e642d1c8912dcfbf40666d02ec0f26458 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 20 Feb 2014 16:16:09 +0100 Subject: [PATCH 034/220] Make sure pyqt uses the proper SIP and Python by setting the appropriate PYTHONPATH --- pyqt4.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqt4.cmake b/pyqt4.cmake index 7266e77..2dcf8ca 100644 --- a/pyqt4.cmake +++ b/pyqt4.cmake @@ -50,7 +50,7 @@ ExternalProject_Add(${pyqt4_NAME} UPDATE_COMMAND "" PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} ${pyqt4_SRC_DIR}/configure.py ${PATCH_DIR}/pyqt4.patch # For some reason, the configure script wants to build pyqt phonon support even if qt was built without it. This patch simply comments out phonon support. - CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} ${pyqt4_SRC_DIR}/configure.py + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} PYTHONPATH=${BUILDEM_PYTHONPATH} ${PYTHON_EXE} ${pyqt4_SRC_DIR}/configure.py --confirm-license -q "${BUILDEM_DIR}/bin/qmake" ${EXTRA_PYQT4_CONFIG_FLAGS} From f36e968ae0f6075bcc2e0b9345819117b1d64970 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Mon, 10 Mar 2014 14:47:19 +0100 Subject: [PATCH 035/220] fix cplex shared library building --- FindCplex.cmake | 4 ++++ cplex-shared.cmake | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/FindCplex.cmake b/FindCplex.cmake index 63488d1..4a66cf2 100644 --- a/FindCplex.cmake +++ b/FindCplex.cmake @@ -89,6 +89,7 @@ FIND_LIBRARY(CPLEX_LIBRARY ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx + ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_darwin/static_pic #osx PATHS ENV LIBRARY_PATH #unix ENV LD_LIBRARY_PATH #unix ) @@ -100,6 +101,7 @@ FIND_LIBRARY(CPLEX_ILOCPLEX_LIBRARY ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx + ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_darwin/static_pic #osx PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH ) @@ -111,6 +113,7 @@ FIND_LIBRARY(CPLEX_CONCERT_LIBRARY ${CPLEX_ROOT_DIR}/concert/lib/x86-64_debian4.0_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/concert/lib/x86-64_sles10_4.1/static_pic #unix ${CPLEX_ROOT_DIR}/concert/lib/x86-64_osx/static_pic #osx + ${CPLEX_ROOT_DIR}/concert/lib/x86-64_darwin/static_pic #osx PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH ) @@ -127,6 +130,7 @@ else() HINTS ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_sles10_4.1 #unix ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_debian4.0_4.1 #unix ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_osx #osx + ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_darwin #osx ENV LIBRARY_PATH ENV LD_LIBRARY_PATH ) diff --git a/cplex-shared.cmake b/cplex-shared.cmake index c01c184..ad455a8 100644 --- a/cplex-shared.cmake +++ b/cplex-shared.cmake @@ -27,7 +27,7 @@ find_package( Cplex REQUIRED ) if (APPLE) set(SHARED_CPLEX_COMPILE_FLAGS "-fpic -stdlib=libstdc++") set(SHARED_CPLEX_LINK_FLAGS_1 "-Wl,-all_load") - set(SHARED_CPLEX_LINK_FLAGS_2 "") + set(SHARED_CPLEX_LINK_FLAGS_2 "-stdlib=libstdc++") else() set(SHARED_CPLEX_COMPILE_FLAGS "-shared -fpic") set(SHARED_CPLEX_LINK_FLAGS_1 "-Wl,-whole-archive") From 056aa21e4ac307b913d3103f8c3a06ea381dd313 Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Wed, 9 Apr 2014 16:33:00 +0200 Subject: [PATCH 036/220] Set the pythonpath when building qimage2ndarray --- qimage2ndarray.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qimage2ndarray.cmake b/qimage2ndarray.cmake index 6d3ea1b..2400ea8 100644 --- a/qimage2ndarray.cmake +++ b/qimage2ndarray.cmake @@ -32,8 +32,8 @@ ExternalProject_Add(${qimage2ndarray_NAME} PATCH_COMMAND "" LIST_SEPARATOR ^^ CONFIGURE_COMMAND "" - BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} ${qimage2ndarray_SRC_DIR}/setup.py build - INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} ${qimage2ndarray_SRC_DIR}/setup.py install --prefix=${PYTHON_PREFIX} + BUILD_COMMAND ${BUILDEM_ENV_STRING} PYTHONPATH=${BUILDEM_PYTHONPATH} ${PYTHON_EXE} ${qimage2ndarray_SRC_DIR}/setup.py build + INSTALL_COMMAND ${BUILDEM_ENV_STRING} PYTHONPATH=${BUILDEM_PYTHONPATH} ${PYTHON_EXE} ${qimage2ndarray_SRC_DIR}/setup.py install --prefix=${PYTHON_PREFIX} BUILD_IN_SOURCE 1 ) From daa0defa13d8507fa9855ecb4da601f3390cbd6a Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 11 Apr 2014 12:09:01 -0400 Subject: [PATCH 037/220] lemon: Added patch (see https://lemon.cs.elte.hu/trac/lemon/attachment/ticket/480/51deaff8728a.patch Ticket #480). --- lemon.cmake | 3 +- patches/lemon-lgf-gen.patch | 108 ++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 patches/lemon-lgf-gen.patch diff --git a/lemon.cmake b/lemon.cmake index f8cef82..5575801 100644 --- a/lemon.cmake +++ b/lemon.cmake @@ -32,8 +32,9 @@ ExternalProject_Add(${lemon_NAME} UPDATE_COMMAND "" PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} # This patch fixes a build error that clang detects. - # (Already fixed in lemon trunk, but not in the tarball release.) + # Already fixed in lemon trunk, patch here in Ticket #480 ( https://lemon.cs.elte.hu/trac/lemon/attachment/ticket/480/51deaff8728a.patch ), but not in the tarball release. ${lemon_SRC_DIR}/lemon/graph_to_eps.h ${PATCH_DIR}/lemon.patch + ${lemon_SRC_DIR}/tools/lgf-gen.cc ${PATCH_DIR}/lemon-lgf-gen.patch # Apparently one test file is missing from the release. # This patch removes it from CMakeLists.txt ${lemon_SRC_DIR}/test/CMakeLists.txt ${PATCH_DIR}/lemon-test.patch diff --git a/patches/lemon-lgf-gen.patch b/patches/lemon-lgf-gen.patch new file mode 100644 index 0000000..457e6a0 --- /dev/null +++ b/patches/lemon-lgf-gen.patch @@ -0,0 +1,108 @@ +# HG changeset patch +# User Alpar Juttner +# Date 1396968869 -7200 +# Tue Apr 08 16:54:29 2014 +0200 +# Node ID 51deaff8728aacb20463ace3626807877d608611 +# Parent e00d7b681d8e8fa6cc94353e9b30388b27138043 +Clang compatibility fix in lgf-gen.cc (#480) + +diff --git a/tools/lgf-gen.cc b/tools/lgf-gen.cc +--- a/tools/lgf-gen.cc ++++ b/tools/lgf-gen.cc +@@ -246,7 +246,7 @@ + + struct BeachIt; + +- typedef std::multimap SpikeHeap; ++ typedef std::multimap SpikeHeap; + + typedef std::multimap Beach; + +@@ -329,6 +329,7 @@ + Beach::iterator bit = beach.upper_bound(Part(site, site, site)); + + if (bit->second != spikeheap.end()) { ++ delete bit->second->second; + spikeheap.erase(bit->second); + } + +@@ -342,8 +343,8 @@ + if (prev != -1 && + circle_form(points[prev], points[curr], points[site])) { + double x = circle_point(points[prev], points[curr], points[site]); +- pit = spikeheap.insert(std::make_pair(x, BeachIt(beach.end()))); +- pit->second.it = ++ pit = spikeheap.insert(std::make_pair(x, new BeachIt(beach.end()))); ++ pit->second->it = + beach.insert(std::make_pair(Part(prev, curr, site), pit)); + } else { + beach.insert(std::make_pair(Part(prev, curr, site), pit)); +@@ -355,8 +356,8 @@ + if (next != -1 && + circle_form(points[site], points[curr],points[next])) { + double x = circle_point(points[site], points[curr], points[next]); +- nit = spikeheap.insert(std::make_pair(x, BeachIt(beach.end()))); +- nit->second.it = ++ nit = spikeheap.insert(std::make_pair(x, new BeachIt(beach.end()))); ++ nit->second->it = + beach.insert(std::make_pair(Part(site, curr, next), nit)); + } else { + beach.insert(std::make_pair(Part(site, curr, next), nit)); +@@ -366,7 +367,7 @@ + } else { + sweep = spit->first; + +- Beach::iterator bit = spit->second.it; ++ Beach::iterator bit = spit->second->it; + + int prev = bit->first.prev; + int curr = bit->first.curr; +@@ -399,10 +400,22 @@ + Beach::iterator nbit = bit; ++nbit; + int nnt = nbit->first.next; + +- if (bit->second != spikeheap.end()) spikeheap.erase(bit->second); +- if (pbit->second != spikeheap.end()) spikeheap.erase(pbit->second); +- if (nbit->second != spikeheap.end()) spikeheap.erase(nbit->second); +- ++ if (bit->second != spikeheap.end()) ++ { ++ delete bit->second->second; ++ spikeheap.erase(bit->second); ++ } ++ if (pbit->second != spikeheap.end()) ++ { ++ delete pbit->second->second; ++ spikeheap.erase(pbit->second); ++ } ++ if (nbit->second != spikeheap.end()) ++ { ++ delete nbit->second->second; ++ spikeheap.erase(nbit->second); ++ } ++ + beach.erase(nbit); + beach.erase(bit); + beach.erase(pbit); +@@ -412,8 +425,8 @@ + circle_form(points[ppv], points[prev], points[next])) { + double x = circle_point(points[ppv], points[prev], points[next]); + if (x < sweep) x = sweep; +- pit = spikeheap.insert(std::make_pair(x, BeachIt(beach.end()))); +- pit->second.it = ++ pit = spikeheap.insert(std::make_pair(x, new BeachIt(beach.end()))); ++ pit->second->it = + beach.insert(std::make_pair(Part(ppv, prev, next), pit)); + } else { + beach.insert(std::make_pair(Part(ppv, prev, next), pit)); +@@ -424,8 +437,8 @@ + circle_form(points[prev], points[next], points[nnt])) { + double x = circle_point(points[prev], points[next], points[nnt]); + if (x < sweep) x = sweep; +- nit = spikeheap.insert(std::make_pair(x, BeachIt(beach.end()))); +- nit->second.it = ++ nit = spikeheap.insert(std::make_pair(x, new BeachIt(beach.end()))); ++ nit->second->it = + beach.insert(std::make_pair(Part(prev, next, nnt), nit)); + } else { + beach.insert(std::make_pair(Part(prev, next, nnt), nit)); From 15989a0adc8362c6a8fa6745f0f96254475bf800 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 11 Apr 2014 16:24:34 -0400 Subject: [PATCH 038/220] pyqt4: Added a new patch to fix build errors with PyQt4 looking for phonon. --- patches/pyqt4.patch | 24 ++++++++++++++++++++++++ pyqt4.cmake | 1 + 2 files changed, 25 insertions(+) create mode 100644 patches/pyqt4.patch diff --git a/patches/pyqt4.patch b/patches/pyqt4.patch new file mode 100644 index 0000000..de78eb3 --- /dev/null +++ b/patches/pyqt4.patch @@ -0,0 +1,24 @@ +--- configure.py 2013-08-21 02:02:48.000000000 -0400 ++++ configure_2.py 2014-04-11 16:11:07.000000000 -0400 +@@ -371,8 +371,8 @@ + check_module("QtTest", "QtTest", "QTest::qSleep(0)") + check_module("QtWebKit", "qwebpage.h", "new QWebPage()") + check_module("QtXmlPatterns", "qxmlname.h", "new QXmlName()") +- check_module("phonon", "phonon/videowidget.h", +- "new Phonon::VideoWidget()") ++# check_module("phonon", "phonon/videowidget.h", ++# "new Phonon::VideoWidget()") + check_module("QtAssistant", "qassistantclient.h", + "new QAssistantClient(\"foo\")", extra_lib_dirs=ass_lib_dirs, + extra_libs=ass_libs) +@@ -518,8 +518,8 @@ + if "QtXmlPatterns" in pyqt_modules: + generate_code("QtXmlPatterns") + +- if "phonon" in pyqt_modules: +- generate_code("phonon") ++ #if "phonon" in pyqt_modules: ++ # generate_code("phonon") + + if "QtAssistant" in pyqt_modules: + generate_code("QtAssistant") diff --git a/pyqt4.cmake b/pyqt4.cmake index 8205e3e..dd74c89 100644 --- a/pyqt4.cmake +++ b/pyqt4.cmake @@ -48,6 +48,7 @@ ExternalProject_Add(${pyqt4_NAME} URL ${pyqt4_URL} URL_MD5 ${pyqt4_MD5} UPDATE_COMMAND "" + # New patch related to new version of PyQt4, which still suffers from the same phonon bug. PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} ${pyqt4_SRC_DIR}/configure.py ${PATCH_DIR}/pyqt4.patch # For some reason, the configure script wants to build pyqt phonon support even if qt was built without it. This patch simply comments out phonon support. CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} PYTHONPATH=${BUILDEM_PYTHONPATH} ${PYTHON_EXE} ${pyqt4_SRC_DIR}/configure.py From befa06fc9bae896e553b501e0f775d18055ee032 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 11 Apr 2014 17:19:19 -0400 Subject: [PATCH 039/220] openblas: Added TARGET=SANDYBRIDGE. According to their change log ( http://www.openblas.net/Changelog.txt ). This should support Haswell and thus Crystalwell as well. Note the list of supported targets ( https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt ) does not explicitly include Haswell or Crystalwell. --- openblas.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openblas.cmake b/openblas.cmake index 7a963ed..4fc2ce2 100644 --- a/openblas.cmake +++ b/openblas.cmake @@ -10,7 +10,8 @@ include (ExternalProject) include (ExternalSource) external_git_repo (openblas - v0.2.8 + #v0.2.8 + HEAD https://github.com/xianyi/OpenBLAS) message ("Installing ${openblas_NAME} into ilastik build area: ${BUILDEM_DIR} ...") @@ -22,9 +23,11 @@ ExternalProject_Add(${openblas_NAME} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND "" - BUILD_COMMAND $(MAKE) NO_AVX=1 NO_AFFINITY=1 -j8 + # Added Sandybridge target. This is required for SandyBridge architecture. It also will optimize for Haswell architechture, which includes Clearwell. + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) NO_AVX=1 NO_AFFINITY=1 TARGET=SANDYBRIDGE -j8 BUILD_IN_SOURCE 1 - INSTALL_COMMAND $(MAKE) PREFIX=${BUILDEM_DIR} install && + # Added Sandybridge target. This is required for SandyBridge architecture. It also will optimize for Haswell architechture, which includes Clearwell. + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PREFIX=${BUILDEM_DIR} TARGET=SANDYBRIDGE install && ln -fs libopenblas.so ${BUILDEM_DIR}/lib/libblas.so && ln -fs libopenblas.so ${BUILDEM_DIR}/lib/liblapack.so ) From d741518742382d442bb5e503832eb490d861df38 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 11 Apr 2014 18:01:17 -0400 Subject: [PATCH 040/220] Qt4: On Mavericks the Xarch_x86_64 flag is not appropriate as the OS only supports 64 bit systems. However, Qt4 uses this flag in a way that is no longer compatiable on Mavericks. As a result, this causes Qt4 to fail to build. This commit comments out lines using those flags and simply adds the exact same line below with two patches that are applied. It may be worthwhile to actually create small pieces of code to test for Mavericks in particular so as not to break the build for other OSes.. However, this has not been done in this commit. --- patches/qt4-osx-mavericks-configure.patch | 21 +++++++ patches/qt4-osx-mavericks-gui-pro.patch | 77 +++++++++++++++++++++++ qt4.cmake | 4 ++ 3 files changed, 102 insertions(+) create mode 100644 patches/qt4-osx-mavericks-configure.patch create mode 100644 patches/qt4-osx-mavericks-gui-pro.patch diff --git a/patches/qt4-osx-mavericks-configure.patch b/patches/qt4-osx-mavericks-configure.patch new file mode 100644 index 0000000..9cffd44 --- /dev/null +++ b/patches/qt4-osx-mavericks-configure.patch @@ -0,0 +1,21 @@ +--- ilastik_build_dir_2/src/qt4-git/configure 2014-04-11 17:46:22.000000000 -0400 ++++ ilastik_build_dir/src/qt4-git/configure 2014-04-11 17:31:32.000000000 -0400 +@@ -7993,10 +7993,14 @@ + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4" + fi + if echo "$CFG_MAC_ARCHS" | grep '\' > /dev/null 2>&1; then +- QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" +- QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" +- QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" +- QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5" ++# QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" ++# QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" ++# QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" ++# QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5" ++ QMakeVar add QMAKE_CFLAGS "-mmacosx-version-min=10.5" ++ QMakeVar add QMAKE_CXXFLAGS "-mmacosx-version-min=10.5" ++ QMakeVar add QMAKE_LFLAGS "-mmacosx-version-min=10.5" ++ QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -mmacosx-version-min=10.5" + fi + if echo "$CFG_MAC_ARCHS" | grep '\' > /dev/null 2>&1; then + QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" diff --git a/patches/qt4-osx-mavericks-gui-pro.patch b/patches/qt4-osx-mavericks-gui-pro.patch new file mode 100644 index 0000000..109e88a --- /dev/null +++ b/patches/qt4-osx-mavericks-gui-pro.patch @@ -0,0 +1,77 @@ +--- ilastik_build_dir_2/src/qt4-git/src/gui/gui.pro 2014-04-11 17:46:26.000000000 -0400 ++++ ilastik_build_dir/src/qt4-git/src/gui/gui.pro 2014-04-11 17:31:23.000000000 -0400 +@@ -95,8 +95,9 @@ + mmx_compiler.commands = $$QMAKE_CXX -c -Winline + + mac { +- mmx_compiler.commands += -Xarch_i386 -mmmx +- mmx_compiler.commands += -Xarch_x86_64 -mmmx ++# mmx_compiler.commands += -Xarch_i386 -mmmx ++# mmx_compiler.commands += -Xarch_x86_64 -mmmx ++ mmx_compiler.commands += -mmmx + } else { + mmx_compiler.commands += -mmmx + } +@@ -114,8 +115,9 @@ + mmx3dnow_compiler.commands = $$QMAKE_CXX -c -Winline + + mac { +- mmx3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -mmmx +- mmx3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -mmmx ++# mmx3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -mmmx ++# mmx3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -mmmx ++ mmx3dnow_compiler.commands += -m3dnow -mmmx + } else { + mmx3dnow_compiler.commands += -m3dnow -mmmx + } +@@ -132,8 +134,9 @@ + sse3dnow_compiler.commands = $$QMAKE_CXX -c -Winline + + mac { +- sse3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -msse +- sse3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -msse ++# sse3dnow_compiler.commands += -Xarch_i386 -m3dnow -Xarch_i386 -msse ++# sse3dnow_compiler.commands += -Xarch_x86_64 -m3dnow -Xarch_x86_64 -msse ++ sse3dnow_compiler.commands += -m3dnow -msse + } else { + sse3dnow_compiler.commands += -m3dnow -msse + } +@@ -152,8 +155,10 @@ + sse_compiler.commands = $$QMAKE_CXX -c -Winline + + mac { +- sse_compiler.commands += -Xarch_i386 -msse +- sse_compiler.commands += -Xarch_x86_64 -msse ++# sse_compiler.commands += -Xarch_i386 -msse ++# sse_compiler.commands += -Xarch_x86_64 -msse ++ sse_compiler.commands += -msse ++ sse_compiler.commands += -msse + } else { + sse_compiler.commands += -msse + } +@@ -171,8 +176,10 @@ + sse2_compiler.commands = $$QMAKE_CXX -c -Winline + + mac { +- sse2_compiler.commands += -Xarch_i386 -msse2 +- sse2_compiler.commands += -Xarch_x86_64 -msse2 ++# sse2_compiler.commands += -Xarch_i386 -msse2 ++# sse2_compiler.commands += -Xarch_x86_64 -msse2 ++ sse2_compiler.commands += -msse2 ++ sse2_compiler.commands += -msse2 + } else { + sse2_compiler.commands += -msse2 + } +@@ -190,8 +197,10 @@ + ssse3_compiler.commands = $$QMAKE_CXX -c -Winline + + mac { +- ssse3_compiler.commands += -Xarch_i386 -mssse3 +- ssse3_compiler.commands += -Xarch_x86_64 -mssse3 ++# ssse3_compiler.commands += -Xarch_i386 -mssse3 ++# ssse3_compiler.commands += -Xarch_x86_64 -mssse3 ++ ssse3_compiler.commands += -mssse3 ++ ssse3_compiler.commands += -mssse3 + } else { + ssse3_compiler.commands += -mssse3 + } diff --git a/qt4.cmake b/qt4.cmake index b215b45..ea2751e 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -46,6 +46,10 @@ ExternalProject_Add(${qt4_NAME} PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} # This patch fixes ilastik crashes on OSX due to an ill-shaped ellipse ${qt4_SRC_DIR}/src/gui/painting/qpaintengine_mac.cpp ${PATCH_DIR}/qt4-osx-draw-ellipse.patch + # This patch fixes removes Xarch_x86_64 flags from the Qt4 configure file. These flags are not appropriate for Mavericks and cause Qt4 to fail building. + ${qt4_SRC_DIR}/configure ${PATCH_DIR}/qt4-osx-mavericks-configure.patch + # This patch fixes removes Xarch_x86_64 flags from the Qt4 gui.pro file. These flags are not appropriate for Mavericks and cause Qt4 to fail building. + ${qt4_SRC_DIR}/src/gui/gui.pro ${PATCH_DIR}/qt4-osx-mavericks-gui-pro.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} env CXXFLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} echo "yes" | ${qt4_SRC_DIR}/configure # pipe "yes" to stdin to accept the license. --prefix=${BUILDEM_DIR} -opensource From a0ebf37631aa897a62f6cb3b3ff743e10ee576cb Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 13 Apr 2014 19:22:09 -0400 Subject: [PATCH 041/220] sip: Corrected cmake file so that additional flags (-b, -d, -e, -v) are uncommented. They must be uncommented for the build to work. Otherwise, the build will fail to use the correct SIP and may use a system installed SIP. This will affect whether building qimage2ndarray succeeds or fails. --- sip.cmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sip.cmake b/sip.cmake index fcdd446..0e403de 100644 --- a/sip.cmake +++ b/sip.cmake @@ -34,12 +34,18 @@ ExternalProject_Add(${sip_NAME} UPDATE_COMMAND "" PATCH_COMMAND "" LIST_SEPARATOR ^^ + # Though it may seem that the -b, -d, -e, and -v flags are unnecessary, this is not the case. + # It would seem obvious that the install would happen in those locations. However, python will + # become confused if the system python has SIP installed. Thus, keeping the flags below will + # ensure that the right SIP packages can be imported by python. This is necessary for the build + # of qimage2ndarray in particular. Without the flags below, qimage2ndarray will fail to find the + # right SIP to build with. CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} ${sip_SRC_DIR}/configure.py ${EXTRA_SIP_CONFIG_FLAGS} - #-b ${PYTHON_PREFIX}/bin - #-d ${PYTHON_PREFIX}/lib/python2.7/site-packages - #-e ${PYTHON_PREFIX}/include/python2.7 - #-v ${PYTHON_PREFIX}/share/sip + -b ${PYTHON_PREFIX}/bin + -d ${PYTHON_PREFIX}/lib/python2.7/site-packages + -e ${PYTHON_PREFIX}/include/python2.7 + -v ${PYTHON_PREFIX}/share/sip BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install From a77b035339eab2fe210621a38d82f86803db65c4 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 13:27:43 -0400 Subject: [PATCH 042/220] qt4: Was using PATCH_EXE defined in PatchSupport, but had the include of PatchSupport commented. This line has been uncommented and a comment to this effect was left. --- qt4.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qt4.cmake b/qt4.cmake index ea2751e..5098058 100644 --- a/qt4.cmake +++ b/qt4.cmake @@ -9,7 +9,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) include (ExternalProject) include (ExternalSource) include (BuildSupport) -#include (PatchSupport) +include (PatchSupport) # Using PATCH_EXE so this include should be here. include(zlib) include(libpng) @@ -111,5 +111,4 @@ endif() set_target_properties(${qt4_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT qt4_NAME) - +endif (NOT qt4_NAME) \ No newline at end of file From 7312730c15a4b7c4916b7a5e93f9de9dacaf0474 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 13:36:24 -0400 Subject: [PATCH 043/220] nose: The URL for external_source contained the file to download, which it shouldn't. This caused build errors. --- nose.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nose.cmake b/nose.cmake index 48a4bcb..68c7b95 100644 --- a/nose.cmake +++ b/nose.cmake @@ -1,5 +1,5 @@ # -# Install nose library from source +# Install nose library from source. # if (NOT nose_NAME) @@ -17,7 +17,7 @@ external_source (nose 1.2.1 nose-1.2.1.tar.gz 735e3f1ce8b07e70ee1b742a8a53585a - http://pypi.python.org/packages/source/n/nose/nose-1.2.1.tar.gz) + http://pypi.python.org/packages/source/n/nose) message ("Installing ${nose_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From db8cfdf18f052bd6e944e41c4023392e5ffd8b3a Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 13:40:49 -0400 Subject: [PATCH 044/220] qimage2ndarray: Removed PatchSupport comment as no patching is happening here. Also, added SHA1 commented for the release in question. --- qimage2ndarray.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qimage2ndarray.cmake b/qimage2ndarray.cmake index 2400ea8..d59ab99 100644 --- a/qimage2ndarray.cmake +++ b/qimage2ndarray.cmake @@ -9,7 +9,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) include (ExternalProject) include (ExternalSource) include (BuildSupport) -#include (PatchSupport) include (numpy) include (pyqt4) @@ -18,7 +17,7 @@ include (pyqt4) # it doesn't have an /include directory! # Instead, we pull directly from github. external_git_repo (qimage2ndarray - release-1.3 + release-1.3 # beaa2eca4605be443f78d6dd5cd2d4be8081d0dc https://github.com/hmeine/qimage2ndarray) message ("Installing ${qimage2ndarray_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From aa57894fb19936c1e0b8ed768f62c7f9a76fbf94 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 13:44:19 -0400 Subject: [PATCH 045/220] gmp: Added more detail to comment at top about the cmake file. Removed extra quote in CONFIGURE_COMMAND that was causing build errors. --- gmp.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gmp.cmake b/gmp.cmake index f77559e..27602f5 100644 --- a/gmp.cmake +++ b/gmp.cmake @@ -1,5 +1,6 @@ # -# Install gmp from source +# Install gmp from source. +# Provides multiple precision support. # if (NOT gmp_NAME) @@ -25,7 +26,7 @@ ExternalProject_Add(${gmp_NAME} PATCH_COMMAND "" CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${gmp_SRC_DIR}/configure --prefix=${BUILDEM_DIR} - "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}"" + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) BUILD_IN_SOURCE 1 From 4fad0e04398ba416d1a8c54cf3f12cebc10e9832 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 13:48:52 -0400 Subject: [PATCH 046/220] mpfr: Added more detailed introductor comment. Added an additional flag to the configure comment to help specify where gmp is just for clarity. --- mpfr.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mpfr.cmake b/mpfr.cmake index cdef3a0..2fbe10a 100644 --- a/mpfr.cmake +++ b/mpfr.cmake @@ -1,5 +1,6 @@ # -# Install mpfr from source +# Install mpfr from source. +# Provides additional multiple precision support. # if (NOT mpfr_NAME) @@ -29,6 +30,7 @@ ExternalProject_Add(${mpfr_NAME} PATCH_COMMAND ${BUILDEM_ENV_STRING} patch -N -Z -p1 < ${PATCH_DIR}/mpfr-3.1.1.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${mpfr_SRC_DIR}/configure --prefix=${BUILDEM_DIR} + --with-gmp=${BUILDEM_DIR} # Standard. See http://code.google.com/p/gmpy/wiki/InstallingGmpy2 LDFLAGS=${BUILDEM_LDFLAGS} CPPFLAGS=-I${BUILDEM_DIR}/include BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) From 5236d39b798b22e0f789cb844ea776cf3458cd2d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 13:53:00 -0400 Subject: [PATCH 047/220] python: Added a patch to stop the buildem Python from including the system Python packages in sys.path for Mac. Without this patch, buildem Python may fail to install packages and use system versions instead of buildem versions or in the worse case link against system Python libraries/packages instead of buildem version. --- patches/turn_off_mac_sys_path.patch | 16 ++++++++++++++++ python.cmake | 7 ++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 patches/turn_off_mac_sys_path.patch diff --git a/patches/turn_off_mac_sys_path.patch b/patches/turn_off_mac_sys_path.patch new file mode 100644 index 0000000..d22e716 --- /dev/null +++ b/patches/turn_off_mac_sys_path.patch @@ -0,0 +1,16 @@ +--- /Users/kirkhamj/Downloads/Python-2.7.6/Lib/site.py 2013-11-10 02:36:40.000000000 -0500 ++++ /Users/kirkhamj/Documents/site.py 2014-04-21 23:12:01.000000000 -0400 +@@ -301,9 +301,10 @@ + from sysconfig import get_config_var + framework = get_config_var("PYTHONFRAMEWORK") + if framework: +- sitepackages.append( +- os.path.join("/Library", framework, +- sys.version[:3], "site-packages")) ++ pass ++ #sitepackages.append( ++ # os.path.join("/Library", framework, ++ # sys.version[:3], "site-packages")) + return sitepackages + + def addsitepackages(known_paths): diff --git a/python.cmake b/python.cmake index c5ac31f..a8b01ca 100644 --- a/python.cmake +++ b/python.cmake @@ -12,6 +12,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) include (ExternalProject) include (ExternalSource) include (BuildSupport) +include (PatchSupport) include (zlib) include (openssl) # without openssl, hashlib might have missing encryption methods @@ -53,7 +54,11 @@ ExternalProject_Add(${python_NAME} URL ${python_URL} URL_MD5 ${python_MD5} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # This patch stops including the system Python site-packages on Python. + # Without this patch buildem versions of Python tools will either not be installed + # or not be used. This will give the false sense that something succeeded in buildem. + ${python_SRC_DIR}/Lib/site.py ${PATCH_DIR}/turn_off_mac_sys_path.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${python_SRC_DIR}/configure --prefix=${BUILDEM_DIR} ${PYTHON_BINARY_TYPE_ARG} From 0b8129baf0169fd9229d84f3e665471450851e41 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 14:47:12 -0400 Subject: [PATCH 048/220] six: Added six, which provides access to utilities in a compatible way between Python 2 and 3. Required by Matplotlib. --- six.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 six.cmake diff --git a/six.cmake b/six.cmake new file mode 100644 index 0000000..d32188f --- /dev/null +++ b/six.cmake @@ -0,0 +1,40 @@ +# A python standards module. Provides support for utilities in a compatible way +# between Python 2 and 3. +# Required by Matplotlib. + +if (NOT six_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (six + 1.6.1 + six-1.6.1.tar.gz + 07d606ac08595d795bf926cc9985674f + https://pypi.python.org/packages/source/s/six/) + + +# Download and install six +message ("Installing ${six_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${six_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${six_URL} + URL_MD5 ${six_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${six_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT six_NAME) \ No newline at end of file From 706fa8acf84a1b705f1aaeaf39f1a6af1383a654 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:05:17 -0400 Subject: [PATCH 049/220] pytz: Provides support for timezone definitions. Required by Matplotlib. --- pytz.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pytz.cmake diff --git a/pytz.cmake b/pytz.cmake new file mode 100644 index 0000000..8d604cf --- /dev/null +++ b/pytz.cmake @@ -0,0 +1,39 @@ +# Time zone definitions for Python. +# Used by Matplotlib. + +if (NOT pytz_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (pytz + 2014.2 + pytz-2014.2.tar.gz + c0158314605420cbf6e5328369b06145 + https://pypi.python.org/packages/source/p/pytz/) + + +# Download and install pytz +message ("Installing ${pytz_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pytz_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pytz_URL} + URL_MD5 ${pytz_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pytz_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pytz_NAME) \ No newline at end of file From 275865c7d0d4e1387c6ce0b2d2ac04fbdfd32af3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:09:29 -0400 Subject: [PATCH 050/220] python-dateutil: Added dateutil for Python. Provides support for date and/or time manipulation. Used by Matplotlib. --- python-dateutil.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 python-dateutil.cmake diff --git a/python-dateutil.cmake b/python-dateutil.cmake new file mode 100644 index 0000000..c72f98a --- /dev/null +++ b/python-dateutil.cmake @@ -0,0 +1,41 @@ +# Used for handling any date or time. +# Required by Matplotlib. + +if (NOT python-dateutil_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) +include (six) + +external_source (python-dateutil + 1.5 + python-dateutil-1.5.tar.gz + 35f3732db3f2cc4afdc68a8533b60a52 + https://labix.org/download/python-dateutil) + + +# Download and install python-dateutil +message ("Installing ${python-dateutil_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${python-dateutil_NAME} + DEPENDS ${python_NAME} ${six_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + URL ${python-dateutil_URL} + URL_MD5 ${python-dateutil_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${python-dateutil_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT python-dateutil_NAME) \ No newline at end of file From ad1fa45969e39b0ccc5f2420b40dbe4e208315e7 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:11:02 -0400 Subject: [PATCH 051/220] pyparsing: Added pyparsing. Provides a Python implementation of a parser. Used by Matplotlib. --- pyparsing.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pyparsing.cmake diff --git a/pyparsing.cmake b/pyparsing.cmake new file mode 100644 index 0000000..fe4084e --- /dev/null +++ b/pyparsing.cmake @@ -0,0 +1,39 @@ +# Pyparsing is a dependency of matplotlib. +# Used to render formulae. + +if (NOT pyparsing_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (pyparsing + 2.0.1 + pyparsing-2.0.1.tar.gz + 37adec94104b98591507218bc82e7c31 + https://pypi.python.org/packages/source/p/pyparsing/) + + +# Download and install pyparsing +message ("Installing ${pyparsing_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pyparsing_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pyparsing_URL} + URL_MD5 ${pyparsing_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pyparsing_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pyparsing_NAME) \ No newline at end of file From a296d3168dbc36b8301582ba35d796c0c7508db2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:13:21 -0400 Subject: [PATCH 052/220] backports-ssl_match_hostname: Added backports-ssl_match_hostname. Provides match_hostname from Python 3 for Python 2. Required for tornado, which is used by both Matplotlib and iPython. --- backports-ssl_match_hostname.cmake | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 backports-ssl_match_hostname.cmake diff --git a/backports-ssl_match_hostname.cmake b/backports-ssl_match_hostname.cmake new file mode 100644 index 0000000..8e66869 --- /dev/null +++ b/backports-ssl_match_hostname.cmake @@ -0,0 +1,37 @@ +# Provides match_hostname from Python 3 for Python 2. +# Required by tornado. + +if (NOT backports-ssl_match_hostname_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) + +external_source(backports-ssl_match_hostname + 3.4.0.2 + backports.ssl_match_hostname-3.4.0.2.tar.gz + 788214f20214c64631f0859dc79f23c6 + https://pypi.python.org/packages/source/b/backports.ssl_match_hostname/) + +message ("Installing ${backports-ssl_match_hostname_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${backports-ssl_match_hostname_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${backports-ssl_match_hostname_URL} + URL_MD5 ${backports-ssl_match_hostname_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${backports-ssl_match_hostname_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT backports-ssl_match_hostname_NAME) \ No newline at end of file From 97f0a5a0959fc6cb5d92257db861b05e24bfface Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:15:45 -0400 Subject: [PATCH 053/220] tornado: Added tornado, which is a web framework and asynchronous networking library. Required by Matplotlib and iPython. --- tornado.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tornado.cmake diff --git a/tornado.cmake b/tornado.cmake new file mode 100644 index 0000000..aa1d766 --- /dev/null +++ b/tornado.cmake @@ -0,0 +1,39 @@ +# Web framework and asynchronous networking library (from their intro). +# Required by Matplotlib and iPython. + +if (NOT tornado_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (backports-ssl_match_hostname) + + +external_git_repo(tornado + v3.1.1 # f36652d47fc42205c085ed65e740f4b155d4e5e4 + https://github.com/facebook/tornado) + + +# Download and install tornado +message ("Installing ${tornado_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${tornado_NAME} + DEPENDS ${python_NAME} ${backports-ssl_match_hostname} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${tornado_URL} + GIT_TAG ${tornado_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${tornado_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT tornado_NAME) \ No newline at end of file From 0086fe0e8e2127eb3e70de494e643371ba681ed8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:18:11 -0400 Subject: [PATCH 054/220] matplotlib: Missing various dependencies, which now have their own cmake files ( six, pytz, python-dateutil, pyparsing, tornado ). These have now been included and added as dependencies. Did not add PyCXX or LibAgg as they are bundled with Matplotlib and we would rather use the version they have tested against as we don't use them elsewhere yet. Updated the comments to reflect this information. Should consider updating to a more recent version of Matplotlib, but that was not done here. --- matplotlib.cmake | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index 8836207..a1ac7dc 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -1,5 +1,9 @@ # -# Install matplotlib library from source +# Install matplotlib library from source. +# Includes dependencies to try to avoid use of easy_install, which matplotlib will try. +# +# However, we will let matplotlib install its own copy of PyCXX and LibAgg, which it comes prepackaged with. +# This will help avoid incompatibilities. Also, some version PyCXX are not compatible with some versions of Python. # if (NOT matplotlib_NAME) @@ -12,9 +16,15 @@ include (BuildSupport) include (TemplateSupport) include (python) +include (six) +include (setuptools) +include (pytz) +include (python-dateutil) +include (pyparsing) include (numpy) include (libpng) include (freetype2) +include (tornado) external_source (matplotlib 1.1.1 @@ -24,7 +34,7 @@ external_source (matplotlib message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} - DEPENDS ${python_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} + DEPENDS ${python_NAME} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${tornado_NAME} PREFIX ${BUILDEM_DIR} URL ${matplotlib_URL} URL_MD5 ${matplotlib_MD5} From 19605aaf936c9635aa611a0ad85b1d8558b39784 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:33:06 -0400 Subject: [PATCH 055/220] matplotlib: Added PyQt4 as a dependency as Matplotlib should use the Qt backend. --- matplotlib.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index a1ac7dc..d08062a 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -16,6 +16,7 @@ include (BuildSupport) include (TemplateSupport) include (python) +include (pyqt4) include (six) include (setuptools) include (pytz) @@ -34,7 +35,7 @@ external_source (matplotlib message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} - DEPENDS ${python_NAME} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${tornado_NAME} + DEPENDS ${python_NAME} ${pyqt4} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${tornado_NAME} PREFIX ${BUILDEM_DIR} URL ${matplotlib_URL} URL_MD5 ${matplotlib_MD5} From 68b4ee0f9083d5045f527f935fec626c0a2bedca Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:42:33 -0400 Subject: [PATCH 056/220] sphinx: Added sphinx. Generates nice documentation from docstrings. sphinxcontrib-napoleon: Added the third party Sphinx extension napoleon. This allows docstrings to be formatted using Google style or Numpy style. Both are very readable as docstrings. Also, it parses them in a way that Sphinx can handle for generating documentation. --- sphinx.cmake | 39 +++++++++++++++++++++++++++++++++++ sphinxcontrib-napoleon.cmake | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 sphinx.cmake create mode 100644 sphinxcontrib-napoleon.cmake diff --git a/sphinx.cmake b/sphinx.cmake new file mode 100644 index 0000000..3033893 --- /dev/null +++ b/sphinx.cmake @@ -0,0 +1,39 @@ +# Provide nice Python documentation output. +# Used by Spyder and iPython. + +if (NOT sphinx_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (sphinx + 1.2.2 + Sphinx-1.2.2.tar.gz + 3dc73ccaa8d0bfb2d62fb671b1f7e8a4 + https://pypi.python.org/packages/source/S/Sphinx/) + + +# Download and install sphinx +message ("Installing ${sphinx_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sphinx_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sphinx_URL} + URL_MD5 ${sphinx_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sphinx_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sphinx_NAME) \ No newline at end of file diff --git a/sphinxcontrib-napoleon.cmake b/sphinxcontrib-napoleon.cmake new file mode 100644 index 0000000..73b2be0 --- /dev/null +++ b/sphinxcontrib-napoleon.cmake @@ -0,0 +1,40 @@ +# Extends Sphinx to add support for Google style and Numpy style documentation. +# Much easier on the eyes and brain than Sphinx. + +if (NOT sphinxcontrib-napoleon_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (sphinx) + +external_source (sphinxcontrib-napoleon + 0.2.7 + sphinxcontrib-napoleon-0.2.7.tar.gz + 001ee10b53eba1361738ed126cd6deb2 + https://pypi.python.org/packages/source/s/sphinxcontrib-napoleon/) + + +# Download and install sphinxcontrib-napoleon +message ("Installing ${sphinxcontrib-napoleon_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sphinxcontrib-napoleon_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sphinxcontrib-napoleon_URL} + URL_MD5 ${sphinxcontrib-napoleon_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sphinxcontrib-napoleon_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sphinxcontrib-napoleon_NAME) \ No newline at end of file From 3f1d2c963bc90d1f67e54a29f3b27104455104ba Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:47:39 -0400 Subject: [PATCH 057/220] readline: Added a cmake to build and install the right readline for Mac or Windows using anyreadline. Required by iPython. --- readline.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 readline.cmake diff --git a/readline.cmake b/readline.cmake new file mode 100644 index 0000000..4b14958 --- /dev/null +++ b/readline.cmake @@ -0,0 +1,40 @@ +# Pulls down the right readline depending on whether it is Windows or Mac using anyreadline. +# Does nothing on Linux as it should have GNU readline. +# +# Required by iPython. + + +if (NOT readline_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (setuptools) + +external_git_repo(readline + v0_1_1 #0796d3eaa9158f6ac82b7f8eea96f372851b79e3 + https://github.com/pombredanne/anyreadline) + +message ("Installing ${readline_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${readline_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${readline_URL} + GIT_TAG ${readline_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${readline_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT readline_NAME) From 8f9a3977d5fcefcb9667ea05314bceaafdf3b99f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:50:58 -0400 Subject: [PATCH 058/220] zeromq: Added zeromq. Provides an asynchronous message passing implementation. Need by iPython. pyzmq: Added pyzmq. Provides Python bindings to ZeroMQ. Used by iPython. --- pyzmq.cmake | 38 ++++++++++++++++++++++++++++++++++++++ zeromq.cmake | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 pyzmq.cmake create mode 100644 zeromq.cmake diff --git a/pyzmq.cmake b/pyzmq.cmake new file mode 100644 index 0000000..a57738b --- /dev/null +++ b/pyzmq.cmake @@ -0,0 +1,38 @@ +# Provides Python bindings for ZeroMQ. +# Required for iPython. + +if (NOT pyzmq_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) +include(zeromq) + + +external_git_repo(pyzmq + v14.0.1 # 28b5bef764cbe87518b589df54f6f7f5ed50964d + https://github.com/zeromq/pyzmq) + + +message ("Installing ${pyzmq_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${pyzmq_NAME} + DEPENDS ${python_NAME} ${zeromq_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${pyzmq_URL} + GIT_TAG ${pyzmq_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py configure --zmq=${BUILDEM_DIR} + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pyzmq_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pyzmq_NAME) \ No newline at end of file diff --git a/zeromq.cmake b/zeromq.cmake new file mode 100644 index 0000000..c4cfbe1 --- /dev/null +++ b/zeromq.cmake @@ -0,0 +1,33 @@ +# A standard asynchronous message passing library. +# Required by pyzmq, which is used by iPython. + +if (NOT zeromq_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +external_source (zeromq + 3.2.4 + zeromq-3.2.4.tar.gz + 39af2d41e3fb744b98d7999e291e05dc + http://download.zeromq.org/) + +message ("Installing ${zeromq_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${zeromq_NAME} + PREFIX ${BUILDEM_DIR} + URL ${zeromq_URL} + URL_MD5 ${zeromq_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ./configure --prefix ${BUILDEM_DIR} + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${zeromq_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT zeromq_NAME) \ No newline at end of file From 2b968f1faf5926a1beed909dbc10ad59b3d2377f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:54:28 -0400 Subject: [PATCH 059/220] nose: Added comment to reflect iPython dependency. --- nose.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/nose.cmake b/nose.cmake index 68c7b95..28861ee 100644 --- a/nose.cmake +++ b/nose.cmake @@ -1,5 +1,6 @@ # # Install nose library from source. +# Dependency for iPython amongst other things. # if (NOT nose_NAME) From 9462b7ffa4bdc80a539a8dca8e77e85ea536f0dd Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:56:39 -0400 Subject: [PATCH 060/220] pygments: Added. Provides syntax highlighting support in Python. Used by iPython. --- pygments.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pygments.cmake diff --git a/pygments.cmake b/pygments.cmake new file mode 100644 index 0000000..a77c4b0 --- /dev/null +++ b/pygments.cmake @@ -0,0 +1,37 @@ +# Provides syntax highlighting support for Python. +# Required by iPython. Also, used by Spyder. + +if (NOT pygments_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) + +external_source (pygments + 1.6 + Pygments-1.6.tar.gz + a18feedf6ffd0b0cc8c8b0fbdb2027b1 + https://pypi.python.org/packages/source/P/Pygments/) + +message ("Installing ${pygments_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${pygments_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pygments_URL} + URL_MD5 ${pygments_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pygments_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pygments_NAME) \ No newline at end of file From 7427e7ca4864d3bbc33fecb6cd7a600be3fe3e67 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:00:24 -0400 Subject: [PATCH 061/220] jinja: Added comment to reflect iPython dependency. --- jinja.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jinja.cmake b/jinja.cmake index 3d9e0e4..7332838 100644 --- a/jinja.cmake +++ b/jinja.cmake @@ -1,5 +1,6 @@ # -# Install jinja library from source +# Install jinja library from source. +# Required by iPython. # if (NOT jinja_NAME) From d3e9bfad51ef85affeacc39b5ce3d131c665bde2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:03:12 -0400 Subject: [PATCH 062/220] ipython: Added iPython and dependencies. This includes install readline in a compatiable way for Mac and Windows. Uses the 1.2.1 ( last of version 1 ). --- ipython.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ipython.cmake diff --git a/ipython.cmake b/ipython.cmake new file mode 100644 index 0000000..ac02613 --- /dev/null +++ b/ipython.cmake @@ -0,0 +1,44 @@ +# Standard of Python interactive programming. +# Required by Spyder. + +if (NOT ipython_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) +include (pyqt4) +include (sphinxcontrib-napoleon) # For sphinx extension. Doesn't necessarily need napolean, but it is nice to have and is quick to install. +include (readline) +include (pyzmq) +include (nose) +include (pygments) +include (tornado) +include (jinja) + + +external_git_repo(ipython + rel-1.2.1 #9c4f59ddd54d797072d28d2d5549bc5ea234216d + https://github.com/ipython/ipython/) + +message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${ipython_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${readline_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${ipython_URL} + GIT_TAG ${ipython_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${ipython_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT ipython_NAME) \ No newline at end of file From beb32d23bf259a61cf42dd61c1fadaab11c518ed Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:08:36 -0400 Subject: [PATCH 063/220] patsy: Uses a mini-language for formulae in a way similar to R/S. Used by pandas and hence statsmodels. --- patsy.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 patsy.cmake diff --git a/patsy.cmake b/patsy.cmake new file mode 100644 index 0000000..2bced69 --- /dev/null +++ b/patsy.cmake @@ -0,0 +1,44 @@ +# A statistical models library. Uses a formula mini-language that is similar to R and S. +# +# Required by statsmodels, which is used by pandas. +# All dependencies included as already present. + + +if (NOT patsy_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (numpy) +include (scipy) +include (nose) + + +external_git_repo(patsy + v0.2.1 #93ee6dcc75f7fd97e4ff46b4cf2688a013c3af40 + https://github.com/pydata/patsy/) + + +message ("Installing ${patsy_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${patsy_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${scipy_NAME} ${nose_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${patsy_URL} + GIT_TAG ${patsy_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${patsy_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT patsy_NAME) From f54dd62997c06d1cb425fe4c59090d73c906dc5f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:10:43 -0400 Subject: [PATCH 064/220] numexpr: An acceleration library for use with NumPy. --- numexpr.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 numexpr.cmake diff --git a/numexpr.cmake b/numexpr.cmake new file mode 100644 index 0000000..e7a7de4 --- /dev/null +++ b/numexpr.cmake @@ -0,0 +1,41 @@ +# An acceleration library for use with NumPy. +# +# Used by pandas. However, it is useful by itself. + + +if (NOT numexpr_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (numpy) +include (scipy) +include (nose) + +external_git_repo(numexpr + v2.3.1 #aba0e0a1ff1edc4cc8c82024dee1693c06aa1336 + https://github.com/pydata/numexpr) + +message ("Installing ${numexpr_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${numexpr_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${numexpr_URL} + GIT_TAG ${numexpr_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" # Would like to run this test however. Import doesn't necessarily work during build. ${BUILDEM_ENV_STRING} ${PYTHON_EXE} -c "import numexpr; numexpr.test()" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${numexpr_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT numexpr_NAME) From b6b19bcf0b3a30d9e4baed74f1eb3c144703678c Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:11:52 -0400 Subject: [PATCH 065/220] bottleneck: Added bottleneck, which speeds up some corner cases with NumPy. In particular, when nan values are present. --- bottleneck.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bottleneck.cmake diff --git a/bottleneck.cmake b/bottleneck.cmake new file mode 100644 index 0000000..0aa290c --- /dev/null +++ b/bottleneck.cmake @@ -0,0 +1,41 @@ +# Provides functions to deal with nan in NumPy arrays efficiently. +# +# Required by pandas. + + +if (NOT bottleneck_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (numpy) +include (scipy) +include (nose) + +external_git_repo(bottleneck + v0.7.0 #4042977fa716f127a2074de011b9ef84caf2e965 + https://github.com/kwgoodman/bottleneck) + +message ("Installing ${bottleneck_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${bottleneck_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${scipy_NAME} ${nose_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${bottleneck_URL} + GIT_TAG ${bottleneck_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${bottleneck_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT bottleneck_NAME) From 5dcabacaa5aad3f8a1cf008e9dddeb53e8d9a2ea Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:14:42 -0400 Subject: [PATCH 066/220] pandas: Data analysis library. Part of SciPy stack. Used in particular for linear analysis. Included essential dependencies. Did not include optional dependencies to deal with input and output formats ( e.g. Excel, Amazon, PyTables ) nor were any parsers included ( e.g. any version BeautifulSoup ). Regardless, actual analytical operations should work. --- pandas.cmake | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pandas.cmake diff --git a/pandas.cmake b/pandas.cmake new file mode 100644 index 0000000..250edb2 --- /dev/null +++ b/pandas.cmake @@ -0,0 +1,50 @@ +# Data analysis (primarily linear) for Python. Part of the SciPy Stack. +# +# Includes essential dependencies and optional ones that were already included. +# Optional ones have not been included (i.e. Any data reading stuff Excel, Amazon, PyTables) or fancy HTML parsers (i.e. BeautifulSoupX). +# Required by statsmodels. + + +if (NOT pandas_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (cython) +include (python-dateutil) +include (pytz) +include (numpy) +include (scipy) +include (matplotlib) +include (numexpr) +include (bottleneck) + + +external_git_repo(pandas + v0.12.0 #8c0a34f15f8a87def3f7ad6ebdac052de44669f2 + https://github.com/pydata/pandas) + + +message ("Installing ${pandas_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${pandas_NAME} + DEPENDS ${python_NAME} ${cython_NAME} ${python-dateutil_NAME} ${pytz_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${numexpr_NAME} ${bottleneck_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${pandas_URL} + GIT_TAG ${pandas_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pandas_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pandas_NAME) From 8914e34c232f536daad3a75928f048d4386dcef9 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:18:04 -0400 Subject: [PATCH 067/220] statsmodels: Builds on pandas ( actually depends on it as well ). Provides more advanced statistical analysis. --- statsmodels.cmake | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 statsmodels.cmake diff --git a/statsmodels.cmake b/statsmodels.cmake new file mode 100644 index 0000000..0aa413f --- /dev/null +++ b/statsmodels.cmake @@ -0,0 +1,46 @@ +# A statistical analysis library that builds on pandas. +# +# Used in pandas place in the SciPy Stack as it requires pandas and extends in +# many ways. + + +if (NOT statsmodels_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (cython) +include (nose) +include (numpy) +include (scipy) +include (matplotlib) +include (patsy) +include (pandas) + +external_git_repo(statsmodels + v0.5.0 #82e027e91cac47cfcfbcab754a244731cd726f06 + https://github.com/statsmodels/statsmodels) + +message ("Installing ${statsmodels_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${statsmodels_NAME} + DEPENDS ${python_NAME} ${cython_NAME} ${nose_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${patsy_NAME} ${pandas_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${statsmodels_URL} + GIT_TAG ${statsmodels_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${statsmodels_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT statsmodels_NAME) From 680415692de9483e678798b7fa65ba743b9fae9d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:22:44 -0400 Subject: [PATCH 068/220] mpc: Added mpc, which is commonly used in conjunction with gmp and mpfr ( already included ). This is also required by gmpy, which provides Python bindings to these three libraries to allow the use of large precision numbers with high efficiency. --- mpc.cmake | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 mpc.cmake diff --git a/mpc.cmake b/mpc.cmake new file mode 100644 index 0000000..8deb742 --- /dev/null +++ b/mpc.cmake @@ -0,0 +1,45 @@ +# A useful addition to gmp and mpfr, which were already included. +# +# Required by gmpy. + +if (NOT mpc_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (PatchSupport) + +include (gmp) +include (mpfr) + +external_source (mpc + 1.0.2 + mpc-1.0.2.tar.gz + 68fadff3358fb3e7976c7a398a0af4c3 + ftp://ftp.gnu.org/gnu/mpc/) + +message ("Installing ${mpc_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${mpc_NAME} + DEPENDS ${gmp_NAME} ${mpfr_NAME} + PREFIX ${BUILDEM_DIR} + URL ${mpc_URL} + URL_MD5 ${mpc_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${mpc_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + --with-gmp=${BUILDEM_DIR} # Standard. See http://code.google.com/p/gmpy/wiki/InstallingGmpy2 + --with-mpfr=${BUILDEM_DIR} # Standard. See http://code.google.com/p/gmpy/wiki/InstallingGmpy2 + LDFLAGS=${BUILDEM_LDFLAGS} + CPPFLAGS=-I${BUILDEM_DIR}/include + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${mpc_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT mpc_NAME) \ No newline at end of file From 7b0a32c1dae8e681f0879816898707b0d48c6119 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:25:38 -0400 Subject: [PATCH 069/220] gmpy: Provides Python bindings to gmp, mpfr, and mpc. In short, allows high precision numbers in Python. --- gmpy.cmake | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 gmpy.cmake diff --git a/gmpy.cmake b/gmpy.cmake new file mode 100644 index 0000000..44ea9ce --- /dev/null +++ b/gmpy.cmake @@ -0,0 +1,46 @@ +# Python bindings to the very versatile, established gmp, mpfr, and mpc. +# +# Used by SymPy. Though, can be used independently. + + +if (NOT gmpy_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (gmp) +include (mpfr) +include (mpc) + + +external_source (gmpy + 2.0.3 + gmpy2-2.0.3.zip + 63f367b4dceb20dcd72c143e7c9a8632 + http://gmpy.googlecode.com/files/ + FORCE) + + +message ("Installing ${gmpy_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${gmpy_NAME} + DEPENDS ${python_NAME} ${gmp_NAME} ${mpfr_NAME} ${mpc_NAME} + PREFIX ${BUILDEM_DIR} + URL ${gmpy_URL} + URL_MD5 ${gmpy_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build --prefix=${BUILDEM_DIR} + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install --prefix=${BUILDEM_DIR} +) + +set_target_properties(${gmpy_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT gmpy_NAME) From d2188be5bbebfe696ef71cd600c8a02c8b118b85 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:28:15 -0400 Subject: [PATCH 070/220] sympy: Provides support for symbolic on top of numeric calculations. Provides support for high precision calculation using gmpy with its bindings to gmp, mpfr, and mpc. Part of the SciPy stack. --- sympy.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sympy.cmake diff --git a/sympy.cmake b/sympy.cmake new file mode 100644 index 0000000..d103635 --- /dev/null +++ b/sympy.cmake @@ -0,0 +1,41 @@ +# Provides symbolic algebra support for Python. Part of the scipy stack. + + +if (NOT sympy_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (cython) +include (gmpy) +include (numpy) +include (scipy) +include (ipython) + +external_git_repo(sympy + sympy-0.7.3 #f44c2c6afb1eaf5f1071b49bcd147e0d6197923a + https://github.com/sympy/sympy) + +message ("Installing ${sympy_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${sympy_NAME} + DEPENDS ${python_NAME} ${cython_NAME} ${gmpy_NAME} ${numpy_NAME} ${scipy_NAME} ${ipython_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${sympy_URL} + GIT_TAG ${sympy_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sympy_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sympy_NAME) From 251ec6feca871e478b10c986853afe05d870e7b8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:31:01 -0400 Subject: [PATCH 071/220] sympy: Corrected comment. --- sympy.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sympy.cmake b/sympy.cmake index d103635..9505cae 100644 --- a/sympy.cmake +++ b/sympy.cmake @@ -1,4 +1,4 @@ -# Provides symbolic algebra support for Python. Part of the scipy stack. +# Provides symbolic algebra support for Python. Part of the SciPy stack. if (NOT sympy_NAME) From d1161f6297c7e75106f3f02e0bf5252ebb04a76d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:52:15 -0400 Subject: [PATCH 072/220] pep8: Added. Provides support for PEP8. --- pep8.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pep8.cmake diff --git a/pep8.cmake b/pep8.cmake new file mode 100644 index 0000000..5110950 --- /dev/null +++ b/pep8.cmake @@ -0,0 +1,37 @@ +# Provides support for PEP8. +# Required by Spyder. + +if (NOT pep8_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_git_repo(pep8 + 1.5.6 #96290d48b1334fe8542666174d7775cda3f46d9a + https://github.com/jcrocholl/pep8) + + +# Download and install pep8 +message ("Installing ${pep8_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pep8_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${pep8_URL} + GIT_TAG ${pep8_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pep8_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pep8_NAME) \ No newline at end of file From 9ddd88c0fccd89ddfb754c92a17dfbc5e0fc61ed Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:52:57 -0400 Subject: [PATCH 073/220] pyflakes: A passive Python analyzer and error detector. Used by Spyder. --- pyflakes.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pyflakes.cmake diff --git a/pyflakes.cmake b/pyflakes.cmake new file mode 100644 index 0000000..4883974 --- /dev/null +++ b/pyflakes.cmake @@ -0,0 +1,39 @@ +# A passive Python analyzer and error detector. +# Required by Spyder. + +if (NOT pyflakes_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (pyflakes + 1.1.0 + pyflakes-0.8.1.tar.gz + 905fe91ad14b912807e8fdc2ac2e2c23 + https://pypi.python.org/packages/source/p/pyflakes/) + + +# Download and install pyflakes +message ("Installing ${pyflakes_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pyflakes_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pyflakes_URL} + URL_MD5 ${pyflakes_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pyflakes_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pyflakes_NAME) \ No newline at end of file From 9695aadca9f7258ecc83cc7215b490ea576d39d7 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:54:21 -0400 Subject: [PATCH 074/220] pylint: Python analyzer and error detector. Also, checks for bad smells. Used by Spyder. --- pylint.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pylint.cmake diff --git a/pylint.cmake b/pylint.cmake new file mode 100644 index 0000000..6d44517 --- /dev/null +++ b/pylint.cmake @@ -0,0 +1,39 @@ +# Another Python code analyzer and error detector like pyflakes. Also, checks for bad smells. +# Required by Spyder. + +if (NOT pylint_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (pylint + 1.1.0 + pylint-1.1.0.tar.gz + 017299b5911838a9347a71de5f946afc + https://pypi.python.org/packages/source/p/pylint) + + +# Download and install pylint +message ("Installing ${pylint_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pylint_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pylint_URL} + URL_MD5 ${pylint_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pylint_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pylint_NAME) \ No newline at end of file From 8f9f3b100fdfb6decb2d7971cb16a9944887d8d8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:55:50 -0400 Subject: [PATCH 075/220] rope: Added to provide refactoring support for Python. Used by Spyder. --- rope.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 rope.cmake diff --git a/rope.cmake b/rope.cmake new file mode 100644 index 0000000..888ad3b --- /dev/null +++ b/rope.cmake @@ -0,0 +1,39 @@ +# Refactoring for Python. +# Required by Spyder. + +if (NOT rope_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (rope + 0.9.4 + rope-0.9.4.tar.gz + 6c654c6892f78008e04e2d65f9f859bb + https://pypi.python.org/packages/source/r/rope/) + + +# Download and install rope +message ("Installing ${rope_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${rope_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${rope_URL} + URL_MD5 ${rope_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${rope_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT rope_NAME) \ No newline at end of file From b2c16b454e7b674b6d6578b3c8d0f581f89533ef Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 17:01:32 -0400 Subject: [PATCH 076/220] spyder: Added Spyder. However, it currently is broken. Until WebKit is added back to Qt and PyQt, it will remain broken. It raises an error message to this effect if anyone tries to build it. If WebKit is fixed, feel free to comment the error message and try out the build. --- spyder.cmake | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 spyder.cmake diff --git a/spyder.cmake b/spyder.cmake new file mode 100644 index 0000000..f8ecd16 --- /dev/null +++ b/spyder.cmake @@ -0,0 +1,57 @@ +# A MATLAB styled IDE for Python. +# +# Would be nice if this worked. However, it requires QtWebKit, which is currently broken. QtWebKit does not build cleanly and may require patches to Qt and/or PyQt. +# + + +message(FATAL_ERROR "Spyder does not currently work. Though it can build, it requires features from Qt and PyQt that are not currently supported. In particular, it needs to QtWebKit.") + + +if (NOT spyder_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) +include (pep8) +include (pyqt4) +include (sphinxcontrib-napoleon) # Nice Sphinx docs +include (nose) +include (rope) +include (pyflakes) +include (pygments) +include (pylint) +include (psutil) +include (ipython) + + +external_source (spyder + 2.2.5 + spyder-2.2.5.zip + 1c9aa650dae9f883616e917803f8a3be + https://bitbucket.org/spyder-ide/spyderlib/downloads) + + +# Download and install spyder +message ("Installing ${spyder_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${spyder_NAME} + DEPENDS ${python_NAME} ${pep8_NAME} ${pyqt4_NAME} ${sphinxcontrib-napoleon} ${nose_NAME} ${rope_NAME} ${pyflakes_NAME} ${pygments_NAME} ${pylint_NAME} ${psutil_NAME} ${ipython_NAME} + PREFIX ${BUILDEM_DIR} + URL ${spyder_URL} + URL_MD5 ${spyder_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${spyder_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT spyder_NAME) \ No newline at end of file From 6e6fc7193003205411bc35ec41de7ba009343459 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 17:12:02 -0400 Subject: [PATCH 077/220] scipy-stack: Provides a custom target for installing the full SciPy stack. Includes everything in the SciPy stack and in a few cases a little extra. Does not include Spyder. --- scipy-stack.cmake | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scipy-stack.cmake diff --git a/scipy-stack.cmake b/scipy-stack.cmake new file mode 100644 index 0000000..a16468d --- /dev/null +++ b/scipy-stack.cmake @@ -0,0 +1,32 @@ +# Pseudo-package for installing the full SciPy stack. + +if (NOT scipy-stack_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +scipy-stack_NAME = "scipy-stack" + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) +include (sphinxcontrib-napoleon) # Nice Sphinx docs +include (pyqt4) +include (numpy) +include (scipy) +include (matplotlib) +include (statsmodels) # Includes pandas as a dependency +include (scikit-image) +include (scikit-learn) +include (sympy) # Pulls in gmpy2 +include (ipython) +include (nose) + + +add_custom_target(scipy-stack + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} +) + +endif (NOT scipy-stack_NAME) \ No newline at end of file From c5fd53a361e9b821670688910d24ce6fc5727057 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 18:11:06 -0400 Subject: [PATCH 078/220] gmp: Add / after url. --- gmp.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gmp.cmake b/gmp.cmake index 27602f5..32c9b8c 100644 --- a/gmp.cmake +++ b/gmp.cmake @@ -15,7 +15,7 @@ external_source (gmp 5.0.5 gmp-5.0.5.tar.bz2 041487d25e9c230b0c42b106361055fe - ftp://ftp.gnu.org/gnu/gmp) + ftp://ftp.gnu.org/gnu/gmp/) message ("Installing ${gmp_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${gmp_NAME} From cc1a6a61452720a5bd1291dcc0139212141bef3b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 18:46:37 -0400 Subject: [PATCH 079/220] pylint: Add / after url. --- pylint.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylint.cmake b/pylint.cmake index 6d44517..a21a7d9 100644 --- a/pylint.cmake +++ b/pylint.cmake @@ -15,7 +15,7 @@ external_source (pylint 1.1.0 pylint-1.1.0.tar.gz 017299b5911838a9347a71de5f946afc - https://pypi.python.org/packages/source/p/pylint) + https://pypi.python.org/packages/source/p/pylint/) # Download and install pylint From e7f691dc64db3622efc814bfde385824cab6efb5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 18:47:21 -0400 Subject: [PATCH 080/220] python-dateutil: Add / after URL. --- python-dateutil.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-dateutil.cmake b/python-dateutil.cmake index c72f98a..cd11047 100644 --- a/python-dateutil.cmake +++ b/python-dateutil.cmake @@ -17,7 +17,7 @@ external_source (python-dateutil 1.5 python-dateutil-1.5.tar.gz 35f3732db3f2cc4afdc68a8533b60a52 - https://labix.org/download/python-dateutil) + https://labix.org/download/python-dateutil/) # Download and install python-dateutil From 53c7ee45c7e7daf2e73119994a060f57f402eee7 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 18:48:35 -0400 Subject: [PATCH 081/220] spyder: Add / after URL. --- spyder.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spyder.cmake b/spyder.cmake index f8ecd16..9dd566e 100644 --- a/spyder.cmake +++ b/spyder.cmake @@ -33,7 +33,7 @@ external_source (spyder 2.2.5 spyder-2.2.5.zip 1c9aa650dae9f883616e917803f8a3be - https://bitbucket.org/spyder-ide/spyderlib/downloads) + https://bitbucket.org/spyder-ide/spyderlib/downloads/) # Download and install spyder From 72fc1fbde1866fbde3fc36b9cacf5b706ac74ee2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 19:26:10 -0400 Subject: [PATCH 082/220] mpfr: Link used for downloading mpfr no longer works. Added a new one that does work. Verified that the md5 is a match. --- mpfr.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpfr.cmake b/mpfr.cmake index 2fbe10a..50008dc 100644 --- a/mpfr.cmake +++ b/mpfr.cmake @@ -18,7 +18,7 @@ external_source (mpfr 3.1.1 mpfr-3.1.1.tar.gz 769411e241a3f063ae1319eb5fac2462 - http://www.mpfr.org/mpfr-current/) + ftp://ftp.gnu.org/gnu/mpfr/) message ("Installing ${mpfr_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${mpfr_NAME} From afe3fac715bb9a687bcd58a20bceba7244d37eb8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 22:18:43 -0400 Subject: [PATCH 083/220] scipy-stack: Fixed a variable not being set correctly. --- scipy-stack.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scipy-stack.cmake b/scipy-stack.cmake index a16468d..6547753 100644 --- a/scipy-stack.cmake +++ b/scipy-stack.cmake @@ -4,7 +4,7 @@ if (NOT scipy-stack_NAME) CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -scipy-stack_NAME = "scipy-stack" +set(scipy-stack_NAME "scipy-stack") include (ExternalProject) include (ExternalSource) From a4d5559a2a9d5b1a45826db977043069d29e2669 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 23 Apr 2014 17:07:12 -0400 Subject: [PATCH 084/220] openblas: Replaced head by working commit. Removed TARGET specification (seems to be working without it). README_openblas: Added README to for openblas to explain TARGET specification and point to further information. --- README_openblas.txt | 7 +++++++ openblas.cmake | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 README_openblas.txt diff --git a/README_openblas.txt b/README_openblas.txt new file mode 100644 index 0000000..6bef511 --- /dev/null +++ b/README_openblas.txt @@ -0,0 +1,7 @@ +If you are having trouble building OpenBLAS out of the box, you may need to specify your CPU Architecture. +Common architecture options include SandyBridge and Haswell. They can be specified by using the TARGET flag. +For example, TARGET=SANDYBRIDGE will build for the SandyBridge architecture. Similarly, TARGET=HASWELL will +target the Haswell (or Crystalwell) architecture(s). More information can be found on the OpenBLAS GitHub +webpage located ( https://github.com/xianyi/OpenBLAS/ ) here. To do this simply modify the BUILD_COMMAND to +include this flag ____after____ the call to $(MAKE) as it must be an argument to make. It is recommend the +same be done for the INSTALL_COMMAND as well. \ No newline at end of file diff --git a/openblas.cmake b/openblas.cmake index 4fc2ce2..0724059 100644 --- a/openblas.cmake +++ b/openblas.cmake @@ -10,8 +10,7 @@ include (ExternalProject) include (ExternalSource) external_git_repo (openblas - #v0.2.8 - HEAD + 4d42368214f2fd102b2d163c086e0f2d8c166dc6 https://github.com/xianyi/OpenBLAS) message ("Installing ${openblas_NAME} into ilastik build area: ${BUILDEM_DIR} ...") @@ -23,11 +22,11 @@ ExternalProject_Add(${openblas_NAME} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND "" - # Added Sandybridge target. This is required for SandyBridge architecture. It also will optimize for Haswell architechture, which includes Clearwell. - BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) NO_AVX=1 NO_AFFINITY=1 TARGET=SANDYBRIDGE -j8 + # Add TARGET=xxx (where xxx is an architecture) to the BUILD_COMMAND to optimize and/or avoid particular build errors. See README_openblas.txt for details. + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) NO_AVX=1 NO_AFFINITY=1 -j8 BUILD_IN_SOURCE 1 - # Added Sandybridge target. This is required for SandyBridge architecture. It also will optimize for Haswell architechture, which includes Clearwell. - INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PREFIX=${BUILDEM_DIR} TARGET=SANDYBRIDGE install && + # Add TARGET=xxx (where xxx is an architecture) to the BUILD_COMMAND to optimize and/or avoid particular build errors. See README_openblas.txt for details. + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PREFIX=${BUILDEM_DIR} install && ln -fs libopenblas.so ${BUILDEM_DIR}/lib/libblas.so && ln -fs libopenblas.so ${BUILDEM_DIR}/lib/liblapack.so ) From 476ab119d558c23b3bc858011cc42cb5d06ff6d5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 23 Apr 2014 17:34:07 -0400 Subject: [PATCH 085/220] README_openblas: Added more details about default TARGET (NEHALEM) and a link to a list of architectures options for TARGET in the OpenBLAS repo. Broke up the contents a nicer more reader friendly way. --- README_openblas.txt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README_openblas.txt b/README_openblas.txt index 6bef511..17a311b 100644 --- a/README_openblas.txt +++ b/README_openblas.txt @@ -1,7 +1,15 @@ If you are having trouble building OpenBLAS out of the box, you may need to specify your CPU Architecture. -Common architecture options include SandyBridge and Haswell. They can be specified by using the TARGET flag. -For example, TARGET=SANDYBRIDGE will build for the SandyBridge architecture. Similarly, TARGET=HASWELL will -target the Haswell (or Crystalwell) architecture(s). More information can be found on the OpenBLAS GitHub -webpage located ( https://github.com/xianyi/OpenBLAS/ ) here. To do this simply modify the BUILD_COMMAND to -include this flag ____after____ the call to $(MAKE) as it must be an argument to make. It is recommend the -same be done for the INSTALL_COMMAND as well. \ No newline at end of file +Common architecture options include SandyBridge and Haswell. Even if your build worked correctly, it may +not be optimal. The default architecture, if not specified, is Nehalem, which is probably not the ideal +choice unless using an older computer. + +To specify the architecture simply use the TARGET flag. For example, TARGET=SANDYBRIDGE will build for +the SandyBridge architecture. Similarly, TARGET=HASWELL will target the Haswell (or Crystalwell) +architecture(s). To do this simply modify the BUILD_COMMAND to include this flag ____after____ the call +to $(MAKE) as it must be an argument to make. It is recommend the same be done for the INSTALL_COMMAND +as well. + +More information can be found on the OpenBLAS GitHub webpage ( https://github.com/xianyi/OpenBLAS/ ). A list +of architectures supported can be found here ( https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt ). +Note that at the time of writing this READNME, the list has not been updated in about a year; so, it does not +list HASWELL even though it is supported by the version we are using. \ No newline at end of file From f99da5ab7d9776b11df7c71291b253636016845f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 23 Apr 2014 18:27:59 -0400 Subject: [PATCH 086/220] vtk: Forced manual reference counting as garbage collection is deprecated and VTK has not fully implemented automatic reference counting. --- vtk.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vtk.cmake b/vtk.cmake index 864cecc..e464d99 100644 --- a/vtk.cmake +++ b/vtk.cmake @@ -81,6 +81,10 @@ ExternalProject_Add(${vtk_NAME} -DZLIB_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR} -DZLIB_LIBRARY=${BUILDEM_LIB_DIR}/libz.${BUILDEM_PLATFORM_DYLIB_EXTENSION} + # XCode Tools 5.1 moving forward no longer supports garbage collection ( -fobjc-gc flag ). However, Mac, AFAIK + # still supports Manual and Automatic Reference Counting. By setting VTK_REQUIRED_OBJCXX_FLAGS to "", manual + # reference counting is used by VTK, which should work on other Mac OS versions. + -DVTK_REQUIRED_OBJCXX_FLAGS="" # We want vtk to be built in parallel if possible. # Therefore we use $(MAKE) instead of 'make', which somehow enables sub-make files to use the jobserver correctly. From 5f0ad7c991eb1aa3a1e7ea9ac535ef96d42279a3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 23 Apr 2014 19:32:37 -0400 Subject: [PATCH 087/220] vtk: Added note about VTK 5 not supporting automatic reference counting. --- vtk.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vtk.cmake b/vtk.cmake index e464d99..df090fa 100644 --- a/vtk.cmake +++ b/vtk.cmake @@ -82,7 +82,8 @@ ExternalProject_Add(${vtk_NAME} -DZLIB_LIBRARY=${BUILDEM_LIB_DIR}/libz.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # XCode Tools 5.1 moving forward no longer supports garbage collection ( -fobjc-gc flag ). However, Mac, AFAIK - # still supports Manual and Automatic Reference Counting. By setting VTK_REQUIRED_OBJCXX_FLAGS to "", manual + # still supports Manual and Automatic Reference Counting. According to VTK, version 6 will support automatic + # reference counting, but the version we are using does not. By setting VTK_REQUIRED_OBJCXX_FLAGS to "", manual # reference counting is used by VTK, which should work on other Mac OS versions. -DVTK_REQUIRED_OBJCXX_FLAGS="" From 964434c41a6c35d810f0cb0bc7c341be5ca549f3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 27 May 2014 12:04:18 -0400 Subject: [PATCH 088/220] joblib: Provided a separate cmake for joblib. Tested and it works. This isn't strictly necessary if scikit-learn is installed as it will have joblib under sklearn.externals. However, it doesn't hurt to have it separated, especially, for those, who only want joblib. This uses the same version that scikit-learn uses currently ( 0.7.1 ). --- joblib.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 joblib.cmake diff --git a/joblib.cmake b/joblib.cmake new file mode 100644 index 0000000..18b4d19 --- /dev/null +++ b/joblib.cmake @@ -0,0 +1,37 @@ +# Adds joblib support. Allows for advanced memoizing with disk and +# advanced multi-threading techniques. + +if (NOT joblib_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_git_repo(joblib + 0.7.1 # 40fc9389c4e18510ba2a19c8bd8502fdbdd7e165 + https://github.com/joblib/joblib) + + +# Download and install joblib +message ("Installing ${joblib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${joblib_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${joblib_URL} + GIT_TAG ${joblib_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${joblib_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT joblib_NAME) \ No newline at end of file From 2e085b0e607700c6c66481c6fc665c461d591753 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 27 May 2014 12:06:21 -0400 Subject: [PATCH 089/220] Updated scikit-image to 0.9.3 --- scikit-image.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scikit-image.cmake b/scikit-image.cmake index 5524393..572ea6e 100644 --- a/scikit-image.cmake +++ b/scikit-image.cmake @@ -16,10 +16,10 @@ include (numpy) include (scipy) external_source (scikit-image - 0.7.2 - scikit-image-0.7.2.tar.gz - 80eb9862fa09c7e06eda6e2a9fc4042f - http://pypi.python.org/packages/source/s/scikit-image) + 0.9.3 + scikit-image-0.9.3.tar.gz + f010e0cd46ee2996a6875c96b216e768 + https://pypi.python.org/packages/source/s/scikit-image) message ("Installing ${scikit-image_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${scikit-image_NAME} From 8713ca779c9b3a0bc3bd0f9ab4a137bc7070a466 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 30 May 2014 11:24:59 -0400 Subject: [PATCH 090/220] python: Fails on Mavericks when multithreaded. Forced to be single threaded. --- python.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python.cmake b/python.cmake index a8b01ca..14ecc55 100644 --- a/python.cmake +++ b/python.cmake @@ -65,7 +65,7 @@ ExternalProject_Add(${python_NAME} ${PYTHON_DEBUG_CONFIG_ARGS} "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" - BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) -j1 # Fails on Mavericks when multithreaded. INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PYTHONAPPSDIR=${BUILDEM_BIN_DIR}/${python_NAME} install BUILD_IN_SOURCE 1 # Required for Mac From 128ac7f06c8a1f674fd08cdfd553e6f27f06ecb0 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 22 Jun 2014 12:19:23 -0400 Subject: [PATCH 091/220] futures: Apparently, the futures package is being used by tiling.py in volumina. As a result, futures has been added as a cmake. --- futures.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 futures.cmake diff --git a/futures.cmake b/futures.cmake new file mode 100644 index 0000000..2e29355 --- /dev/null +++ b/futures.cmake @@ -0,0 +1,40 @@ +# +# Install futures library from source. +# + +if (NOT futures_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) + +external_source (futures + 2.1.6 + futures-2.1.6.tar.gz + cfab9ac3cd55d6c7ddd0546a9f22f453 + https://pypi.python.org/packages/source/f/futures/futures-2.1.6.tar.gz) + + +message ("Installing ${futures_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${futures_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + URL ${futures_URL} + URL_MD5 ${futures_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND "" +) + +set_target_properties(${futures_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT futures_NAME) From 39782c7a1df69b621344da4edeb806547d91ed3b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Mon, 7 Jul 2014 13:30:44 -0400 Subject: [PATCH 092/220] sqlite: Created a cmake for sqlite. This is expected by Python to create the sqlite3 module ( https://docs.python.org/2/library/sqlite3.html ). python: Added dependency on sqlite. --- python.cmake | 4 +++- sqlite.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 sqlite.cmake diff --git a/python.cmake b/python.cmake index 14ecc55..a25b713 100644 --- a/python.cmake +++ b/python.cmake @@ -16,6 +16,8 @@ include (PatchSupport) include (zlib) include (openssl) # without openssl, hashlib might have missing encryption methods +include (sqlite) # required to implement the standard module sqlite3 + # (https://docs.python.org/2/library/sqlite3.html) external_source (python 2.7.6 @@ -49,7 +51,7 @@ if (${PYTHON_BUILD_DEBUG}) endif() ExternalProject_Add(${python_NAME} - DEPENDS ${zlib_NAME} ${openssl_NAME} + DEPENDS ${zlib_NAME} ${openssl_NAME} ${sqlite_NAME} PREFIX ${BUILDEM_DIR} URL ${python_URL} URL_MD5 ${python_MD5} diff --git a/sqlite.cmake b/sqlite.cmake new file mode 100644 index 0000000..8629c07 --- /dev/null +++ b/sqlite.cmake @@ -0,0 +1,39 @@ +# Builds SQLite, which Python uses to implement the standard library module +# sqlite3 ( https://docs.python.org/2/library/sqlite3.html ). + +if (NOT sqlite_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (PatchSupport) + + +external_source (sqlite + 3.8.5 + sqlite-autoconf-3080500.tar.gz + 0544ef6d7afd8ca797935ccc2685a9ed + http://www.sqlite.org/2014/) + +message ("Installing ${sqlite_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${sqlite_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sqlite_URL} + URL_MD5 ${sqlite_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${sqlite_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + LDFLAGS=${BUILDEM_LDFLAGS} + CPPFLAGS=-I${BUILDEM_DIR}/include + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${sqlite_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sqlite_NAME) \ No newline at end of file From b03d56987f18892755927dc1b9b0d2ceb2b39093 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 8 Jul 2014 13:40:27 -0400 Subject: [PATCH 093/220] scipy-stack: Changed all arguments to add_custom_target to be use NAME strings. --- scipy-stack.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scipy-stack.cmake b/scipy-stack.cmake index 6547753..416262d 100644 --- a/scipy-stack.cmake +++ b/scipy-stack.cmake @@ -25,8 +25,8 @@ include (ipython) include (nose) -add_custom_target(scipy-stack - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} +add_custom_target(${scipy-stack_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} ) endif (NOT scipy-stack_NAME) \ No newline at end of file From d2b6f6f6a68728747235a98c36a50a04c8bda3aa Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 8 Jul 2014 14:28:11 -0400 Subject: [PATCH 094/220] scipy-stack: Changed from using add_custom_target to ExternalProject_Add (with null steps). This has the same effect and works nicely with the build system. --- scipy-stack.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scipy-stack.cmake b/scipy-stack.cmake index 416262d..c5ee665 100644 --- a/scipy-stack.cmake +++ b/scipy-stack.cmake @@ -25,8 +25,13 @@ include (ipython) include (nose) -add_custom_target(${scipy-stack_NAME} +ExternalProject_Add(${scipy-stack_NAME} DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} + DOWNLOAD_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + TEST_COMMAND "" + INSTALL_COMMAND "" ) endif (NOT scipy-stack_NAME) \ No newline at end of file From 058601243e48aaff984ce17fd152af2dae30e05a Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 8 Jul 2014 14:52:55 -0400 Subject: [PATCH 095/220] scipy-stack: Made sure to exclude it from the all target. Also, added a message before beginning the build process. --- scipy-stack.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scipy-stack.cmake b/scipy-stack.cmake index c5ee665..8eca628 100644 --- a/scipy-stack.cmake +++ b/scipy-stack.cmake @@ -25,6 +25,7 @@ include (ipython) include (nose) +message ("Installing ${scipy-stack_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${scipy-stack_NAME} DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} DOWNLOAD_COMMAND "" @@ -34,4 +35,6 @@ ExternalProject_Add(${scipy-stack_NAME} INSTALL_COMMAND "" ) +set_target_properties(${scipy-stack_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + endif (NOT scipy-stack_NAME) \ No newline at end of file From 8b67672c85a0afe226a44dda1977bc5b093d9bef Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 16 Jul 2014 19:40:38 -0400 Subject: [PATCH 096/220] h5py: Updated version to 2.3.1. --- h5py.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/h5py.cmake b/h5py.cmake index acfd8ec..29a4326 100644 --- a/h5py.cmake +++ b/h5py.cmake @@ -15,10 +15,10 @@ include (hdf5) include (numpy) external_source (h5py - 2.1.3 - h5py-2.1.3.tar.gz - afd3c14f763339e186dd9cd24eb2eb74 - http://h5py.googlecode.com/files) + 2.3.1 + h5py-2.3.1.tar.gz + 8f32f96d653e904d20f9f910c6d9dd91 + https://pypi.python.org/packages/source/h/h5py) message ("Installing ${h5py_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${h5py_NAME} From df779bb2cd0dc64466cff9024e593e6741894ee9 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 2 Aug 2014 19:25:43 -0400 Subject: [PATCH 097/220] julia: Added julia as a build target. Currently, it builds its own dependencies (many of which overlap with things that are already built). It would be good if this could either be avoided or taken advantage of in the future. Just like OpenBLAS, julia needs to have the architecture specified if the build fails. This can be done with the OPENBLAS_TARGET_ARCH variable. --- julia.cmake | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 julia.cmake diff --git a/julia.cmake b/julia.cmake new file mode 100644 index 0000000..f5d6846 --- /dev/null +++ b/julia.cmake @@ -0,0 +1,35 @@ +# A standard asynchronous message passing library. +# Required by pyzmq, which is used by iPython. + +if (NOT julia_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +# Need to use v0.3.0-rc1 as there is a build error in the lower versions where julia is not properly installed in ${BUILDEM_DIR}/bin. Attempts to install it there or links to the actual executable resulted in mismatches between runtime and linking libraries. Using this version resolves these problems. +external_git_repo(julia + v0.3.0-rc1 # 3737cc28bc3116b21fb2502cdccbbeef5fbcd1b3 + https://github.com/JuliaLang/julia) + +message ("Installing ${julia_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${julia_NAME} + DEPENDS "" + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${julia_URL} + GIT_TAG ${julia_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + # Julia builds its own dependencies. Trying to get it to share was not straightforward. It builds its own OpenBLAS. So, can suffer from the same problems that OpenBLAS does. Add OPENBLAS_TARGET_ARCH=xxx (where xxx is an architecture) to the BUILD_COMMAND to optimize and/or avoid particular build errors. See README_openblas.txt for details. + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) testall + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install prefix=${BUILDEM_DIR} +) + +set_target_properties(${julia_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT julia_NAME) \ No newline at end of file From c034dcc8fe65e7babe39eae1e414b544afbe735b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 3 Aug 2014 01:04:12 -0400 Subject: [PATCH 098/220] julia: Updated title description. --- julia.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/julia.cmake b/julia.cmake index f5d6846..b2ed67c 100644 --- a/julia.cmake +++ b/julia.cmake @@ -1,5 +1,4 @@ -# A standard asynchronous message passing library. -# Required by pyzmq, which is used by iPython. +# Builds julia. if (NOT julia_NAME) From a441f6c7f380c0fcd33a0f1562c856bb2a335320 Mon Sep 17 00:00:00 2001 From: Stephen Plaza Date: Tue, 19 Aug 2014 18:39:21 -0400 Subject: [PATCH 099/220] updates openssl package to work on Fedora 20 --- openssl.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openssl.cmake b/openssl.cmake index 5637396..fc7b323 100644 --- a/openssl.cmake +++ b/openssl.cmake @@ -13,9 +13,9 @@ include (BuildSupport) include (zlib) external_source (openssl - 1.0.1c - openssl-1.0.1c.tar.gz - ae412727c8c15b67880aef7bd2999b2e + 1.0.1i + openssl-1.0.1i.tar.gz + c8dc151a671b9b92ff3e4c118b174972 http://www.openssl.org/source) if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") From b1db86a29900ad6291cb4ce86290d4850f3344c8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 20 Aug 2014 20:00:28 -0400 Subject: [PATCH 100/220] pip.cmake: Added pip for installing Python packages. --- pip.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pip.cmake diff --git a/pip.cmake b/pip.cmake new file mode 100644 index 0000000..f8ebcb8 --- /dev/null +++ b/pip.cmake @@ -0,0 +1,37 @@ +# Adds pip, the python installer. + +if (NOT pip_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) + +external_git_repo(pip + 1.5.6 # 81f21f2261d422d243f66b2dfeef0faae72ab119 + https://github.com/pypa/pip) + + +# Download and install pip +message ("Installing ${pip_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pip_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${pip_URL} + GIT_TAG ${pip_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pip_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pip_NAME) From b2675b3216559d5bdde0c957a3cc92ce1e007e4e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 29 Aug 2014 20:07:28 -0400 Subject: [PATCH 101/220] readline.cmake: Added a patch to ensure readline is installed in the package on Linux, if readline is not already installed, as some versions (i.e. CentOS) don't already have readline. patches/readline-setup.patch: Patch that ensures readline is installed on Linux. --- patches/readline-setup.patch | 22 ++++++++++++++++++++++ readline.cmake | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 patches/readline-setup.patch diff --git a/patches/readline-setup.patch b/patches/readline-setup.patch new file mode 100644 index 0000000..110b579 --- /dev/null +++ b/patches/readline-setup.patch @@ -0,0 +1,22 @@ +diff --git a/setup.py b/setup.py +index 1b79682..df5fc3a 100644 +--- a/setup.py ++++ b/setup.py +@@ -24,6 +24,8 @@ if 'darwin' in sysplat: + install_requires += ['readline'] + if 'win32' in sysplat: + install_requires += ['pyreadline'] ++if 'linux' in sysplat: ++ # Check to see if readline is already installed. ++ # If it is, installing this will break the existing readline. ++ has_readline = True ++ try: ++ import readline ++ except ImportError: ++ has_readline = False ++ ++ if not has_readline: ++ install_requires += ['readline'] + + setup( + name = name, diff --git a/readline.cmake b/readline.cmake index 4b14958..54d4045 100644 --- a/readline.cmake +++ b/readline.cmake @@ -27,7 +27,9 @@ ExternalProject_Add(${readline_NAME} GIT_REPOSITORY ${readline_URL} GIT_TAG ${readline_TAG} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Allows readline to be installed for Linux where it may not always be present (i.e. CentOS). + ${readline_SRC_DIR}/setup.py ${PATCH_DIR}/readline-setup.patch CONFIGURE_COMMAND "" BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build BUILD_IN_SOURCE 1 From 682865e69836579c67842ff5532a51eab7a3eb82 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 13:27:49 -0400 Subject: [PATCH 102/220] readline.cmake: Renamed to python-readline.cmake. python-readline.cmake: Renamed from readline.cmake. python-readline.cmake: Updated the name of the patch. patches/readline-setup.patch: Renamed to patches/python-readline-setup.patch. patches/python-readline-setup.patch: Renamed from patches/readline-setup.patch. ipython.cmake: Changed readline to python-readline. --- ipython.cmake | 4 ++-- patches/{readline-setup.patch => python-readline-setup.patch} | 0 readline.cmake => python-readline.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename patches/{readline-setup.patch => python-readline-setup.patch} (100%) rename readline.cmake => python-readline.cmake (94%) diff --git a/ipython.cmake b/ipython.cmake index ac02613..a53a254 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -13,7 +13,7 @@ include (BuildSupport) include (python) include (pyqt4) include (sphinxcontrib-napoleon) # For sphinx extension. Doesn't necessarily need napolean, but it is nice to have and is quick to install. -include (readline) +include (python-readline) include (pyzmq) include (nose) include (pygments) @@ -27,7 +27,7 @@ external_git_repo(ipython message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ipython_NAME} - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${readline_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${python-readline_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${ipython_URL} GIT_TAG ${ipython_TAG} diff --git a/patches/readline-setup.patch b/patches/python-readline-setup.patch similarity index 100% rename from patches/readline-setup.patch rename to patches/python-readline-setup.patch diff --git a/readline.cmake b/python-readline.cmake similarity index 94% rename from readline.cmake rename to python-readline.cmake index 54d4045..34c0a6c 100644 --- a/readline.cmake +++ b/python-readline.cmake @@ -29,7 +29,7 @@ ExternalProject_Add(${readline_NAME} UPDATE_COMMAND "" PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} # Allows readline to be installed for Linux where it may not always be present (i.e. CentOS). - ${readline_SRC_DIR}/setup.py ${PATCH_DIR}/readline-setup.patch + ${readline_SRC_DIR}/setup.py ${PATCH_DIR}/python-readline-setup.patch CONFIGURE_COMMAND "" BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build BUILD_IN_SOURCE 1 From 986b167a2c45e7d2718db568d4b09310172495ca Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 14:02:53 -0400 Subject: [PATCH 103/220] readline.cmake: Added readline to build from source. python.cmake: Added readline as dependency for python. ipython.cmake: Removed python-readline dependency. --- ipython.cmake | 3 +-- python.cmake | 3 ++- readline.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 readline.cmake diff --git a/ipython.cmake b/ipython.cmake index a53a254..ee3feff 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -13,7 +13,6 @@ include (BuildSupport) include (python) include (pyqt4) include (sphinxcontrib-napoleon) # For sphinx extension. Doesn't necessarily need napolean, but it is nice to have and is quick to install. -include (python-readline) include (pyzmq) include (nose) include (pygments) @@ -27,7 +26,7 @@ external_git_repo(ipython message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ipython_NAME} - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${python-readline_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${ipython_URL} GIT_TAG ${ipython_TAG} diff --git a/python.cmake b/python.cmake index a25b713..de532d5 100644 --- a/python.cmake +++ b/python.cmake @@ -16,6 +16,7 @@ include (PatchSupport) include (zlib) include (openssl) # without openssl, hashlib might have missing encryption methods +include (readline) # To support the readline module. include (sqlite) # required to implement the standard module sqlite3 # (https://docs.python.org/2/library/sqlite3.html) @@ -51,7 +52,7 @@ if (${PYTHON_BUILD_DEBUG}) endif() ExternalProject_Add(${python_NAME} - DEPENDS ${zlib_NAME} ${openssl_NAME} ${sqlite_NAME} + DEPENDS ${zlib_NAME} ${openssl_NAME} ${readline_NAME} ${sqlite_NAME} PREFIX ${BUILDEM_DIR} URL ${python_URL} URL_MD5 ${python_MD5} diff --git a/readline.cmake b/readline.cmake new file mode 100644 index 0000000..e214e1f --- /dev/null +++ b/readline.cmake @@ -0,0 +1,40 @@ +# +# Install readline from source. +# + +if (NOT readline_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +external_source (readline + 6.2 + readline-6.2.tar.gz + 67948acb2ca081f23359d0256e9a271c + ftp://ftp.gnu.org/gnu/readline) + +message ("Installing ${readline_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${readline_NAME} + PREFIX ${BUILDEM_DIR} + URL ${readline_URL} + URL_MD5 ${readline_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${readline_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + --enable-shared + --enable-static + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${readline_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT readline_NAME) From f8819692a2f1b4caa28c1acdeea522bed61bdd86 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 15:49:19 -0400 Subject: [PATCH 104/220] readline.cmake: Added patch step for all patches from ( ftp://ftp.gnu.org/pub/gnu/readline/readline-6.2-patches ) applied per file. patches/readline-6.2-callback.patch: Patch for callback.c. patches/readline-6.2-input.patch: Patch for input.c. patches/readline-6.2-patchlevel.patch: Patch for patchlevel. patches/readline-6.2-shobj-conf.patch: Patch for support/shobj-conf. patches/readline-6.2-vi_mode.patch: Patch for vi_mode.c. --- patches/readline-6.2-callback.patch | 15 ++++++ patches/readline-6.2-input.patch | 36 +++++++++++++ patches/readline-6.2-patchlevel.patch | 10 ++++ patches/readline-6.2-shobj-conf.patch | 32 +++++++++++ patches/readline-6.2-vi_mode.patch | 76 +++++++++++++++++++++++++++ readline.cmake | 9 +++- 6 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 patches/readline-6.2-callback.patch create mode 100644 patches/readline-6.2-input.patch create mode 100644 patches/readline-6.2-patchlevel.patch create mode 100644 patches/readline-6.2-shobj-conf.patch create mode 100644 patches/readline-6.2-vi_mode.patch diff --git a/patches/readline-6.2-callback.patch b/patches/readline-6.2-callback.patch new file mode 100644 index 0000000..0ea4028 --- /dev/null +++ b/patches/readline-6.2-callback.patch @@ -0,0 +1,15 @@ +diff --git a/readline-6.2/callback.c b/readline-6.2/callback.c +index 4ee6361..7682cd0 100644 +--- a/readline-6.2/callback.c ++++ b/readline-6.2/callback.c +@@ -148,6 +148,9 @@ rl_callback_read_char () + eof = _rl_vi_domove_callback (_rl_vimvcxt); + /* Should handle everything, including cleanup, numeric arguments, + and turning off RL_STATE_VIMOTION */ ++ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) ++ _rl_internal_char_cleanup (); ++ + return; + } + #endif + diff --git a/patches/readline-6.2-input.patch b/patches/readline-6.2-input.patch new file mode 100644 index 0000000..8fa168f --- /dev/null +++ b/patches/readline-6.2-input.patch @@ -0,0 +1,36 @@ +diff --git a/readline-6.2/input.c b/readline-6.2/input.c +index 7c74c99..b49af88 100644 +--- a/readline-6.2/input.c ++++ b/readline-6.2/input.c +@@ -409,7 +409,7 @@ rl_clear_pending_input () + int + rl_read_key () + { +- int c; ++ int c, r; + + rl_key_sequence_length++; + +@@ -429,14 +429,18 @@ rl_read_key () + { + while (rl_event_hook) + { +- if (rl_gather_tyi () < 0) /* XXX - EIO */ ++ if (rl_get_char (&c) != 0) ++ break; ++ ++ if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */ + { + rl_done = 1; + return ('\n'); + } ++ else if (r == 1) /* read something */ ++ continue; ++ + RL_CHECK_SIGNALS (); +- if (rl_get_char (&c) != 0) +- break; + if (rl_done) /* XXX - experimental */ + return ('\n'); + (*rl_event_hook) (); + diff --git a/patches/readline-6.2-patchlevel.patch b/patches/readline-6.2-patchlevel.patch new file mode 100644 index 0000000..23e43f1 --- /dev/null +++ b/patches/readline-6.2-patchlevel.patch @@ -0,0 +1,10 @@ +diff --git a/readline-6.2/patchlevel b/readline-6.2/patchlevel +index fdf4740..e0ba09d 100644 +--- a/readline-6.2/patchlevel ++++ b/readline-6.2/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-1 ++5 + diff --git a/patches/readline-6.2-shobj-conf.patch b/patches/readline-6.2-shobj-conf.patch new file mode 100644 index 0000000..9b63c93 --- /dev/null +++ b/patches/readline-6.2-shobj-conf.patch @@ -0,0 +1,32 @@ +diff --git a/readline-6.2/support/shobj-conf b/readline-6.2/support/shobj-conf +index 5a63e80..cb3095c 100644 +--- a/readline-6.2/support/shobj-conf ++++ b/readline-6.2/support/shobj-conf +@@ -157,13 +157,15 @@ freebsd[4-9]*|freebsdelf*|dragonfly*) + ;; + + # Darwin/MacOS X +-darwin[89]*|darwin10*) ++darwin[89]*|darwin1[0123]*) + SHOBJ_STATUS=supported + SHLIB_STATUS=supported + + SHOBJ_CFLAGS='-fno-common' + +- SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' ++# SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' ++ # we can finally kill Mac OS X 10.3 ++ SHOBJ_LD='${CC}' + + SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' + SHLIB_LIBSUFF='dylib' +@@ -186,7 +188,7 @@ darwin*|macosx*) + SHLIB_LIBSUFF='dylib' + + case "${host_os}" in +- darwin[789]*|darwin10*) SHOBJ_LDFLAGS='' ++ darwin[789]*|darwin1[0123]*) SHOBJ_LDFLAGS='' + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' + ;; + *) SHOBJ_LDFLAGS='-dynamic' + diff --git a/patches/readline-6.2-vi_mode.patch b/patches/readline-6.2-vi_mode.patch new file mode 100644 index 0000000..ebb349e --- /dev/null +++ b/patches/readline-6.2-vi_mode.patch @@ -0,0 +1,76 @@ +diff --git a/readline-6.2/vi_mode.c b/readline-6.2/vi_mode.c +index 41e1dbb..4408053 100644 +--- a/readline-6.2/vi_mode.c ++++ b/readline-6.2/vi_mode.c +@@ -1114,7 +1114,7 @@ rl_domove_read_callback (m) + rl_beg_of_line (1, c); + _rl_vi_last_motion = c; + RL_UNSETSTATE (RL_STATE_VIMOTION); +- return (0); ++ return (vidomove_dispatch (m)); + } + #if defined (READLINE_CALLBACKS) + /* XXX - these need to handle rl_universal_argument bindings */ +@@ -1234,11 +1234,19 @@ rl_vi_delete_to (count, key) + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } +- else if (vi_redoing) ++ else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } ++ else if (vi_redoing) /* handle redoing `dd' here */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ rl_mark = rl_end; ++ rl_beg_of_line (1, key); ++ RL_UNSETSTATE (RL_STATE_VIMOTION); ++ r = vidomove_dispatch (_rl_vimvcxt); ++ } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { +@@ -1316,11 +1324,19 @@ rl_vi_change_to (count, key) + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } +- else if (vi_redoing) ++ else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } ++ else if (vi_redoing) /* handle redoing `cc' here */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ rl_mark = rl_end; ++ rl_beg_of_line (1, key); ++ RL_UNSETSTATE (RL_STATE_VIMOTION); ++ r = vidomove_dispatch (_rl_vimvcxt); ++ } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { +@@ -1377,6 +1393,19 @@ rl_vi_yank_to (count, key) + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } ++ else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ r = rl_domove_motion_callback (_rl_vimvcxt); ++ } ++ else if (vi_redoing) /* handle redoing `yy' here */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ rl_mark = rl_end; ++ rl_beg_of_line (1, key); ++ RL_UNSETSTATE (RL_STATE_VIMOTION); ++ r = vidomove_dispatch (_rl_vimvcxt); ++ } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + diff --git a/readline.cmake b/readline.cmake index e214e1f..192b378 100644 --- a/readline.cmake +++ b/readline.cmake @@ -22,7 +22,14 @@ ExternalProject_Add(${readline_NAME} URL ${readline_URL} URL_MD5 ${readline_MD5} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # These patches are the result of smashing all of the patches from ( ftp://ftp.gnu.org/pub/gnu/readline/readline-6.2-patches/ ) into one massive patch. + # Then, they have been split out to have one patch per file changed. + ${readline_SRC_DIR}/callback.c ${PATCH_DIR}/readline-6.2-callback.patch + ${readline_SRC_DIR}/input.c ${PATCH_DIR}/readline-6.2-input.patch + ${readline_SRC_DIR}/patchlevel ${PATCH_DIR}/readline-6.2-patchlevel.patch + ${readline_SRC_DIR}/support/shobj-conf ${PATCH_DIR}/readline-6.2-shobj-conf.patch + ${readline_SRC_DIR}/vi_mode.c ${PATCH_DIR}/readline-6.2-vi_mode.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${readline_SRC_DIR}/configure --prefix=${BUILDEM_DIR} --enable-shared From 9bbbed283fef495bc5340c03c3ebb1bdcb4be0ee Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 15:52:16 -0400 Subject: [PATCH 105/220] python.cmake: Removed readline fix for Mac OS as it is no longer necessary. patches/python-fix-readline-bug.sh: Deleted script as it is no longer used. --- patches/python-fix-readline-bug.sh | 3 --- python.cmake | 7 ------- 2 files changed, 10 deletions(-) delete mode 100644 patches/python-fix-readline-bug.sh diff --git a/patches/python-fix-readline-bug.sh b/patches/python-fix-readline-bug.sh deleted file mode 100644 index d024a6b..0000000 --- a/patches/python-fix-readline-bug.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -mv $1/lib/python2.7/lib-dynload/readline.so $1/lib/python2.7/lib-dynload/readline.so.disabled \ No newline at end of file diff --git a/python.cmake b/python.cmake index de532d5..a9ed885 100644 --- a/python.cmake +++ b/python.cmake @@ -74,13 +74,6 @@ ExternalProject_Add(${python_NAME} BUILD_IN_SOURCE 1 # Required for Mac ) -if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - ExternalProject_Add_Step(${python_NAME} ${python_NAME}-fix-readline-bug - COMMAND bash ${PATCH_DIR}/python-fix-readline-bug.sh ${PYTHON_PREFIX} - DEPENDEES install - ) -endif() - set (PYTHON_INCLUDE_PATH ${PYTHON_PREFIX}/include/python2.7) set (PYTHON_LIBRARY_FILE ${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}) set (PYTHON_EXE ${PYTHON_PREFIX}/bin/python) From a8573a780eb9fa6f35b269fc8ed4aee4dba841da Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 16:11:24 -0400 Subject: [PATCH 106/220] python-readline.cmake: Removed python-readline as building readline makes this unnecessary. patches/python-readline-setup.patch: Removed patch as it is no longer necessary. --- patches/python-readline-setup.patch | 22 --------------- python-readline.cmake | 42 ----------------------------- 2 files changed, 64 deletions(-) delete mode 100644 patches/python-readline-setup.patch delete mode 100644 python-readline.cmake diff --git a/patches/python-readline-setup.patch b/patches/python-readline-setup.patch deleted file mode 100644 index 110b579..0000000 --- a/patches/python-readline-setup.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/setup.py b/setup.py -index 1b79682..df5fc3a 100644 ---- a/setup.py -+++ b/setup.py -@@ -24,6 +24,8 @@ if 'darwin' in sysplat: - install_requires += ['readline'] - if 'win32' in sysplat: - install_requires += ['pyreadline'] -+if 'linux' in sysplat: -+ # Check to see if readline is already installed. -+ # If it is, installing this will break the existing readline. -+ has_readline = True -+ try: -+ import readline -+ except ImportError: -+ has_readline = False -+ -+ if not has_readline: -+ install_requires += ['readline'] - - setup( - name = name, diff --git a/python-readline.cmake b/python-readline.cmake deleted file mode 100644 index 34c0a6c..0000000 --- a/python-readline.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# Pulls down the right readline depending on whether it is Windows or Mac using anyreadline. -# Does nothing on Linux as it should have GNU readline. -# -# Required by iPython. - - -if (NOT readline_NAME) - -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - -include (ExternalProject) -include (ExternalSource) -include (BuildSupport) -include (TemplateSupport) - -include (python) -include (setuptools) - -external_git_repo(readline - v0_1_1 #0796d3eaa9158f6ac82b7f8eea96f372851b79e3 - https://github.com/pombredanne/anyreadline) - -message ("Installing ${readline_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") -ExternalProject_Add(${readline_NAME} - DEPENDS ${python_NAME} ${setuptools_NAME} - PREFIX ${BUILDEM_DIR} - GIT_REPOSITORY ${readline_URL} - GIT_TAG ${readline_TAG} - UPDATE_COMMAND "" - PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} - # Allows readline to be installed for Linux where it may not always be present (i.e. CentOS). - ${readline_SRC_DIR}/setup.py ${PATCH_DIR}/python-readline-setup.patch - CONFIGURE_COMMAND "" - BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build - BUILD_IN_SOURCE 1 - TEST_COMMAND "" - INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install -) - -set_target_properties(${readline_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) - -endif (NOT readline_NAME) From cd0a05515cd8470e6f5c8d60151a9894fcc1443d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 20:15:59 -0400 Subject: [PATCH 107/220] pyzmq.cmake: Requires Cython to build. --- pyzmq.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyzmq.cmake b/pyzmq.cmake index a57738b..5b99a76 100644 --- a/pyzmq.cmake +++ b/pyzmq.cmake @@ -10,6 +10,7 @@ include (ExternalSource) include (BuildSupport) +include (cython) include (python) include(zeromq) @@ -21,7 +22,7 @@ external_git_repo(pyzmq message ("Installing ${pyzmq_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${pyzmq_NAME} - DEPENDS ${python_NAME} ${zeromq_NAME} + DEPENDS ${cython_NAME} ${python_NAME} ${zeromq_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${pyzmq_URL} GIT_TAG ${pyzmq_TAG} From 67e7ff1e30288ff0adcd74bebd0af5469accfd9e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 10 Jul 2014 17:29:20 -0400 Subject: [PATCH 108/220] spams-python: Created a cmake to install SPAMS with Python bindings. Requires a patch be applied to the setup.py file to ensure that ATLAS is being used to build. --- patches/spams-python-setup-atlas.patch | 67 ++++++++++++++++++++++++++ patches/spams-python-setup.patch | 67 ++++++++++++++++++++++++++ spams-python.cmake | 45 +++++++++++++++++ 3 files changed, 179 insertions(+) create mode 100644 patches/spams-python-setup-atlas.patch create mode 100644 patches/spams-python-setup.patch create mode 100644 spams-python.cmake diff --git a/patches/spams-python-setup-atlas.patch b/patches/spams-python-setup-atlas.patch new file mode 100644 index 0000000..779f1e9 --- /dev/null +++ b/patches/spams-python-setup-atlas.patch @@ -0,0 +1,67 @@ +--- setup.py_old 2014-07-09 19:03:41.996900059 +0000 ++++ setup.py 2014-07-10 20:18:55.653738878 +0000 +@@ -7,31 +7,35 @@ + # includes numpy : package numpy.distutils , numpy.get_include() + # python setup.py build --inplace + # python setup.py install --prefix=dist, +-incs = ['.'] + map(lambda x: os.path.join('spams',x),[ 'linalg', 'prox', 'decomp', 'dictLearn']) + [numpy.get_include()] + ['/usr/include/python2.7/'] ++incs = ['.'] + map(lambda x: os.path.join('spams',x),[ 'linalg', 'prox', 'decomp', 'dictLearn']) + [numpy.get_include()] + + osname = distutils.util.get_platform() +-cc_flags = ['-fPIC', '-fopenmp'] +-link_flags = ['-fopenmp', '-s' ] +-libs = ['stdc++', 'blas', 'lapack' ] ++ ++buildem_dir = os.environ["BUILDEM_DIR"] ++cc_flags = ['-fPIC', '-fopenmp', '-static-libgfortran', '-Wunused-variable'] ++link_flags = ['-fopenmp', '-static-libgfortran'] ++ ++dynamic_libs = ['stdc++', 'cblas', 'lapack'] ++static_libs = ['atlas'] ++ + libdirs = [] + ++# What's the point of a standarized build system if we are just going to route around it. + if osname.startswith("macosx"): +- cc_flags = ['-fPIC', '-fopenmp','-m32'] +- link_flags = ['-m32', '-framework', 'Python'] ++ cc_flags += ["-F" + os.path.join(buildem_dir, "Frameworks")] ++ link_flags = ['-framework', 'Python'] ++elif osname.startswith("win"): ++ # Assuming MinGW system. ++ # Don't mess with path as we have ideally set it the right way already. ++ # Don't use R for BLAS as we have built BLAS already. ++ cc_flags += ['-DWIN32'] ++ link_flags += ['-mwindows'] ++ ++# These assume GCC style syntax is allowed. Should work for clang (when they have openmp). Will not work with other compilers. ++dynamic_libs = ["-l" + _ for _ in dynamic_libs] ++static_libs = ["-Wl,-Bstatic"] + ["-l" + _ for _ in static_libs] + ["-Wl,-Bdynamic"] + +-if osname.startswith("win32"): +- cc_flags = ['-fPIC', '-fopenmp','-DWIN32'] +- link_flags = ['-fopenmp', '-mwindows'] +- path = os.environ['PATH'] +- os.environ['PATH'] = 'C:/MinGW/bin;' + path +- libs = ['stdc++', 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files/R/R-2.15.1/bin/i386'] +- +-if osname.startswith("win-amd64"): +- cc_flags = ['-openmp', '-EHsc', '-DWIN32', '-DCYGWIN', '-DWINDOWS', '-I','C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/include'] +- link_flags = [] +- libs = [ 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/lib/amd64','C:/Program Files/R/R-2.15.1/bin/x64'] ++libs = dynamic_libs + static_libs + + + ##path = os.environ['PATH']; print "XX OS %s, path %s" %(osname,path) +@@ -42,7 +46,8 @@ + include_dirs = incs, + extra_compile_args = ['-DNDEBUG', '-DUSE_BLAS_LIB'] + cc_flags, + library_dirs = libdirs, +- libraries = libs, ++ # Want to control the formatting. ++ extra_objects = libs, + # strip the .so + extra_link_args = link_flags, + language = 'c++', diff --git a/patches/spams-python-setup.patch b/patches/spams-python-setup.patch new file mode 100644 index 0000000..8948bb7 --- /dev/null +++ b/patches/spams-python-setup.patch @@ -0,0 +1,67 @@ +--- setup.py_old 2014-07-09 19:03:41.996900059 +0000 ++++ setup.py 2014-07-10 20:18:55.653738878 +0000 +@@ -7,31 +7,35 @@ + # includes numpy : package numpy.distutils , numpy.get_include() + # python setup.py build --inplace + # python setup.py install --prefix=dist, +-incs = ['.'] + map(lambda x: os.path.join('spams',x),[ 'linalg', 'prox', 'decomp', 'dictLearn']) + [numpy.get_include()] + ['/usr/include/python2.7/'] ++incs = ['.'] + map(lambda x: os.path.join('spams',x),[ 'linalg', 'prox', 'decomp', 'dictLearn']) + [numpy.get_include()] + + osname = distutils.util.get_platform() +-cc_flags = ['-fPIC', '-fopenmp'] +-link_flags = ['-fopenmp', '-s' ] +-libs = ['stdc++', 'blas', 'lapack' ] ++ ++buildem_dir = os.environ["BUILDEM_DIR"] ++cc_flags = ['-fPIC', '-fopenmp', '-Wunused-variable'] ++link_flags = ['-fopenmp'] ++ ++dynamic_libs = ['stdc++', 'blas', 'lapack'] ++static_libs = [] ++ + libdirs = [] + ++# What's the point of a standarized build system if we are just going to route around it. + if osname.startswith("macosx"): +- cc_flags = ['-fPIC', '-fopenmp','-m32'] +- link_flags = ['-m32', '-framework', 'Python'] ++ cc_flags += ["-F" + os.path.join(buildem_dir, "Frameworks")] ++ link_flags = ['-framework', 'Python'] ++elif osname.startswith("win"): ++ # Assuming MinGW system. ++ # Don't mess with path as we have ideally set it the right way already. ++ # Don't use R for BLAS as we have built BLAS already. ++ cc_flags += ['-DWIN32'] ++ link_flags += ['-mwindows'] ++ ++# These assume GCC style syntax is allowed. Should work for clang (when they have openmp). Will not work with other compilers. ++dynamic_libs = ["-l" + _ for _ in dynamic_libs] ++static_libs = ["-Wl,-Bstatic"] + ["-l" + _ for _ in static_libs] + ["-Wl,-Bdynamic"] + +-if osname.startswith("win32"): +- cc_flags = ['-fPIC', '-fopenmp','-DWIN32'] +- link_flags = ['-fopenmp', '-mwindows'] +- path = os.environ['PATH'] +- os.environ['PATH'] = 'C:/MinGW/bin;' + path +- libs = ['stdc++', 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files/R/R-2.15.1/bin/i386'] +- +-if osname.startswith("win-amd64"): +- cc_flags = ['-openmp', '-EHsc', '-DWIN32', '-DCYGWIN', '-DWINDOWS', '-I','C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/include'] +- link_flags = [] +- libs = [ 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/lib/amd64','C:/Program Files/R/R-2.15.1/bin/x64'] ++libs = dynamic_libs + static_libs + + + ##path = os.environ['PATH']; print "XX OS %s, path %s" %(osname,path) +@@ -42,7 +46,8 @@ + include_dirs = incs, + extra_compile_args = ['-DNDEBUG', '-DUSE_BLAS_LIB'] + cc_flags, + library_dirs = libdirs, +- libraries = libs, ++ # Want to control the formatting. ++ extra_objects = libs, + # strip the .so + extra_link_args = link_flags, + language = 'c++', diff --git a/spams-python.cmake b/spams-python.cmake new file mode 100644 index 0000000..575826f --- /dev/null +++ b/spams-python.cmake @@ -0,0 +1,45 @@ +# +# Install spams-python from source +# + +if (NOT spams-python_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (PatchSupport) + +external_source (spams-python + 2.4 + spams-python-v2.4-svn2014-03-27.tar.gz + 57b4851bf2d623fc8a23d0fd4c204694 + http://spams-devel.gforge.inria.fr/hitcounter2.php?file=33494/) + +message ("Installing ${spams-python_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${spams-python_NAME} + DEPENDS ${atlas_NAME} ${python_NAME} ${setuptools_NAME} ${numpy_NAME} ${scipy_NAME} + PREFIX ${BUILDEM_DIR} + URL ${spams-python_URL} + URL_MD5 ${spams-python_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Patches SPAMS in a way where we are sure it will run. + + # The first patch should work with any LAPACK and BLAS implementation. + ${spams-python_SRC_DIR}/setup.py ${PATCH_DIR}/spams-python-setup.patch + # If you wish to use the tuned ATLAS library as well, use this patch. + #${spams-python_SRC_DIR}/setup.py ${PATCH_DIR}/spams-python-setup-atlas.patch + + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${spams-python_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT spams-python_NAME) + From 83e372342637c8a01421ae6c91fef3ca94efd5dd Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Fri, 4 Apr 2014 14:18:31 -0400 Subject: [PATCH 109/220] Added jsonschema.cmake --- jsonschema.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 jsonschema.cmake diff --git a/jsonschema.cmake b/jsonschema.cmake new file mode 100644 index 0000000..d2339b8 --- /dev/null +++ b/jsonschema.cmake @@ -0,0 +1,41 @@ +# +# Install jsonschema library from source +# + +if (NOT jsonschema_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) + +external_source (jsonschema + 2.3.0 + jsonschema-2.3.0.tar.gz + 410075e1969a9ec1838b5a6e1313c32b + https://pypi.python.org/packages/source/j/jsonschema) + +message ("Installing ${jsonschema_NAME} into ilastik build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${jsonschema_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + URL ${jsonschema_URL} + URL_MD5 ${jsonschema_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND "" +) + +set_target_properties(${jsonschema_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + + +endif (NOT jsonschema_NAME) + From 22933faf41ecabd96bfc8f43a6b5970312d59975 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Mon, 17 Mar 2014 18:06:47 -0400 Subject: [PATCH 110/220] ilastik.cmake: Changed remote url to ilastik/ilastik-meta, not janelia-flyem/ilastik --- ilastik.cmake | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ilastik.cmake b/ilastik.cmake index 719d400..8635755 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -33,7 +33,7 @@ include (nose) include (faulthandler) # select the desired ilastik commit -set(DEFAULT_ILASTIK_VERSION "20131205") +set(DEFAULT_ILASTIK_VERSION "v1.0.2") IF(NOT DEFINED ILASTIK_VERSION) SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}") ENDIF() @@ -43,20 +43,27 @@ SET(ILASTIK_VERSION ${ILASTIK_VERSION} external_git_repo (ilastik ${ILASTIK_VERSION} - https://github.com/janelia-flyem/flyem-ilastik + https://github.com/ilastik/ilastik-meta ilastik) set(lazyflow_SRC_DIR "${ilastik_SRC_DIR}/lazyflow") if("${ILASTIK_VERSION}" STREQUAL "master") - set(ILASTIK_UPDATE_COMMAND git checkout master && git pull origin master && git submodule update --init --recursive && + # If the user's build is old, he might be linked to the janelia-flyem remote + # Force the remote to update from ilastik/ilastik-meta by removing origin and adding it again + set(ILASTIK_UPDATE_COMMAND git remote rm origin && git remote add origin https://github.com/ilastik/ilastik-meta && + git fetch origin && + git checkout master && git pull origin master && git submodule update --init --recursive && cd lazyflow && git checkout master && git pull origin master && git submodule update && cd .. && cd volumina && git checkout master && git pull origin master && cd .. && cd ilastik && git checkout master && git pull origin master && cd ..) else() - set(ILASTIK_UPDATE_COMMAND git fetch && git checkout ${ILASTIK_VERSION} && git submodule update --init --recursive) + # If the user's build is old, he might be linked to the janelia-flyem remote + # Force the remote to update from ilastik/ilastik-meta by removing origin and adding it again + set(ILASTIK_UPDATE_COMMAND git remote rm origin && git remote add origin https://github.com/ilastik/ilastik-meta && + git fetch origin && git checkout ${ILASTIK_VERSION} && git submodule update --init --recursive) endif() From 630b15696caab058a688e286d30fb86c6ec311c2 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Fri, 4 Apr 2014 14:19:23 -0400 Subject: [PATCH 111/220] ilastik.cmake: Added a new dependency: jsonschema --- ilastik.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 8635755..66b9970 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -31,6 +31,7 @@ include (pgmlink) include (scikit-learn) include (nose) include (faulthandler) +include (jsonschema) # Required for the dvid extension. # select the desired ilastik commit set(DEFAULT_ILASTIK_VERSION "v1.0.2") @@ -71,7 +72,7 @@ message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: $ set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} - ${cylemon_NAME} ${scikit-learn_NAME}) + ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME}) if (${build_pgmlink}) # Tracking depends on pgmlink, which depends on CPLEX. From 37827540fd3905c24acab374ffd2a43f0a8da2f8 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Tue, 8 Apr 2014 22:21:52 -0400 Subject: [PATCH 112/220] ilastik.cmake: Require opengm --- ilastik.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ilastik.cmake b/ilastik.cmake index 66b9970..534da94 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -32,6 +32,7 @@ include (scikit-learn) include (nose) include (faulthandler) include (jsonschema) # Required for the dvid extension. +include (opengm) # select the desired ilastik commit set(DEFAULT_ILASTIK_VERSION "v1.0.2") @@ -71,8 +72,8 @@ endif() message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...") set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} - ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} - ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME}) + ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} + ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) if (${build_pgmlink}) # Tracking depends on pgmlink, which depends on CPLEX. From 1c034a9bdf87020d166a0adee6d9e63e72124560 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Tue, 27 May 2014 11:27:45 -0400 Subject: [PATCH 113/220] Added futures.cmake (python futures module backported from Python 3) Conflicts: futures.cmake --- futures.cmake | 9 +++++---- ilastik.cmake | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/futures.cmake b/futures.cmake index 2e29355..b0f64d6 100644 --- a/futures.cmake +++ b/futures.cmake @@ -1,5 +1,5 @@ # -# Install futures library from source. +# Install futures library from source # if (NOT futures_NAME) @@ -17,10 +17,9 @@ external_source (futures 2.1.6 futures-2.1.6.tar.gz cfab9ac3cd55d6c7ddd0546a9f22f453 - https://pypi.python.org/packages/source/f/futures/futures-2.1.6.tar.gz) + https://pypi.python.org/packages/source/f/futures) - -message ("Installing ${futures_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +message ("Installing ${futures_NAME} into ilastik build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${futures_NAME} DEPENDS ${python_NAME} ${setuptools_NAME} PREFIX ${BUILDEM_DIR} @@ -37,4 +36,6 @@ ExternalProject_Add(${futures_NAME} set_target_properties(${futures_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + endif (NOT futures_NAME) + diff --git a/ilastik.cmake b/ilastik.cmake index 534da94..c693001 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -33,6 +33,7 @@ include (nose) include (faulthandler) include (jsonschema) # Required for the dvid extension. include (opengm) +include (futures) # select the desired ilastik commit set(DEFAULT_ILASTIK_VERSION "v1.0.2") @@ -71,7 +72,7 @@ endif() message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...") -set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} +set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} ${futures_NAME} ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) From adb5748b9f12805613449925b77ae0eee80b5cff Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Tue, 10 Jun 2014 17:06:09 -0400 Subject: [PATCH 114/220] ilastik.cmake: Updated default ilastik checkout sha --- ilastik.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index c693001..8e8902e 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -36,7 +36,7 @@ include (opengm) include (futures) # select the desired ilastik commit -set(DEFAULT_ILASTIK_VERSION "v1.0.2") +set(DEFAULT_ILASTIK_VERSION 233886caf405623d8e17b260716b743cb4b96527) # 2014-06-10 IF(NOT DEFINED ILASTIK_VERSION) SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}") ENDIF() From 648a6b56b60e4e3573d07d2423b8a21e060eec94 Mon Sep 17 00:00:00 2001 From: Steve Plaza Date: Wed, 11 Jun 2014 15:34:01 -0400 Subject: [PATCH 115/220] updates sha for ilastik.cmake --- ilastik.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 8e8902e..2357fd2 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -36,7 +36,7 @@ include (opengm) include (futures) # select the desired ilastik commit -set(DEFAULT_ILASTIK_VERSION 233886caf405623d8e17b260716b743cb4b96527) # 2014-06-10 +set(DEFAULT_ILASTIK_VERSION 18026ae2efb9e9e04046598cd5fccca3a42bcdaa) # 2014-06-11 IF(NOT DEFINED ILASTIK_VERSION) SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}") ENDIF() @@ -146,6 +146,7 @@ configure_file(${TEMPLATE_DIR}/ilastik_script.template ${BUILDEM_DIR}/bin/ilasti set(LAUNCH_ILASTIK ilastik/ilastik/workflows/pixelClassification/pixelClassificationClusterized.py) configure_file(${TEMPLATE_DIR}/ilastik_script.template ${BUILDEM_DIR}/bin/ilastik_clusterized @ONLY) + set_target_properties(${ilastik_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) endif (NOT ilastik_NAME) From 92007454710274bce4e82b791c9f9bc9599ce8ab Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Mon, 31 Mar 2014 11:06:54 -0400 Subject: [PATCH 116/220] opengm.cmake: Compile with hdf5, boost, and python --- opengm.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/opengm.cmake b/opengm.cmake index b965fea..a2ebb6a 100644 --- a/opengm.cmake +++ b/opengm.cmake @@ -11,6 +11,10 @@ include (ExternalSource) include (BuildSupport) include (PatchSupport) +include (boost) +include (hdf5) +include (python) + external_git_repo (opengm 576dc472324a5dce40b7e9bb4c270afbd9b3da37 https://github.com/opengm/opengm) @@ -21,7 +25,7 @@ endif() message ("Installing ${opengm_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${opengm_NAME} - DEPENDS ${boost_NAME} + DEPENDS ${boost_NAME} ${hdf5_NAME} ${python_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${opengm_URL} GIT_TAG ${opengm_TAG} @@ -36,6 +40,9 @@ ExternalProject_Add(${opengm_NAME} -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -DWITH_CPLEX=ON -DWITH_BOOST=ON + -DWITH_HDF5=ON + -DBUILD_PYTHON_WRAPPER=ON + -DWITH_OPENMP=OFF # Mac doesn't support OpenMP ${CMAKE_CPLEX_ROOT_DIR} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) From b8df931c6e6d41350bfa247c62a116984d42bd96 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Tue, 8 Apr 2014 23:07:12 -0400 Subject: [PATCH 117/220] opengm: Build without CPLEX if it can't be found. Conflicts: opengm.cmake --- opengm.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opengm.cmake b/opengm.cmake index a2ebb6a..d8d7362 100644 --- a/opengm.cmake +++ b/opengm.cmake @@ -21,6 +21,9 @@ external_git_repo (opengm if(CPLEX_ROOT_DIR) set(CMAKE_CPLEX_ROOT_DIR "-DCPLEX_ROOT_DIR=${CPLEX_ROOT_DIR}") + set(WITH_CPLEX ON) +else() + set(WITH_CPLEX OFF) endif() message ("Installing ${opengm_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") @@ -38,7 +41,7 @@ ExternalProject_Add(${opengm_NAME} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} - -DWITH_CPLEX=ON + -DWITH_CPLEX=${WITH_CPLEX} -DWITH_BOOST=ON -DWITH_HDF5=ON -DBUILD_PYTHON_WRAPPER=ON From f35f4988935ed26a67815c203f85818ab544896d Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Wed, 28 May 2014 16:09:19 -0400 Subject: [PATCH 118/220] opengm: Added a patch to let us skip the sphinx docs build with a cmake switch. Conflicts: opengm.cmake --- opengm.cmake | 4 ++ patches/opengm.patch | 89 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 patches/opengm.patch diff --git a/opengm.cmake b/opengm.cmake index d8d7362..fe10245 100644 --- a/opengm.cmake +++ b/opengm.cmake @@ -36,6 +36,9 @@ ExternalProject_Add(${opengm_NAME} PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} # This patch disables linking against the rt-lib on Mac for the combilp test ${opengm_SRC_DIR}/src/unittest/inference/CMakeLists.txt ${PATCH_DIR}/opengm-toggle-rt.patch + # This patch adds the BUILD_PYTHON_DOCS setting, used to avoid building the sphinx documentation. + # Future versions of OpenGM will probably not need this patch. + ${opengm_SRC_DIR}/src/interfaces/python/CMakeLists.txt ${PATCH_DIR}/opengm.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opengm_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} @@ -45,6 +48,7 @@ ExternalProject_Add(${opengm_NAME} -DWITH_BOOST=ON -DWITH_HDF5=ON -DBUILD_PYTHON_WRAPPER=ON + -DBUILD_PYTHON_DOCS=OFF -DWITH_OPENMP=OFF # Mac doesn't support OpenMP ${CMAKE_CPLEX_ROOT_DIR} diff --git a/patches/opengm.patch b/patches/opengm.patch new file mode 100644 index 0000000..77ce090 --- /dev/null +++ b/patches/opengm.patch @@ -0,0 +1,89 @@ +--- src/interfaces/python/CMakeLists.txt 2014-05-28 16:03:43.000000000 -0400 ++++ src/interfaces/python/CMakeLists.txt2 2014-05-28 16:03:38.000000000 -0400 +@@ -16,47 +16,50 @@ + + message(STATUS ${OPENGM_PYTHON_BUILD_MODULE_DIR}) + +-find_package(SPHINX) +-if(SPHINX_FOUND) +- message(STATUS "FOUND_SPHINX") ++set( BUILD_PYTHON_DOCS 0 CACHE BOOL "Build the Python documentation with Sphinx" ) + +- if(NOT DEFINED SPHINX_THEME) +- set(SPHINX_THEME default) ++if(BUILD_PYTHON_DOCS) ++ find_package(SPHINX) ++ if(SPHINX_FOUND) ++ message(STATUS "FOUND_SPHINX") ++ ++ if(NOT DEFINED SPHINX_THEME) ++ set(SPHINX_THEME default) ++ endif() ++ if(NOT DEFINED SPHINX_THEME_DIR) ++ set(SPHINX_THEME_DIR) ++ endif() ++ # configured documentation tools and intermediate build results ++ set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") ++ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/_build) ++ # Sphinx cache with pickled ReST documents ++ set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/_doctrees") ++ # HTML output directory ++ set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/html") ++ configure_file( ++ "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py.in" ++ #"${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py" ++ "${BINARY_BUILD_DIR}/conf.py" ++ @ONLY) ++ add_custom_target(python-doc ALL ++ ${SPHINX_EXECUTABLE} ++ -q -b html ++ #-c "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" ++ -c "${BINARY_BUILD_DIR}" ++ -d "${SPHINX_CACHE_DIR}" ++ "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" ++ "${SPHINX_HTML_DIR}" ++ COMMENT "Building HTML documentation with Sphinx") ++ add_dependencies(python-doc _opengmcore ) ++ add_dependencies(python-doc _inference ) ++ add_dependencies(python-doc _hdf5 ) ++ ++ else() ++ message(STATUS "CANNOT Building HTML documentation with Sphinx , did not find Sphinx") + endif() +- if(NOT DEFINED SPHINX_THEME_DIR) +- set(SPHINX_THEME_DIR) +- endif() +- # configured documentation tools and intermediate build results +- set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") +- file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/_build) +- # Sphinx cache with pickled ReST documents +- set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/_doctrees") +- # HTML output directory +- set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/html") +- configure_file( +- "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py.in" +- #"${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py" +- "${BINARY_BUILD_DIR}/conf.py" +- @ONLY) +- add_custom_target(python-doc ALL +- ${SPHINX_EXECUTABLE} +- -q -b html +- #-c "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" +- -c "${BINARY_BUILD_DIR}" +- -d "${SPHINX_CACHE_DIR}" +- "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" +- "${SPHINX_HTML_DIR}" +- COMMENT "Building HTML documentation with Sphinx") +- add_dependencies(python-doc _opengmcore ) +- add_dependencies(python-doc _inference ) +- add_dependencies(python-doc _hdf5 ) +- +-else() +- message(STATUS "CANNOT Building HTML documentation with Sphinx , did not find Sphinx") + endif() + + + + + +- From 3807a124222a03b5494eb2c0eb5c66ecacaaa188 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 31 Aug 2014 01:04:16 -0400 Subject: [PATCH 119/220] openblas.cmake: Added an additional step for installing links. Previously, the links pointed to a non-existent libopenblas.so on Mac. Now, links on Mac point to libopenblas.dylib. --- openblas.cmake | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/openblas.cmake b/openblas.cmake index 0724059..e680772 100644 --- a/openblas.cmake +++ b/openblas.cmake @@ -26,11 +26,24 @@ ExternalProject_Add(${openblas_NAME} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) NO_AVX=1 NO_AFFINITY=1 -j8 BUILD_IN_SOURCE 1 # Add TARGET=xxx (where xxx is an architecture) to the BUILD_COMMAND to optimize and/or avoid particular build errors. See README_openblas.txt for details. - INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PREFIX=${BUILDEM_DIR} install && - ln -fs libopenblas.so ${BUILDEM_DIR}/lib/libblas.so && - ln -fs libopenblas.so ${BUILDEM_DIR}/lib/liblapack.so + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PREFIX=${BUILDEM_DIR} install ) +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + ExternalProject_Add_Step(${openblas_NAME} "install_links" # Names of project and custom step + COMMAND ln -fs libopenblas.dylib ${BUILDEM_DIR}/lib/libblas.dylib && + ln -fs libopenblas.dylib ${BUILDEM_DIR}/lib/liblapack.dylib + DEPENDEES install + ) +else() + ExternalProject_Add_Step(${openblas_NAME} "install_links" # Names of project and custom step + COMMAND ln -fs libopenblas.so ${BUILDEM_DIR}/lib/libblas.so && + ln -fs libopenblas.so ${BUILDEM_DIR}/lib/liblapack.so + DEPENDEES install + ) +endif() + + set_target_properties(${openblas_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) endif (NOT openblas_NAME) From 2f6fec50ec9f5f52681cd3b87fdfc1ed38a0b5a3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 31 Aug 2014 01:08:42 -0400 Subject: [PATCH 120/220] spams-python.cmake: Updated to pass environment variable namely BUILDEM_DIR, GCC, and GXX. The variables GCC and GXX should point to GNU gcc and g++ compilers, respectively. patches/spams-python-setup.patch: Simplified the patch to avoid issues on Mac with specifying which libraries to build statically and which to build dynamically. --- patches/spams-python-setup.patch | 59 +++++++++++++------------------- spams-python.cmake | 4 +-- 2 files changed, 25 insertions(+), 38 deletions(-) diff --git a/patches/spams-python-setup.patch b/patches/spams-python-setup.patch index 8948bb7..3576e5c 100644 --- a/patches/spams-python-setup.patch +++ b/patches/spams-python-setup.patch @@ -1,6 +1,8 @@ ---- setup.py_old 2014-07-09 19:03:41.996900059 +0000 -+++ setup.py 2014-07-10 20:18:55.653738878 +0000 -@@ -7,31 +7,35 @@ +diff --git a/setup.py b/setup.py +index 2307122..64570f2 100644 +--- a/setup.py ++++ b/setup.py +@@ -7,31 +7,29 @@ import numpy # includes numpy : package numpy.distutils , numpy.get_include() # python setup.py build --inplace # python setup.py install --prefix=dist, @@ -11,57 +13,42 @@ -cc_flags = ['-fPIC', '-fopenmp'] -link_flags = ['-fopenmp', '-s' ] -libs = ['stdc++', 'blas', 'lapack' ] -+ +-libdirs = [] + +-if osname.startswith("macosx"): +- cc_flags = ['-fPIC', '-fopenmp','-m32'] +- link_flags = ['-m32', '-framework', 'Python'] +buildem_dir = os.environ["BUILDEM_DIR"] -+cc_flags = ['-fPIC', '-fopenmp', '-Wunused-variable'] ++cc_flags = ['-fPIC', '-fopenmp', '-Wunused-variable', '-m64'] +link_flags = ['-fopenmp'] + -+dynamic_libs = ['stdc++', 'blas', 'lapack'] -+static_libs = [] -+ - libdirs = [] ++libs = ['stdc++', 'blas', 'lapack', 'gomp'] +-if osname.startswith("win32"): +- cc_flags = ['-fPIC', '-fopenmp','-DWIN32'] +- link_flags = ['-fopenmp', '-mwindows'] +- path = os.environ['PATH'] +- os.environ['PATH'] = 'C:/MinGW/bin;' + path +- libs = ['stdc++', 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files/R/R-2.15.1/bin/i386'] ++libdirs = [os.path.join(buildem_dir, 'lib')] ++ +# What's the point of a standarized build system if we are just going to route around it. - if osname.startswith("macosx"): -- cc_flags = ['-fPIC', '-fopenmp','-m32'] -- link_flags = ['-m32', '-framework', 'Python'] ++if osname.startswith("macosx"): + cc_flags += ["-F" + os.path.join(buildem_dir, "Frameworks")] -+ link_flags = ['-framework', 'Python'] ++ link_flags = ["-F" + os.path.join(buildem_dir, "Frameworks"), '-framework', 'Python'] +elif osname.startswith("win"): + # Assuming MinGW system. + # Don't mess with path as we have ideally set it the right way already. + # Don't use R for BLAS as we have built BLAS already. + cc_flags += ['-DWIN32'] + link_flags += ['-mwindows'] -+ -+# These assume GCC style syntax is allowed. Should work for clang (when they have openmp). Will not work with other compilers. -+dynamic_libs = ["-l" + _ for _ in dynamic_libs] -+static_libs = ["-Wl,-Bstatic"] + ["-l" + _ for _ in static_libs] + ["-Wl,-Bdynamic"] --if osname.startswith("win32"): -- cc_flags = ['-fPIC', '-fopenmp','-DWIN32'] -- link_flags = ['-fopenmp', '-mwindows'] -- path = os.environ['PATH'] -- os.environ['PATH'] = 'C:/MinGW/bin;' + path -- libs = ['stdc++', 'Rblas', 'Rlapack' ] -- libdirs = ['C:/Program Files/R/R-2.15.1/bin/i386'] -- -if osname.startswith("win-amd64"): - cc_flags = ['-openmp', '-EHsc', '-DWIN32', '-DCYGWIN', '-DWINDOWS', '-I','C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/include'] - link_flags = [] - libs = [ 'Rblas', 'Rlapack' ] - libdirs = ['C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/lib/amd64','C:/Program Files/R/R-2.15.1/bin/x64'] -+libs = dynamic_libs + static_libs ##path = os.environ['PATH']; print "XX OS %s, path %s" %(osname,path) -@@ -42,7 +46,8 @@ - include_dirs = incs, - extra_compile_args = ['-DNDEBUG', '-DUSE_BLAS_LIB'] + cc_flags, - library_dirs = libdirs, -- libraries = libs, -+ # Want to control the formatting. -+ extra_objects = libs, - # strip the .so - extra_link_args = link_flags, - language = 'c++', diff --git a/spams-python.cmake b/spams-python.cmake index 575826f..d85310c 100644 --- a/spams-python.cmake +++ b/spams-python.cmake @@ -33,10 +33,10 @@ ExternalProject_Add(${spams-python_NAME} #${spams-python_SRC_DIR}/setup.py ${PATCH_DIR}/spams-python-setup-atlas.patch CONFIGURE_COMMAND "" - BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_COMMAND BUILDEM_DIR=${BUILDEM_DIR} ${BUILDEM_ENV_STRING} CC=${GCC} CXX=${GXX} ${PYTHON_EXE} setup.py build BUILD_IN_SOURCE 1 TEST_COMMAND "" - INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install + INSTALL_COMMAND BUILDEM_DIR=${BUILDEM_DIR} ${BUILDEM_ENV_STRING} CC=${GCC} CXX=${GXX} ${PYTHON_EXE} setup.py install ) set_target_properties(${spams-python_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) From 5c26b779d9b9f54aa4a05ac8f5805e904c0cf39e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 31 Aug 2014 03:01:27 -0400 Subject: [PATCH 121/220] ilastik.cmake: Added scikit-image as dependency. --- ilastik.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 2357fd2..23280d2 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -28,6 +28,7 @@ include (greenlet) include (cylemon) include (yapsy) include (pgmlink) +include (scikit-image) include (scikit-learn) include (nose) include (faulthandler) @@ -74,7 +75,7 @@ message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: $ set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} ${futures_NAME} ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} - ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) + ${cylemon_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) if (${build_pgmlink}) # Tracking depends on pgmlink, which depends on CPLEX. From 35e38fa401c2973a103b0849a6668859a7b987ce Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 23 Sep 2014 09:03:03 -0400 Subject: [PATCH 122/220] ilastik.cmake: Added qimage2ndarray as a dependency. --- ilastik.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 23280d2..af81f1d 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -35,6 +35,7 @@ include (faulthandler) include (jsonschema) # Required for the dvid extension. include (opengm) include (futures) +include (qimage2ndarray) # select the desired ilastik commit set(DEFAULT_ILASTIK_VERSION 18026ae2efb9e9e04046598cd5fccca3a42bcdaa) # 2014-06-11 @@ -75,7 +76,7 @@ message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: $ set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} ${futures_NAME} ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} - ${cylemon_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) + ${cylemon_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ${qimage2ndarray_NAME}) if (${build_pgmlink}) # Tracking depends on pgmlink, which depends on CPLEX. From 405611abe2838e04cbf798acff00e8e3e65ebf1a Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 23 Sep 2014 09:10:08 -0400 Subject: [PATCH 123/220] templates/exec.template: Added template to construct exec.sh, which acts like exec for BuildEM. ilastik-gui.cmake: Added step to install exec.sh. ilastik.cmake: Added step to install exec.sh. --- ilastik-gui.cmake | 4 ++++ ilastik.cmake | 4 ++++ templates/exec.template | 13 +++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 templates/exec.template diff --git a/ilastik-gui.cmake b/ilastik-gui.cmake index d0d5c5e..4cc514f 100644 --- a/ilastik-gui.cmake +++ b/ilastik-gui.cmake @@ -42,6 +42,10 @@ add_custom_target (${ilastik-gui_NAME} ALL set(SETENV_ILASTIK setenv_ilastik_gui) configure_file(${TEMPLATE_DIR}/${SETENV_ILASTIK}.in ${BUILDEM_DIR}/bin/${SETENV_ILASTIK}.sh @ONLY) +# Create exec script for easy execution. +set(SETENV_ILASTIK setenv_ilastik_gui) +configure_file(${TEMPLATE_DIR}/exec.template ${BUILDEM_DIR}/bin/exec.sh @ONLY) + # Add gui launch script set(LAUNCH_ILASTIK ilastik/ilastik.py) configure_file(${TEMPLATE_DIR}/ilastik_script.template ${BUILDEM_DIR}/bin/ilastik_gui @ONLY) diff --git a/ilastik.cmake b/ilastik.cmake index af81f1d..7534112 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -136,6 +136,10 @@ file(RELATIVE_PATH PYTHON_PREFIX_RELATIVE ${BUILDEM_DIR} ${PYTHON_PREFIX}) set(SETENV_ILASTIK setenv_ilastik_gui) configure_file(${TEMPLATE_DIR}/${SETENV_ILASTIK}.in ${BUILDEM_DIR}/bin/${SETENV_ILASTIK}.sh @ONLY) +# Create exec script for easy execution. +set(SETENV_ILASTIK setenv_ilastik_gui) +configure_file(${TEMPLATE_DIR}/exec.template ${BUILDEM_DIR}/bin/exec.sh @ONLY) + # Add headless launch script set(LAUNCH_ILASTIK "ilastik/ilastik.py --headless") configure_file(${TEMPLATE_DIR}/ilastik_script.template ${BUILDEM_DIR}/bin/ilastik_headless @ONLY) diff --git a/templates/exec.template b/templates/exec.template new file mode 100644 index 0000000..0125d69 --- /dev/null +++ b/templates/exec.template @@ -0,0 +1,13 @@ +#!/bin/bash + +export ILASTIK_PATH= + +# we assume that this script resides in BUILDEM_DIR +export BUILDEM_DIR=$(cd `dirname $0`/.. && pwd) +echo "BUILDEM_DIR: $BUILDEM_DIR" +source $BUILDEM_DIR/bin/@SETENV_ILASTIK@.sh + +# no longer need this shell as +# we just wanted to set environment +# before executing the command. +exec "$@" From cb32191f4a15f7e90ab98698f22070ab1e592b8e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 23 Sep 2014 09:12:59 -0400 Subject: [PATCH 124/220] boost.cmake: Upgraded version of Boost. --- boost.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boost.cmake b/boost.cmake index 22e81b2..ac9ba55 100644 --- a/boost.cmake +++ b/boost.cmake @@ -17,10 +17,10 @@ set (boost_INCLUDE_DIR ${BUILDEM_INCLUDE_DIR}/boost) include_directories (${boost_INCLUDE_DIR}) external_source (boost - 1_51_0 - boost_1_51_0.tar.gz - 6a1f32d902203ac70fbec78af95b3cf8 - http://downloads.sourceforge.net/project/boost/boost/1.51.0) + 1_56_0 + boost_1_56_0.tar.bz2 + a744cf167b05d72335f27c88115f211d + http://hivelocity.dl.sourceforge.net/project/boost/boost/1.56.0) set (boost_LIBS ${BUILDEM_LIB_DIR}/libboost_thread.${BUILDEM_PLATFORM_DYLIB_EXTENSION} ${BUILDEM_LIB_DIR}/libboost_system.${BUILDEM_PLATFORM_DYLIB_EXTENSION} From e26a373d02a1af108d3f621aed90701f9af22a03 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 11 Oct 2014 19:34:55 -0400 Subject: [PATCH 125/220] boost.cmake: Added libboost_container to the boost_LIBS build list. --- boost.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/boost.cmake b/boost.cmake index ac9ba55..d6ed2c3 100644 --- a/boost.cmake +++ b/boost.cmake @@ -22,7 +22,8 @@ external_source (boost a744cf167b05d72335f27c88115f211d http://hivelocity.dl.sourceforge.net/project/boost/boost/1.56.0) -set (boost_LIBS ${BUILDEM_LIB_DIR}/libboost_thread.${BUILDEM_PLATFORM_DYLIB_EXTENSION} +set (boost_LIBS ${BUILDEM_LIB_DIR}/libboost_container.${BUILDEM_PLATFORM_DYLIB_EXTENSION} + ${BUILDEM_LIB_DIR}/libboost_thread.${BUILDEM_PLATFORM_DYLIB_EXTENSION} ${BUILDEM_LIB_DIR}/libboost_system.${BUILDEM_PLATFORM_DYLIB_EXTENSION} ${BUILDEM_LIB_DIR}/libboost_program_options.${BUILDEM_PLATFORM_DYLIB_EXTENSION} ${BUILDEM_LIB_DIR}/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION} @@ -42,7 +43,7 @@ ExternalProject_Add(${boost_NAME} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ./bootstrap.sh - --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread,program_options,chrono + --with-libraries=container,date_time,filesystem,python,regex,serialization,system,test,thread,program_options,chrono --with-python=${PYTHON_EXE} --prefix=${BUILDEM_DIR} BUILD_COMMAND ${BUILDEM_ENV_STRING} ./b2 From 23e892e71615dbff538158d7a45fe44092e24cef Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 11 Oct 2014 19:41:50 -0400 Subject: [PATCH 126/220] vigra.cmake: Added Boost_INCLUDE_DIR to vigra's CMake variables. --- vigra.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/vigra.cmake b/vigra.cmake index 4a8f918..a9ed3ae 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -71,6 +71,7 @@ ExternalProject_Add(${vigra_NAME} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} -DCMAKE_EXE_LINKER_FLAGS=${BUILDEM_LDFLAGS} -DDEPENDENCY_SEARCH_PREFIX=${BUILDEM_DIR} + -DBoost_INCLUDE_DIR=${BUILDEM_DIR}/include -DBoost_LIBRARY_DIRS=${BUILDEM_DIR}/lib # -DBoost_PYTHON_LIBRARY=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_RELEASE=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} From 2dfd619737ae6557fc8533d7796b2a86d6824531 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 11 Oct 2014 19:44:21 -0400 Subject: [PATCH 127/220] vigra.cmake: Changed Python library path to start with PYTHON_PREFIX instead of BUILDEM_DIR. Required on all platforms (including Mac). --- vigra.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vigra.cmake b/vigra.cmake index a9ed3ae..3c558e0 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -76,7 +76,7 @@ ExternalProject_Add(${vigra_NAME} # -DBoost_PYTHON_LIBRARY=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_RELEASE=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_DEBUG=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} - # -DVIGRANUMPY_LIBRARIES=${BUILDEM_DIR}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION} + -DVIGRANUMPY_LIBRARIES=${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DJPEG_INCLUDE_DIR=${BUILDEM_DIR}/include -DJPEG_LIBRARY=${BUILDEM_DIR}/lib/libjpeg.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DHDF5_CORE_LIBRARY=${BUILDEM_DIR}/lib/libhdf5.${BUILDEM_PLATFORM_DYLIB_EXTENSION} From 93f9eb268896c9b573eb9b91c529ad74e2ee2024 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 11 Oct 2014 19:45:31 -0400 Subject: [PATCH 128/220] vigra.cmake: Added the library libboost_container to the vigra CMake variable VIGRANUMPY_LIBRARIES. --- vigra.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vigra.cmake b/vigra.cmake index 3c558e0..a8359be 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -76,7 +76,7 @@ ExternalProject_Add(${vigra_NAME} # -DBoost_PYTHON_LIBRARY=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_RELEASE=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_DEBUG=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} - -DVIGRANUMPY_LIBRARIES=${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION} + -DVIGRANUMPY_LIBRARIES=${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_container.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DJPEG_INCLUDE_DIR=${BUILDEM_DIR}/include -DJPEG_LIBRARY=${BUILDEM_DIR}/lib/libjpeg.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DHDF5_CORE_LIBRARY=${BUILDEM_DIR}/lib/libhdf5.${BUILDEM_PLATFORM_DYLIB_EXTENSION} From db8de6547faabe5db71844f6e5f5a9e36c9f3ffd Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 22 May 2014 14:57:29 +0200 Subject: [PATCH 129/220] Update psutil to fix https://github.com/ilastik/ilastik/issues/891 --- psutil.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/psutil.cmake b/psutil.cmake index 338bd50..faad4ff 100644 --- a/psutil.cmake +++ b/psutil.cmake @@ -13,10 +13,12 @@ include (BuildSupport) include (python) external_source (psutil - 0.6.1 - psutil-0.6.1.tar.gz - 3cfcbfb8525f6e4c70110e44a85e907e - http://psutil.googlecode.com/files) + 2.1.1 + psutil-2.1.1.tar.gz + 72a6b15d589fab11f6ca245b775bc3c6 + https://pypi.python.org/packages/source/p/psutil + FORCE +) message ("Installing ${psutil_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${psutil_NAME} From 14ac04b598ddf4dfb95113e553ba9f4a469e9cb8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 22 Oct 2014 16:06:18 -0400 Subject: [PATCH 130/220] vigra.cmake: Eliminated extra spaces. --- vigra.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vigra.cmake b/vigra.cmake index a8359be..31abfb9 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -64,7 +64,7 @@ ExternalProject_Add(${vigra_NAME} #URL ${vigra_URL} #URL_MD5 ${vigra_MD5} UPDATE_COMMAND ${VIGRA_UPDATE_COMMAND} - PATCH_COMMAND "" + PATCH_COMMAND "" LIST_SEPARATOR ^^ CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${vigra_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} From 67784af54e152ae64692d79bf6061eed8c62aa77 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:46:18 -0500 Subject: [PATCH 131/220] opencv.cmake: Changed order of includes to match the depends list. --- opencv.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.cmake b/opencv.cmake index 7318eed..81960b2 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -12,10 +12,10 @@ include (BuildSupport) include (PatchSupport) include (zlib) -include (openexr) include (libtiff) include (libjpeg) include (libpng) +include (openexr) external_source (opencv 2.4.5 From 63d5dc5523e44afdcfe7ca346772f523f6ddd996 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:47:49 -0500 Subject: [PATCH 132/220] opencv.cmake: Added missing dependencies to OpenCV. --- opencv.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opencv.cmake b/opencv.cmake index 81960b2..d507096 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -16,6 +16,10 @@ include (libtiff) include (libjpeg) include (libpng) include (openexr) +include (qt4) +include (python) +include (numpy) +include (sphinx) external_source (opencv 2.4.5 @@ -28,7 +32,7 @@ set (opencv_LIBS ${BUILDEM_LIB_DIR}/libopencv_ml.so ${BUILDEM_LIB_DIR}/libop message ("Installing ${opencv_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${opencv_NAME} - DEPENDS ${zlib_NAME} ${libjpeg_NAME} ${libpng_NAME} ${libtiff_NAME} ${openexr_NAME} + DEPENDS ${zlib_NAME} ${libjpeg_NAME} ${libpng_NAME} ${libtiff_NAME} ${openexr_NAME} ${qt4_NAME} ${python_NAME} ${numpy_NAME} ${sphinx_NAME} PREFIX ${BUILDEM_DIR} URL ${opencv_URL} URL_MD5 ${opencv_MD5} From 160ef4673d3e97272a3def09bc31e58660b0763b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:48:52 -0500 Subject: [PATCH 133/220] opencv.cmake: Specified paths to python and its includes for configuring OpenCV Python bindings. --- opencv.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.cmake b/opencv.cmake index d507096..1b3ea59 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -38,7 +38,7 @@ ExternalProject_Add(${opencv_NAME} URL_MD5 ${opencv_MD5} UPDATE_COMMAND "" PATCH_COMMAND "" - CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opencv_SRC_DIR} + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opencv_SRC_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXE} -DPYTHON_LIBRARY=${PYTHON_LIBRARY_FILE} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_PATH} -DPYTHON_PACKAGES_PATH=${PYTHON_PREFIX}/lib/python2.7/site-packages -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} From a8e72e8f5736c8dbadc13cfef1de1dec66863074 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 22 Oct 2014 13:55:51 -0400 Subject: [PATCH 134/220] geos.cmake: Added geo, which is a dependency of shapely. --- geos.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 geos.cmake diff --git a/geos.cmake b/geos.cmake new file mode 100644 index 0000000..4704324 --- /dev/null +++ b/geos.cmake @@ -0,0 +1,49 @@ +# +# Install geos from source. +# Provides an open source geometry engine. +# + +if (NOT geos_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +external_source (geos + 3.4.2 + geos-3.4.2.tar.bz2 + fc5df2d926eb7e67f988a43a92683bae + http://download.osgeo.org/geos/) + + +# if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +# set (GEOS_ENABLE_MACOSX_FRAMEWORK ON) +# set (GEOS_ENABLE_MACOSX_FRAMEWORK_UNIXCOMPAT ON) +# else() +# set (GEOS_ENABLE_MACOSX_FRAMEWORK OFF) +# endif() + + +message ("Installing ${geos_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${geos_NAME} + DEPENDS + PREFIX ${BUILDEM_DIR} + URL ${geos_URL} + URL_MD5 ${geos_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${geos_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${geos_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT geos_NAME) From 0e59d03e54379b5ab6b5dd8c8926766e034c30db Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 11:55:19 -0500 Subject: [PATCH 135/220] patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch: Patches a broken test. Known failure on Mac ( http://trac.osgeo.org/geos/ticket/299 ). --- ...s-CoordinateArraySequenceFactoryTest.cpp.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch diff --git a/patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch b/patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch new file mode 100644 index 0000000..6c539a9 --- /dev/null +++ b/patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch @@ -0,0 +1,15 @@ +diff --git a/CoordinateArraySequenceFactoryTest.cpp b/CoordinateArraySequenceFactoryTest.cpp +index 1bf6b66..8fa603e 100644 +--- a/CoordinateArraySequenceFactoryTest.cpp ++++ b/CoordinateArraySequenceFactoryTest.cpp +@@ -51,8 +51,8 @@ namespace tut + + CoordinateArrayFactoryCPtr derived; + derived = dynamic_cast(base); +- ensure( 0 != derived ); +- ensure(typeid(derived).name(), typeid(derived) == typeid(CoordinateArrayFactoryCPtr) ); ++ //ensure( 0 != derived ); ++ //ensure(typeid(derived).name(), typeid(derived) == typeid(CoordinateArrayFactoryCPtr) ); + } + catch (std::exception& e) + { From b191d6cc9afc5a985a7261e41043f8f7728b4b89 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 11:56:09 -0500 Subject: [PATCH 136/220] geos.cmake: Added a patch to geos to bypass a broken test. --- geos.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geos.cmake b/geos.cmake index 4704324..4d72451 100644 --- a/geos.cmake +++ b/geos.cmake @@ -33,7 +33,9 @@ ExternalProject_Add(${geos_NAME} URL ${geos_URL} URL_MD5 ${geos_MD5} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Turns off test that is known failure on Mac and that does not appear to be fixed ( http://trac.osgeo.org/geos/ticket/299 ). + ${geos_SRC_DIR}/tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp ${PATCH_DIR}/geos-CoordinateArraySequenceFactoryTest.cpp.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${geos_SRC_DIR}/configure --prefix=${BUILDEM_DIR} "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" From 8ad76fa76a9805fbaeccf3aa25a382127c78c73c Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 22 Oct 2014 13:56:17 -0400 Subject: [PATCH 137/220] shapely.cmake: Added shapely, which is a dependency of sima. --- shapely.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 shapely.cmake diff --git a/shapely.cmake b/shapely.cmake new file mode 100644 index 0000000..b0b21b9 --- /dev/null +++ b/shapely.cmake @@ -0,0 +1,44 @@ +# +# Provides Python bindings to GEOS as well as additional functionality in analyzing and manipulating geometric objects. +# + +if (NOT shapely_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (geos) +include (python) +include (setuptools) +include (cython) +include (numpy) + +external_source (shapely + 1.4.3 + Shapely-1.4.3.tar.gz + 0b152ead7004cb359a1d5430e0eb94ca + http://pypi.python.org/packages/source/S/Shapely/) + + +# Download and install shapely +message ("Installing ${shapely_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${shapely_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} ${cython_NAME} ${numpy_NAME} ${geos_NAME} + PREFIX ${BUILDEM_DIR} + URL ${shapely_URL} + URL_MD5 ${shapely_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${shapely_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT shapely_NAME) From b48579be1f4fbde2325683028894ab7f775cd19e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:43:30 -0500 Subject: [PATCH 138/220] ffmpeg.cmake: Added ffmpeg, which is required for animations in matplotlib and opencv. --- ffmpeg.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ffmpeg.cmake diff --git a/ffmpeg.cmake b/ffmpeg.cmake new file mode 100644 index 0000000..0b5e3c1 --- /dev/null +++ b/ffmpeg.cmake @@ -0,0 +1,39 @@ +# +# Install ffmpeg from source. +# Provides support for audio and video. +# + +if (NOT ffmpeg_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +external_source (ffmpeg + 2.4.3 + ffmpeg-2.4.3.tar.bz2 + 8da635baff57d7ab704b1daca5a99b47 + http://www.ffmpeg.org/releases/ + FORCE) + +message ("Installing ${ffmpeg_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${ffmpeg_NAME} + PREFIX ${BUILDEM_DIR} + URL ${ffmpeg_URL} + URL_MD5 ${ffmpeg_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${ffmpeg_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + --disable-yasm + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${ffmpeg_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT ffmpeg_NAME) From 001e231604f44b30d1c6a07d6909daec93b7e1a5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:51:17 -0500 Subject: [PATCH 139/220] opencv.cmake: Added FFmpeg as a dependency of OpenCV and provided proper linking flags related to FFmpeg. --- opencv.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opencv.cmake b/opencv.cmake index 1b3ea59..e4728d0 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -16,6 +16,7 @@ include (libtiff) include (libjpeg) include (libpng) include (openexr) +include (ffmpeg) include (qt4) include (python) include (numpy) @@ -32,7 +33,7 @@ set (opencv_LIBS ${BUILDEM_LIB_DIR}/libopencv_ml.so ${BUILDEM_LIB_DIR}/libop message ("Installing ${opencv_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${opencv_NAME} - DEPENDS ${zlib_NAME} ${libjpeg_NAME} ${libpng_NAME} ${libtiff_NAME} ${openexr_NAME} ${qt4_NAME} ${python_NAME} ${numpy_NAME} ${sphinx_NAME} + DEPENDS ${zlib_NAME} ${libjpeg_NAME} ${libpng_NAME} ${libtiff_NAME} ${openexr_NAME} ${ffmpeg_NAME} ${qt4_NAME} ${python_NAME} ${numpy_NAME} ${sphinx_NAME} PREFIX ${BUILDEM_DIR} URL ${opencv_URL} URL_MD5 ${opencv_MD5} @@ -41,7 +42,7 @@ ExternalProject_Add(${opencv_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opencv_SRC_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXE} -DPYTHON_LIBRARY=${PYTHON_LIBRARY_FILE} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_PATH} -DPYTHON_PACKAGES_PATH=${PYTHON_PREFIX}/lib/python2.7/site-packages -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} - -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} + "-DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -liconv -L${BUILDEM_LIB_DIR} -lswresample" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) # TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install From e9db38d8e1217e4357c1d1a23dd08b86dc780f4b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:53:09 -0500 Subject: [PATCH 140/220] opencv.cmake: Update OpenCV version as sima requires 2.4.8 at a minimum. --- opencv.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opencv.cmake b/opencv.cmake index e4728d0..3b955e5 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -23,10 +23,10 @@ include (numpy) include (sphinx) external_source (opencv - 2.4.5 - opencv-2.4.5.tar.gz - 8eac87462c7bec8b89021b723207c623 - http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.5/ + 2.4.8.3 + 2.4.8.3.tar.gz + a64feba01bd74c36ddf04d560d9cafd3 + https://github.com/Itseez/opencv/archive/ ) set (opencv_LIBS ${BUILDEM_LIB_DIR}/libopencv_ml.so ${BUILDEM_LIB_DIR}/libopencv_core.so) From 7a518cde9c3a5756504e544ddc8b052d339933f0 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 22 Oct 2014 13:56:41 -0400 Subject: [PATCH 141/220] sima.cmake: Added sima, which is a tool for "analysis of time-series imaging data arising from fluorescence microscopy". --- sima.cmake | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sima.cmake diff --git a/sima.cmake b/sima.cmake new file mode 100644 index 0000000..4dd8900 --- /dev/null +++ b/sima.cmake @@ -0,0 +1,48 @@ +# +# For use in the analysis of time-series imaging data arising from fluorescence microscopy. +# + +if (NOT sima_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (numpy) +include (scipy) +include (matplotlib) +include (scikit-image) +include (shapely) +include (h5py) +include (opencv) + + +external_source (sima + 0.3.1 + sima-0.3.1.tar.gz + 5910ea2c8c1bbcd7deb001ce64a5a9f4 + http://pypi.python.org/packages/source/s/sima/) + + +# Download and install sima +message ("Installing ${sima_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sima_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${scikit-image_NAME} ${shapely_NAME} ${h5py_NAME} ${opencv_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sima_URL} + URL_MD5 ${sima_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sima_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sima_NAME) From f029dfdb61db0c243c170bda2763231a7b030b5d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 11:03:20 -0500 Subject: [PATCH 142/220] patches/sima-extract.py.patch: Use non-sparse inv from SciPy as our version does not include the sparse implementation. patches/sima-misc-__init__.py.patch: Use LooseVersion instead of StrictVersion for enforcing which OpenCV version is used. patches/sima-normcut.py.patch: Use LooseVersion instead of StrictVersion for enforcing which OpenCV version is used. patches/sima-segment.py.patch: Use LooseVersion instead of StrictVersion for enforcing which OpenCV version is used. Also, nanmean is not in scipy, but is in scipy.stats. However, bottleneck's nanmean is roughly an order of magnitude faster. --- patches/sima-extract.py.patch | 13 +++++++++++++ patches/sima-misc-__init__.py.patch | 22 ++++++++++++++++++++++ patches/sima-normcut.py.patch | 22 ++++++++++++++++++++++ patches/sima-segment.py.patch | 24 ++++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 patches/sima-extract.py.patch create mode 100644 patches/sima-misc-__init__.py.patch create mode 100644 patches/sima-normcut.py.patch create mode 100644 patches/sima-segment.py.patch diff --git a/patches/sima-extract.py.patch b/patches/sima-extract.py.patch new file mode 100644 index 0000000..b98522c --- /dev/null +++ b/patches/sima-extract.py.patch @@ -0,0 +1,13 @@ +diff --git a/extract.py b/extract.py +index 34d14f4..9d19c34 100644 +--- a/extract.py ++++ b/extract.py +@@ -8,7 +8,7 @@ from multiprocessing import Pool, cpu_count + + import numpy as np + from scipy.sparse import vstack, diags, csc_matrix +-from scipy.sparse.linalg import inv ++from scipy.linalg import inv + + + def _demixing_matrix(dataset): diff --git a/patches/sima-misc-__init__.py.patch b/patches/sima-misc-__init__.py.patch new file mode 100644 index 0000000..7c39cf4 --- /dev/null +++ b/patches/sima-misc-__init__.py.patch @@ -0,0 +1,22 @@ +diff --git a/misc/__init__.py b/misc/__init__.py +index 87b42da..cc73f9e 100644 +--- a/misc/__init__.py ++++ b/misc/__init__.py +@@ -1,7 +1,7 @@ + import os + import itertools as it + import errno +-from distutils.version import StrictVersion ++from distutils.version import LooseVersion + + from numpy import nanmax + try: +@@ -9,7 +9,7 @@ try: + except ImportError: + cv2_available = False + else: +- cv2_available = StrictVersion(cv2.__version__) >= StrictVersion('2.4.8') ++ cv2_available = LooseVersion(cv2.__version__) >= LooseVersion('2.4.8') + + + def lazyprop(fn): diff --git a/patches/sima-normcut.py.patch b/patches/sima-normcut.py.patch new file mode 100644 index 0000000..eb86250 --- /dev/null +++ b/patches/sima-normcut.py.patch @@ -0,0 +1,22 @@ +diff --git a/normcut.py b/normcut.py +index 48e5000..b6fc90a 100644 +--- a/normcut.py ++++ b/normcut.py +@@ -7,7 +7,7 @@ Reference + IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, + VOL. 22, NO. 8, AUGUST 2000. + """ +-from distutils.version import StrictVersion ++from distutils.version import LooseVersion + + import numpy as np + from scipy.sparse.linalg import eigsh +@@ -19,7 +19,7 @@ try: + except ImportError: + cv2_available = False + else: +- cv2_available = StrictVersion(cv2.__version__) >= StrictVersion('2.4.8') ++ cv2_available = LooseVersion(cv2.__version__) >= LooseVersion('2.4.8') + + + def normcut_vectors(affinity_matrix, k): diff --git a/patches/sima-segment.py.patch b/patches/sima-segment.py.patch new file mode 100644 index 0000000..db23f80 --- /dev/null +++ b/patches/sima-segment.py.patch @@ -0,0 +1,24 @@ +diff --git a/segment.py b/segment.py +index d927b0c..153ef8f 100644 +--- a/segment.py ++++ b/segment.py +@@ -1,6 +1,6 @@ + import os + import itertools as it +-from distutils.version import StrictVersion ++from distutils.version import LooseVersion + + import numpy as np + from scipy import sparse, ndimage +@@ -11,9 +11,9 @@ try: + except ImportError: + cv2_available = False + else: +- cv2_available = StrictVersion(cv2.__version__) >= StrictVersion('2.4.8') ++ cv2_available = LooseVersion(cv2.__version__) >= LooseVersion('2.4.8') + +-from scipy import nanmean ++from scipy.stats import nanmean + try: + from sklearn.decomposition import FastICA + except ImportError: From 48a682915c43feefd1f4aa18ee633e54365b15a5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:55:27 -0500 Subject: [PATCH 143/220] sima.cmake: Added patches to SIMA to relax OpenCV version constraints from StrictVersion to LooseVersion. Also, used nanmean from SciPy (however bottleneck's nanmean is faster by roughly an order of magnitude). Do not have access to sparse inversion in our version of SciPy. So, we used a non-sparse inversion, which may be slower. --- sima.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sima.cmake b/sima.cmake index 4dd8900..74461c9 100644 --- a/sima.cmake +++ b/sima.cmake @@ -36,7 +36,12 @@ ExternalProject_Add(${sima_NAME} URL ${sima_URL} URL_MD5 ${sima_MD5} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Turns off test that is known failure on Mac. + ${sima_SRC_DIR}/sima/extract.py ${PATCH_DIR}/sima-extract.py.patch + ${sima_SRC_DIR}/sima/misc/__init__.py ${PATCH_DIR}/sima-misc-__init__.py.patch + ${sima_SRC_DIR}/sima/normcut.py ${PATCH_DIR}/sima-normcut.py.patch + ${sima_SRC_DIR}/sima/segment.py ${PATCH_DIR}/sima-segment.py.patch CONFIGURE_COMMAND "" BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build BUILD_IN_SOURCE 1 From 931c17338d4cca3a8e298b68995cb0e1cbdbe68b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 12 Dec 2014 09:56:38 -0500 Subject: [PATCH 144/220] patches/sima-motion.py.patch: Corrected to use nanmean from SciPy. --- patches/sima-motion.py.patch | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 patches/sima-motion.py.patch diff --git a/patches/sima-motion.py.patch b/patches/sima-motion.py.patch new file mode 100644 index 0000000..942e7a0 --- /dev/null +++ b/patches/sima-motion.py.patch @@ -0,0 +1,49 @@ +diff --git a/motion.py b/motion.py +index e747353..31bc941 100644 +--- a/motion.py ++++ b/motion.py +@@ -21,7 +21,7 @@ from numpy.linalg import det, svd, pinv + from scipy.special import gammaln + from scipy.signal import fftconvolve + from scipy.cluster.vq import kmeans2 +-from scipy.stats import nanstd ++from scipy.stats import nanmean, nanstd + from scipy.stats.mstats import mquantiles + from scipy.ndimage.filters import gaussian_filter + +@@ -99,7 +99,7 @@ def _estimate_movement_model(shifts, num_rows): + shifts.shape[1] * num_rows)) + assert det(cov_matrix) > 0 + +- mean_shift = np.nanmean(shifts, axis=1) ++ mean_shift = nanmean(shifts, axis=1) + centered_shifts = np.nan_to_num( + shifts - + np.dot(mean_shift.reshape([2, 1]), np.ones([1, shifts.shape[1]])) +@@ -349,7 +349,7 @@ class _MCImagingDataset(ImagingDataset): + pixel_means, pixel_variances = self._pixel_distribution() + cov_matrix_est, decay_matrix, log_transition_matrix = \ + _estimate_movement_model(shifts, self.num_rows) +- mean_shift = np.nanmean(shifts, axis=1) ++ mean_shift = nanmean(shifts, axis=1) + + # add a bit of extra room to move around + extra_buffer = ((max_displacement - np.nanmax(shifts, 1) + +@@ -706,7 +706,7 @@ class _MCImagingDataset(ImagingDataset): + The displacement to add to each shift to align the minimal shift + with the edge of the corrected image. + """ +- good_corr = correlations >= np.nanmean(correlations) - \ ++ good_corr = correlations >= nanmean(correlations) - \ + 2 * nanstd(correlations) + # only include image frames with sufficiently high correlation + min_shifts = np.nanmin(shifts[:, good_corr], axis=1).astype(int) +@@ -760,7 +760,7 @@ class _MCImagingDataset(ImagingDataset): + array + The photon-to-intensity gains for each channel. + """ +- corr_mean = np.nanmean(correlations) ++ corr_mean = nanmean(correlations) + corr_stdev = nanstd(correlations) + # Calculate displacements between consecutive images + diffs = np.diff(shifts, axis=1) From 72bb7ceb3bcbaf518ee302ab3c09cbcf58bdc0ff Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 12 Dec 2014 09:58:34 -0500 Subject: [PATCH 145/220] sima.cmake: Apply sima-motion.py.patch. --- sima.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/sima.cmake b/sima.cmake index 74461c9..2456071 100644 --- a/sima.cmake +++ b/sima.cmake @@ -40,6 +40,7 @@ ExternalProject_Add(${sima_NAME} # Turns off test that is known failure on Mac. ${sima_SRC_DIR}/sima/extract.py ${PATCH_DIR}/sima-extract.py.patch ${sima_SRC_DIR}/sima/misc/__init__.py ${PATCH_DIR}/sima-misc-__init__.py.patch + ${sima_SRC_DIR}/sima/motion.py ${PATCH_DIR}/sima-motion.py.patch ${sima_SRC_DIR}/sima/normcut.py ${PATCH_DIR}/sima-normcut.py.patch ${sima_SRC_DIR}/sima/segment.py ${PATCH_DIR}/sima-segment.py.patch CONFIGURE_COMMAND "" From 8d7f558b0199e66e83520b1b120d91853f3a0d58 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 12 Dec 2014 14:13:07 -0500 Subject: [PATCH 146/220] rank_filter.cmake: Provide support for building the Python module rank_filter. --- rank_filter.cmake | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 rank_filter.cmake diff --git a/rank_filter.cmake b/rank_filter.cmake new file mode 100644 index 0000000..fcca1bf --- /dev/null +++ b/rank_filter.cmake @@ -0,0 +1,52 @@ +# +# Install rank_filter module from source +# + +if (NOT rank_filter_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +set(DISABLE_VIGRANUMPY 0) + +include (python) +include (numpy) +include (boost) +include (vigra) +include (nose) + +external_git_repo (rank_filter + v0.1 + https://github.com/jakirkham/rank_filter) + +message("Installing ${rank_filter_NAME}/${VIGRA_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${rank_filter_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${boost_NAME} ${vigra_NAME} ${nose_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${rank_filter_URL} + GIT_TAG ${rank_filter_TAG} + PATCH_COMMAND "" + LIST_SEPARATOR ^^ + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${rank_filter_SRC_DIR} + -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} + -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_EXE_LINKER_FLAGS=${BUILDEM_LDFLAGS} + -DDEPENDENCY_SEARCH_PREFIX=${BUILDEM_DIR} + -DBOOST_ROOT=${BUILDEM_DIR} + -DVIGRA_ROOT=${BUILDEM_DIR} + "-DCMAKE_CXX_FLAGS=-pthread ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "-DCMAKE_CXX_LINK_FLAGS=-pthread ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + -DCMAKE_CXX_FLAGS_RELEASE=-O2\ -DNDEBUG + -DCMAKE_CXX_FLAGS_DEBUG="${CMAKE_CXX_FLAGS_DEBUG}" + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) test + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${rank_filter_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT rank_filter_NAME) + From f7166fb723482b9a096fe7f3357dd66ea811dd28 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Mon, 15 Dec 2014 13:52:37 -0500 Subject: [PATCH 147/220] templates/exec.template: Make exec.template an executable. This way, when it is copied to bin, it should be an executable. --- templates/exec.template | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 templates/exec.template diff --git a/templates/exec.template b/templates/exec.template old mode 100644 new mode 100755 From 123ddbe499c2240eaae6f2740f41d8d08cede381 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 18 Dec 2014 09:48:30 -0500 Subject: [PATCH 148/220] ilastik.cmake: Update the ilastik version. --- ilastik.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 7534112..61ad166 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -38,7 +38,7 @@ include (futures) include (qimage2ndarray) # select the desired ilastik commit -set(DEFAULT_ILASTIK_VERSION 18026ae2efb9e9e04046598cd5fccca3a42bcdaa) # 2014-06-11 +set(DEFAULT_ILASTIK_VERSION 779685cc1e6b78b633fcd1737c5eae78e8b72ddb) # 2014-09-18 IF(NOT DEFINED ILASTIK_VERSION) SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}") ENDIF() From 66f53143b14ad841e6929d4a9f20cc343251690c Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 6 Jan 2015 14:51:37 -0500 Subject: [PATCH 149/220] nanshe.cmake: Adds nanshe to the src directory just like ilastik. Does not install in site-packages. --- nanshe.cmake | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 nanshe.cmake diff --git a/nanshe.cmake b/nanshe.cmake new file mode 100644 index 0000000..146ffe3 --- /dev/null +++ b/nanshe.cmake @@ -0,0 +1,42 @@ +# Activity based segmentation of Calcium image data based on ( dx.doi.org/10.1109/ISBI.2013.6556660 ). + +if (NOT nanshe_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (pip) +include (scipy-stack) +include (ilastik) +include (spams-python) +include (rank_filter) + + +external_git_repo(nanshe + HEAD + https://github.com/jakirkham/nanshe) + + +# Download and install nanshe +message ("Installing ${nanshe_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${nanshe_NAME} + DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${nanshe_URL} + GIT_TAG ${nanshe_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + BUILD_IN_SOURCE 1 + INSTALL_COMMAND "" +) + +set_target_properties(${nanshe_NAME} PROPERTIES EXCLUDE_FROM_ALL OFF) + +endif (NOT nanshe_NAME) From 9ee3036c1da1e7557ef1dc4ea1f551256861b4f3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 6 Jan 2015 16:44:52 -0500 Subject: [PATCH 150/220] templates/setenv_ilastik_gui.in: Add nanshe to the PYTHONPATH as well. --- templates/setenv_ilastik_gui.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/setenv_ilastik_gui.in b/templates/setenv_ilastik_gui.in index 32375a0..e5a48fb 100644 --- a/templates/setenv_ilastik_gui.in +++ b/templates/setenv_ilastik_gui.in @@ -33,6 +33,8 @@ else export PYTHONPATH=$ILASTIK_PATH/lazyflow:$PYTHONPATH export PYTHONPATH=$ILASTIK_PATH/lazyflow/lazyflow/drtile:$PYTHONPATH export PYTHONPATH=$ILASTIK_PATH/volumina:$PYTHONPATH + + export PYTHONPATH=$BUILDEM_DIR/src/nanshe-git:$PYTHONPATH export PATH=$PYTHON_PREFIX/bin:$PATH export PATH=$BUILDEM_DIR/bin:$PATH From 1aad659899e00d8a8347bc20fba51279237aa427 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 6 Jan 2015 16:46:05 -0500 Subject: [PATCH 151/220] templates/setenv_ilastik_headless.in: Add nanshe to the PYTHONPATH as well. --- templates/setenv_ilastik_headless.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/setenv_ilastik_headless.in b/templates/setenv_ilastik_headless.in index 481c696..9430644 100644 --- a/templates/setenv_ilastik_headless.in +++ b/templates/setenv_ilastik_headless.in @@ -26,6 +26,8 @@ else export PYTHONPATH=$ILASTIK_PATH/ilastik:$PYTHONPATH export PYTHONPATH=$ILASTIK_PATH/lazyflow:$PYTHONPATH export PYTHONPATH=$ILASTIK_PATH/lazyflow/lazyflow/drtile:$PYTHONPATH + + export PYTHONPATH=$BUILDEM_DIR/src/nanshe-git:$PYTHONPATH export PATH=$PYTHON_PREFIX/bin:$PATH export PATH=$BUILDEM_DIR/bin:$PATH From 4ab53a7e80d252c484bec0dc8516472a2933bdea Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 9 Jan 2015 20:14:48 -0500 Subject: [PATCH 152/220] hdf5storage.cmake: Adds additional support for the HDF5 format in Python. Provides method for loading and saving MATLAB v7.3 files. Will fallback to SciPy if the version is older. --- hdf5storage.cmake | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 hdf5storage.cmake diff --git a/hdf5storage.cmake b/hdf5storage.cmake new file mode 100644 index 0000000..a82b256 --- /dev/null +++ b/hdf5storage.cmake @@ -0,0 +1,47 @@ +# +# A python module to provide additional support for the HDF5 format. +# Is able to load and save MATLAB v7.3 file. Will fallback to SciPy when it is unable to. +# + + +if (NOT hdf5storage_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (numpy) +include (h5py) +include (scipy) + +external_source (hdf5storage +# Run the fake file using echo to initialize the shell. + 0.1.3 + hdf5storage-0.1.3.zip + 1bdda81bd88ce2f23adbda0217e16375 + https://pypi.python.org/packages/source/h/hdf5storage/) + + +# Download and install hdf5storage +message ("Installing ${hdf5storage_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${hdf5storage_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${h5py_NAME} ${scipy_NAME} + PREFIX ${BUILDEM_DIR} + URL ${hdf5storage_URL} + URL_MD5 ${hdf5storage_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${hdf5storage_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT hdf5storage_NAME) + From 4707213836dc8144764172f6797a2ec3ae4492ff Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 9 Jan 2015 22:59:50 -0500 Subject: [PATCH 153/220] templates/exec.template: Cleaned up comments. --- templates/exec.template | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/exec.template b/templates/exec.template index 0125d69..3f20536 100755 --- a/templates/exec.template +++ b/templates/exec.template @@ -2,12 +2,10 @@ export ILASTIK_PATH= -# we assume that this script resides in BUILDEM_DIR +# We assume that this script resides in BUILDEM_DIR. export BUILDEM_DIR=$(cd `dirname $0`/.. && pwd) echo "BUILDEM_DIR: $BUILDEM_DIR" source $BUILDEM_DIR/bin/@SETENV_ILASTIK@.sh -# no longer need this shell as -# we just wanted to set environment -# before executing the command. +# No longer need this shell as we just wanted to set environment before executing the command. exec "$@" From f7bd0967529d66b517b51cbb13b8adf61e88f286 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 9 Jan 2015 23:00:23 -0500 Subject: [PATCH 154/220] templates/exec.template: Removed quotes as they were unnecessary and hindered some behavior (i.e. opening a subshell). --- templates/exec.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/exec.template b/templates/exec.template index 3f20536..994b717 100755 --- a/templates/exec.template +++ b/templates/exec.template @@ -8,4 +8,4 @@ echo "BUILDEM_DIR: $BUILDEM_DIR" source $BUILDEM_DIR/bin/@SETENV_ILASTIK@.sh # No longer need this shell as we just wanted to set environment before executing the command. -exec "$@" +exec $@ From 047d484b3ab86504f26c3c7a87afc21029e3adf1 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:22:28 -0500 Subject: [PATCH 155/220] gmpy.cmake: Use PyPI for downloads instead of their Google Code page. --- gmpy.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gmpy.cmake b/gmpy.cmake index 44ea9ce..0254416 100644 --- a/gmpy.cmake +++ b/gmpy.cmake @@ -22,7 +22,7 @@ external_source (gmpy 2.0.3 gmpy2-2.0.3.zip 63f367b4dceb20dcd72c143e7c9a8632 - http://gmpy.googlecode.com/files/ + http://pypi.python.org/packages/source/g/gmpy2/ FORCE) From e6879c2c0f6379e444c26747a86cb0e1633d2e3f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:28:19 -0500 Subject: [PATCH 156/220] gmpy.cmake: Turn off FORCE as the archive is already in the cache. --- gmpy.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gmpy.cmake b/gmpy.cmake index 0254416..49861c5 100644 --- a/gmpy.cmake +++ b/gmpy.cmake @@ -22,8 +22,7 @@ external_source (gmpy 2.0.3 gmpy2-2.0.3.zip 63f367b4dceb20dcd72c143e7c9a8632 - http://pypi.python.org/packages/source/g/gmpy2/ - FORCE) + http://pypi.python.org/packages/source/g/gmpy2/) message ("Installing ${gmpy_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From 2e89bb66b612689a2d2860145b61eaf4f3731c54 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:30:15 -0500 Subject: [PATCH 157/220] gmpy.cmake: Bump version from 2.0.3 to 2.0.5. --- gmpy.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gmpy.cmake b/gmpy.cmake index 49861c5..f5e7e8a 100644 --- a/gmpy.cmake +++ b/gmpy.cmake @@ -19,9 +19,9 @@ include (mpc) external_source (gmpy - 2.0.3 - gmpy2-2.0.3.zip - 63f367b4dceb20dcd72c143e7c9a8632 + 2.0.5 + gmpy2-2.0.5.zip + 95f008bcab6372164358123f43e3f490 http://pypi.python.org/packages/source/g/gmpy2/) From 170cdefa08f2363b78e7f095599f5014b1fab2fd Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:53:56 -0500 Subject: [PATCH 158/220] ipython.cmake: Add newline at EOF. --- ipython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipython.cmake b/ipython.cmake index ee3feff..a27d4db 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -40,4 +40,4 @@ ExternalProject_Add(${ipython_NAME} set_target_properties(${ipython_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT ipython_NAME) \ No newline at end of file +endif (NOT ipython_NAME) From 720f72f9181e35a366a7e5be60a86d8274bac62c Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:58:38 -0500 Subject: [PATCH 159/220] ann.cmake: Add terminal /. --- ann.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ann.cmake b/ann.cmake index dbe0ee6..64f5cb9 100644 --- a/ann.cmake +++ b/ann.cmake @@ -15,7 +15,7 @@ external_source (ann 1.1.2 ann_1.1.2.tar.gz 7ffaacc7ea79ca39d4958a6378071365 - http://www.cs.umd.edu/~mount/ANN/Files/1.1.2 + http://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ FORCE) message ("Installing ${ann_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From 9a127a412bf2e6802daf037409ce4a2ed9baa122 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:58:54 -0500 Subject: [PATCH 160/220] ann.cmake: Turn off FORCE as it is already in downloads. --- ann.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ann.cmake b/ann.cmake index 64f5cb9..2ce809c 100644 --- a/ann.cmake +++ b/ann.cmake @@ -15,8 +15,7 @@ external_source (ann 1.1.2 ann_1.1.2.tar.gz 7ffaacc7ea79ca39d4958a6378071365 - http://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ - FORCE) + http://www.cs.umd.edu/~mount/ANN/Files/1.1.2/) message ("Installing ${ann_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ann_NAME} From 0a74b0a257070245a1443ad1bafc6794977ae735 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:01:25 -0500 Subject: [PATCH 161/220] dlib.cmake: Turn off FORCE as it is already in downloads. --- dlib.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlib.cmake b/dlib.cmake index 7bb3c6e..d13cf39 100644 --- a/dlib.cmake +++ b/dlib.cmake @@ -15,8 +15,7 @@ external_source (dlib 18.3 dlib-18.3.tar.bz2 1ad26ec7bddccf8a605e1edfd0620c65 - http://downloads.sourceforge.net/project/dclib/dlib/v18.3 - FORCE) + http://downloads.sourceforge.net/project/dclib/dlib/v18.3) message ("Installing ${dlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${dlib_NAME} From 1ec962a737cac757b1aeb30a8e8d12c257b97ae6 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:11:28 -0500 Subject: [PATCH 162/220] libxml2.cmake: Turn off FORCE as it is already in downloads. --- libxml2.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/libxml2.cmake b/libxml2.cmake index 1fe8022..d6fac2e 100644 --- a/libxml2.cmake +++ b/libxml2.cmake @@ -16,7 +16,6 @@ if (NOT libxml2_NAME) libxml2-2.9.1.tar.gz 9c0cfef285d5c4a5c80d00904ddab380 ftp://xmlsoft.org/libxml2 - FORCE ) From 19fd88ed432b2f265eeacd4ba99e5e0a83bec620 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:55:35 -0500 Subject: [PATCH 163/220] psutil.cmake: Turn off FORCE as it is already in downloads. --- psutil.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/psutil.cmake b/psutil.cmake index faad4ff..890e932 100644 --- a/psutil.cmake +++ b/psutil.cmake @@ -17,7 +17,6 @@ external_source (psutil psutil-2.1.1.tar.gz 72a6b15d589fab11f6ca245b775bc3c6 https://pypi.python.org/packages/source/p/psutil - FORCE ) message ("Installing ${psutil_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From 307dcfa951017ce53f404d5263f38fcb1c8e28ea Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:42:18 -0500 Subject: [PATCH 164/220] matplotlib.cmake: Bump version to 1.4.2. --- matplotlib.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index d08062a..4d34c4f 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -28,10 +28,10 @@ include (freetype2) include (tornado) external_source (matplotlib - 1.1.1 - matplotlib-1.1.1.tar.gz - 8cbeaae8ba9da703d926e74c3e7c8a57 - http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.1.1) + 1.4.2 + matplotlib-1.4.2.tar.gz + 7d22efb6cce475025733c50487bd8898 + http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.4.2) message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} From b7879f023fbf4ec322e0e8fc07c7c4edb9abcb3e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 20:12:24 -0500 Subject: [PATCH 165/220] ipython.cmake: Bump version from 1.2.1 to 2.1.0. --- ipython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipython.cmake b/ipython.cmake index a27d4db..c451de2 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -21,7 +21,7 @@ include (jinja) external_git_repo(ipython - rel-1.2.1 #9c4f59ddd54d797072d28d2d5549bc5ea234216d + rel-2.1.0 #681fd77d0aa43f0b2648674ce3da9185021c0e3d https://github.com/ipython/ipython/) message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From ca333c9bcf712da99facc63ed994296e9ad2e154 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:52:28 -0500 Subject: [PATCH 166/220] opencv.cmake: Correct spacing. --- opencv.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencv.cmake b/opencv.cmake index 3b955e5..4fce495 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -43,8 +43,8 @@ ExternalProject_Add(${opencv_NAME} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} "-DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -liconv -L${BUILDEM_LIB_DIR} -lswresample" - BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) -# TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) +# TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) From b2f8382f0ae1363b5d285bfe65cd692556419128 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 20:59:19 -0500 Subject: [PATCH 167/220] python-markdown.cmake: Markdown parser for Python. --- python-markdown.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 python-markdown.cmake diff --git a/python-markdown.cmake b/python-markdown.cmake new file mode 100644 index 0000000..ab4678f --- /dev/null +++ b/python-markdown.cmake @@ -0,0 +1,37 @@ +# Adds python-markdown, a markdown parser. + +if (NOT python-markdown_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) + +external_git_repo(python-markdown + 2.5.2-final # a9195fd2261d8a29762f7d8fc34b520c94fd09ec + https://github.com/waylan/Python-Markdown) + + +# Download and install python-markdown +message ("Installing ${python-markdown_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${python-markdown_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${python-markdown_URL} + GIT_TAG ${python-markdown_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${python-markdown_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT python-markdown_NAME) From 7a3c6fb266e69550750d0b399678cebf75e6dbad Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 21:01:47 -0500 Subject: [PATCH 168/220] ipython.cmake: Correct spacing. --- ipython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipython.cmake b/ipython.cmake index c451de2..691f822 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -28,7 +28,7 @@ message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ipython_NAME} DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} PREFIX ${BUILDEM_DIR} - GIT_REPOSITORY ${ipython_URL} + GIT_REPOSITORY ${ipython_URL} GIT_TAG ${ipython_TAG} UPDATE_COMMAND "" PATCH_COMMAND "" From 830ffbb759502ce87a51fc055b454251094c8940 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 21:02:00 -0500 Subject: [PATCH 169/220] ipython.cmake: Make python-markdown a dependency. --- ipython.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipython.cmake b/ipython.cmake index 691f822..7f61689 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -18,6 +18,7 @@ include (nose) include (pygments) include (tornado) include (jinja) +include (python-markdown) external_git_repo(ipython @@ -26,7 +27,7 @@ external_git_repo(ipython message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ipython_NAME} - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} ${python-markdown_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${ipython_URL} GIT_TAG ${ipython_TAG} From 228eb73e60def125dd2977f08f944d1b16104a8d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 20 Jan 2015 11:36:13 -0500 Subject: [PATCH 170/220] pylibtiff.cmake: Added pylibtiff to provide Python bindings to libtiff. --- pylibtiff.cmake | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pylibtiff.cmake diff --git a/pylibtiff.cmake b/pylibtiff.cmake new file mode 100644 index 0000000..e1ccea9 --- /dev/null +++ b/pylibtiff.cmake @@ -0,0 +1,45 @@ +# +# Provides a thin wrapper for libtiff to be used from Python. +# + +if (NOT pylibtiff_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (libtiff) +include (python) +include (setuptools) +include (numpy) +include (nose) + +external_source (pylibtiff + 0.4.0 + libtiff-0.4.0.tar.gz + f7cad14620548b21bf05a276a040f487 + http://pypi.python.org/packages/source/l/libtiff/) + + +# Download and install pylibtiff +message ("Installing ${pylibtiff_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pylibtiff_NAME} + DEPENDS ${libtiff_NAME} ${python_NAME} ${setuptools_NAME} ${numpy_NAME} ${nose_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pylibtiff_URL} + URL_MD5 ${pylibtiff_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pylibtiff_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pylibtiff_NAME) From 7d054beb95b0c1834e8e86f2b9b05e611900630e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 23 Jan 2015 00:44:13 -0500 Subject: [PATCH 171/220] cloud_sptheme.cmake: Added cloud theme. A theme for Sphinx. --- cloud_sptheme.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cloud_sptheme.cmake diff --git a/cloud_sptheme.cmake b/cloud_sptheme.cmake new file mode 100644 index 0000000..f9b6e1e --- /dev/null +++ b/cloud_sptheme.cmake @@ -0,0 +1,40 @@ +# +# Install cloud_sptheme from source. Provides theme for Sphinx. +# + +if (NOT cloud_sptheme_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (sphinx) + +external_source (cloud_sptheme + 1.6 + cloud_sptheme-1.6.tar.gz + 23d5fce0b87836d9f29573d6ee6a9bc1 + https://pypi.python.org/packages/source/c/cloud_sptheme/) + +message ("Installing ${cloud_sptheme_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${cloud_sptheme_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} + PREFIX ${BUILDEM_DIR} + URL ${cloud_sptheme_URL} + URL_MD5 ${cloud_sptheme_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${cloud_sptheme_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT cloud_sptheme_NAME) From d181e3a4d37db29fb9f87df16f5684d6debd7e67 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 23 Jan 2015 01:07:49 -0500 Subject: [PATCH 172/220] nanshe.cmake: Add cloud_sptheme as a dependency. --- nanshe.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nanshe.cmake b/nanshe.cmake index 146ffe3..08a04b5 100644 --- a/nanshe.cmake +++ b/nanshe.cmake @@ -14,6 +14,7 @@ include (scipy-stack) include (ilastik) include (spams-python) include (rank_filter) +include (cloud_sptheme) external_git_repo(nanshe @@ -25,7 +26,7 @@ external_git_repo(nanshe message ("Installing ${nanshe_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${nanshe_NAME} - DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} + DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} ${cloud_sptheme_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${nanshe_URL} GIT_TAG ${nanshe_TAG} From f23144751d05dead67d98814799246a7b5c8d479 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 20 Feb 2015 13:57:01 -0500 Subject: [PATCH 173/220] vigra.cmake: Supply paths for fftw3f support. --- vigra.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vigra.cmake b/vigra.cmake index 31abfb9..1e9e1db 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -82,9 +82,9 @@ ExternalProject_Add(${vigra_NAME} -DHDF5_CORE_LIBRARY=${BUILDEM_DIR}/lib/libhdf5.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DHDF5_HL_LIBRARY=${BUILDEM_DIR}/lib/libhdf5_hl.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DHDF5_INCLUDE_DIR=${BUILDEM_DIR}/include - -DFFTW3F_INCLUDE_DIR= + -DFFTW3F_INCLUDE_DIR=${BUILDEM_DIR}/include -DWITH_VIGRANUMPY=${WITH_VIGRANUMPY} - -DFFTW3F_LIBRARY= + -DFFTW3F_LIBRARY=${BUILDEM_DIR}/lib/libfftw3f.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DFFTW3_INCLUDE_DIR=${BUILDEM_DIR}/include -DFFTW3_LIBRARY=${BUILDEM_DIR}/lib/libfftw3.${BUILDEM_PLATFORM_DYLIB_EXTENSION} "-DCMAKE_CXX_FLAGS=-pthread ${VIGRA_CXX_FLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" From fbe15b909e8322a265d3b5492f96e543063c23c5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 07:21:30 -0500 Subject: [PATCH 174/220] cytoolz.cmake: A Cython-based version of toolz, which is in all other ways compliant. --- cytoolz.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 cytoolz.cmake diff --git a/cytoolz.cmake b/cytoolz.cmake new file mode 100644 index 0000000..394ecac --- /dev/null +++ b/cytoolz.cmake @@ -0,0 +1,39 @@ +# +# Install cytoolz library from source +# + +if (NOT cytoolz_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (cytoolz + 0.7.1 + cytoolz-0.7.1.tar.gz + ddc3cc4a00fa0bdd3e7a837cd8d2df31 + https://pypi.python.org/packages/source/c/cytoolz +) + +message ("Installing ${cytoolz_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${cytoolz_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${cytoolz_URL} + URL_MD5 ${cytoolz_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND "" +) + +set_target_properties(${cytoolz_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT cytoolz_NAME) From 675d6ed08233572ec39eeae7dfa4e9a244b3b37a Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 07:23:31 -0500 Subject: [PATCH 175/220] dill.cmake: Added dill, which provides support pickling a larger set of Python objects. --- dill.cmake | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 dill.cmake diff --git a/dill.cmake b/dill.cmake new file mode 100644 index 0000000..8ab8255 --- /dev/null +++ b/dill.cmake @@ -0,0 +1,36 @@ +# Provides dill, which provides support for pickling with a larger set of Python objects. + +if (NOT dill_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_git_repo(dill + dill-0.2.2 #8d3fb53d218082b14839f3e2aa6a3b0f975fb57c + https://github.com/uqfoundation/dill) + + +# Download and install dill +message ("Installing ${dill_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${dill_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${dill_URL} + GIT_TAG ${dill_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${dill_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT dill_NAME) From 92034ddc3feb7e1e5520a28cf216c4181f9d40b2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 07:24:39 -0500 Subject: [PATCH 176/220] dask.cmake: Added Dask, to provide support for handling arrays that may be larger than memory using a NumPy ndarray like interface. --- dask.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 dask.cmake diff --git a/dask.cmake b/dask.cmake new file mode 100644 index 0000000..845c5e4 --- /dev/null +++ b/dask.cmake @@ -0,0 +1,38 @@ +# Provides dask, an implementation to support larger than memory arrays that can be used as NumPy ndarrays. + +if (NOT dask_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (cytoolz) +include (dill) + +external_git_repo(dask + 0.2.6 #af03c7c7d7cc5e06701fd2f5153008f367ed99fe + https://github.com/ContinuumIO/dask) + + +# Download and install dask +message ("Installing ${dask_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${dask_NAME} + DEPENDS ${python_NAME} ${cytoolz_NAME} ${dill_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${dask_URL} + GIT_TAG ${dask_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${dask_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT dask_NAME) From f2aed33712f65233bab1ebb93e55640d541df375 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 07:36:31 -0500 Subject: [PATCH 177/220] toolz.cmake: Adds Toolz, a pure Python implementation of everything in CyToolz. --- toolz.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 toolz.cmake diff --git a/toolz.cmake b/toolz.cmake new file mode 100644 index 0000000..16c29c1 --- /dev/null +++ b/toolz.cmake @@ -0,0 +1,39 @@ +# +# Install toolz library from source +# + +if (NOT toolz_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (toolz + 0.7.1 + toolz-0.7.1.tar.gz + 550681a2819915c5724c7e8f22ab2334 + https://pypi.python.org/packages/source/t/toolz +) + +message ("Installing ${toolz_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${toolz_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${toolz_URL} + URL_MD5 ${toolz_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND "" +) + +set_target_properties(${toolz_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT toolz_NAME) From f22a32c001937e11ffbe9d03a69041ebd4ece374 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 07:39:02 -0500 Subject: [PATCH 178/220] dask.cmake: Use Toolz. --- dask.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dask.cmake b/dask.cmake index 845c5e4..c977602 100644 --- a/dask.cmake +++ b/dask.cmake @@ -11,6 +11,7 @@ include (BuildSupport) include (python) include (cytoolz) include (dill) +include (toolz) external_git_repo(dask 0.2.6 #af03c7c7d7cc5e06701fd2f5153008f367ed99fe @@ -21,7 +22,7 @@ external_git_repo(dask message ("Installing ${dask_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${dask_NAME} - DEPENDS ${python_NAME} ${cytoolz_NAME} ${dill_NAME} + DEPENDS ${python_NAME} ${cytoolz_NAME} ${dill_NAME} ${toolz_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${dask_URL} GIT_TAG ${dask_TAG} From 67dc0df35e1a2415fd800b2cd88edd873f6c1296 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 07:49:28 -0500 Subject: [PATCH 179/220] python-matlab-bridge.cmake: Provides a simple and fast interface to MATLAB from Python using zmq. --- python-matlab-bridge.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 python-matlab-bridge.cmake diff --git a/python-matlab-bridge.cmake b/python-matlab-bridge.cmake new file mode 100644 index 0000000..298cec9 --- /dev/null +++ b/python-matlab-bridge.cmake @@ -0,0 +1,37 @@ +# Provides a simple and fast interface to MATLAB from Python using zmq. + +if (NOT python-matlab-bridge_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) +include (pyzmq) +include (ipython) + + +external_git_repo(python-matlab-bridge + 0.3 #a6fd3cc3adf5ef2b5e3d9b83a8050d783c76d48f + https://github.com/arokem/python-matlab-bridge) + +message ("Installing ${python-matlab-bridge_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${python-matlab-bridge_NAME} + DEPENDS ${python_NAME} ${pyzmq_NAME} ${ipython_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${python-matlab-bridge_URL} + GIT_TAG ${python-matlab-bridge_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${python-matlab-bridge_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT python-matlab-bridge_NAME) From dc90cd0052037de3c5c6e076a17dcbdc71b01d62 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:46:49 -0500 Subject: [PATCH 180/220] matplotlib.cmake: Switch to git repo. --- matplotlib.cmake | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index 4d34c4f..b016f90 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -27,18 +27,16 @@ include (libpng) include (freetype2) include (tornado) -external_source (matplotlib - 1.4.2 - matplotlib-1.4.2.tar.gz - 7d22efb6cce475025733c50487bd8898 - http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.4.2) +external_git_repo(matplotlib + 1.4.2 # 3a828ddb7df3bc597254f875cbbac6aadf48aee0 + https://github.com/matplotlib/matplotlib) message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} DEPENDS ${python_NAME} ${pyqt4} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${tornado_NAME} PREFIX ${BUILDEM_DIR} - URL ${matplotlib_URL} - URL_MD5 ${matplotlib_MD5} + GIT_REPOSITORY ${matplotlib_URL} + GIT_TAG ${matplotlib_TAG} UPDATE_COMMAND "" PATCH_COMMAND ${TEMPLATE_EXE} ${TEMPLATE_DIR}/matplotlib-setup-cfg.template From 085b9f684397dedbb9d8eff69091dea8e2ae14be Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:52:43 -0500 Subject: [PATCH 181/220] opencv.cmake: Switch to git repo. --- opencv.cmake | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/opencv.cmake b/opencv.cmake index 4fce495..68e5933 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -22,12 +22,9 @@ include (python) include (numpy) include (sphinx) -external_source (opencv - 2.4.8.3 - 2.4.8.3.tar.gz - a64feba01bd74c36ddf04d560d9cafd3 - https://github.com/Itseez/opencv/archive/ - ) +external_git_repo (opencv + 2.4.8.3 # b2790973a32eb662c165a921afe03dbfd2c65269 + https://github.com/Itseez/opencv/) set (opencv_LIBS ${BUILDEM_LIB_DIR}/libopencv_ml.so ${BUILDEM_LIB_DIR}/libopencv_core.so) @@ -35,8 +32,8 @@ message ("Installing ${opencv_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${opencv_NAME} DEPENDS ${zlib_NAME} ${libjpeg_NAME} ${libpng_NAME} ${libtiff_NAME} ${openexr_NAME} ${ffmpeg_NAME} ${qt4_NAME} ${python_NAME} ${numpy_NAME} ${sphinx_NAME} PREFIX ${BUILDEM_DIR} - URL ${opencv_URL} - URL_MD5 ${opencv_MD5} + GIT_REPOSITORY ${opencv_URL} + GIT_TAG ${opencv_TAG} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opencv_SRC_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXE} -DPYTHON_LIBRARY=${PYTHON_LIBRARY_FILE} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_PATH} -DPYTHON_PACKAGES_PATH=${PYTHON_PREFIX}/lib/python2.7/site-packages From 2d7949e1b30ffd208966eec1b3337878de11fcb0 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:59:12 -0500 Subject: [PATCH 182/220] psutil.cmake: Switch to git repo. --- psutil.cmake | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/psutil.cmake b/psutil.cmake index 890e932..42a6d96 100644 --- a/psutil.cmake +++ b/psutil.cmake @@ -12,19 +12,16 @@ include (BuildSupport) include (python) -external_source (psutil - 2.1.1 - psutil-2.1.1.tar.gz - 72a6b15d589fab11f6ca245b775bc3c6 - https://pypi.python.org/packages/source/p/psutil -) +external_git_repo(psutil + release-2.1.1 # 50bd135bbbd17c970afc4882b0829900e3d9bb4c + https://github.com/giampaolo/psutil) message ("Installing ${psutil_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${psutil_NAME} DEPENDS ${python_NAME} PREFIX ${BUILDEM_DIR} - URL ${psutil_URL} - URL_MD5 ${psutil_MD5} + GIT_REPOSITORY ${psutil_URL} + GIT_TAG ${psutil_TAG} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND "" From 800440e696f02c4513f933ff2c73e1a9fcce1abb Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 20:05:28 -0500 Subject: [PATCH 183/220] shapely.cmake: Switch to git repo. --- shapely.cmake | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/shapely.cmake b/shapely.cmake index b0b21b9..35a4a01 100644 --- a/shapely.cmake +++ b/shapely.cmake @@ -16,11 +16,9 @@ include (setuptools) include (cython) include (numpy) -external_source (shapely - 1.4.3 - Shapely-1.4.3.tar.gz - 0b152ead7004cb359a1d5430e0eb94ca - http://pypi.python.org/packages/source/S/Shapely/) +external_git_repo(shapely + 1.4.3 # 53424e60ba8b83bbdce84a8e238b201b83c53a7d + https://github.com/Toblerity/Shapely) # Download and install shapely @@ -29,8 +27,8 @@ message ("Installing ${shapely_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${shapely_NAME} DEPENDS ${python_NAME} ${setuptools_NAME} ${cython_NAME} ${numpy_NAME} ${geos_NAME} PREFIX ${BUILDEM_DIR} - URL ${shapely_URL} - URL_MD5 ${shapely_MD5} + GIT_REPOSITORY ${shapely_URL} + GIT_TAG ${shapely_TAG} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND "" From 043ab047ad40a6598257827eb5c58bb8d43d9138 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 20:08:30 -0500 Subject: [PATCH 184/220] sima.cmake: Switch to git repo. --- sima.cmake | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sima.cmake b/sima.cmake index 2456071..64d35dd 100644 --- a/sima.cmake +++ b/sima.cmake @@ -20,11 +20,9 @@ include (h5py) include (opencv) -external_source (sima - 0.3.1 - sima-0.3.1.tar.gz - 5910ea2c8c1bbcd7deb001ce64a5a9f4 - http://pypi.python.org/packages/source/s/sima/) +external_git_repo(sima + 0.3.1 # 5d700e518dc78aa6d478357d80dcc603b67cf3ff + https://github.com/losonczylab/sima) # Download and install sima @@ -33,8 +31,8 @@ message ("Installing ${sima_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${sima_NAME} DEPENDS ${python_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${scikit-image_NAME} ${shapely_NAME} ${h5py_NAME} ${opencv_NAME} PREFIX ${BUILDEM_DIR} - URL ${sima_URL} - URL_MD5 ${sima_MD5} + GIT_REPOSITORY ${sima_URL} + GIT_TAG ${sima_TAG} UPDATE_COMMAND "" PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} # Turns off test that is known failure on Mac. From 6061d27ac81f3d76ba355478bdd0372c8d1e5125 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 14:57:32 -0500 Subject: [PATCH 185/220] mock.cmake: Allows for testing with fake objects. Added to Python 3. Required by matplotlib. --- mock.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 mock.cmake diff --git a/mock.cmake b/mock.cmake new file mode 100644 index 0000000..2895deb --- /dev/null +++ b/mock.cmake @@ -0,0 +1,39 @@ +# A python standards module. Provides test support. Added to core tests in Python 3. +# Required by Matplotlib. + +if (NOT mock_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (mock + 1.0.1 + mock-1.0.1.tar.gz + c3971991738caa55ec7c356bbc154ee2 + https://pypi.python.org/packages/source/m/mock/) + + +# Download and install mock +message ("Installing ${mock_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${mock_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${mock_URL} + URL_MD5 ${mock_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${mock_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT mock_NAME) From 2c2c510a76390c62553afe6fe2c395af4d8f485f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 14:59:38 -0500 Subject: [PATCH 186/220] matplotlib.cmake: Add `v` to version string. --- matplotlib.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index b016f90..cc32feb 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -28,7 +28,7 @@ include (freetype2) include (tornado) external_git_repo(matplotlib - 1.4.2 # 3a828ddb7df3bc597254f875cbbac6aadf48aee0 + v1.4.2 # 3a828ddb7df3bc597254f875cbbac6aadf48aee0 https://github.com/matplotlib/matplotlib) message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From f318b8ca149efe1ea1f2b22d472dda0572785777 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 15:00:02 -0500 Subject: [PATCH 187/220] matplotlib.cmake: Add nose and mock as dependencies of matplotlib. --- matplotlib.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index cc32feb..4d166b2 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -25,6 +25,8 @@ include (pyparsing) include (numpy) include (libpng) include (freetype2) +include (nose) +include (mock) include (tornado) external_git_repo(matplotlib @@ -33,7 +35,7 @@ external_git_repo(matplotlib message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} - DEPENDS ${python_NAME} ${pyqt4} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${tornado_NAME} + DEPENDS ${python_NAME} ${pyqt4} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${nose_NAME} ${mock_NAME} ${tornado_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${matplotlib_URL} GIT_TAG ${matplotlib_TAG} From 11fcdc461a39839b5067104ad5c0508ba8d9b4a1 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 15:14:39 -0500 Subject: [PATCH 188/220] matplotlib.cmake: Add ffmpeg as a dependency of matplotlib. Used for animations. --- matplotlib.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index 4d166b2..a83cb4f 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -24,6 +24,7 @@ include (python-dateutil) include (pyparsing) include (numpy) include (libpng) +include (ffmpeg) include (freetype2) include (nose) include (mock) @@ -35,7 +36,7 @@ external_git_repo(matplotlib message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} - DEPENDS ${python_NAME} ${pyqt4} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${nose_NAME} ${mock_NAME} ${tornado_NAME} + DEPENDS ${python_NAME} ${pyqt4} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${ffmpeg_NAME} ${freetype2_NAME} ${nose_NAME} ${mock_NAME} ${tornado_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${matplotlib_URL} GIT_TAG ${matplotlib_TAG} From fd4803041414bb4be433f360b733f26372aac3e9 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 15:15:18 -0500 Subject: [PATCH 189/220] julia.cmake: Add newline at EOF. --- julia.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/julia.cmake b/julia.cmake index b2ed67c..9be9aa4 100644 --- a/julia.cmake +++ b/julia.cmake @@ -31,4 +31,4 @@ ExternalProject_Add(${julia_NAME} set_target_properties(${julia_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT julia_NAME) \ No newline at end of file +endif (NOT julia_NAME) From c782aef69025e1da015846899b98e70a3e6edf51 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 15:16:08 -0500 Subject: [PATCH 190/220] shapely.cmake: Switch import order to match dependency order. --- shapely.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shapely.cmake b/shapely.cmake index 35a4a01..5fef6dd 100644 --- a/shapely.cmake +++ b/shapely.cmake @@ -10,11 +10,11 @@ include (ExternalProject) include (ExternalSource) include (BuildSupport) -include (geos) include (python) include (setuptools) include (cython) include (numpy) +include (geos) external_git_repo(shapely 1.4.3 # 53424e60ba8b83bbdce84a8e238b201b83c53a7d From d24f266dca73dfe3af3beb414e9900557c92ae88 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 15:34:18 -0500 Subject: [PATCH 191/220] sima.cmake: Add Cython as a dependency. --- sima.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sima.cmake b/sima.cmake index 64d35dd..ee393b7 100644 --- a/sima.cmake +++ b/sima.cmake @@ -11,6 +11,7 @@ include (ExternalSource) include (BuildSupport) include (python) +include (cython) include (numpy) include (scipy) include (matplotlib) @@ -29,7 +30,7 @@ external_git_repo(sima message ("Installing ${sima_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${sima_NAME} - DEPENDS ${python_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${scikit-image_NAME} ${shapely_NAME} ${h5py_NAME} ${opencv_NAME} + DEPENDS ${python_NAME} ${cython_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${scikit-image_NAME} ${shapely_NAME} ${h5py_NAME} ${opencv_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${sima_URL} GIT_TAG ${sima_TAG} From e5274c6a9e62ba6492aa3d017eb74d3065431d68 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 15:32:42 -0500 Subject: [PATCH 192/220] sima.cmake: Bump version. Previously, 0.3.1 had a bug where Cythonizing was not occurring. This fixes it. --- sima.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sima.cmake b/sima.cmake index ee393b7..1712ef8 100644 --- a/sima.cmake +++ b/sima.cmake @@ -22,7 +22,7 @@ include (opencv) external_git_repo(sima - 0.3.1 # 5d700e518dc78aa6d478357d80dcc603b67cf3ff + 1.0.3 # e340a2cae1244a9d6359bb2aa124bbe467750c0d https://github.com/losonczylab/sima) From 1f886043493febcadd50271a578cfdd919d63574 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 15:37:48 -0500 Subject: [PATCH 193/220] dask.cmake: Place cytoolz and toolz together. --- dask.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dask.cmake b/dask.cmake index c977602..5b5d86c 100644 --- a/dask.cmake +++ b/dask.cmake @@ -9,8 +9,8 @@ include (ExternalSource) include (BuildSupport) include (python) -include (cytoolz) include (dill) +include (cytoolz) include (toolz) external_git_repo(dask @@ -22,7 +22,7 @@ external_git_repo(dask message ("Installing ${dask_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${dask_NAME} - DEPENDS ${python_NAME} ${cytoolz_NAME} ${dill_NAME} ${toolz_NAME} + DEPENDS ${python_NAME} ${dill_NAME} ${cytoolz_NAME} ${toolz_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${dask_URL} GIT_TAG ${dask_TAG} From 44f4595259736d6d13dd160882fe2ac4c27d9bdf Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 15:40:07 -0500 Subject: [PATCH 194/220] dask.cmake: Add psutil and numpy as dependencies. --- dask.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dask.cmake b/dask.cmake index 5b5d86c..7387fb3 100644 --- a/dask.cmake +++ b/dask.cmake @@ -9,6 +9,8 @@ include (ExternalSource) include (BuildSupport) include (python) +include (psutil) +include (numpy) include (dill) include (cytoolz) include (toolz) @@ -22,7 +24,7 @@ external_git_repo(dask message ("Installing ${dask_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${dask_NAME} - DEPENDS ${python_NAME} ${dill_NAME} ${cytoolz_NAME} ${toolz_NAME} + DEPENDS ${python_NAME} ${psutil_NAME} ${numpy_NAME} ${dill_NAME} ${cytoolz_NAME} ${toolz_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${dask_URL} GIT_TAG ${dask_TAG} From b44b21c8495f2a65f2301b46133a0bdc5fe49381 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 24 Feb 2015 16:01:41 -0500 Subject: [PATCH 195/220] sima.cmake: Better comment for patches. --- sima.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sima.cmake b/sima.cmake index 1712ef8..4f19a1a 100644 --- a/sima.cmake +++ b/sima.cmake @@ -36,7 +36,7 @@ ExternalProject_Add(${sima_NAME} GIT_TAG ${sima_TAG} UPDATE_COMMAND "" PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} - # Turns off test that is known failure on Mac. + # Patch to work around new numpy and scipy functions. Also, fix annoying version constraint. ${sima_SRC_DIR}/sima/extract.py ${PATCH_DIR}/sima-extract.py.patch ${sima_SRC_DIR}/sima/misc/__init__.py ${PATCH_DIR}/sima-misc-__init__.py.patch ${sima_SRC_DIR}/sima/motion.py ${PATCH_DIR}/sima-motion.py.patch From a60e67ab2d7691b7723bb275d76c9c9f8d1da933 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 25 Feb 2015 23:55:46 -0500 Subject: [PATCH 196/220] libfftw.cmake: Enable threads libraries to be built, as well. --- libfftw.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libfftw.cmake b/libfftw.cmake index 78c6755..543c5c3 100644 --- a/libfftw.cmake +++ b/libfftw.cmake @@ -26,6 +26,7 @@ ExternalProject_Add(${libfftw_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${libfftw_SRC_DIR}/configure --prefix=${BUILDEM_DIR} --enable-shared + --enable-threads LDFLAGS=${BUILDEM_LDFLAGS} "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) @@ -41,6 +42,7 @@ ExternalProject_Add_Step(${libfftw_NAME} singlefloat-configure COMMAND cd ${libfftw_SRC_DIR}-build && ${BUILDEM_ENV_STRING} ${libfftw_SRC_DIR}/configure --prefix=${BUILDEM_DIR} --enable-shared + --enable-threads --enable-float # This creates libfftw3f single-precision libraries INSTEAD OF the default double libraries. "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" From 47cfbdec8ca529c24f1bb7f9128f1666dc4ba446 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 25 Feb 2015 23:57:23 -0500 Subject: [PATCH 197/220] libfftw.cmake: Add install step to configure, build, and install long double precision libraries after single precision libraries are installed. --- libfftw.cmake | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libfftw.cmake b/libfftw.cmake index 543c5c3..561a6ef 100644 --- a/libfftw.cmake +++ b/libfftw.cmake @@ -60,6 +60,30 @@ ExternalProject_Add_Step(${libfftw_NAME} singlefloat-install COMMAND cd ${libfftw_SRC_DIR}-build && ${BUILDEM_ENV_STRING} $(MAKE) install ) +# Configure long-double-precision +ExternalProject_Add_Step(${libfftw_NAME} long-double-configure + DEPENDEES singlefloat-install + COMMAND cd ${libfftw_SRC_DIR}-build && ${BUILDEM_ENV_STRING} ${libfftw_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + --enable-shared + --enable-threads + --enable-long-double # This creates libfftw3l long-double-precision libraries INSTEAD OF the default double libraries. + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" +) + +# build long-double-precision +ExternalProject_Add_Step(${libfftw_NAME} long-double-build + DEPENDEES long-double-configure + COMMAND cd ${libfftw_SRC_DIR}-build && ${BUILDEM_ENV_STRING} $(MAKE) +) + +# install long-double-precision +ExternalProject_Add_Step(${libfftw_NAME} long-double-install + DEPENDEES long-double-build + COMMAND cd ${libfftw_SRC_DIR}-build && ${BUILDEM_ENV_STRING} $(MAKE) install +) + set_target_properties(${libfftw_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) endif (NOT libfftw_NAME) From 0c720bd24cdbb7e2ab75ca6d39f5d7937136108b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 26 Feb 2015 00:39:12 -0500 Subject: [PATCH 198/220] pyfftw.cmake: Builds python bindings to FFTW. --- pyfftw.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pyfftw.cmake diff --git a/pyfftw.cmake b/pyfftw.cmake new file mode 100644 index 0000000..48f8f5d --- /dev/null +++ b/pyfftw.cmake @@ -0,0 +1,41 @@ +# Provides support for FFTW from Python. + + +if (NOT pyfftw_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (libfftw) +include (python) +include (numpy) +include (scipy) +include (cython) + +external_git_repo(pyfftw + v0.9.2 #94375708a8a6a0112f0c76e5e1467a17cf4a6a02 + https://github.com/hgomersall/pyFFTW) + + +# Download and install pyfftw +message ("Installing ${pyfftw_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pyfftw_NAME} + DEPENDS ${libfftw_NAME} ${python_NAME} ${numpy_NAME} ${scipy_NAME} ${cython_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${pyfftw_URL} + GIT_TAG ${pyfftw_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND + CONFIGURE_COMMAND "" + BUILD_COMMAND BUILDEM_DIR=${BUILDEM_DIR} ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND BUILDEM_DIR=${BUILDEM_DIR} ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pyfftw_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pyfftw_NAME) From 5fea6e43f0367902939089850f58ebd0332e1850 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 26 Feb 2015 00:39:48 -0500 Subject: [PATCH 199/220] patches/pyfftw-setup.py.patch: Added patch to pyfftw to ensure it grabs headers and libraries from the right places. --- patches/pyfftw-setup.py.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 patches/pyfftw-setup.py.patch diff --git a/patches/pyfftw-setup.py.patch b/patches/pyfftw-setup.py.patch new file mode 100644 index 0000000..5025776 --- /dev/null +++ b/patches/pyfftw-setup.py.patch @@ -0,0 +1,16 @@ +diff --git a/setup.py b/setup.py +index 48c3bb6..a6904d5 100644 +--- a/setup.py ++++ b/setup.py +@@ -48,8 +48,9 @@ except ImportError: + from distutils.command.build_ext import build_ext + sources = [os.path.join('pyfftw', 'pyfftw.c')] + +-include_dirs = ['include', numpy.get_include()] +-library_dirs = [] ++buildem_dir = os.environ["BUILDEM_DIR"] ++include_dirs = [os.path.join(buildem_dir, 'include'), 'include', numpy.get_include()] ++library_dirs = [os.path.join(buildem_dir, 'lib')] + package_data = {} + + if get_platform() in ('win32', 'win-amd64'): From 04656864b7df250d0746358fe0d681fd3c12c4e0 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 26 Feb 2015 00:40:08 -0500 Subject: [PATCH 200/220] pyfftw.cmake: Apply patch to make sure the right include and lib paths are added. --- pyfftw.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyfftw.cmake b/pyfftw.cmake index 48f8f5d..2884ec4 100644 --- a/pyfftw.cmake +++ b/pyfftw.cmake @@ -29,7 +29,9 @@ ExternalProject_Add(${pyfftw_NAME} GIT_REPOSITORY ${pyfftw_URL} GIT_TAG ${pyfftw_TAG} UPDATE_COMMAND "" - PATCH_COMMAND + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Patches PyFFTW to ensure that it uses includes and libraries from the right place. + ${pyfftw_SRC_DIR}/setup.py ${PATCH_DIR}/pyfftw-setup.py.patch CONFIGURE_COMMAND "" BUILD_COMMAND BUILDEM_DIR=${BUILDEM_DIR} ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build BUILD_IN_SOURCE 1 From 88b90864bac3dd291378c7e99bd5c2737b22da49 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 17 Mar 2015 13:33:14 -0400 Subject: [PATCH 201/220] matplotlib.cmake: Fix missing _NAME. --- matplotlib.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index a83cb4f..3ccaf21 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -36,7 +36,7 @@ external_git_repo(matplotlib message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} - DEPENDS ${python_NAME} ${pyqt4} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${ffmpeg_NAME} ${freetype2_NAME} ${nose_NAME} ${mock_NAME} ${tornado_NAME} + DEPENDS ${python_NAME} ${pyqt4_NAME} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${ffmpeg_NAME} ${freetype2_NAME} ${nose_NAME} ${mock_NAME} ${tornado_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${matplotlib_URL} GIT_TAG ${matplotlib_TAG} From a9bd42875d77f2fa258cab261546f27e9cc1a579 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 17 Mar 2015 19:43:41 -0400 Subject: [PATCH 202/220] python-geojson.cmake: Added new cmake to build python-geojson. --- python-geojson.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 python-geojson.cmake diff --git a/python-geojson.cmake b/python-geojson.cmake new file mode 100644 index 0000000..6fda76c --- /dev/null +++ b/python-geojson.cmake @@ -0,0 +1,37 @@ +# +# Install python-geojson library from source. +# + +if (NOT python-geojson_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) + +external_git_repo(python-geojson + 1.0.9 # 0c68ce74d4472f957b31c336bfd41b719d8dfa00 + https://github.com/frewsxcv/python-geojson) + +message ("Installing ${python-geojson_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${python-geojson_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${python-geojson_URL} + GIT_TAG ${python-geojson_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${python-geojson_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT python-geojson_NAME) From 5985139861aaee907591555950ba8eece8b08356 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 17 Mar 2015 20:05:05 -0400 Subject: [PATCH 203/220] nanshe.cmake: Make PyFFTW a dependency of nanshe. --- nanshe.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nanshe.cmake b/nanshe.cmake index 08a04b5..a8e6c09 100644 --- a/nanshe.cmake +++ b/nanshe.cmake @@ -15,6 +15,7 @@ include (ilastik) include (spams-python) include (rank_filter) include (cloud_sptheme) +include (pyfftw) external_git_repo(nanshe @@ -26,7 +27,7 @@ external_git_repo(nanshe message ("Installing ${nanshe_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${nanshe_NAME} - DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} ${cloud_sptheme_NAME} + DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} ${cloud_sptheme_NAME} ${pyfftw_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${nanshe_URL} GIT_TAG ${nanshe_TAG} From 9bd47c83d2a11e77bbdbe32d1f1391529ff495b2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 26 Mar 2015 14:44:01 -0400 Subject: [PATCH 204/220] sphinx.cmake: Add newline to end of file. --- sphinx.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx.cmake b/sphinx.cmake index 3033893..d8ea0f8 100644 --- a/sphinx.cmake +++ b/sphinx.cmake @@ -36,4 +36,4 @@ ExternalProject_Add(${sphinx_NAME} set_target_properties(${sphinx_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT sphinx_NAME) \ No newline at end of file +endif (NOT sphinx_NAME) From 907c15f1e6725c746f50cb5e016ff63f30e8f1e9 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 26 Mar 2015 14:44:56 -0400 Subject: [PATCH 205/220] sphinx.cmake: Update to 1.3.1. --- sphinx.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sphinx.cmake b/sphinx.cmake index d8ea0f8..51fd173 100644 --- a/sphinx.cmake +++ b/sphinx.cmake @@ -12,9 +12,9 @@ include (BuildSupport) include (python) external_source (sphinx - 1.2.2 - Sphinx-1.2.2.tar.gz - 3dc73ccaa8d0bfb2d62fb671b1f7e8a4 + 1.3.1 + Sphinx-1.3.1.tar.gz + 8786a194acf9673464c5455b11fd4332 https://pypi.python.org/packages/source/S/Sphinx/) From 3ce627a954f929872b813c7314749fb17b0c2762 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 1 Apr 2015 21:42:43 -0400 Subject: [PATCH 206/220] sphinxcontrib-napoleon.cmake: Deleted as the newest version of Sphinx includes napoleon. ipython.cmake: Just use Sphinx as it has napoleon. scipy-stack.cmake: Just use Sphinx as it has napoleon. spyder.cmake: Just use Sphinx as it has napoleon. --- ipython.cmake | 4 ++-- scipy-stack.cmake | 6 +++--- sphinxcontrib-napoleon.cmake | 40 ------------------------------------ spyder.cmake | 6 +++--- 4 files changed, 8 insertions(+), 48 deletions(-) delete mode 100644 sphinxcontrib-napoleon.cmake diff --git a/ipython.cmake b/ipython.cmake index 7f61689..9cd3873 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -12,7 +12,7 @@ include (BuildSupport) include (python) include (pyqt4) -include (sphinxcontrib-napoleon) # For sphinx extension. Doesn't necessarily need napolean, but it is nice to have and is quick to install. +include (sphinx) include (pyzmq) include (nose) include (pygments) @@ -27,7 +27,7 @@ external_git_repo(ipython message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ipython_NAME} - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} ${python-markdown_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} ${python-markdown_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${ipython_URL} GIT_TAG ${ipython_TAG} diff --git a/scipy-stack.cmake b/scipy-stack.cmake index 8eca628..8e969d0 100644 --- a/scipy-stack.cmake +++ b/scipy-stack.cmake @@ -12,7 +12,7 @@ include (BuildSupport) include (python) -include (sphinxcontrib-napoleon) # Nice Sphinx docs +include (sphinx) include (pyqt4) include (numpy) include (scipy) @@ -27,7 +27,7 @@ include (nose) message ("Installing ${scipy-stack_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${scipy-stack_NAME} - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} DOWNLOAD_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" @@ -37,4 +37,4 @@ ExternalProject_Add(${scipy-stack_NAME} set_target_properties(${scipy-stack_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT scipy-stack_NAME) \ No newline at end of file +endif (NOT scipy-stack_NAME) diff --git a/sphinxcontrib-napoleon.cmake b/sphinxcontrib-napoleon.cmake deleted file mode 100644 index 73b2be0..0000000 --- a/sphinxcontrib-napoleon.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# Extends Sphinx to add support for Google style and Numpy style documentation. -# Much easier on the eyes and brain than Sphinx. - -if (NOT sphinxcontrib-napoleon_NAME) - -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - -include (ExternalProject) -include (ExternalSource) -include (BuildSupport) - -include (python) -include (sphinx) - -external_source (sphinxcontrib-napoleon - 0.2.7 - sphinxcontrib-napoleon-0.2.7.tar.gz - 001ee10b53eba1361738ed126cd6deb2 - https://pypi.python.org/packages/source/s/sphinxcontrib-napoleon/) - - -# Download and install sphinxcontrib-napoleon -message ("Installing ${sphinxcontrib-napoleon_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") - -ExternalProject_Add(${sphinxcontrib-napoleon_NAME} - DEPENDS ${python_NAME} ${sphinx_NAME} - PREFIX ${BUILDEM_DIR} - URL ${sphinxcontrib-napoleon_URL} - URL_MD5 ${sphinxcontrib-napoleon_MD5} - UPDATE_COMMAND "" - PATCH_COMMAND "" - CONFIGURE_COMMAND "" - BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build - BUILD_IN_SOURCE 1 - INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install -) - -set_target_properties(${sphinxcontrib-napoleon_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) - -endif (NOT sphinxcontrib-napoleon_NAME) \ No newline at end of file diff --git a/spyder.cmake b/spyder.cmake index 9dd566e..812b7d2 100644 --- a/spyder.cmake +++ b/spyder.cmake @@ -19,7 +19,7 @@ include (BuildSupport) include (python) include (pep8) include (pyqt4) -include (sphinxcontrib-napoleon) # Nice Sphinx docs +include (sphinx) include (nose) include (rope) include (pyflakes) @@ -40,7 +40,7 @@ external_source (spyder message ("Installing ${spyder_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${spyder_NAME} - DEPENDS ${python_NAME} ${pep8_NAME} ${pyqt4_NAME} ${sphinxcontrib-napoleon} ${nose_NAME} ${rope_NAME} ${pyflakes_NAME} ${pygments_NAME} ${pylint_NAME} ${psutil_NAME} ${ipython_NAME} + DEPENDS ${python_NAME} ${pep8_NAME} ${pyqt4_NAME} ${sphinx_NAME} ${nose_NAME} ${rope_NAME} ${pyflakes_NAME} ${pygments_NAME} ${pylint_NAME} ${psutil_NAME} ${ipython_NAME} PREFIX ${BUILDEM_DIR} URL ${spyder_URL} URL_MD5 ${spyder_MD5} @@ -54,4 +54,4 @@ ExternalProject_Add(${spyder_NAME} set_target_properties(${spyder_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT spyder_NAME) \ No newline at end of file +endif (NOT spyder_NAME) From 93ec26fbdfb8718aa96e5a143de403a4c3db949e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 1 Apr 2015 23:33:21 -0400 Subject: [PATCH 207/220] funcparserlib.cmake: Provide support for constructing DSLs. --- funcparserlib.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 funcparserlib.cmake diff --git a/funcparserlib.cmake b/funcparserlib.cmake new file mode 100644 index 0000000..9d455a8 --- /dev/null +++ b/funcparserlib.cmake @@ -0,0 +1,38 @@ +# A Pure Python library for building parsers fro DSLs. + +if (NOT funcparserlib_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (funcparserlib + 0.3.6 + funcparserlib-0.3.6.tar.gz + 3aba546bdad5d0826596910551ce37c0 + https://pypi.python.org/packages/source/f/funcparserlib/) + + +# Download and install funcparserlib +message ("Installing ${funcparserlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${funcparserlib_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${funcparserlib_URL} + URL_MD5 ${funcparserlib_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${funcparserlib_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT funcparserlib_NAME) From 42eef6a8b4e84d1dfa44c5b0c75d1d732718b782 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 2 Apr 2015 00:02:50 -0400 Subject: [PATCH 208/220] pillow.cmake: Provide Pillow a fork of PIL. --- pillow.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pillow.cmake diff --git a/pillow.cmake b/pillow.cmake new file mode 100644 index 0000000..99b9efd --- /dev/null +++ b/pillow.cmake @@ -0,0 +1,41 @@ +# Python image library fork. + + +if (NOT Pillow_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (zlib) +include (libjpeg) +include (libtiff) +include (freetype2) +include (numpy) + +external_git_repo(Pillow + 2.7.0 # 0f05eb287a223ce106848cd048cfcb45e9faa565 + https://github.com/python-pillow/Pillow) + +message ("Installing ${Pillow_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${Pillow_NAME} + DEPENDS ${python_NAME} ${zlib_NAME} ${libjpeg_NAME} ${libtiff_NAME} ${freetype2_NAME} ${numpy_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${Pillow_URL} + GIT_TAG ${Pillow_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build --disable-tcl --disable-tk --disable-lcms --disable-webp --disable-webpmux --disable-jpeg2000 + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${Pillow_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT Pillow_NAME) From d4feeeebf3d25a6d8b8701e389fb071a32d9afee Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 1 Apr 2015 23:53:24 -0400 Subject: [PATCH 209/220] actdiag.cmake: Provide the ability to build action-based diagrams from a DSL. --- actdiag.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 actdiag.cmake diff --git a/actdiag.cmake b/actdiag.cmake new file mode 100644 index 0000000..e277d6c --- /dev/null +++ b/actdiag.cmake @@ -0,0 +1,41 @@ +# Action-based diagramming from a DSL. + +if (NOT actdiag_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) +include (pillow) +include (funcparserlib) + +external_source (actdiag + 0.5.4 + actdiag-0.5.4.tar.gz + d254a4dbac727ba7bee1b252e530cb3f + https://pypi.python.org/packages/source/a/actdiag/) + + +# Download and install actdiag +message ("Installing ${actdiag_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${actdiag_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} ${pillow_NAME} ${funcparserlib} + PREFIX ${BUILDEM_DIR} + URL ${actdiag_URL} + URL_MD5 ${actdiag_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${actdiag_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT actdiag_NAME) From 24eae0220b27514a0081af47e076a5105cdce213 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 1 Apr 2015 23:54:32 -0400 Subject: [PATCH 210/220] blockdiag.cmake: Provide the ability to build block-based diagrams from a DSL. --- blockdiag.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 blockdiag.cmake diff --git a/blockdiag.cmake b/blockdiag.cmake new file mode 100644 index 0000000..c874eb5 --- /dev/null +++ b/blockdiag.cmake @@ -0,0 +1,41 @@ +# Block-based diagramming from a DSL. + +if (NOT blockdiag_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) +include (pillow) +include (funcparserlib) + +external_source (blockdiag + 1.5.1 + blockdiag-1.5.1.tar.gz + e1bcaf5ae64467f7722ad7883fc06abb + https://pypi.python.org/packages/source/b/blockdiag/) + + +# Download and install blockdiag +message ("Installing ${blockdiag_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${blockdiag_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} ${pillow_NAME} ${funcparserlib} + PREFIX ${BUILDEM_DIR} + URL ${blockdiag_URL} + URL_MD5 ${blockdiag_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${blockdiag_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT blockdiag_NAME) From 478620fbecda5baf79c35ff576d1807c7f7cb747 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 1 Apr 2015 23:55:15 -0400 Subject: [PATCH 211/220] nwdiag.cmake: Provide the ability to build network-based diagrams from a DSL. --- nwdiag.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 nwdiag.cmake diff --git a/nwdiag.cmake b/nwdiag.cmake new file mode 100644 index 0000000..8cd5c07 --- /dev/null +++ b/nwdiag.cmake @@ -0,0 +1,41 @@ +# Network-based diagramming from a DSL. + +if (NOT nwdiag_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) +include (pillow) +include (funcparserlib) + +external_source (nwdiag + 1.0.4 + nwdiag-1.0.4.tar.gz + 0d2ff1348aeff53aaf08838d0fa2c001 + https://pypi.python.org/packages/source/n/nwdiag/) + + +# Download and install nwdiag +message ("Installing ${nwdiag_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${nwdiag_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} ${pillow_NAME} ${funcparserlib} + PREFIX ${BUILDEM_DIR} + URL ${nwdiag_URL} + URL_MD5 ${nwdiag_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${nwdiag_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT nwdiag_NAME) From 547a0d46f93cfa37b22a6356e2e1a40762768daa Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 1 Apr 2015 23:55:41 -0400 Subject: [PATCH 212/220] seqdiag.cmake: Provide the ability to build sequence-based diagrams from a DSL. --- seqdiag.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 seqdiag.cmake diff --git a/seqdiag.cmake b/seqdiag.cmake new file mode 100644 index 0000000..8283f21 --- /dev/null +++ b/seqdiag.cmake @@ -0,0 +1,41 @@ +# Sequence-based diagramming from a DSL. + +if (NOT seqdiag_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) +include (pillow) +include (funcparserlib) + +external_source (seqdiag + 0.9.5 + seqdiag-0.9.5.tar.gz + 18b05be0467a23b7d8569a937d6de02b + https://pypi.python.org/packages/source/a/seqdiag/) + + +# Download and install seqdiag +message ("Installing ${seqdiag_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${seqdiag_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} ${pillow_NAME} ${funcparserlib} + PREFIX ${BUILDEM_DIR} + URL ${seqdiag_URL} + URL_MD5 ${seqdiag_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${seqdiag_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT seqdiag_NAME) From 4757bbea3e137b42cf25e1ea528ddc4d593bfe0a Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 2 Apr 2015 00:03:55 -0400 Subject: [PATCH 213/220] sphinxcontrib-actdiag.cmake: Sphinx embedding of the actdiag DSL. --- sphinxcontrib-actdiag.cmake | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sphinxcontrib-actdiag.cmake diff --git a/sphinxcontrib-actdiag.cmake b/sphinxcontrib-actdiag.cmake new file mode 100644 index 0000000..094b412 --- /dev/null +++ b/sphinxcontrib-actdiag.cmake @@ -0,0 +1,40 @@ +# Sphinx embedding of actdiag. + +if (NOT sphinxcontrib-actdiag_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (sphinx) +include (actdiag) + +external_source (sphinxcontrib-actdiag + 0.8.1 + sphinxcontrib-actdiag-0.8.1.tar.gz + 651e6ca4e066f38cff80746fb727a105 + https://pypi.python.org/packages/source/s/sphinxcontrib-actdiag/) + + +# Download and install sphinxcontrib-actdiag +message ("Installing ${sphinxcontrib-actdiag_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sphinxcontrib-actdiag_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sphinxcontrib-actdiag_URL} + URL_MD5 ${sphinxcontrib-actdiag_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sphinxcontrib-actdiag_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sphinxcontrib-actdiag_NAME) From 6b028652982d1934119965d1eb1e9b5309a59f3d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 2 Apr 2015 00:04:51 -0400 Subject: [PATCH 214/220] sphinxcontrib-blockdiag.cmake: Sphinx embedding of the blockdiag DSL. --- sphinxcontrib-blockdiag.cmake | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sphinxcontrib-blockdiag.cmake diff --git a/sphinxcontrib-blockdiag.cmake b/sphinxcontrib-blockdiag.cmake new file mode 100644 index 0000000..f054565 --- /dev/null +++ b/sphinxcontrib-blockdiag.cmake @@ -0,0 +1,40 @@ +# Sphinx embedding of blockdiag. + +if (NOT sphinxcontrib-blockdiag_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (sphinx) +include (blockdiag) + +external_source (sphinxcontrib-blockdiag + 1.5.1 + sphinxcontrib-blockdiag-1.5.1.tar.gz + 1a031f379869875ce882be968bed6ef8 + https://pypi.python.org/packages/source/s/sphinxcontrib-blockdiag/) + + +# Download and install sphinxcontrib-blockdiag +message ("Installing ${sphinxcontrib-blockdiag_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sphinxcontrib-blockdiag_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} ${blockdiag_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sphinxcontrib-blockdiag_URL} + URL_MD5 ${sphinxcontrib-blockdiag_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sphinxcontrib-blockdiag_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sphinxcontrib-blockdiag_NAME) From 63512b8e0cf2725df1c7d00c77bb7f846f82a0a1 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 2 Apr 2015 00:05:09 -0400 Subject: [PATCH 215/220] sphinxcontrib-nwdiag.cmake: Sphinx embedding of the nwdiag DSL. --- sphinxcontrib-nwdiag.cmake | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sphinxcontrib-nwdiag.cmake diff --git a/sphinxcontrib-nwdiag.cmake b/sphinxcontrib-nwdiag.cmake new file mode 100644 index 0000000..ee95cd1 --- /dev/null +++ b/sphinxcontrib-nwdiag.cmake @@ -0,0 +1,40 @@ +# Sphinx embedding of nwdiag. + +if (NOT sphinxcontrib-nwdiag_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (sphinx) +include (nwdiag) + +external_source (sphinxcontrib-nwdiag + 0.9.1 + sphinxcontrib-nwdiag-0.9.1.tar.gz + f144fbd4965109930d8708be6cfc59ba + https://pypi.python.org/packages/source/s/sphinxcontrib-nwdiag/) + + +# Download and install sphinxcontrib-nwdiag +message ("Installing ${sphinxcontrib-nwdiag_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sphinxcontrib-nwdiag_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} ${nwdiag_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sphinxcontrib-nwdiag_URL} + URL_MD5 ${sphinxcontrib-nwdiag_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sphinxcontrib-nwdiag_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sphinxcontrib-nwdiag_NAME) From f64a0e3d79472ca8686dbb5ddc45c896f65b47ec Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 2 Apr 2015 00:05:26 -0400 Subject: [PATCH 216/220] sphinxcontrib-seqdiag.cmake: Sphinx embedding of the seqdiag DSL. --- sphinxcontrib-seqdiag.cmake | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sphinxcontrib-seqdiag.cmake diff --git a/sphinxcontrib-seqdiag.cmake b/sphinxcontrib-seqdiag.cmake new file mode 100644 index 0000000..0f47d74 --- /dev/null +++ b/sphinxcontrib-seqdiag.cmake @@ -0,0 +1,40 @@ +# Sphinx embedding of seqdiag. + +if (NOT sphinxcontrib-seqdiag_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (sphinx) +include (seqdiag) + +external_source (sphinxcontrib-seqdiag + 0.8.1 + sphinxcontrib-seqdiag-0.8.1.tar.gz + ef9ad01798b5cf46247ab1fbe4ff781c + https://pypi.python.org/packages/source/s/sphinxcontrib-seqdiag/) + + +# Download and install sphinxcontrib-seqdiag +message ("Installing ${sphinxcontrib-seqdiag_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sphinxcontrib-seqdiag_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} ${seqdiag_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sphinxcontrib-seqdiag_URL} + URL_MD5 ${sphinxcontrib-seqdiag_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sphinxcontrib-seqdiag_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sphinxcontrib-seqdiag_NAME) From e49e323d517920a8519576539a235853ac2ccaa4 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 2 Apr 2015 00:12:49 -0400 Subject: [PATCH 217/220] nanshe.cmake: Include diagram building DSL tools as dependencies for building documentation. --- nanshe.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nanshe.cmake b/nanshe.cmake index a8e6c09..8537bd8 100644 --- a/nanshe.cmake +++ b/nanshe.cmake @@ -16,6 +16,10 @@ include (spams-python) include (rank_filter) include (cloud_sptheme) include (pyfftw) +include (sphinxcontrib-actdiag) +include (sphinxcontrib-blockdiag) +include (sphinxcontrib-nwdiag) +include (sphinxcontrib-seqdiag) external_git_repo(nanshe @@ -27,7 +31,7 @@ external_git_repo(nanshe message ("Installing ${nanshe_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${nanshe_NAME} - DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} ${cloud_sptheme_NAME} ${pyfftw_NAME} + DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} ${cloud_sptheme_NAME} ${pyfftw_NAME} ${sphinxcontrib-actdiag_NAME} ${sphinxcontrib-blockdiag_NAME} ${sphinxcontrib-nwdiag_NAME} ${sphinxcontrib-seqdiag_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${nanshe_URL} GIT_TAG ${nanshe_TAG} From 16af094973525339992a07d51bac018448cb2ce2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 2 Apr 2015 00:30:15 -0400 Subject: [PATCH 218/220] pillow.cmake: Don't bother passing disable flags. --- pillow.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pillow.cmake b/pillow.cmake index 99b9efd..fd00167 100644 --- a/pillow.cmake +++ b/pillow.cmake @@ -30,7 +30,8 @@ ExternalProject_Add(${Pillow_NAME} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND "" - BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build --disable-tcl --disable-tk --disable-lcms --disable-webp --disable-webpmux --disable-jpeg2000 + # It would be nice to ensure libraries we don't provide aren't used with these options, but they appear not to work. + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build # --disable-tcl --disable-tk --disable-lcms --disable-webp --disable-webpmux --disable-jpeg2000 BUILD_IN_SOURCE 1 TEST_COMMAND "" INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install From 37a84854f5c6606d27f5f0d35d90166b34799381 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 2 Apr 2015 00:32:41 -0400 Subject: [PATCH 219/220] pillow.cmake: Lower case pillow. --- pillow.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pillow.cmake b/pillow.cmake index fd00167..6d5c8fe 100644 --- a/pillow.cmake +++ b/pillow.cmake @@ -1,7 +1,7 @@ # Python image library fork. -if (NOT Pillow_NAME) +if (NOT pillow_NAME) CMAKE_MINIMUM_REQUIRED(VERSION 2.8) @@ -17,16 +17,16 @@ include (libtiff) include (freetype2) include (numpy) -external_git_repo(Pillow +external_git_repo(pillow 2.7.0 # 0f05eb287a223ce106848cd048cfcb45e9faa565 - https://github.com/python-pillow/Pillow) + https://github.com/python-pillow/pillow) -message ("Installing ${Pillow_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") -ExternalProject_Add(${Pillow_NAME} +message ("Installing ${pillow_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${pillow_NAME} DEPENDS ${python_NAME} ${zlib_NAME} ${libjpeg_NAME} ${libtiff_NAME} ${freetype2_NAME} ${numpy_NAME} PREFIX ${BUILDEM_DIR} - GIT_REPOSITORY ${Pillow_URL} - GIT_TAG ${Pillow_TAG} + GIT_REPOSITORY ${pillow_URL} + GIT_TAG ${pillow_TAG} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND "" @@ -37,6 +37,6 @@ ExternalProject_Add(${Pillow_NAME} INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install ) -set_target_properties(${Pillow_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) +set_target_properties(${pillow_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT Pillow_NAME) +endif (NOT pillow_NAME) From 9f4bb8a10c4fd9cab644ccd57a4b991a56958189 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Mon, 6 Apr 2015 11:59:34 -0400 Subject: [PATCH 220/220] ruffus.cmake: Add support for building ruffus, a Python pipeline builder. --- ruffus.cmake | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ruffus.cmake diff --git a/ruffus.cmake b/ruffus.cmake new file mode 100644 index 0000000..b5696b5 --- /dev/null +++ b/ruffus.cmake @@ -0,0 +1,36 @@ +# Provides support for building pipelines in Python. Supports multiprocessing and DRMAA. + +if (NOT ruffus_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_git_repo(ruffus + e72bdac5ad845c8c16a8516160a76d89fb31ad45 # version 2.6.2 + https://github.com/bunbun/ruffus) + + +# Download and install ruffus +message ("Installing ${ruffus_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${ruffus_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${ruffus_URL} + GIT_TAG ${ruffus_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${ruffus_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT ruffus_NAME)