# -*- 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 119898 2014-05-09 17:47:02Z devans@macports.org $

PortSystem      1.0

name            easytag
version         2.2.2
set branch      [join [lrange [split ${version} .] 0 1] .]
categories      audio gnome
platforms       darwin
maintainers     rmstonecipher openmaintainer
homepage        https://wiki.gnome.org/Apps/EasyTAG/
license         GPL-2+
description     Tool for editing tags of audio files

long_description \
                EasyTAG is an utility for viewing and editing tags \
                for MP3, MP2, FLAC, Ogg Vorbis, MusePack, Monkey's \
                audio files and MP4/AAC. \
                Its simple and nice GTK2+ interface makes tagging easier \
                under UNIX systems.

master_sites    gnome:sources/${name}/${branch}

checksums       rmd160  1633253eb2f695e0ba526f063c370672d6cdad32 \
                sha256  fb21ac51975c90c58c5dc38c28aa1030d6fa3420bc6b8406f085e34df9e14164

use_xz          yes

depends_build   port:pkgconfig \
                port:intltool \
                port:itstool \
                port:yelp-tools \
                port:appdata-tools

depends_lib     port:desktop-file-utils \
                port:gtk3 \
                port:libvorbis \
                port:flac \
                port:id3lib \
                port:libid3tag \
                port:speex \
                port:taglib \
                port:wavpack

# update m4/intltool.m4 and autoreconf

pre-configure {
    copy -force ${prefix}/share/aclocal/intltool.m4 ${worksrcpath}/m4
}

use_autoreconf  yes
autoreconf.args -fvi

configure.args  --with-gtk2=no

configure.cxxflags-append \
                -Wno-format-nonliteral

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
    system "${prefix}/bin/gtk-update-icon-cache-3.0 -f -t ${prefix}/share/icons/hicolor"
}

livecheck.type  gnome-with-unstable
