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

github.setup        andmarti1424 sc-im 0.8.5 v
revision            1
maintainers         @nkorth openmaintainer
license             BSD
categories          finance office
description         Spreadsheet Calculator Improvised
long_description    An ncurses spreadsheet program for terminal

github.tarball_from archive
checksums           rmd160  78d94bac2f6f0630c1218e46a56dafb344ea3a56 \
                    sha256  49adb76fc55bc3e6ea8ee414f41428db4aef947e247718d9210be8d14a6524bd \
                    size    1677609

patchfiles          patch-Makefile.diff

worksrcdir          ${distname}/src
build.args-append   prefix=${prefix}
destroot.destdir-append \
                    prefix=${prefix}

# Define GNUPLOT even if it's not present. It's not actually a build dependency,
# it's just used via system() when the user runs one of sc-im's plot commands.
# This define lets the user always use those commands, and they'll get an error
# message if they don't have gnuplot installed.
build.env-append    CFLAGS=-DGNUPLOT

compiler.blacklist-append \
                    *gcc-4.0 *gcc-4.2

# Avoid potentially broken system bison, use the port:
depends_build-append \
                    path:bin/bison:bison \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:libxls \
                    port:libxlsxwriter \
                    port:libxml2 \
                    port:libzip \
                    port:lua51 \
                    port:ncurses
