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

name                sequelpro-devel
github.setup        sequelpro sequelpro 53cd722f37d6e1818206613d1234c0f2e21cb189
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
version             20200622
license             MIT
categories          aqua devel databases
maintainers         nomaintainer
description         MySQL/MariaDB database management for macOS

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

homepage            https://sequelpro.com/

checksums           md5     c45a851c6d683759f14efb8cc64b9f8e \
                    sha1    3f8f4258a8e52c2676b741918463edbda8dbe0ac \
                    rmd160  90e4a36e05b201647ee70ae6b3b4123752456478 \
                    sha256  db50e072102e7f2a724311ef7d5c3d82c4832290930c52aefcf5ba44a192672f \
                    size    8519269

minimum_xcodeversions-append {15 8.0}

platforms           {darwin >= 15}

# UniversalDetector.framework links with libstdc++ so set this to prevent the
# app from being flagged as broken
configure.cxx_stdlib libstdc++

supported_archs     i386 x86_64

patchfiles          0001-Remove-Sparkle-and-auto-update.patch

patch.pre_args-replace  -p0 -p1

xcode.scheme        "Sequel Pro"
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 Pro.app" \
		${destroot}${applications_dir}
}

notes {
    Sequel Pro is no longer supported. Consider switching to the Sequel-Ace port.
}

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