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

github.setup        fikovnik ShiftIt 1.6.6 version-
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
categories          aqua
maintainers         nomaintainer
license             GPL-3+

description         Managing windows size and position in OS X

long_description    {*}${description}

checksums           rmd160  172866c90a22349dd9e27ab7270ce2fcbc1cf155 \
                    sha256  cced6faf2053ff7f03e8a52a4f1357a6846aad3fb491b124af055b4909a9907f \
                    size    863634

depends_lib         port:xorg-libX11

universal_variant   no

build.dir           ${worksrcpath}/ShiftIt

patchfiles          patch-ShiftIt-ShiftIt.xcodeproj-project.pbxproj.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${build.dir}/ShiftIt.xcodeproj/project.pbxproj
}

xcode.project       ShiftIt.xcodeproj
xcode.target        ShiftIt
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
}

platform darwin {
    if {${os.major} >= 13} {
        notes-append "
For new installs on OS X 10.9 or later, read this page instead\
of following the Accessibility settings dialog:

${homepage}/issues/110#issuecomment-20834932
"
    }
}
