# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id: Portfile 151902 2016-08-23 21:51:18Z mojca@macports.org $ PortSystem 1.0 PortGroup cmake 1.0 # C++11 can be conditionally avoided by using an older version of vigra (1.9.0) # and a tiny patch below PortGroup cxx11 1.0 PortGroup perl5 1.0 PortGroup wxWidgets 1.0 name hugin-app version 2016.0.0 revision 4 set branch [join [lrange [split ${version} .] 0 1] .] categories graphics maintainers nomaintainer description Panorama photo stitcher long_description An easy to use cross-platform panoramic imaging \ toolchain based on Panorama Tools. With hugin you \ can assemble a mosaic of photographs into a complete \ immersive panorama, stitch any series of overlapping \ pictures and much more. homepage http://hugin.sourceforge.net platforms darwin master_sites sourceforge:project/hugin/hugin/hugin-${branch} distname hugin-${version} use_bzip2 yes cmake.out_of_source yes perl5.branches 5.24 wxWidgets.use wxWidgets-3.0 checksums rmd160 9d73e78accbfae2194b347d3d7f7c3932adc018a \ sha256 b030b05b248b583cf9a26817f5b350303e3ce2c8bc4b43d45f697fbdf55b65e6 depends_build-append port:pkgconfig \ port:p${perl5.major}-image-exiftool depends_lib-append port:boost \ port:exiv2 \ port:flann \ port:gettext \ port:glew \ port:ilmbase \ port:jpeg \ port:lensfun \ port:libpano13 \ port:libpng \ port:libxml2 \ port:openexr \ port:swig-python \ port:tclap \ port:tiff \ port:vigra \ port:python27 \ port:${wxWidgets.port} depends_run port:enblend \ port:p${perl5.major}-image-exiftool # TODO dependencies: # - freeglut or glut, the OpenGL utility toolkit # - optionally, lapack # - for the optional Python Scripting Interface (currently functional and tested only on Linux and Windows) # Python version >=2.6 # SWIG >=2.0 - If Python >=3.2, SWIG must be >=2.0.4 # # NOTE: maybe the problem was that if swig is installed, # it gets detected and then requires swig-python # and additional python definitions, else it fails to bulid # TODO: try to see where MAC_SELF_CONTAINED_BUNDLE gets defined # patch-CMakeLists.txt.diff - include the file declaring check_cxx_source_compiles (report upstream) # patch-src-hugin1-hugin1.pch.diff - moderately helps with compiler issues patchfiles patch-CMakeLists.txt.diff \ patch-src-hugin1-hugin1.pch.diff \ patch-src-hugin1-icpfind-AutoCtrlPointCreator.cpp.diff # if C++11 configure.args-append -DCMAKE_CXX_FLAGS="-std=c++11" # else #patchfiles-append patch-nocxx11.diff # nowadays Hugin is transitioning to C++11, so this list probably doesn't make much sense # Per (an old) README: "Hugin can be compiled with gcc-4.4.4, gcc-4.5.1, and gcc-4.6" #compiler.blacklist gcc-* apple-gcc-* macports-gcc-4.2 macports-gcc-4.3 configure.env PATH="${prefix}/libexec/perl${perl5.major}:$env(PATH)" # TODO: # - BOOST is most likely only needed when C++11 support is missing configure.args-append -DINSTALL_OSX_BUNDLE_DIR=${applications_dir} \ -DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/2.7/bin/python \ -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/include/python2.7 \ -DPYTHON_LIBRARY=${prefix}/lib/libpython2.7.dylib \ -DwxWidgets_CONFIG_EXECUTABLE=${wxWidgets.wxconfig} \ -DwxWidgets_wxrc_EXECUTABLE=${wxWidgets.wxrc} \ -DUSE_BOOST=ON -DBOOST_ROOT=${prefix} # prevents some compiler errors configure.cxxflags-append -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0 # recursive template instantiation exceeded maximum depth of 128 configure.cxxflags-append -ftemplate-depth-1024 livecheck.type regex livecheck.url ${homepage} livecheck.regex Hugin-(\[.0-9\]+) released