diff options
author | leot <leot@pkgsrc.org> | 2019-01-30 12:58:24 +0000 |
---|---|---|
committer | leot <leot@pkgsrc.org> | 2019-01-30 12:58:24 +0000 |
commit | 71879f2125a5da66430bee59daa487954dd48705 (patch) | |
tree | 581c2616c903b6b528273097d3b6e14c6f041d32 /math/sc-im | |
parent | cad02f876c92bc1521b4eff3ac2c31b5a9fb00e6 (diff) | |
download | pkgsrc-71879f2125a5da66430bee59daa487954dd48705.tar.gz |
sc-im: Import sc-im-0.7.0 as math/sc-im
'SC Improved', a curses-based spreadsheet program based on sc. New features
include undo and redo, colors, sorting, plotting and XLS[X] support.
Packaged in pkgsrc-wip by Sijmen J. Mulder.
Diffstat (limited to 'math/sc-im')
-rw-r--r-- | math/sc-im/DESCR | 2 | ||||
-rw-r--r-- | math/sc-im/Makefile | 38 | ||||
-rw-r--r-- | math/sc-im/PLIST | 8 | ||||
-rw-r--r-- | math/sc-im/distinfo | 7 | ||||
-rw-r--r-- | math/sc-im/options.mk | 23 | ||||
-rw-r--r-- | math/sc-im/patches/patch-src_Makefile | 80 |
6 files changed, 158 insertions, 0 deletions
diff --git a/math/sc-im/DESCR b/math/sc-im/DESCR new file mode 100644 index 00000000000..d88607dd43a --- /dev/null +++ b/math/sc-im/DESCR @@ -0,0 +1,2 @@ +'SC Improved', a curses-based spreadsheet program based on sc. New features +include undo and redo, colors, sorting, plotting and XLS[X] support. diff --git a/math/sc-im/Makefile b/math/sc-im/Makefile new file mode 100644 index 00000000000..24b6d25c07d --- /dev/null +++ b/math/sc-im/Makefile @@ -0,0 +1,38 @@ +# $NetBSD: Makefile,v 1.1 2019/01/30 12:58:24 leot Exp $ + +DISTNAME= sc-im-0.7.0 +CATEGORIES= math +MASTER_SITES= ${MASTER_SITE_GITHUB:=andmarti1424/} +GITHUB_TAG= v${PKGVERSION_NOREV} + +MAINTAINER= ik@sjmulder.nl +HOMEPAGE= https://github.com/andmarti1424/sc-im/ +COMMENT= Curses-based spreadsheet program based on sc +LICENSE= original-bsd + +BUILD_DIRS= src +INSTALL_DIRS= src + +.include "../../mk/bsd.prefs.mk" + +# pkg-config to avoid broken Makefile self-configuration +USE_TOOLS+= gmake pkg-config yacc + +# gnuplot is invoked through the shell, no need to check at compile time +CFLAGS+= -DGNUPLOT + +MAKE_ENV+= CFLAGS_CURSES=${BUILDLINK_CFLAGS.ncursesw:Q} +MAKE_ENV+= LDLIBS_CURSES=${BUILDLINK_LDADD.ncursesw:Q} +MAKE_ENV+= CFLAGS_DL=${BUILDLINK_CFLAGS.dl:Q} +MAKE_ENV+= LDLIBS_DL=${BUILDLINK_LDADD.dl:Q} + +# defaults to scim +MAKE_FLAGS+= name=sc-im +MAKE_FLAGS+= prefix=${PREFIX} +MAKE_FLAGS+= MANDIR=${PREFIX}/${PKGMANDIR}/man1 + +.include "options.mk" + +.include "../../devel/ncursesw/buildlink3.mk" +.include "../../mk/dlopen.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/math/sc-im/PLIST b/math/sc-im/PLIST new file mode 100644 index 00000000000..256b00f1e80 --- /dev/null +++ b/math/sc-im/PLIST @@ -0,0 +1,8 @@ +@comment $NetBSD: PLIST,v 1.1 2019/01/30 12:58:24 leot Exp $ +bin/sc-im +man/man1/sc-im.1 +share/sc-im/plot_bar +share/sc-im/plot_line +share/sc-im/plot_pie +share/sc-im/plot_scatter +share/sc-im/sc-im_help diff --git a/math/sc-im/distinfo b/math/sc-im/distinfo new file mode 100644 index 00000000000..5919bdc3315 --- /dev/null +++ b/math/sc-im/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2019/01/30 12:58:24 leot Exp $ + +SHA1 (sc-im-0.7.0.tar.gz) = 1e8e2ad2f9042c304f57fefb320bb18e76edd398 +RMD160 (sc-im-0.7.0.tar.gz) = 6b13e1dfd46b57dd84d4458fb8bdb509b07d1f1e +SHA512 (sc-im-0.7.0.tar.gz) = 47bc02d4b698c30a3144733216cfdf57daafb4115e5d49774104c4fedbd22f1ab7e491e1fc16683273c8c5e8820f6caf2389223c4789b9e3f777d57528b76f1b +Size (sc-im-0.7.0.tar.gz) = 1109887 bytes +SHA1 (patch-src_Makefile) = 2a7e56779350af57002ecddd8bec13e1b10f7ea4 diff --git a/math/sc-im/options.mk b/math/sc-im/options.mk new file mode 100644 index 00000000000..80a0e4b013a --- /dev/null +++ b/math/sc-im/options.mk @@ -0,0 +1,23 @@ +# $NetBSD: options.mk,v 1.1 2019/01/30 12:58:24 leot Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.sc-im +PKG_SUPPORTED_OPTIONS+= color xlsx lua +PKG_SUGGESTED_OPTIONS+= color xlsx lua + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mcolor) +CFLAGS+= -DUSECOLORS +.endif + +.if !empty(PKG_OPTIONS:Mxlsx) +CFLAGS+= -DXLSX -DXLSX_EXPORT +LDFLAGS+= -lxlsxwriter +.include "../../archivers/libzip/buildlink3.mk" +.include "../../textproc/libxml2/buildlink3.mk" +.include "../../textproc/libxlsxwriter/buildlink3.mk" +.endif + +.if !empty(PKG_OPTIONS:Mlua) +.include "../../lang/lua51/buildlink3.mk" +.endif diff --git a/math/sc-im/patches/patch-src_Makefile b/math/sc-im/patches/patch-src_Makefile new file mode 100644 index 00000000000..8521482458d --- /dev/null +++ b/math/sc-im/patches/patch-src_Makefile @@ -0,0 +1,80 @@ +$NetBSD: patch-src_Makefile,v 1.1 2019/01/30 12:58:24 leot Exp $ + +- Fix install permissions + https://github.com/andmarti1424/sc-im/pull/305 +- Make libdl and curses flags overridable +- Make color support opt in so we can control it + +--- src/Makefile ++++ src/Makefile +@@ -29,8 +29,8 @@ CFLAGS += -DLIBDIR=\"$(LIBDIR)\" + CFLAGS += -DDFLT_PAGER=\"less\" + # Sets default editor. Its use in case EDITOR env variable is not set + CFLAGS += -DDFLT_EDITOR=\"vim\" +-# Comment out to disable color support +-CFLAGS += -DUSECOLORS ++# Uncomment to enable color support ++#CFLAGS += -DUSECOLORS + # Command history file, relative to home directory. Comment out to disable commandline history + CFLAGS += -DHISTORY_FILE=\".$(name)info\" + # Input mode history. Same as previous, but for insert mode commands +@@ -89,25 +89,27 @@ endif + + # dynamic linking (should not be used in FreeBSD + ifneq ($(shell uname -s),FreeBSD) +- LDLIBS += -ldl ++ LDLIBS_DL ?= -ldl + endif + ++LDLIBS += $(LDLIBS_DL) ++ + ifneq (, $(shell which pkg-config)) + # Any system with pkg-config + + # NOTE: ncursesw (required) + ifeq ($(shell uname -s),Darwin) + # macOS' ncurses is built with wide-char support +- LDFLAGS += -lncurses ++ LDLIBS_CURSES ?= -lncurses + else ifneq ($(shell pkg-config --exists ncursesw || echo 'no'),no) +- CFLAGS += $(shell pkg-config --cflags ncursesw) +- LDLIBS += $(shell pkg-config --libs ncursesw) ++ CFLAGS_CURSES ?= $(shell pkg-config --cflags ncursesw) ++ LDLIBS_CURSES ?= $(shell pkg-config --libs ncursesw) + else ifneq ($(shell pkg-config --exists ncurses || echo 'no'),no) + # hopefully this includes wide character support then +- CFLAGS += $(shell pkg-config --cflags ncurses) +- LDLIBS += $(shell pkg-config --libs ncurses) ++ CFLAGS_CURSES ?= $(shell pkg-config --cflags ncurses) ++ LDLIBS_CURSES ?= $(shell pkg-config --libs ncurses) + else +- LDLIBS += -lncursesw ++ LDLIBS_CURSES ?= -lncursesw + endif + + # NOTE: libxml and libzip are required for xlsx file import support +@@ -128,9 +130,12 @@ else ifeq ($(shell uname -s),Darwin) + # macOS without pkg-config + + # macOS' ncurses is built with wide-char support +- LDFLAGS += -lncurses ++ LDLIBS_CURSES += -lncurses + endif + ++CFLAGS += $(CFLAGS_CURSES) ++LDLIBS += $(LDLIBS_CURSES) ++ + OBJS = $(patsubst %.c, %.o, $(wildcard *.c) $(wildcard utils/*.c)) gram.o + + .PHONY : all clean install docs man_install man_uninstall +@@ -141,8 +146,8 @@ install : + install -d $(DESTDIR)$(prefix)/bin + install $(name) $(DESTDIR)$(prefix)/bin/$(name) + install -d $(DESTDIR)$(HELPDIR) +- install doc $(DESTDIR)$(HELPDIR)/$(name)_help +- install plot_* $(DESTDIR)$(HELPDIR)/ ++ install -m 644 doc $(DESTDIR)$(HELPDIR)/$(name)_help ++ install -m 644 plot_* $(DESTDIR)$(HELPDIR)/ + install -d $(DESTDIR)$(MANDIR)/ + install -m 644 sc-im.1 $(DESTDIR)$(MANDIR)/$(name).1 + |