* [gentoo-commits] repo/proj/guru:dev commit in: app-office/sc-im/files/, app-office/sc-im/
@ 2022-04-13 17:15 Dex Conner
0 siblings, 0 replies; 4+ messages in thread
From: Dex Conner @ 2022-04-13 17:15 UTC (permalink / raw
To: gentoo-commits
commit: b29e34669e5c14296b8fd1fb8bec4d9356a04336
Author: Dex Conner <cantcuckthis <AT> danwin1210 <DOT> de>
AuthorDate: Wed Apr 13 17:14:27 2022 +0000
Commit: Dex Conner <cantcuckthis <AT> danwin1210 <DOT> de>
CommitDate: Wed Apr 13 17:14:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b29e3466
app-office/sc-im: tmux patch and dependency
Properly added the tmux flag with the dependency and
the Makefile patch.
Signed-off-by: Dex Conner <cantcuckthis <AT> danwin1210.de>
app-office/sc-im/files/sc-im-0.8.2-tmux.patch | 23 +++++++++++++++++++++++
app-office/sc-im/metadata.xml | 1 +
app-office/sc-im/sc-im-0.8.2.ebuild | 11 ++++++++++-
3 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/app-office/sc-im/files/sc-im-0.8.2-tmux.patch b/app-office/sc-im/files/sc-im-0.8.2-tmux.patch
new file mode 100644
index 000000000..63f910c54
--- /dev/null
+++ b/app-office/sc-im/files/sc-im-0.8.2-tmux.patch
@@ -0,0 +1,23 @@
+--- src/Makefile
++++ src/Makefile
+@@ -58,16 +58,16 @@
+ # Choose one of the following commands for copying to different clipboards:
+ # You can later change it at runtime.
+ #to copy to tmux clipboard:
+-#CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\"
++CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\"
+ #to copy to X clipboard:
+-CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\"
++#CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\"
+ #to copy to OSX clipboard:
+ #CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""pbcopy <"\"
+ #
+ # Choose one of the proposed commands for pasting from different clipboards:
+ # You can later change it at runtime.
+-#CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\"
+-CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\"
++CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\"
++#CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\"
+ #CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""pbpaste"\"
+
+ # Command to open file or link under cursor
diff --git a/app-office/sc-im/metadata.xml b/app-office/sc-im/metadata.xml
index ff8f94c7c..64d566c87 100644
--- a/app-office/sc-im/metadata.xml
+++ b/app-office/sc-im/metadata.xml
@@ -10,5 +10,6 @@
<flag name='xls'>Add xls/xlsx support. Pulls in <pkg>dev-python/xlsxwriter</pkg>, <pkg>dev-haskell/libxml</pkg>, <pkg>dev-libs/libzip</pkg> and <pkg>dev-libs/libxls</pkg></flag>
<flag name='ods'>Add <pkg>dev-libs/libzip</pkg> for ods import support</flag>
<flag name='X'>Use <pkg>x11-misc/xclip</pkg> for clipboard copy/paste</flag>
+ <flag name='tmux'>Use <pkg>app-misc/tmux</pkg> for clipboard copy/paste</flag>
</use>
</pkgmetadata>
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 69b694230..eed3d720a 100644
--- a/app-office/sc-im/sc-im-0.8.2.ebuild
+++ b/app-office/sc-im/sc-im-0.8.2.ebuild
@@ -10,15 +10,18 @@ SRC_URI="https://github.com/andmarti1424/sc-im/archive/v${PV}.tar.gz -> ${P}.tar
LICENSE="BSD-4"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="X plots xls lua ods"
+IUSE="X plots xls lua ods tmux"
PATCHES=(
"${FILESDIR}/${P}-prefix.patch"
+ "${FILESDIR}/${P}-tmux.patch"
+
)
DEPEND="
sys-libs/ncurses
X? ( x11-misc/xclip )
+ tmux? ( app-misc/tmux )
plots? ( sci-visualization/gnuplot )
xls? (
dev-libs/libxlsxwriter
@@ -36,3 +39,9 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND=""
S="${WORKDIR}/${P}/src"
+
+src_prepare() {
+ eapply "${FILESDIR}/${P}-prefix.patch"
+ use tmux && "${FILESDIR}/${P}-tmux.patch"
+ eapply_user
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-office/sc-im/files/, app-office/sc-im/
@ 2022-04-16 10:08 Dex Conner
0 siblings, 0 replies; 4+ messages in thread
From: Dex Conner @ 2022-04-16 10:08 UTC (permalink / raw
To: gentoo-commits
commit: f91cfa5b70e65e2871c2ade3c47dcbbf5888e838
Author: Dex Conner <cantcuckthis <AT> danwin1210 <DOT> de>
AuthorDate: Sat Apr 16 08:51:33 2022 +0000
Commit: Dex Conner <cantcuckthis <AT> danwin1210 <DOT> de>
CommitDate: Sat Apr 16 10:06:45 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f91cfa5b
app-office/sc-im: cleaner lua handling
Removed the unnecessary luajit check in Makefile and corresponding env
var in the ebuild.
Signed-off-by: Dex Conner <cantcuckthis <AT> danwin1210.de>
app-office/sc-im/files/sc-im-0.8.2-automagic.patch | 16 ++++++++++------
app-office/sc-im/sc-im-0.8.2.ebuild | 3 +--
2 files changed, 11 insertions(+), 8 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 102c0b2ed..dbdc73ca1 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
@@ -9,7 +9,7 @@
CFLAGS += -DGNUPLOT
endif
-@@ -116,32 +116,33 @@
+@@ -116,38 +116,31 @@
endif
# NOTE: libxlsreader (libxls) is required for xls file reading support
@@ -43,8 +43,12 @@
LDLIBS += $(shell pkg-config --libs lua) -rdynamic
endif
- else ifneq ($(shell pkg-config --exists luajit || echo 'no'),no) # If not found, check for luajit
-+ endif
-+ ifeq ($(LUAJIT),yes)
- CFLAGS += -DXLUA $(shell pkg-config --cflags luajit)
- ifneq ($(shell uname -s),Darwin)
- LDLIBS += $(shell pkg-config --libs luajit) -Wl,--export-dynamic
+- CFLAGS += -DXLUA $(shell pkg-config --cflags luajit)
+- ifneq ($(shell uname -s),Darwin)
+- LDLIBS += $(shell pkg-config --libs luajit) -Wl,--export-dynamic
+- else
+- LDLIBS += $(shell pkg-config --libs luajit) -rdynamic
+- endif
+ endif
+ else ifeq ($(shell uname -s),Darwin)
+ # macOS without pkg-config
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 39b1fabbd..852cd456c 100644
--- a/app-office/sc-im/sc-im-0.8.2.ebuild
+++ b/app-office/sc-im/sc-im-0.8.2.ebuild
@@ -58,12 +58,11 @@ pkg_setup() {
export XLS=$(usex xls)
export XLSX=$(usex xlsx)
export LUA=$(usex lua)
- export JUAJIT=$(usex lua_single_target_luajit)
( use xlsx || use ods ) && export XML_ZIP="yes"
# Prefer wayland support over X, and tmux support over both wayland and X.
use wayland && export X="no"
- use tmux && X="no" && export WAYLAND="no"
+ use tmux && export X="no" && export WAYLAND="no"
# Notifying the user about which clipboard support is enabled if conflicting flags are set
CONFLICTING=$(usex tmux "tmux " "")$(usex wayland "wayland " "")$(usex X "X" "")
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-office/sc-im/files/, app-office/sc-im/
@ 2022-04-24 6:30 Dex Conner
0 siblings, 0 replies; 4+ messages in thread
From: Dex Conner @ 2022-04-24 6:30 UTC (permalink / raw
To: gentoo-commits
commit: 8daa7b9d08d1fae45fbf6b574d5588d25835d1cf
Author: Dex Conner <cantcuckthis <AT> danwin1210 <DOT> de>
AuthorDate: Sun Apr 24 06:16:52 2022 +0000
Commit: Dex Conner <cantcuckthis <AT> danwin1210 <DOT> 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 <cantcuckthis <AT> 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
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-office/sc-im/files/, app-office/sc-im/
@ 2022-04-26 12:41 Dex Conner
0 siblings, 0 replies; 4+ messages in thread
From: Dex Conner @ 2022-04-26 12:41 UTC (permalink / raw
To: gentoo-commits
commit: 054390fe89008990cf541508a0d2e987df943db2
Author: Dex Conner <cantcuckthis <AT> danwin1210 <DOT> de>
AuthorDate: Tue Apr 26 12:34:54 2022 +0000
Commit: Dex Conner <cantcuckthis <AT> danwin1210 <DOT> de>
CommitDate: Tue Apr 26 12:40:19 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=054390fe
app-office/sc-im: move all flags to the ebuild
Moved all CFLAGS and LDLIBS arguments to the ebuild from the Makefile
and removed the patches that "fixed" the automagic dependencies /
clipboard commands / installation prefix. Now all is handled from within
the ebuild.
Signed-off-by: Dex Conner <cantcuckthis <AT> danwin1210.de>
app-office/sc-im/files/sc-im-0.8.2-automagic.patch | 92 ----------------------
app-office/sc-im/files/sc-im-0.8.2-clipboard.patch | 20 -----
app-office/sc-im/files/sc-im-0.8.2-prefix.patch | 11 ---
app-office/sc-im/sc-im-0.8.2-r1.ebuild | 54 +++++++++++--
4 files changed, 47 insertions(+), 130 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
deleted file mode 100644
index 6ff1aeced..000000000
--- a/app-office/sc-im/files/sc-im-0.8.2-automagic.patch
+++ /dev/null
@@ -1,92 +0,0 @@
---- src/Makefile
-+++ src/Makefile
-@@ -82,11 +82,6 @@
- LDLIBS += -pthread
- endif
-
--# Check for gnuplot existance
--ifneq (, $(shell which gnuplot))
-- CFLAGS += -DGNUPLOT
--endif
--
- # OpenBSD does not implement wordexp()
- ifeq ($(shell uname -s),OpenBSD)
- CFLAGS += -DNO_WORDEXP
-@@ -97,77 +92,6 @@
- LDLIBS += -ldl
- endif
-
--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)
-- 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)
-- 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)
-- 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
-- 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)
-- LDLIBS += $(shell pkg-config --libs luajit) -Wl,--export-dynamic
-- else
-- LDLIBS += $(shell pkg-config --libs luajit) -rdynamic
-- endif
-- 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
deleted file mode 100644
index 2668e7d29..000000000
--- a/app-office/sc-im/files/sc-im-0.8.2-clipboard.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/Makefile
-+++ src/Makefile
-@@ -58,7 +58,7 @@
- # Choose one of the following commands for copying to different clipboards:
- # You can later change it at runtime.
- #to copy to tmux clipboard:
--CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\"
-+#CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\"
- #to copy to X clipboard:
- #CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\"
- #to copy to OSX clipboard:
-@@ -66,7 +77,7 @@
- #
- # Choose one of the proposed commands for pasting from different clipboards:
- # You can later change it at runtime.
--CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\"
-+#CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\"
- #CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\"
- #CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""pbpaste"\"
-
diff --git a/app-office/sc-im/files/sc-im-0.8.2-prefix.patch b/app-office/sc-im/files/sc-im-0.8.2-prefix.patch
deleted file mode 100644
index c34d226c2..000000000
--- a/app-office/sc-im/files/sc-im-0.8.2-prefix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/Makefile
-+++ src/Makefile
-@@ -2,7 +2,7 @@
- name = sc-im
-
- # The base directory where everything should be installed.
--prefix = /usr/local
-+prefix = /usr
-
- EXDIR = $(prefix)/bin
- HELPDIR = $(prefix)/share/$(name)
diff --git a/app-office/sc-im/sc-im-0.8.2-r1.ebuild b/app-office/sc-im/sc-im-0.8.2-r1.ebuild
index 15abb065d..d95a385a1 100644
--- a/app-office/sc-im/sc-im-0.8.2-r1.ebuild
+++ b/app-office/sc-im/sc-im-0.8.2-r1.ebuild
@@ -17,12 +17,6 @@ KEYWORDS="~amd64 ~x86"
IUSE="X plots wayland xls xlsx lua ods tmux"
REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
-PATCHES=(
- "${FILESDIR}/${P}-prefix.patch"
- "${FILESDIR}/${P}-automagic.patch"
- "${FILESDIR}/${P}-clipboard.patch"
-)
-
DEPEND="
sys-libs/ncurses
@@ -64,11 +58,48 @@ pkg_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
PKGCONF=$(tc-getPKG_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=65536 \
+ -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"\"'
@@ -80,6 +111,7 @@ src_configure() {
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 $(${PKGCONF} --cflags libxls)
@@ -99,5 +131,13 @@ src_configure() {
fi
append-cflags $(${PKGCONF} --cflags ncursesw) || append-cflags $(${PKGCONF} --cflags ncurses)
LDLIBS+=" $(${PKGCONF} --libs ncursesw)" || LDLIBS+=" $(${PKGCONF} --libs ncurses)"
- export LDLIBS
+}
+
+src_compile() {
+ emake LDLIBS="${LDLIBS}" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" prefix="/usr" install
+ einstalldocs
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-26 12:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-16 10:08 [gentoo-commits] repo/proj/guru:dev commit in: app-office/sc-im/files/, app-office/sc-im/ Dex Conner
-- strict thread matches above, loose matches on Subject: below --
2022-04-26 12:41 Dex Conner
2022-04-24 6:30 Dex Conner
2022-04-13 17:15 Dex Conner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox