# -*- 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 85982 2011-10-18 02:04:00Z snc@macports.org $

PortSystem      1.0

name		    gtksourceview2
set my_name     gtksourceview
version		    2.10.5
revision	    2
license         LGPL-2.1+
# respository indicates they were in process of shift
# from LGPL-2+ to LGPL-2.1+
set branch      [join [lrange [split ${version} .] 0 1] .]
maintainers	    gmail.com:micah.lerner openmaintainer
categories	    gnome
platforms	    darwin 
description	    GtkSourceView is a text widget

long_description \
	GtkSourceView is a text widget that extends the standard \
	gtk+ 2.x text widget GtkTextView. It improves GtkTextView \
	by implementing syntax highlighting and other features \
	typical of a source editor. This port contains version 2 of the \
	GtkSourceView widget. Port GtkSourceView contains version 1 of the \
	widget.

homepage	    http://svn.gnome.org/viewvc/gtksourceview/
master_sites    gnome:sources/${my_name}/${branch}/
distname	    ${my_name}-${version}
use_bzip2 	    yes

checksums       md5     1219ad1694df136f126507466aeb41aa \
                sha1    5081dc7a081954d0af73852c22e874a746bda30e \
                rmd160  081679debc8ca021749136e952329bb3ea0aa4f2

depends_build   port:intltool \
	        port:pkgconfig \
                port:gtk-doc

depends_lib \
    path:lib/pkgconfig/glib-2.0.pc:glib2 \
    port:gettext \
    port:gtk2 \
    port:libxml2

patchfiles      patch-gtksourceview_gtksourceview-i18n.c.diff

test.run        yes
test.target     check

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING COPYING.lib MAINTAINERS \
        NEWS README ${destroot}${docdir}
}

variant quartz {
    depends_lib-append port:ige-mac-integration
}

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