# -*- 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

PortSystem      1.0

name            gtk2-aurora
set my_name     aurora
version         1.5.1
revision        2
license         GPL-2
set branch      [join [lrange [split ${version} .] 0 1] .]
categories      gnome x11 gtk
platforms       macosx
maintainers     nomaintainer
description     Aurora Gtk Engine

long_description \
    The goal of this theme is to provide a complete and consistent look for Gtk. \
    The theme aims to be very flexible in colour choice, but have few other options otherwise.

set id          56438
homepage        https://www.gnome-look.org/content/show.php/Aurora+Gtk+Engine?content=${id}
master_sites    https://www.gnome-look.org/CONTENT/content-files/
distname        ${id}-${my_name}-${version}
use_bzip2       yes

checksums       md5     5eeea57c5938306ad7ccfc7cd71d009d \
                sha1    7e6a4b6e9798cf3bf4edffc7e2e62e2f51082a41 \
                rmd160  538da2485bd5bf4e7bccc4d1fb124fe0407ece1c

depends_build   port:pkgconfig
depends_lib     path:lib/pkgconfig/gtk+-2.0.pc:gtk2

post-extract {
    system "tar xzf ${workpath}/aurora-gtk-engine-${branch}.tar.gz -C ${workpath}"
    system "tar xjf ${workpath}/Aurora.tar.bz2 -C ${workpath}"
}

worksrcdir      ${my_name}-[join [lrange [split ${version} .] 0 1] .]

patchfiles      patch-glib-2.32.diff

configure.args  --enable-animation

pre-destroot {
    file attributes ${worksrcpath}/install-sh -permissions +x
}

post-destroot {
    file mkdir ${destroot}${prefix}/share/themes
    copy ${workpath}/Aurora ${destroot}${prefix}/share/themes

    set docdir ${prefix}/share/doc/${name}-${version}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
        ${destroot}${docdir}
}

livecheck.type  regex
livecheck.regex {>(\d+\.\d+(?:\.\d+)*)<}
