From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0F35515808E for ; Sun, 24 Apr 2022 06:30:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ADC26E088B; Sun, 24 Apr 2022 06:30:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 79860E088B for ; Sun, 24 Apr 2022 06:30:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 26281341739 for ; Sun, 24 Apr 2022 06:30:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 70314344 for ; Sun, 24 Apr 2022 06:30:41 +0000 (UTC) From: "Dex Conner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Dex Conner" Message-ID: <1650781826.8daa7b9d08d1fae45fbf6b574d5588d25835d1cf.cantcuckthis@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-office/sc-im/files/, app-office/sc-im/ X-VCS-Repository: repo/proj/guru X-VCS-Files: app-office/sc-im/files/sc-im-0.8.2-automagic.patch app-office/sc-im/files/sc-im-0.8.2-clipboard.patch app-office/sc-im/sc-im-0.8.2.ebuild X-VCS-Directories: app-office/sc-im/files/ app-office/sc-im/ X-VCS-Committer: cantcuckthis X-VCS-Committer-Name: Dex Conner X-VCS-Revision: 8daa7b9d08d1fae45fbf6b574d5588d25835d1cf X-VCS-Branch: dev Date: Sun, 24 Apr 2022 06:30:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 80dfdf31-dda3-43cc-a70d-9469680c50e2 X-Archives-Hash: b711776fbbb6df601ad9d2d4927393e9 commit: 8daa7b9d08d1fae45fbf6b574d5588d25835d1cf Author: Dex Conner danwin1210 de> AuthorDate: Sun Apr 24 06:16:52 2022 +0000 Commit: Dex Conner danwin1210 de> CommitDate: Sun Apr 24 06:30:26 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8daa7b9d app-office/sc-im: carry flag / dep logic to ebuild Signed-off-by: Dex Conner danwin1210.de> app-office/sc-im/files/sc-im-0.8.2-automagic.patch | 110 ++++++++++++++------- app-office/sc-im/files/sc-im-0.8.2-clipboard.patch | 14 +-- app-office/sc-im/sc-im-0.8.2.ebuild | 48 ++++++--- 3 files changed, 110 insertions(+), 62 deletions(-) diff --git a/app-office/sc-im/files/sc-im-0.8.2-automagic.patch b/app-office/sc-im/files/sc-im-0.8.2-automagic.patch index dbdc73ca1..6ff1aeced 100644 --- a/app-office/sc-im/files/sc-im-0.8.2-automagic.patch +++ b/app-office/sc-im/files/sc-im-0.8.2-automagic.patch @@ -1,47 +1,65 @@ --- src/Makefile +++ src/Makefile -@@ -83,7 +83,7 @@ +@@ -82,11 +82,6 @@ + LDLIBS += -pthread endif - # Check for gnuplot existance +-# Check for gnuplot existance -ifneq (, $(shell which gnuplot)) -+ifeq ($(PLOTS),yes) - CFLAGS += -DGNUPLOT +- CFLAGS += -DGNUPLOT +-endif +- + # OpenBSD does not implement wordexp() + ifeq ($(shell uname -s),OpenBSD) + CFLAGS += -DNO_WORDEXP +@@ -97,77 +92,6 @@ + LDLIBS += -ldl endif -@@ -116,38 +116,31 @@ - endif - - # NOTE: libxlsreader (libxls) is required for xls file reading support +-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 +- else ifneq ($(shell pkg-config --exists ncursesw || echo 'no'),no) +- CFLAGS += $(shell pkg-config --cflags ncursesw) +- LDLIBS += $(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) +- else +- LDLIBS += -lncursesw +- endif +- +- # NOTE: libxlsreader (libxls) is required for xls file reading support - ifneq ($(shell pkg-config --exists libxls || echo 'no'),no) -+ ifeq ($(XLS),yes) - CFLAGS += -DXLS $(shell pkg-config --cflags libxls) - LDLIBS += $(shell pkg-config --libs libxls) - endif - - # NOTE: libxml and libzip are required for xlsx file import support +- CFLAGS += -DXLS $(shell pkg-config --cflags libxls) +- LDLIBS += $(shell pkg-config --libs libxls) +- endif +- +- # NOTE: libxml and libzip are required for xlsx file import support - ifneq ($(shell pkg-config --exists libzip libxml-2.0 || echo 'no'),no) -+ ifeq ($(XML_ZIP),yes) - CFLAGS += -DODS -DXLSX $(shell pkg-config --cflags libxml-2.0 libzip) - LDLIBS += $(shell pkg-config --libs libxml-2.0 libzip) - endif - - # NOTE: libxlsxwriter is required for xlsx file export support +- CFLAGS += -DODS -DXLSX $(shell pkg-config --cflags libxml-2.0 libzip) +- LDLIBS += $(shell pkg-config --libs libxml-2.0 libzip) +- endif +- +- # NOTE: libxlsxwriter is required for xlsx file export support - ifneq ($(shell pkg-config --exists xlsxwriter || echo 'no'),no) -+ ifeq ($(XLSX),yes) - CFLAGS += -DXLSX_EXPORT $(shell pkg-config --cflags xlsxwriter) - LDLIBS += $(shell pkg-config --libs xlsxwriter) - endif - - # NOTE: lua support +- CFLAGS += -DXLSX_EXPORT $(shell pkg-config --cflags xlsxwriter) +- LDLIBS += $(shell pkg-config --libs xlsxwriter) +- endif +- +- # NOTE: lua support - ifneq ($(shell pkg-config --exists lua || echo 'no'),no) # Check for user's default lua -+ ifeq ($(LUA),yes) - CFLAGS += -DXLUA $(shell pkg-config --cflags lua) - ifneq ($(shell uname -s),Darwin) - LDLIBS += $(shell pkg-config --libs lua) -Wl,--export-dynamic - else - LDLIBS += $(shell pkg-config --libs lua) -rdynamic - endif +- CFLAGS += -DXLUA $(shell pkg-config --cflags lua) +- ifneq ($(shell uname -s),Darwin) +- LDLIBS += $(shell pkg-config --libs lua) -Wl,--export-dynamic +- else +- LDLIBS += $(shell pkg-config --libs lua) -rdynamic +- endif - else ifneq ($(shell pkg-config --exists luajit || echo 'no'),no) # If not found, check for luajit - CFLAGS += -DXLUA $(shell pkg-config --cflags luajit) - ifneq ($(shell uname -s),Darwin) @@ -49,6 +67,26 @@ - else - LDLIBS += $(shell pkg-config --libs luajit) -rdynamic - endif - endif - else ifeq ($(shell uname -s),Darwin) - # macOS without pkg-config +- endif +-else ifeq ($(shell uname -s),Darwin) +- # macOS without pkg-config +- +- # macOS' ncurses is built with wide-char support +- LDFLAGS += -lncurses +-else ifeq ($(shell uname -s),NetBSD) +- # NetBSD without pkg-config +- +- CFLAGS += -I/usr/pkg/include +- CFLAGS += -I/usr/pkg/include/ncursesw +- +- LDFLAGS += -L/usr/pkg/lib +- LDFLAGS += -Wl,-R/usr/pkg/lib +- +- LDLIBS += -lncursesw +-else +- LDFLAGS += -lncursesw +-endif +- + OBJS = $(patsubst %.c, %.o, $(wildcard *.c) $(wildcard utils/*.c)) gram.o + + .PHONY : all clean install docs man_install man_uninstall diff --git a/app-office/sc-im/files/sc-im-0.8.2-clipboard.patch b/app-office/sc-im/files/sc-im-0.8.2-clipboard.patch index 88815c826..2668e7d29 100644 --- a/app-office/sc-im/files/sc-im-0.8.2-clipboard.patch +++ b/app-office/sc-im/files/sc-im-0.8.2-clipboard.patch @@ -1,20 +1,8 @@ --- src/Makefile +++ src/Makefile -@@ -57,8 +57,19 @@ - # +@@ -58,7 +58,7 @@ # Choose one of the following commands for copying to different clipboards: # You can later change it at runtime. -+ifeq ($(TMUX),yes) -+ CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\" -+ CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\" -+else ifeq ($(WAYLAND),yes) -+ CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""wl-copy <"\" -+ CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""wl-paste"\" -+else ifeq ($(X),yes) -+ CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\" -+ CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\" -+endif -+ #to copy to tmux clipboard: -CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\" +#CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\" diff --git a/app-office/sc-im/sc-im-0.8.2.ebuild b/app-office/sc-im/sc-im-0.8.2.ebuild index 3c1ab1a27..ddccd6cb4 100644 --- a/app-office/sc-im/sc-im-0.8.2.ebuild +++ b/app-office/sc-im/sc-im-0.8.2.ebuild @@ -5,7 +5,7 @@ EAPI=7 LUA_COMPAT=( lua5-1 luajit ) -inherit lua-single toolchain-funcs +inherit lua-single toolchain-funcs flag-o-matic DESCRIPTION="Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal" HOMEPAGE="https://github.com/andmarti1424/sc-im" @@ -51,17 +51,6 @@ BDEPEND="virtual/pkgconfig" S="${WORKDIR}/${P}/src" pkg_setup() { - export X=$(usex X) - export TMUX=$(usex tmux) - export WAYLAND=$(usex wayland) - export PLOTS=$(usex plots) - export XLS=$(usex xls) - export XLSX=$(usex xlsx) - export LUA=$(usex lua) - ( use xlsx || use ods ) && export XML_ZIP="yes" - - # Notifying the user about which clipboard support is enabled if conflicting flags are set - # Prefer wayland support over X, and tmux support over both wayland and X. 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}" @@ -77,5 +66,38 @@ pkg_setup() { src_configure() { tc-export CC - default + + PKGCONF=$(tc-getPKG_CONFIG) + + 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 + + use plots && append-cflags -DGNUPLOT + if use xls; then + append-cflags -DXLS $(${PKGCONF} --cflags libxls) + LDLIBS+=" $(${PKGCONF} --libs libxls)" + fi + if use xlsx || use ods ; then + append-cflags -DODS -DXLSX $(${PKGCONF} --cflags libxml-2.0 libzip) + LDLIBS+=" -DODS -DXLSX $(${PKGCONF} --libs libxml-2.0 libzip)" + fi + if use xlsx ; then + append-cflags -DXLSX_EXPORT $(${PKGCONF} --cflags xlsxwriter) + LDLIBS+=" -DXLSX_EXPORT $(${PKGCONF} --libs xlsxwriter)" + fi + if use lua ; then + append-cflags -DXLUA $(${PKGCONF} --cflags lua) + LDLIBS+=" -DXLUA $(${PKGCONF} --libs lua) -rdynamic" + fi + append-cflags $(${PKGCONF} --cflags ncursesw) || append-cflags $(${PKGCONF} --cflags ncurses) + LDLIBS+=" $(${PKGCONF} --libs ncursesw)" || LDLIBS+=" $(${PKGCONF} --libs ncurses)" + export LDLIBS }