summaryrefslogtreecommitdiff
path: root/app-office
diff options
context:
space:
mode:
authorkar <git@13f0.net>2025-06-01 23:36:13 -0400
committerkar <git@13f0.net>2025-06-01 23:36:13 -0400
commit48ea5855a00395011f208d00b6eea00b258c180b (patch)
treec47baa2809b5879d083c5c64336bdf35ed0d4e2e /app-office
parent5347713a89ab9419132dd15ddb669884f6c751c9 (diff)
update app-office/sc-im to 0.8.5
Diffstat (limited to 'app-office')
-rw-r--r--app-office/sc-im/Manifest1
-rw-r--r--app-office/sc-im/sc-im-0.8.5.ebuild141
2 files changed, 142 insertions, 0 deletions
diff --git a/app-office/sc-im/Manifest b/app-office/sc-im/Manifest
new file mode 100644
index 0000000..1b41279
--- /dev/null
+++ 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
new file mode 100644
index 0000000..bf62fb3
--- /dev/null
+++ b/app-office/sc-im/sc-im-0.8.5.ebuild
@@ -0,0 +1,141 @@
1# Copyright 2022-2024 Gentoo Authors
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=8
5
6LUA_COMPAT=( lua5-1 luajit )
7
8inherit lua-single toolchain-funcs flag-o-matic
9
10DESCRIPTION="Ncurses based, vim-like spreadsheet calculator"
11HOMEPAGE="https://github.com/andmarti1424/sc-im"
12SRC_URI="https://github.com/andmarti1424/sc-im/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13S="${WORKDIR}/${P}/src"
14
15LICENSE="BSD-4"
16SLOT="0"
17KEYWORDS="amd64 ~arm arm64 ~x86"
18IUSE="lua ods plots tmux wayland X xls xlsx"
19REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
20
21DEPEND="
22 sys-libs/ncurses:=
23 lua? (
24 ${LUA_DEPS}
25 )
26 ods? (
27 dev-libs/libxml2
28 dev-libs/libzip
29 )
30 plots? ( sci-visualization/gnuplot )
31 tmux? ( app-misc/tmux )
32 wayland? ( gui-apps/wl-clipboard )
33 X? ( x11-misc/xclip )
34 xls? (
35 dev-libs/libxls
36 )
37 xlsx? (
38 dev-libs/libxlsxwriter
39 dev-libs/libxml2
40 dev-libs/libzip
41 )
42"
43RDEPEND="${DEPEND}"
44BDEPEND="app-alternatives/yacc
45 virtual/pkgconfig"
46
47pkg_setup() {
48 CONFLICTING=$(usex tmux "tmux " "")$(usex wayland "wayland " "")$(usex X "X" "")
49 if ( use tmux && ( use wayland || use X ) ) ; then
50 elog "Conflicting flags for clipboard support are set: ${CONFLICTING}"
51 elog "tmux support has been preferred."
52 elif ( use wayland && use X ) ; then
53 elog "Conflicting flags for clipboard support are set: ${CONFLICTING}"
54 elog "Wayland support has been preferred."
55 fi
56
57 # Run lua setup
58 use lua && lua-single_pkg_setup
59}
60
61src_prepare() {
62 default
63
64 # Clean Makefile from all sorts of flag / lib setting
65 sed -i -e '/CFLAGS +=\|LDLIBS +=/d' Makefile \
66 || die "sed fix failed. Uh-oh..."
67 # Also clean the now useless comments and logic
68 sed -i -e '/#\|if\|else/d' Makefile \
69 || die "sed fix failed. Uh-oh..."
70}
71
72src_configure() {
73 tc-export CC PKG_CONFIG
74
75 LDLIBS="-lm"
76
77 # default flags that dont need optional dependencies
78 append-cflags -Wall -g \
79 -DNCURSES \
80 -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE \
81 '-DSNAME=\"sc-im\"' \
82 '-DHELP_PATH=\"/usr/share/sc-im\"' \
83 '-DLIBDIR=\"/usr/share/doc/sc-im\"' \
84 '-DDFLT_PAGER=\"less\"' \
85 '-DDFLT_EDITOR=\"vim\"' \
86 -DUSECOLORS \
87 '-DHISTORY_FILE=\"sc-iminfo\"' \
88 '-DHISTORY_DIR=\".cache\"' \
89 '-DCONFIG_FILE=\"scimrc\"' \
90 '-DCONFIG_DIR=\".config/sc-im\"' \
91 '-DINS_HISTORY_FILE=\"sc-iminfo\"' \
92 -DUNDO \
93 -DMAXROWS=1048576 \
94 -DUSELOCALE \
95 -DMOUSE \
96 '-DDEFAULT_OPEN_FILE_UNDER_CURSOR_CMD=\""scopen"\"' \
97 -DAUTOBACKUP \
98 -DHAVE_PTHREAD
99
100 # setting default clipboard commands
101 if use tmux ; then
102 append-cflags '-DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\"'
103 append-cflags '-DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\"'
104 elif use wayland ; then
105 append-cflags '-DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""wl-copy <"\"'
106 append-cflags '-DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""wl-paste"\"'
107 elif use X ; then
108 append-cflags '-DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\"'
109 append-cflags '-DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\"'
110 fi
111
112 # optional feature dependency
113 use plots && append-cflags -DGNUPLOT
114 if use xls; then
115 append-cflags -DXLS $(${PKG_CONFIG} --cflags libxls)
116 LDLIBS+=" $(${PKG_CONFIG} --libs libxls)"
117 fi
118 if use xlsx || use ods ; then
119 append-cflags -DODS -DXLSX $(${PKG_CONFIG} --cflags libxml-2.0 libzip)
120 LDLIBS+=" -DODS -DXLSX $(${PKG_CONFIG} --libs libxml-2.0 libzip)"
121 fi
122 if use xlsx ; then
123 append-cflags -DXLSX_EXPORT $(${PKG_CONFIG} --cflags xlsxwriter)
124 LDLIBS+=" -DXLSX_EXPORT $(${PKG_CONFIG} --libs xlsxwriter)"
125 fi
126 if use lua ; then
127 append-cflags -DXLUA $(${PKG_CONFIG} --cflags lua)
128 LDLIBS+=" -DXLUA $(${PKG_CONFIG} --libs lua) -rdynamic"
129 fi
130 append-cflags $(${PKG_CONFIG} --cflags ncursesw) || append-cflags $(${PKG_CONFIG} --cflags ncurses)
131 LDLIBS+=" $(${PKG_CONFIG} --libs ncursesw)" || LDLIBS+=" $(${PKG_CONFIG} --libs ncurses)"
132}
133
134src_compile() {
135 emake LDLIBS="${LDLIBS}" CFLAGS="${CFLAGS}"
136}
137
138src_install() {
139 emake DESTDIR="${D}" prefix="/usr" install
140 einstalldocs
141}