# $Id: Portfile 34325 2008-02-21 16:32:23Z phw@macports.org $

PortSystem      1.0
PortGroup       xcode 1.0

name            FFView
version         0.9.9
categories      aqua graphics
maintainers     phw
description     fast OpenGL-powered picture viewer

long_description \
    FFView is a fast OpenGL-powered picture viewer a la ACDsee. It is aimed at letting you read manga or other \
    comics onscreen (windowed & fullscreen mode). Features include fast prefetching, smooth panning, voice commands, \
    the ability to browse pictures inside archives (.rar/.cbr, .zip/.cbz) and sticky per-picture options.

homepage        http://www.feedface.com/projects/ffview.html
master_sites    http://www.feedface.com/projects/files/ffview/
distname        ${name}-src-${version}
use_bzip2       yes
distfiles-append \
                [suffix FFArchive-src-0.8.1] \
                [suffix FFEXIF-src-0.5.2]

checksums       [suffix ${distname}] \
                    md5 71d2ac2b074ff3739c9947bfe776adb8 \
                    sha1 e75a1ee71801e1cb485c946b45dbf15fb26f221e \
                    rmd160 a300cd7a941a13726229f020e06657127f9ac05a \
                [suffix FFArchive-src-0.8.1] \
                    md5 60cc021380de3d05480345aa29783b10 \
                    sha1 4b6aa52e2c444c3b4b31604f3cac28a8b44c25fe \
                    rmd160 7484b80845665a8f4a1aaeac94ec9622f4f14aa0 \
                [suffix FFEXIF-src-0.5.2] \
                    md5 a987bdbd053947f57b8e5c4281a408b7 \
                    sha1 dc457cac7b3996e75bdc17cd8540f499fe7c8222 \
                    rmd160 d49a3e9def1e03bcb3727be5da772bc0b5e6c580

worksrcdir      ${name}

xcode.target    ${name}

if {! [variant_isset universal]} {
    set arch ${os.arch}
    if {! [string compare ${arch} powerpc]} {
        set arch ppc
	}

    xcode.build.settings    ARCHS=${arch}
    xcode.destroot.settings ARCHS=${arch}
}

pre-build {
    foreach {framework} {FFArchive FFEXIF} {
        system "cd ${workpath}/${framework} && \
            ${build.cmd} -configuration ${xcode.configuration} ${xcode.build.settings}"
    }
}

variant universal {}

