# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 68011 2010-05-24 20:58:23Z ryandesign@macports.org $

PortSystem 1.0

name		gnome-libs
version		1.4.2
set branch      [join [lrange [split ${version} .] 0 1] .]
revision	3
description	These are the GNOME libraries.
long_description        These are the GNOME libraries, the foundation for \
			most of the application of the GNOME project.
maintainers	nomaintainer
categories	gnome
platforms	darwin
homepage	http://www.gnome.org/
master_sites    gnome:sources/${name}/${branch}/
use_bzip2	yes
checksums	md5 6111e91b143a90afb30f7a8c1e6cbbd6
depends_lib     port:oaf port:gtk1 port:libghttp port:imlib
patchfiles	patch_configure patch_ltmain.sh patch-XmHTMLP.h patch-XmHTMLI.h \
            install.diff patch-libart_lgpl_libart.m4

configure.args  --mandir=${prefix}/share/man --disable-gtk-doc --disable-test-gnome
configure.cppflags-append "-L${prefix}/lib"
configure.cflags-append "-fstrict-aliasing -funroll-loops"

post-configure {
    reinplace "s|docdir = \$(prefix)/doc|docdir = \$(prefix)/share/doc/${name}|g" \
              ${worksrcpath}/devel-docs/Makefile
}

pre-destroot {
	addgroup games
	adduser games gid=[existsgroup games]
}

post-destroot {
	file rename ${destroot}${prefix}/share/pixmaps/gnome-error.png \
		 ${destroot}${prefix}/share/pixmaps/gnome-error-1.png
	file rename ${destroot}${prefix}/share/pixmaps/gnome-question.png \
		${destroot}${prefix}/share/pixmaps/gnome-question-1.png
	file rename ${destroot}${prefix}/share/pixmaps/gnome-default-dlg.png \
		${destroot}${prefix}/share/pixmaps/gnome-default-dlg-1.png
	file rename ${destroot}${prefix}/share/pixmaps/gnome-info.png \
		${destroot}${prefix}/share/pixmaps/gnome-info-1.png
	file rename ${destroot}${prefix}/share/pixmaps/gnome-warning.png \
		${destroot}${prefix}/share/pixmaps/gnome-warning-1.png
}

livecheck.type  regex
livecheck.url   http://ftp.gnome.org/pub/gnome/sources/${name}/${branch}/
livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}
