# $Id: Portfile,v 1.3 2005/08/11 21:33:15 rshaw Exp $
PortSystem		1.0

name			macsword
version			1.1.3
categories		aqua textproc
maintainers		darwinports@opendarwin.org
description		Aqua application based on the Sword project for Bible reading
long_description	MacSword is a free & open-source application for  \
					research and study of God and His Word. It is  \
					developed specifically for Macintosh computers  \
					running Mac OS X.  \
					MacSword allows you to read and browse many \
					different bibles translations in different languages \
					from Hebrew to Albanian. As well as reading \
					devotionals, commentaries, dictionaries and \
					lexicons, it also supports searching and advanced \
					features such as services so that you can access the \
					Bible in any program. \
					And because MacSword is based on the Sword project, \
					it is compatible with a growing collection of over \
					200 texts available in over 50 languages.
homepage		http://www.macsword.com/
master_sites	sourceforge
worksrcdir		${name}
checksums		md5 ba943645e41d1b1440decd028395ff48
platforms		darwin

depends_lib		lib:libsword:sword \
				path:/Library/Frameworks/AGRegex.framework:agregex

patchfiles		patch-project.pbxproj \
				patch-PrefHandler.m \
				patch-SwordManager.mm
post-patch {
	reinplace "s|__PREFIX|${prefix}|g" \
		${worksrcpath}/MacSword.xcode/project.pbxproj \
		${worksrcpath}/PrefHandler.m
}

use_configure	no

build.type		pbx
build.target	MacSword
build.pre_args	-target ${build.target}
build.args		-buildstyle Deployment

destroot {
	xinstall -d -m 0755 ${destroot}/Applications/DarwinPorts
	system "cp -R ${worksrcpath}/build/MacSword.app \
		${destroot}/Applications/DarwinPorts"
}

