# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name		gtk1
version		1.2.10
revision	8
categories	x11
maintainers	nomaintainer
description	Gimp Tool Kit
homepage	http://www.gtk.org/
platforms	darwin freebsd sunos

long_description This is GTK+ version 1.2.10. GTK+, which stands for \
		 the Gimp ToolKit, is a library for creating graphical \
		 user interfaces for the X Window System.

master_sites	gnome:sources/gtk+/1.2/ \
				ftp://ftp.gtk.org/pub/gtk/v1.2/ \
		macports:lt:lt

distname	gtk+-${version}
set filename	gtk+-${version}${extract.suffix}
distfiles	${filename} ltconfig13:lt ltmain13:lt
checksums	gtk+-1.2.10.tar.gz md5 4d5cb2fc7fb7830e4af9747a36bfce20 \
		ltconfig13 md5 ea53f42a550c9f9e653758a8ed91574e \
		ltmain13 md5 e094ae92724c4015dbab97de151c2525
extract.only	${filename}

depends_lib	port:gettext port:glib1 port:xorg-libXext port:xorg-libXt

patchfiles	patch-config.guess patch-config.sub \
			patch-gtk.m4.diff

configure.ccache    no
configure.args	--disable-shm --with-locale --mandir=${prefix}/share/man \
		--infodir=${prefix}/share/info

post-patch {
	   copy -force ${distpath}/ltconfig13 ${worksrcpath}/ltconfig
	   copy -force ${distpath}/ltmain13 ${worksrcpath}/ltmain.sh
}

post-destroot {
	      ln -sf libgdk-1.2.0.9.1.dylib ${destroot}${prefix}/lib/libgdk.1.dylib
	      ln -sf libgtk-1.2.0.9.1.dylib ${destroot}${prefix}/lib/libgtk.1.dylib
}

platform sunos {
	configure.args-delete	--disable-shm --with-locale
	configure.args-append	--disable-nls
}

livecheck.type  regex
livecheck.url   ftp://ftp.gtk.org/pub/gtk/v1.2/
livecheck.regex "gtk\\+-(\\d+(?:\\.\\d+)*)${extract.suffix}"

# port:glib1 is not universal
universal_variant no
