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

# The 0.12.5 release from pilot-link.org is no longer maintained. Development
# continues at desrod/pilot-link, and jpilot 2.1 requires pilot-link >= 0.15.0.
github.setup        desrod pilot-link 0.15.0 v
revision            0
categories          palm sysutils
license             {GPL-2+ LGPL-2+}
maintainers         @HodsonTech openmaintainer

description         palm-pilot libraries and tools
long_description    pilot-link is a suite of tools used to connect your Palm \
                    or PalmOS compatible handheld. It includes userspace \
                    conduits that allow you to synchronize information to and \
                    from your Palm.

checksums           rmd160  faecf786b5bad934d81bb17e97a6ea876187f88b \
                    sha256  7b3140d6c02cfe5865129fe0287b070dfcf9d2509e30b3e0e1b982e2383cc2b3 \
                    size    1368062

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:libiconv \
                    port:libpng \
                    port:popt \
                    port:readline

# A connection record left over from a finished HotSync made later pi_accept()
# calls ignore the handheld until the program was restarted. The default of the
# option that controls this was chosen with a macro that is never defined in
# darwinusb.c, so it was always off.
patchfiles          patch-darwinusb-accept-multiple.diff
patch.pre_args      -p1

configure.args-append \
                    --disable-silent-rules \
                    --enable-conduits \
                    --with-libpng=${prefix} \
                    --with-libiconv=${prefix} \
                    --enable-shared \
                    --disable-static

# This release still relies on old C conventions that current clang rejects
configure.cflags-append \
                    -Wno-implicit-function-declaration \
                    -Wno-int-conversion \
                    -Wno-incompatible-pointer-types

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING COPYING.LIB NEWS README \
        ${destroot}${prefix}/share/doc/${name}
}
