# -*- 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.4 v
maintainers         @nkorth openmaintainer
license             BSD
categories          finance
description         Spreadsheet Calculator Improvised
long_description    An ncurses spreadsheet program for terminal

github.tarball_from archive
checksums           rmd160  3f4f54259f17935ad78fe72b00adbb8f90b29419 \
                    sha256  ebb1f10006fe49f964a356494f96d86a4f06eb018659e3b9bde63b25c03abdf0 \
                    size    1672884

patchfiles          patch-prefix.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

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

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