# -*- 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
PortGroup           github 1.0

github.setup        mikepj XRG 2.8.2
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                xrg
categories-append   sysutils
maintainers     nomaintainer
license             GPL-2+
description     XRG is an open source system monitor for Mac OS X.
long_description \
    XRG allows you to monitor CPU activity, memory \
    usage, battery status, machine temperature, network \
    activity, disk I/O, current weather, and stock \
    market data. The goal of XRG is to be a functional \
    system monitor that has a clean and flexible \
    interface, so it doesn't intrude on the rest of your \
    Mac experience. XRG is designed to take as little \
    CPU time as possible while still showing detailed \
    graphs on system usage.
homepage        http://www.gauchosoft.com/Products/XRG/

platforms       {macosx >= 11}

checksums           rmd160  b1360c2325ac65ec03ce22ccebb566d91df67fec \
                    sha256  f327b6d4c8de91f25ce6713d6f5f5cd410ce0c4e378a33cbf72619e08ff82120 \
                    size    833703

patch.pre_args-append -b
patchfiles          patch-XRG.xcodeproj-project.pbxproj.diff

xcode.configuration Release

# see https://trac.macports.org/ticket/57137
if {${os.platform} eq "darwin" && ([vercmp $xcodeversion 10.0] > 0)} {
    build.pre_args-append    -UseModernBuildSystem=NO
    destroot.pre_args-append -UseModernBuildSystem=NO
}

# error: -fobjc-arc is not supported on platforms using the legacy runtime
supported_archs     x86_64

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     [string toupper ${name}]-\\w+-(\\d+(\\.\\d+)+)