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

PortSystem          1.0
PortGroup           xcode 1.0

name                GrandPerspective
version             3.6
set version_unsc    [string map {. _} ${version}]
license             GPL-2+
categories          aqua sysutils
maintainers         {amake @amake} openmaintainer
description         Graphically show disk usage
long_description \
    A small utility application for macOS that graphically shows the disk usage \
    within a file system. It can help you to manage your disk, as you can easily \
    spot which files and folders take up the most space.

homepage            http://grandperspectiv.sourceforge.net/
master_sites        sourceforge:project/grandperspectiv/grandperspective/${version}

distname            ${name}-${version_unsc}-src
extract.suffix      .tgz
worksrcdir          ${name}-${version_unsc}

checksums           rmd160  a0967ef2d99e5d9b9a2fca850c6e6e76a4e60e5b \
                    sha256  5c5ccc9586d18732b2c4f74d5e1ebda51584b2b5d8428dacce26436c22c57129 \
                    size    1975450

build.dir           ${worksrcpath}/src

xcode.scheme        ${name}
xcode.configuration Deployment
xcode.build.settings-append \
                    CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO

# This should be removed if/when dealt with in the xcode portgroup; see:
# https://trac.macports.org/ticket/57137
if {[vercmp $xcodeversion 5.0] >= 0} {
    build.pre_args  -derivedDataPath ./DerivedData
}

destroot {
	copy "${build.dir}/build/${xcode.configuration}/${name}.app" \
		${destroot}${applications_dir}
}

livecheck.version   ${version_unsc}
livecheck.regex     ${name}-(\[0-9_\]*)-src${extract.suffix}
