# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 inherit flag-o-matic git-r3 EGIT_REPO_URI="https://github.com/andmarti1424/sc-im.git" EGIT_BRANCH="origin/HEAD" EGIT_COMMIT="HEAD" EGIT_CHECKOUT_DIR="${S}" SRC_URI="" DESCRIPTION="A CLI-driven spreadsheet application; fork of SC" HOMEPAGE="https://github.com/andmarti1424/sc-im" LICENSE="LGPL-2.1" SLOT="1" IUSE="+less +vim +tmux examples gnuplot lua" #xlsreader xlsxwriter" COMMON_DEPEND=" >=sys-libs/ncurses-5.2[unicode] " DEPEND=" virtual/pkgconfig " RDEPEND=" ${COMMON_DEPEND} gnuplot? ( sci-visualization/gnuplot ) less? ( sys-apps/less ) lua? ( =dev-lang/lua-5.1* ) tmux? ( app-misc/tmux ) vim? ( app-editors/vim ) " # xlsreader? ( # dev-libs/libxls # dev-libs/libzip # dev-libs/libxml2 # ) # xlsxwriter? ( dev-libs/libxlsxwriter ) src_unpack() { git-r3_src_unpack } src_prepare() { default sed -i \ -e "/^prefix\s*=/ s:/usr/local:/usr:" \ -e "/^CFLAGS\s*+=/ s:\$(HELPDIR):/usr/share/\$(name):" \ src/Makefile || die if use lua ; then sed -i \ -e "s:lua-5\.1:lua:" \ src/Makefile || die else sed -i \ -e "/+=.*\ lua/ s:^:#:" \ src/Makefile || die fi eapply_user } src_compile() { cd "${S}/src" # use xlsreader && append-cppflags "-DXLS" && export LDLIBS="-lxlsreader" emake } src_install() { cd "${S}/src" emake DESTDIR="${D}" install if use examples; then dodoc -r "${S}/examples" fi }