# $Id: Portfile,v 1.7 2005/07/18 19:50:43 mww Exp $

PortSystem 1.0

name			FFView
version			0.9
categories		aqua graphics
platforms		darwin
maintainers		mww@opendarwin.org
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/
distfiles		${name}-src-${version}.tar.bz2 \
				FFArchive-src-0.6.4.tar.bz2 \
				FFEXIF-src-0.5.tar.bz2
checksums		${name}-src-${version}.tar.bz2 \
					md5 80083705219c61b0b43e340d31e7977c \
				FFArchive-src-0.6.4.tar.bz2 \
					md5 b5c2082253b8bad9100f26d2df2e142d \
				FFEXIF-src-0.5.tar.bz2 md5 98469f91ccb6bf94423d6b240841fe68
use_bzip2		yes

worksrcdir		${name}

post-extract {
	file mkdir ${workpath}/FFArchive/build ${workpath}/FFEXIF/build
	system "cd ${workpath}/FFArchive/build && ln -sf Default/FFArchive.framework ."
	system "cd ${workpath}/FFEXIF/build && ln -sf Default/FFEXIF.framework ."
}

use_configure	no

pre-build	{
	system "cd ${workpath}/FFEXIF && ${build.cmd}"
	system "cd ${workpath}/FFArchive && ${build.cmd}"
}

build.type		pbx
build.target	-buildstyle Deployment

platform darwin 8 {
	pre-destroot {
		system "cd ${worksrcpath}/build && mv Deployment/*.app . || true"
	}
}

destroot {
	xinstall -m 755 -d ${destroot}/Applications/DarwinPorts
	file copy ${worksrcpath}/build/FFView.app \
		${destroot}/Applications/DarwinPorts
}
