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

# The tag has no release tarball with a generated configure script, so the
# plain tag archive is used. Upstream tags use underscores (v2_1_1).
github.setup        juddmon jpilot 2_1_1 v
github.tarball_from archive
version             [string map {_ .} ${version}]
revision            0
categories          palm
license             GPL-2
maintainers         @HodsonTech openmaintainer

description         A Palm Pilot desktop for Unix
long_description    J-Pilot is a desktop organizer application for the palm pilot and other\
                    Palm OS devices. It is similar in functionality to the one that\
                    3Com/Palm distributed.

checksums           rmd160  42b871ab39b3c4a5a679291a9c139e385d0a8f23 \
                    sha256  ea9be858987d3f3b156012238c60f60ab90583cba2978c358835f30a3127b8d0 \
                    size    1591429

# Upstream ships no generated configure script; autogen.sh does the usual
# bootstrap (autopoint/intltoolize/libtoolize/aclocal/autoheader/automake/
# autoconf) and by default also runs ./configure itself. NOCONFIGURE=1 skips
# that last step, since MacPorts' own configure phase does it.
use_autoreconf      yes
autoreconf.cmd      ./autogen.sh
autoreconf.args
autoreconf.env-append \
                    NOCONFIGURE=1

depends_build-append \
                    port:autoconf \
                    port:automake \
                    port:libtool \
                    port:gettext \
                    port:intltool \
                    path:bin/pkg-config:pkgconfig

depends_lib-append \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    port:libiconv \
                    port:pilot-link \
                    path:lib/pkgconfig/sqlite3.pc:sqlite3

configure.args-append \
                    --disable-silent-rules \
                    --with-libiconv-prefix=${prefix} \
                    --with-pilot-prefix=${prefix}
