# $Id: Portfile 62213 2009-12-31 23:12:37Z ryandesign@macports.org $

PortSystem 1.0

name		qtpfsgui
version		1.9.3
categories	aqua graphics
maintainers	gmail.com:clubjuggler openmaintainer
description	GUI for HDR imaging workflow
long_description Qtpfsgui is an open source graphical user interface \
                application that aims to provide a workflow for HDR imaging.
platforms	darwin
homepage	http://qtpfsgui.sourceforge.net/
master_sites	sourceforge
patchfiles      patch-app-path.diff

depends_lib     path:bin/qmake-mac:qt4-mac port:exiv2 port:openexr port:ilmbase port:fftw-3-single port:tiff

checksums       md5     5a6421391e373c912e4a793e131151c8 \
                sha1    adf037c54f55be50d931fa484cca169c01d0384d \
                rmd160  5188b2f1679d6788358067fe761d0c72c475bfe9

# This shouldn't be this hard.  Taken from portconfigure.tcl because
# I couldn't see any other way to set this.
# Set pre-compiler filter to use (ccache/distcc), if any.
if {[tbool configure.ccache] && [tbool configure.distcc]} {
   set filter "ccache "
   append_list_to_environment_value configure "CCACHE_PREFIX" "distcc"
} elseif {[tbool configure.ccache]} {
   set filter "ccache "
} elseif {[tbool configure.distcc]} {
   set filter "distcc "
} else {
   set filter ""
}

# This also shouldn't be this hard.  All I want to do is set QMAKE_CC to the
# environment variable CC (and QMAKE_CXX to CXX) that are set in portconfigure.tcl.
# However, I couldn't figure out how to get the environment variable here so
# this is a kludge to replicate what's done in portconfigure.tcl.  It should
# be fixed as soon as possible.
configure.pre_args  PREFIX=${prefix}
configure.args      APPLICATIONS_DIR="${applications_dir}" \
                    DOCDIR=${prefix}/share/doc/${name} \
                    QMAKE_CC="${filter}gcc" \
                    QMAKE_CXX="${filter}g++"
configure.cmd   "LOCALSOFT=${prefix} ${prefix}/libexec/qt4-mac/bin/qmake"
destroot.destdir INSTALL_ROOT=${destroot}
