gentoo-karlay

My Gentoo ebuild overlay
Log | Files | Refs

commit 48ea5855a00395011f208d00b6eea00b258c180b
parent 5347713a89ab9419132dd15ddb669884f6c751c9
Author: kar <git@13f0.net>
Date:   Sun,  1 Jun 2025 23:36:13 -0400

update app-office/sc-im to 0.8.5

Diffstat:
Aapp-office/sc-im/Manifest | 1+
Aapp-office/sc-im/sc-im-0.8.5.ebuild | 141+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ametadata/md5-cache/app-office/sc-im-0.8.5 | 16++++++++++++++++
3 files changed, 158 insertions(+), 0 deletions(-)

diff --git a/app-office/sc-im/Manifest b/app-office/sc-im/Manifest @@ -0,0 +1 @@ +DIST sc-im-0.8.5.tar.gz 1677609 BLAKE2B 90110e7fe8a5f36505948134ca89116105d6598d65421f295e8bc3de0bf9d82ab653ce3d0aa5d6f5059df51b62a9b37cfb8db3154b79eae3477967e59e33c291 SHA512 63da70204b1ec647d6927fa25686ff8cfddae6346ccca7d7345d6e0aace6fe9bc3779e9cf53154d86ba4439f75bd9213ab83f4f1ff40a2d2018932aa0e05f756 diff --git a/app-office/sc-im/sc-im-0.8.5.ebuild b/app-office/sc-im/sc-im-0.8.5.ebuild @@ -0,0 +1,141 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-1 luajit ) + +inherit lua-single toolchain-funcs flag-o-matic + +DESCRIPTION="Ncurses based, vim-like spreadsheet calculator" +HOMEPAGE="https://github.com/andmarti1424/sc-im" +SRC_URI="https://github.com/andmarti1424/sc-im/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${P}/src" + +LICENSE="BSD-4" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~x86" +IUSE="lua ods plots tmux wayland X xls xlsx" +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )" + +DEPEND=" + sys-libs/ncurses:= + lua? ( + ${LUA_DEPS} + ) + ods? ( + dev-libs/libxml2 + dev-libs/libzip + ) + plots? ( sci-visualization/gnuplot ) + tmux? ( app-misc/tmux ) + wayland? ( gui-apps/wl-clipboard ) + X? ( x11-misc/xclip ) + xls? ( + dev-libs/libxls + ) + xlsx? ( + dev-libs/libxlsxwriter + dev-libs/libxml2 + dev-libs/libzip + ) +" +RDEPEND="${DEPEND}" +BDEPEND="app-alternatives/yacc + virtual/pkgconfig" + +pkg_setup() { + CONFLICTING=$(usex tmux "tmux " "")$(usex wayland "wayland " "")$(usex X "X" "") + if ( use tmux && ( use wayland || use X ) ) ; then + elog "Conflicting flags for clipboard support are set: ${CONFLICTING}" + elog "tmux support has been preferred." + elif ( use wayland && use X ) ; then + elog "Conflicting flags for clipboard support are set: ${CONFLICTING}" + elog "Wayland support has been preferred." + fi + + # Run lua setup + use lua && lua-single_pkg_setup +} + +src_prepare() { + default + + # Clean Makefile from all sorts of flag / lib setting + sed -i -e '/CFLAGS +=\|LDLIBS +=/d' Makefile \ + || die "sed fix failed. Uh-oh..." + # Also clean the now useless comments and logic + sed -i -e '/#\|if\|else/d' Makefile \ + || die "sed fix failed. Uh-oh..." +} + +src_configure() { + tc-export CC PKG_CONFIG + + LDLIBS="-lm" + + # default flags that dont need optional dependencies + append-cflags -Wall -g \ + -DNCURSES \ + -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE \ + '-DSNAME=\"sc-im\"' \ + '-DHELP_PATH=\"/usr/share/sc-im\"' \ + '-DLIBDIR=\"/usr/share/doc/sc-im\"' \ + '-DDFLT_PAGER=\"less\"' \ + '-DDFLT_EDITOR=\"vim\"' \ + -DUSECOLORS \ + '-DHISTORY_FILE=\"sc-iminfo\"' \ + '-DHISTORY_DIR=\".cache\"' \ + '-DCONFIG_FILE=\"scimrc\"' \ + '-DCONFIG_DIR=\".config/sc-im\"' \ + '-DINS_HISTORY_FILE=\"sc-iminfo\"' \ + -DUNDO \ + -DMAXROWS=1048576 \ + -DUSELOCALE \ + -DMOUSE \ + '-DDEFAULT_OPEN_FILE_UNDER_CURSOR_CMD=\""scopen"\"' \ + -DAUTOBACKUP \ + -DHAVE_PTHREAD + + # setting default clipboard commands + if use tmux ; then + append-cflags '-DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\"' + append-cflags '-DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\"' + elif use wayland ; then + append-cflags '-DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""wl-copy <"\"' + append-cflags '-DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""wl-paste"\"' + elif use X ; then + append-cflags '-DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\"' + append-cflags '-DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\"' + fi + + # optional feature dependency + use plots && append-cflags -DGNUPLOT + if use xls; then + append-cflags -DXLS $(${PKG_CONFIG} --cflags libxls) + LDLIBS+=" $(${PKG_CONFIG} --libs libxls)" + fi + if use xlsx || use ods ; then + append-cflags -DODS -DXLSX $(${PKG_CONFIG} --cflags libxml-2.0 libzip) + LDLIBS+=" -DODS -DXLSX $(${PKG_CONFIG} --libs libxml-2.0 libzip)" + fi + if use xlsx ; then + append-cflags -DXLSX_EXPORT $(${PKG_CONFIG} --cflags xlsxwriter) + LDLIBS+=" -DXLSX_EXPORT $(${PKG_CONFIG} --libs xlsxwriter)" + fi + if use lua ; then + append-cflags -DXLUA $(${PKG_CONFIG} --cflags lua) + LDLIBS+=" -DXLUA $(${PKG_CONFIG} --libs lua) -rdynamic" + fi + append-cflags $(${PKG_CONFIG} --cflags ncursesw) || append-cflags $(${PKG_CONFIG} --cflags ncurses) + LDLIBS+=" $(${PKG_CONFIG} --libs ncursesw)" || LDLIBS+=" $(${PKG_CONFIG} --libs ncurses)" +} + +src_compile() { + emake LDLIBS="${LDLIBS}" CFLAGS="${CFLAGS}" +} + +src_install() { + emake DESTDIR="${D}" prefix="/usr" install + einstalldocs +} diff --git a/metadata/md5-cache/app-office/sc-im-0.8.5 b/metadata/md5-cache/app-office/sc-im-0.8.5 @@ -0,0 +1,16 @@ +BDEPEND=app-alternatives/yacc virtual/pkgconfig +DEFINED_PHASES=compile configure install prepare setup +DEPEND=sys-libs/ncurses:= lua? ( lua_single_target_luajit? ( dev-lang/luajit:= ) lua_single_target_lua5-1? ( dev-lang/lua:5.1 ) ) ods? ( dev-libs/libxml2 dev-libs/libzip ) plots? ( sci-visualization/gnuplot ) tmux? ( app-misc/tmux ) wayland? ( gui-apps/wl-clipboard ) X? ( x11-misc/xclip ) xls? ( dev-libs/libxls ) xlsx? ( dev-libs/libxlsxwriter dev-libs/libxml2 dev-libs/libzip ) +DESCRIPTION=Ncurses based, vim-like spreadsheet calculator +EAPI=8 +HOMEPAGE=https://github.com/andmarti1424/sc-im +INHERIT=lua-single toolchain-funcs flag-o-matic +IUSE=lua ods plots tmux wayland X xls xlsx lua_single_target_luajit lua_single_target_lua5-1 +KEYWORDS=amd64 ~arm arm64 ~x86 +LICENSE=BSD-4 +RDEPEND=sys-libs/ncurses:= lua? ( lua_single_target_luajit? ( dev-lang/luajit:= ) lua_single_target_lua5-1? ( dev-lang/lua:5.1 ) ) ods? ( dev-libs/libxml2 dev-libs/libzip ) plots? ( sci-visualization/gnuplot ) tmux? ( app-misc/tmux ) wayland? ( gui-apps/wl-clipboard ) X? ( x11-misc/xclip ) xls? ( dev-libs/libxls ) xlsx? ( dev-libs/libxlsxwriter dev-libs/libxml2 dev-libs/libzip ) +REQUIRED_USE=lua? ( ^^ ( lua_single_target_luajit lua_single_target_lua5-1 ) ) +SLOT=0 +SRC_URI=https://github.com/andmarti1424/sc-im/archive/v0.8.5.tar.gz -> sc-im-0.8.5.tar.gz +_eclasses_=toolchain-funcs f9d71a6efe9d083aec750dd13968e169 lua-utils 7c89927eda6f21c4c48136247077ab37 lua-single 75fe955a36b18e199213c8739eaebdbb flag-o-matic b892042b2667b8ac69ec8a2571dc290a +_md5_=63c8d7ab1e3fe0b5bb3a92542486f45d