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

github.setup        Sequel-Ace Sequel-Ace 2.3.1
license             MIT
categories          aqua devel databases
maintainers         {amake @amake} openmaintainer
description         MySQL/MariaDB database management for macOS

long_description \
    a fast, easy-to-use Mac database management application for working with \
    MySQL & MariaDB databases

checksums           md5     af9628bca85ac78697a33166bb7157ee \
                    sha1    30d1daf3fd98cff04fc63f436ca2a68c3e1b0dab \
                    rmd160  ed89d0f560ffd92ce16c22af211fc3f8b4ac6ddf \
                    sha256  277b33627c4c8c840464c3ffca4b8a7395bf6a6b6151d5bd124d2e98c95efedb \
                    size    54568493

minimum_xcodeversions-append {17 10.0}

if {${os.major} < 17} {
    known_fail      yes
    pre-fetch {
        ui_error "${name} @${version} requires Mac OS X 10.13 or later."
        return -code error "incompatible Mac OS X version"
    }
}

supported_archs     i386 x86_64

xcode.scheme        "Sequel Ace Release Build"
xcode.configuration Release
xcode.build.settings-append \
                    CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO

# Don't set INSTALL_PATH. This build system uses INSTALL_PATH internally to
# link the application and frameworks together with relative paths.
xcode.destroot.type

# 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 "${worksrcpath}/build/${xcode.configuration}/Sequel Ace.app" \
		${destroot}${applications_dir}
}

github.livecheck.regex  {([^"-]+)}
