public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/sc-im/
Date: Sun, 23 Apr 2023 12:29:26 +0000 (UTC)	[thread overview]
Message-ID: <1682252915.64dca91e05079168e4f0ea3f51a5e051e480e6ef.conikost@gentoo> (raw)

commit:     64dca91e05079168e4f0ea3f51a5e051e480e6ef
Author:     Efe İzbudak <efe.izbudak <AT> metu <DOT> edu <DOT> tr>
AuthorDate: Sun Apr 23 03:26:59 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Apr 23 12:28:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64dca91e

app-office/sc-im: change max rows value

The build flag -DMAXROWS used to set max rows have been changed to
1048576 to comply with modern standards.

Closes: https://bugs.gentoo.org/904837
Signed-off-by: Efe İzbudak <efe.izbudak <AT> metu.edu.tr>
Closes: https://github.com/gentoo/gentoo/pull/30715
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 app-office/sc-im/sc-im-0.8.3-r1.ebuild | 141 +++++++++++++++++++++++++++++++++
 1 file changed, 141 insertions(+)

diff --git a/app-office/sc-im/sc-im-0.8.3-r1.ebuild b/app-office/sc-im/sc-im-0.8.3-r1.ebuild
new file mode 100644
index 000000000000..5337d164314b
--- /dev/null
+++ b/app-office/sc-im/sc-im-0.8.3-r1.ebuild
@@ -0,0 +1,141 @@
+# Copyright 2022-2023 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
+	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
+}


             reply	other threads:[~2023-04-23 12:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 12:29 Conrad Kostecki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-28 13:34 [gentoo-commits] repo/gentoo:master commit in: app-office/sc-im/ Sam James
2024-03-02 10:38 Arthur Zamarin
2023-05-29  6:17 Joonas Niilola
2023-05-28  6:57 Joonas Niilola
2023-03-31 16:16 Sam James
2023-02-27 12:35 Joonas Niilola
2022-12-05 19:55 Arthur Zamarin
2022-10-17 19:47 Sam James
2022-10-14  6:40 Joonas Niilola
2022-10-14  6:24 Joonas Niilola
2022-10-14  5:00 Arthur Zamarin
2022-08-29 22:38 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1682252915.64dca91e05079168e4f0ea3f51a5e051e480e6ef.conikost@gentoo \
    --to=conikost@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox