# $Id: Portfile,v 1.2 2006/07/19 07:29:29 pguyot Exp $

PortSystem 1.0
PortGroup xcode 1.0
name            twain-sane
version         1.8
categories      graphics
maintainers     pguyot@kallisys.net
description     TWAIN datasource for SANE
homepage        http://www.ellert.se/twain-sane/

long_description \
				This is a TWAIN datasource for MacOS X that aquires images \
				using the SANE backend libraries. The SANE backend libraries \
				provide access to a large range of scanners connected through \
				SCSI or USB. For a complete list see the documentation on the \
				SANE project homepage. It works with my HP SCSI scanner, and \
				many people have reported success with a large number of \
				different scanners. The feedback from users have helped the \
				SANE developers to fix problems with various backends, so with \
				each release of the SANE backends more of the MacOS X specific \
				problems have been solved.
distname		TWAIN-SANE-Interface-${version}
master_sites    http://www.ellert.se/PKGS/${distname}/src/

checksums       md5 df5a26e179d7efdfc3e2e2fdba164b4e \
				sha1 98d9584d368d0211679e5847e18d384489815487 \
				rmd160 be0468e480ac73db974a4319a98efe3577ebf7f9

depends_lib     lib:libiconv:libiconv \
				lib:libintl:gettext \
				lib:libusb:libusb \
				lib:libsane:sane-backends

pre-build {
	# Generate Info.plist
	cd "${worksrcpath}/src"
	system "./Info.sh > Info.plist"
}

xcode.project			SANE.ds.xcodeproj
xcode.destroot.path		/Library/Image Capture/TWAIN Data Sources
xcode.build.settings	LIBRARY_SEARCH_PATHS=${prefix}/lib \
						HEADER_SEARCH_PATHS=${prefix}/include
xcode.destroot.settings	LIBRARY_SEARCH_PATHS=${prefix}/lib \
						HEADER_SEARCH_PATHS=${prefix}/include
build.dir "${worksrcpath}/src"
