Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
174 lines (143 sloc) 5.53 KB
# -*- 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
PortSystem 1.0
PortGroup cmake 1.1
PortGroup cxx11 1.1
PortGroup perl5 1.0
PortGroup wxWidgets 1.0
PortGroup active_variants 1.1
PortGroup linear_algebra 1.0
name hugin-app
version 2019.0.0
revision 0
set branch [join [lrange [split ${version} .] 0 1] .]
categories graphics
maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
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
license GPL-2
platforms darwin
master_sites sourceforge:project/hugin/hugin/hugin-${branch}
distname hugin-${version}
use_bzip2 yes
perl5.branches 5.28
wxWidgets.use wxWidgets-3.0-cxx11
checksums rmd160 6d1d7e14a862879e5ac9bc2d9b75c5e9e4d0e15a \
sha256 f94717c5035b776a552163bac5815916e0662008fabefafd790fa54b352e22d1 \
size 10297887
linalg.setup noveclibfort
# do not assume default values that MacPorts sets
patchfiles-append patch-no_default.diff
# in /usr/include/sys/termios.h, VT1 is defined as a number
patchfiles-append patch-terios.diff
# at some point, exiv2 restructured header files
# avoid "no type named 'Error' in namespace 'Exiv2'"
patchfiles-append patch-exiv2_error.diff
# change how we look for OpenMP
patchfiles-append patch-find_openmp.diff
post-patch {
reinplace \
"s|___MACPORTS_FIND_OPENMP__|set(OPENMP_FOUND FALSE)|g" \
${worksrcpath}/CMakeLists.txt
}
# icon files are not installed
patchfiles-append patch-icns.diff
post-extract {
# icon files are not found
ln -s ../hugin/Hugin.icns ${worksrcpath}/src/hugin1/stitch_project
ln -s ../hugin/PTBatcherGui.icns ${worksrcpath}/src/hugin1/ptbatcher
# use the cmake version of the following packages
foreach cmakePackage "LAPACK GLUT GLEW JPEG PNG PackageHandleStandardArgs PkgConfig TIFF ZLIB OpenMP" {
delete ${worksrcpath}/CMakeModules/Find${cmakePackage}.cmake
}
}
# do not find freeglut if installed
configure.pre_args-replace \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_FIND_FRAMEWORK=FIRST
# see https://trac.macports.org/ticket/58484
configure.args-append \
-DTIFF_INCLUDE_DIR=${prefix}/include
depends_build-append port:pkgconfig
# see http://wiki.panotools.org/Development_of_Open_Source_tools#Dependencies
depends_lib-append \
port:${wxWidgets.port} \
port:boost \
port:zlib \
port:tiff \
port:libpano13 \
port:jpeg \
port:libpng \
port:ilmbase \
port:openexr \
port:vigra \
port:exiv2 \
port:glew \
port:gettext \
port:fftw-3
require_active_variants glew "" x11
depends_lib-append \
port:flann \
port:lcms2 \
port:sqlite3
depends_run \
port:enblend \
port:p${perl5.major}-image-exiftool
configure.args-append \
-DINSTALL_OSX_BUNDLE_DIR=${applications_dir} \
-DwxWidgets_CONFIG_EXECUTABLE=${wxWidgets.wxconfig} \
-DBUILD_HSI=OFF \
-DENABLE_LAPACK=ON
pre-configure {
configure.args-append ${cmake_linalglib}
}
set pythons_suffixes {27 36 37}
set pythons_ports {}
foreach s ${pythons_suffixes} {
lappend pythons_ports python${s}
}
set any_python 0
foreach s ${pythons_suffixes} {
set p python${s}
set v [string index ${s} 0].[string index ${s} 1]
set i [lsearch -exact ${pythons_ports} ${p}]
set c [lreplace ${pythons_ports} ${i} ${i}]
set python_prefix ${frameworks_dir}/Python.framework/Versions/${v}
variant ${p} description "Build Python Scripting Interface with Python ${v}" conflicts {*}${c} "
depends_lib-append \
port:${p} \
port:swig-python
configure.python ${python_prefix}/bin/python${v}
configure.args-append \
-DPYTHON_EXECUTABLE=${python_prefix}/bin/python${v} \
-DPYTHON_INCLUDE_DIR=${python_prefix}/Headers \
-DPYTHON_LIBRARY=${python_prefix}/Python
configure.args-replace \
-DBUILD_HSI=OFF \
-DBUILD_HSI=ON
"
if {[variant_isset python${s}]} {
set any_python 1
}
}
if {!${any_python}} {
default_variants +python27
}
pre-fetch {
set any_python 0
foreach s ${pythons_suffixes} {
if {[variant_isset python${s}]} {
set any_python 1
}
}
if {!${any_python}} {
return -code error "You must choose at least one Python variant."
}
}
livecheck.type regex
livecheck.url ${homepage}
livecheck.regex Hugin\[ -\](\[.0-9\]+) released
You can’t perform that action at this time.