# $Id: Portfile,v 1.18 2006/05/10 01:21:55 rhwood Exp $
PortSystem 1.0
name		nautilus
version		2.12.2
description	The GNOME filemanager
long_description       	Nautilus is the official file manager for the \
			GNOME desktop. It is designed to be primarly a file manager, \
			but there are support for web and file viewing too.  
maintainers	gnome-darwinports@opendarwin.org rhwood@opendarwin.org
categories	gnome
platforms	darwin 
homepage	http://www.gnome.org/
master_sites    gnome:sources/nautilus/2.12/
checksums	md5 1c1304e458eda551da11ed8c52b1faa2 \
			sha1 9a7e01afb8db91c3b95b7aef9572a581fdb2f1b5 \
			rmd160 6fedb1880febead00e5d4f4e71fb3cf219e1942e

depends_lib	port:eel-2-12 lib:libeel-2:eel lib:libexif.12:libexif port:librsvg
depends_build	bin:update-mime-database:shared-mime-info
use_bzip2 	yes

configure.args  --mandir=${prefix}/share/man
configure.env   CPPFLAGS="-L${prefix}/lib/eel-2.12.2/lib -I${prefix}/lib/eel-2.12.2/include -L${prefix}/lib -I${prefix}/include" \
		PKG_CONFIG_PATH="${prefix}/lib/eel-2.12.2/lib/pkgconfig:${prefix}/lib/pkgconfig:${prefix}/share/pkgconfig"

post-extract {
	reinplace "s|-no-undefined||g"  \
		${worksrcpath}/libnautilus-private/Makefile.in \
		${worksrcpath}/libnautilus-extension/Makefile.in
}

pre-build {
	reinplace "s|-lesd||g" ${worksrcpath}/libnautilus-extension/Makefile
	reinplace "s|-lesd||g" ${worksrcpath}/cut-n-paste-code/Makefile
	reinplace "s|-lesd||g" ${worksrcpath}/cut-n-paste-code/widgets/gimphwrapbox/Makefile
	reinplace "s|-lesd||g" ${worksrcpath}/cut-n-paste-code/libegg/Makefile
	reinplace "s|-lesd||g" ${worksrcpath}/cut-n-paste-code/gsequence/Makefile
	reinplace "s|-lesd||g" ${worksrcpath}/libbackground/Makefile
	reinplace "s|-lesd||g" ${worksrcpath}/src/file-manager/Makefile
	reinplace "s|-lesd||g" ${worksrcpath}/libnautilus-private/Makefile
}

post-install {
	system "update-mime-database ${prefix}/share/mime"
}

platform darwin 8 {
	pre-configure {
		reinplace "s|-flat_namespace -undefined suppress||g" \
			${worksrcpath}/configure
	}
}
