# -*- 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        pilotmoon Scroll-Reverser 1.7.6
revision            1
github.tarball_from archive
categories          aqua sysutils
platforms           darwin
maintainers         nomaintainer
license             Apache-2

description         Reverse the direction of scrolling on macOS
long_description    ${description}

homepage            https://pilotmoon.com/scrollreverser/

checksums           rmd160  5eda00d33ca4c34587e50f1ff2685b12381087de \
                    sha256  9280444203032fe76836a1ec293c60988973d520da02b814de1ce1c9500acf0d \
                    size    2512486

patchfiles          patch-mojave-event-tapping.diff

post-extract {
    reinplace "s|CODE_SIGN_IDENTITY = .*;|CODE_SIGN_IDENTITY = \"\";|g;s|codesign|#codesign|g" \
        ${worksrcpath}/ScrollReverser.xcodeproj/project.pbxproj
}

# this port does not build with the new xcode build system at present
if {[vercmp ${xcodeversion} 10.0] >= 0} {
    build.pre_args      -UseNewBuildSystem=NO
    destroot.pre_args   -UseNewBuildSystem=NO
}
