diff --git a/examples/cmb.darwin.yaml b/examples/cmb.darwin.yaml new file mode 100644 index 000000000..4e638639a --- /dev/null +++ b/examples/cmb.darwin.yaml @@ -0,0 +1,68 @@ +# This profile file controls your <#> (HashDist) build environment. + +# In the future, we'll provide better incorporation of +# automatic environment detection. For now, have a look +# at the YAML files in the top-level directory and choose +# the most *specific* file that matches your environment. + +extends: + - file: osx.yaml + +parameters: + HOST_MPICC: /usr/local/bin/mpicc + HOST_MPICXX: /usr/local/bin/mpic++ + HOST_CMAKE: /usr/local/bin/cmake + PROLOGUE: | + export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | sed "s/\(10.[0-9]\).*/\1/"); export CXX=/usr/bin/clang++; export CC=/usr/bin/clang; + +# The packages list specifies all the packages that you +# require installed. <#> will ensure that all packages +# and their dependencies are installed when you build this +# profile. + +packages: + #blas and lapack are required by numpy + blas: + use: host-osx-framework-accelerate + lapack: + use: host-osx-framework-accelerate + cmake: + use: host-cmake + mpi: + use: host-mpi + + libxml2: + png: + szip: + zlib: + boost: + toolset: clang + address_model: 64 + + #file format packages + hdf5: + netcdf4: + netcdf4cpp: + + #now the rest + freetype: + gdal: + kml: + matplotlib: + molequeue: + numpy: + python: + qt: + toolset: unsupported/macx-clang + arch: x86_64 + remus: + shiboken: + smtk: + vxl: + zmq: + launcher: + paraview: + cmb: + + #not worth the time to enable + #ffmpeg: \ No newline at end of file diff --git a/examples/cmb.linux.yaml b/examples/cmb.linux.yaml new file mode 100644 index 000000000..3652c63f7 --- /dev/null +++ b/examples/cmb.linux.yaml @@ -0,0 +1,67 @@ +# This profile file controls your <#> (HashDist) build environment. + +# In the future, we'll provide better incorporation of +# automatic environment detection. For now, have a look +# at the YAML files in the top-level directory and choose +# the most *specific* file that matches your environment. + +extends: + - file: linux.yaml + +parameters: + HOST_MPICC: /usr/bin/mpicc + HOST_MPICXX: /usr/bin/mpic++ + HOST_MPIF77: /usr/bin/mpif77 + HOST_MPIF90: /usr/bin/mpif90 + HOST_MPIEXEC: /usr/bin/mpiexec + HOST_CMAKE: /usr/local/bin/cmake + PATH: | + /usr/local/bin:/bin:/usr/sbin:/sbin:/usr/bin: + PROLOGUE: | + export CXX=/usr/bin/g++-4.8; export CC=/usr/bin/gcc-4.8; export C_INCLUDE_PATH=/usr/include/mpi/; export CPLUS_INCLUDE_PATH=/usr/include/mpi/; + +# The packages list specifies all the packages that you +# require installed. <#> will ensure that all packages +# and their dependencies are installed when you build this +# profile. + +packages: + blas: + use: host-blas + cmake: + use: host-cmake + mpi: + use: host-mpi + curl: + szip: + bzip2: + zlib: + libxml2: + png: + boost: + toolset: gcc + address_model: 64 + + #file format packages + hdf5: + netcdf4: + netcdf4cpp: + + #now the rest + freetype: + matplotlib: + numpy: + python: + host: true + link: shared + qt: + arch: x86_64 + remus: + shiboken: + smtk: + vxl: + zmq: + + launcher: + paraview: + cmb: diff --git a/examples/paraview.darwin.yaml b/examples/paraview.darwin.yaml new file mode 100644 index 000000000..9cfb44402 --- /dev/null +++ b/examples/paraview.darwin.yaml @@ -0,0 +1,60 @@ +# This profile file controls your <#> (HashDist) build environment. + +# In the future, we'll provide better incorporation of +# automatic environment detection. For now, have a look +# at the YAML files in the top-level directory and choose +# the most *specific* file that matches your environment. + +extends: + - file: osx.yaml + +parameters: + HOST_MPICC: /usr/local/bin/mpicc + HOST_MPICXX: /usr/local/bin/mpic++ + HOST_CMAKE: /usr/local/bin/cmake + PROLOGUE: | + export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | sed "s/\(10.[0-9]\).*/\1/"); export CXX=/usr/bin/clang++; export CC=/usr/bin/clang; + +# The packages list specifies all the packages that you +# require installed. <#> will ensure that all packages +# and their dependencies are installed when you build this +# profile. + +packages: + #blas and lapack are required by numpy + blas: + use: host-osx-framework-accelerate + lapack: + use: host-osx-framework-accelerate + cmake: + use: host-cmake + mpi: + use: host-mpi + + curl: + szip: + bzip2: + zlib: + libxml2: + png: + boost: + toolset: clang + address_model: 64 + + #file format packages + hdf5: + netcdf4: + netcdf4cpp: + + #now the rest + freetype: + matplotlib: + numpy: + python: + host: true + link: shared + qt: + toolset: unsupported/macx-clang + arch: x86_64 + launcher: + paraview: diff --git a/examples/paraview.linux.yaml b/examples/paraview.linux.yaml new file mode 100644 index 000000000..1ce100a9c --- /dev/null +++ b/examples/paraview.linux.yaml @@ -0,0 +1,60 @@ +# This profile file controls your <#> (HashDist) build environment. + +# In the future, we'll provide better incorporation of +# automatic environment detection. For now, have a look +# at the YAML files in the top-level directory and choose +# the most *specific* file that matches your environment. + +extends: + - file: linux.yaml + +parameters: + HOST_MPICC: /usr/bin/mpicc + HOST_MPICXX: /usr/bin/mpic++ + HOST_MPIF77: /usr/bin/mpif77 + HOST_MPIF90: /usr/bin/mpif90 + HOST_MPIEXEC: /usr/bin/mpiexec + HOST_CMAKE: /usr/local/bin/cmake + PATH: | + /usr/local/bin:/bin:/usr/sbin:/sbin:/usr/bin: + PROLOGUE: | + export CXX=/usr/bin/g++-4.8; export CC=/usr/bin/gcc-4.8; export C_INCLUDE_PATH=/usr/include/mpi/; export CPLUS_INCLUDE_PATH=/usr/include/mpi/; + +# The packages list specifies all the packages that you +# require installed. <#> will ensure that all packages +# and their dependencies are installed when you build this +# profile. + +packages: + blas: + use: host-blas + cmake: + use: host-cmake + mpi: + use: host-mpi + curl: + szip: + bzip2: + zlib: + libxml2: + png: + boost: + toolset: gcc + address_model: 64 + + #file format packages + hdf5: + netcdf4: + netcdf4cpp: + + #now the rest + freetype: + matplotlib: + numpy: + python: + host: true + link: shared + qt: + arch: x86_64 + launcher: + paraview: diff --git a/pkgs/cmb.yaml b/pkgs/cmb.yaml new file mode 100644 index 000000000..db7beabb7 --- /dev/null +++ b/pkgs/cmb.yaml @@ -0,0 +1,25 @@ +extends: [cmake_package] +dependencies: + build: [boost, png, qt, zlib, bzip2, gdal, hdf5, + mpi, netcdf4, netcdf4cpp, freetype, + python, numpy, matplotlib, libxml2, + paraview, remus, vxl, kml, molequeue, smtk, zmq, {{build_with}}] + +sources: +- key: git:b24225a52187a124f5f83bdb7212d363f9254519 + url: git://public.kitware.com/CMB.git + +build_stages: +- name: configure + mode: override + extra: [ + '-DCMAKE_C_COMPILER:FILEPATH={{HOST_MPICC}}', + '-DCMAKE_CXX_COMPILER:FILEPATH={{HOST_MPICXX}}', + '-DBUILD_SHARED_LIBS:BOOL=ON', + '-DBUILD_TESTING:BOOL=OFF', + '-DKML_DIR:PATH=${KML_DIR}', + '-DGDAL_DIR:PATH=${GDAL_DIR}', + '-DParaView_DIR:PATH=${PARAVIEW_DIR}', + '-DMoleQueue_DIR:PATH=${MOLEQUEUE_DIR}', + '-DCMAKE_CXX_FLAGS:STRING="${CPPFLAGS}"', + ] diff --git a/pkgs/molequeue/header-fix.patch b/pkgs/molequeue/header-fix.patch new file mode 100644 index 000000000..a6bf86673 --- /dev/null +++ b/pkgs/molequeue/header-fix.patch @@ -0,0 +1,9 @@ +--- a/molequeue/transport/messageidmanager_p.cpp ++++ b/molequeue/transport/messageidmanager_p.cpp +@@ -17,6 +17,7 @@ + #include "messageidmanager_p.h" + + #include "message.h" ++#include + + namespace MoleQueue { diff --git a/pkgs/molequeue/molequeue.yaml b/pkgs/molequeue/molequeue.yaml new file mode 100644 index 000000000..5d95b013b --- /dev/null +++ b/pkgs/molequeue/molequeue.yaml @@ -0,0 +1,26 @@ +extends: [cmake_package] +dependencies: + build: [qt] + +sources: +- key: git:e545ee25b4b79d5bae9e1cd0515fccb39f44d19d + url: git://source.openchemistry.org/molequeue.git + +defaults: + # lib/cmake/molequeue/MoleQueueConfig.cmake contains hard-coded path + relocatable: false + +build_stages: +- name: patch + before: configure + files: [header-fix.patch] + handler: bash + bash: | + patch -up1 < _hashdist/header-fix.patch + +- name: configure + mode: override + extra: ['-DBUILD_SHARED_LIBS:BOOL=ON', + '-DCMAKE_BUILD_TYPE:STRING=Release', + '-DENABLE_TESTING:BOOL=OFF' + ] diff --git a/pkgs/paraview/findnetcdf.patch b/pkgs/paraview/findnetcdf.patch new file mode 100644 index 000000000..98c41c376 --- /dev/null +++ b/pkgs/paraview/findnetcdf.patch @@ -0,0 +1,66 @@ +--- a/VTK/CMake/FindNetCDF.cmake ++++ b/VTK/CMake/FindNetCDF.cmake +@@ -38,17 +38,26 @@ if (NETCDF_INCLUDE_DIR AND NETCDF_LIBRARY) + set (NETCDF_FIND_QUIETLY TRUE) + endif () + ++set(USE_DEFAULT_PATHS "NO_DEFAULT_PATH") ++if(NETCDF_USE_DEFAULT_PATHS) ++ set(USE_DEFAULT_PATHS "") ++endif() ++ + find_path (NETCDF_INCLUDE_DIR netcdf.h +- HINTS NETCDF_DIR ENV NETCDF_DIR) ++ HINTS "${NETCDF_DIR}/include") + mark_as_advanced (NETCDF_INCLUDE_DIR) + set (NETCDF_C_INCLUDE_DIRS ${NETCDF_INCLUDE_DIR}) + +-find_library (NETCDF_LIBRARY NAMES netcdf) ++find_library (NETCDF_LIBRARY NAMES netcdf ++ HINTS "${NETCDF_DIR}/lib") + mark_as_advanced (NETCDF_LIBRARY) ++ + set (NETCDF_C_LIBRARIES ${NETCDF_LIBRARY}) + + #start finding requested language components + set (NetCDF_libs "") ++set (netCDF_includes "${NETCDF_INCLUDE_DIR}") ++ + get_filename_component (NetCDF_lib_dirs "${NETCDF_LIBRARY}" PATH) + set (NETCDF_HAS_INTERFACES "YES") # will be set to NO if we're missing any interfaces + +@@ -56,9 +65,15 @@ macro (NetCDF_check_interface lang header libs) + if (NETCDF_${lang}) + #search starting from user modifiable cache var + find_path (NETCDF_${lang}_INCLUDE_DIR NAMES ${header} +- HINTS "${NETCDF_INCLUDE_DIR}" NO_DEFAULT_PATH) ++ HINTS "${NETCDF_INCLUDE_DIR}" ++ HINTS "${NETCDF_${lang}_ROOT}/include" ++ ${USE_DEFAULT_PATHS}) ++ + find_library (NETCDF_${lang}_LIBRARY NAMES ${libs} +- HINTS "${NetCDF_lib_dirs}" NO_DEFAULT_PATH) ++ HINTS "${NetCDF_lib_dirs}" ++ HINTS "${NETCDF_${lang}_ROOT}/lib" ++ ${USE_DEFAULT_PATHS}) ++ + mark_as_advanced (NETCDF_${lang}_INCLUDE_DIR NETCDF_${lang}_LIBRARY) + + #export to internal varS that rest of project can use directly +@@ -67,6 +82,7 @@ macro (NetCDF_check_interface lang header libs) + + if (NETCDF_${lang}_INCLUDE_DIR AND NETCDF_${lang}_LIBRARY) + list (APPEND NetCDF_libs ${NETCDF_${lang}_LIBRARY}) ++ list (APPEND netCDF_includes ${NETCDF_${lang}_INCLUDE_DIR}) + else () + set (NETCDF_HAS_INTERFACES "NO") + message (STATUS "Failed to find NetCDF interface for ${lang}") +@@ -93,7 +109,7 @@ NetCDF_check_interface (F90 netcdf.mod netcdff) + #export accumulated results to internal varS that rest of project can depend on + list (APPEND NetCDF_libs "${NETCDF_C_LIBRARIES}") + set (NETCDF_LIBRARIES ${NetCDF_libs}) +-set (NETCDF_INCLUDE_DIRS ${NETCDF_INCLUDE_DIR}) ++set (NETCDF_INCLUDE_DIRS ${netCDF_includes}) + + # handle the QUIETLY and REQUIRED arguments and set NETCDF_FOUND to TRUE if + # all listed variables are TRUE diff --git a/pkgs/paraview/installCMakeFiles.patch b/pkgs/paraview/installCMakeFiles.patch new file mode 100644 index 000000000..c8a1b6521 --- /dev/null +++ b/pkgs/paraview/installCMakeFiles.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b102aa5..d3d72f4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -208,7 +208,7 @@ if (UNIX) + option(PARAVIEW_ENABLE_FFMPEG "Enable FFMPEG Support." OFF) + endif() + +-if (UNIX AND NOT APPLE) ++if (UNIX) + # Since development installs are currently being tested only on linuxes. We + # can support these for other platforms if time permits. + option(PARAVIEW_INSTALL_DEVELOPMENT_FILES +@@ -725,6 +725,17 @@ if (NOT VTK_INSTALL_NO_DEVELOPMENT) + DESTINATION ${VTK_INSTALL_PACKAGE_DIR} + COMPONENT Development + ) ++ ++ #we depend on a couple VTK CMake files that aren't installed but we need ++ #installed ++ install( ++ FILES ${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake/TopologicalSort.cmake ++ ${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake/vtkMakeInstantiator.h.in ++ ${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake/vtkMakeInstantiator.cxx.in ++ DESTINATION ${VTK_INSTALL_PACKAGE_DIR} ++ COMPONENT Development ++ ) ++ + endif() + + #----------------------------------------------------------------------------- diff --git a/pkgs/paraview/paraview.yaml b/pkgs/paraview/paraview.yaml index cc4a183f4..d20e7f262 100644 --- a/pkgs/paraview/paraview.yaml +++ b/pkgs/paraview/paraview.yaml @@ -5,7 +5,7 @@ dependencies: python, numpy, matplotlib, libxml2, {{build_with}}] sources: -- key: git:08cb9fc8d27b24f1d581a98bccd01b8c8b834a19 +- key: git:e90304c0053a68ab316790748e097d810cb17ed1 url: https://github.com/Kitware/ParaView.git defaults: @@ -13,6 +13,27 @@ defaults: relocatable: false build_stages: +- name: patch + before: configure + files: [findnetcdf.patch] + handler: bash + bash: | + patch -up1 < _hashdist/findnetcdf.patch + +- name: patch2 + before: configure + files: [visitbridge.patch] + handler: bash + bash: | + patch -up1 < _hashdist/visitbridge.patch + +- name: patch3 + before: configure + files: [installCMakeFiles.patch] + handler: bash + bash: | + patch -up1 < _hashdist/installCMakeFiles.patch + - name: patch4 before: configure files: [installGenerateFiles.patch] diff --git a/pkgs/paraview/visitbridge.patch b/pkgs/paraview/visitbridge.patch new file mode 100644 index 000000000..c5ccc5c2f --- /dev/null +++ b/pkgs/paraview/visitbridge.patch @@ -0,0 +1,23 @@ +--- a/Utilities/VisItBridge/databases/CMakeLists.txt ++++ b/Utilities/VisItBridge/databases/CMakeLists.txt +@@ -192,11 +192,16 @@ else(VISIT_PARALLEL) + visit_vtk vtkIOImage vtkRenderingOpenGL) + endif(VISIT_PARALLEL) + +-target_link_libraries(vtkIOVisItBridge LINK_PRIVATE vtkNetCDF) ++#To properly use thirdparty vtk libraries you shouldn't explicitly link to ++#the target itself. That won't work when the target is external, because in ++#that use case the target has no import libraries. Instead the best way to ++#use third party libraries is to use the global variable _LIBRARIES. ++vtk_module_load(vtkhdf5) ++vtk_module_load(vtknetcdf) + +-if(PARAVIEW_HDF5_LIBRARIES) +- target_link_libraries(vtkIOVisItBridge LINK_PRIVATE ${PARAVIEW_HDF5_LIBRARIES}) +-endif(PARAVIEW_HDF5_LIBRARIES) ++target_link_libraries(vtkIOVisItBridge LINK_PRIVATE ${vtknetcdf_LIBRARIES} vtksys) ++ ++target_link_libraries(vtkIOVisItBridge LINK_PRIVATE ${vtkhdf5_LIBRARIES}) + + if(HAVE_LIBSILO AND VISIT_BUILD_READER_Silo) + target_link_libraries(vtkIOVisItBridge LINK_PRIVATE ${SILO_LIBRARIES}) diff --git a/pkgs/remus.yaml b/pkgs/remus.yaml new file mode 100644 index 000000000..21d247a6e --- /dev/null +++ b/pkgs/remus.yaml @@ -0,0 +1,20 @@ +extends: [cmake_package] +dependencies: + build: [boost, zmq] + +sources: +- key: git:42ab4e84e7769b3c3531ee378c6d95f342110d46 + url: https://github.com/robertmaynard/Remus.git + +build_stages: +- name: configure + mode: override + extra: ['-DBUILD_SHARED_LIBS:BOOL=ON', + '-DRemus_ENABLE_EXAMPLES:BOOL=OFF', + '-DRemus_ENABLE_TESTING:BOOL=OFF', + '-DRemus_NO_SYSTEM_BOOST:BOOL=ON', + '-DZeroMQ_ROOT_DIR:PATH=${ZMQ_DIR}', + '-DZeroMQ_INCLUDE_DIR:PATH=${ZMQ_DIR}/include', + '-DZeroMQ_LIBRARY_DIR:PATH=${ZMQ_DIR}/lib', + '-DBOOST_ROOT:PATH=${BOOST_DIR}', + '-DBOOST_LIBRARYDIR:PATH=${BOOST_DIR}/lib'] diff --git a/pkgs/shiboken.yaml b/pkgs/shiboken.yaml new file mode 100644 index 000000000..68aa41f10 --- /dev/null +++ b/pkgs/shiboken.yaml @@ -0,0 +1,23 @@ +extends: [cmake_package] +dependencies: + build: [qt, python] + +sources: +- key: git:7f3bf07ee6c368a42edd8dcc1b3b0730b4809eaf + url: https://github.com/OpenGeoscience/shiboken.git + +defaults: + # lib/cmake/Shiboken-1.2.1/ShibokenConfig.cmake contains hard-coded path + relocatable: false + +build_stages: +- name: configure + mode: override + extra: [ + '-DSET_RPATH:BOOL=ON', + '-DBUILD_SHARED_LIBS:BOOL=ON', + '-DDISABLE_DOCSTRINGS:BOOL=ON', + '-DCMAKE_BUILD_TYPE:STRING=Release'] + + + diff --git a/pkgs/smtk.yaml b/pkgs/smtk.yaml new file mode 100644 index 000000000..56f5b2420 --- /dev/null +++ b/pkgs/smtk.yaml @@ -0,0 +1,39 @@ +extends: [cmake_package] +dependencies: + build: [shiboken, boost, qt, python] + +sources: +- key: git:9322a480c1e93de9f78d965183970ab843526d9d + url: https://github.com/Kitware/SMTK + +defaults: + # python/smtk.py contains hard-coded path + relocatable: false + +build_stages: +- name: configure + mode: override + extra: ['-DBUILD_SHARED_LIBS:BOOL=ON', + '-DCMAKE_BUILD_TYPE:STRING=Release', + '-DSMTK_BUILD_QT:BOOL=ON', + '-DSMTK_BUILD_PYTHON_WRAPPINGS:BOOL=ON', + '-DShiboken_DIR=${SHIBOKEN_DIR}/lib/cmake/Shiboken-1.2.1/', + '-DBOOST_ROOT=${BOOST_DIR}'] + +#Fixing missing include files and install files. Todo This needs alot of +#work to convert over to hashdist, mainly since I need to convert +#install_smtk_python_plugin.cmake +# - name: install_fix +# handler: bash +# after: install +# bash: | +# ${CMAKE} \ +# CMAKE_BUILD_TYPE:STRING=Release \ +# -Dpv_version:STRING=4.1 \ +# -Dpv_python_executable:PATH=${PYTHON_DIR/bin/python} \ +# -DBUILD_SHARED_LIBS:BOOL=ON \ +# -DSMTK_BIN_DIR:PATH=${ARTIFACT} \ +# -DTMP_DIR:PATH= \ +# -P ${CMAKE_CURRENT_LIST_DIR}/install_smtk_python_plugin.cmake + + diff --git a/pkgs/vxl.yaml b/pkgs/vxl.yaml index f932ca8d9..164a2c231 100644 --- a/pkgs/vxl.yaml +++ b/pkgs/vxl.yaml @@ -1,10 +1,10 @@ extends: [cmake_package] dependencies: - build: [png] + build: [png, zlib] sources: -- url: http://git.code.sf.net/p/vxl/git - key: git:e456b35d322eea055567819408c6dff5c887d149 +- key: git:e456b35d322eea055567819408c6dff5c887d149 + url: http://git.code.sf.net/p/vxl/git defaults: # /share/vxl/cmake/VXLConfig.cmake contains absolute path