* [gentoo-commits] repo/proj/guru:master commit in: app-misc/uwufetch/files/, app-misc/uwufetch/
@ 2022-12-06 6:09 Viorel Munteanu
0 siblings, 0 replies; only message in thread
From: Viorel Munteanu @ 2022-12-06 6:09 UTC (permalink / raw
To: gentoo-commits
commit: b958e50641648c619c0a657027fd39e826e5163b
Author: Cara Salter <cara <AT> devcara <DOT> com>
AuthorDate: Mon Dec 5 14:31:18 2022 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Dec 5 14:31:18 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b958e506
app-misc/uwufetch: Respect LDFLAGS, CFLAGS, CC, and generate soname
Closes: https://bugs.gentoo.org/884441
Closes: https://bugs.gentoo.org/884431
Closes: https://bugs.gentoo.org/884439
Closes: https://bugs.gentoo.org/884437
Signed-off-by: Cara Salter <cara <AT> devcara.com>
app-misc/uwufetch/files/uwufetch-2.0-cc.patch | 11 +++++++++++
.../uwufetch/files/uwufetch-2.0-cflags-ldflags.patch | 20 ++++++++++++++++++++
.../files/uwufetch-2.0-no-install-soname.patch | 12 ++++++++++++
app-misc/uwufetch/files/uwufetch-2.0-soname.patch | 18 +++++++++---------
app-misc/uwufetch/uwufetch-2.0.ebuild | 10 ++++++++--
5 files changed, 60 insertions(+), 11 deletions(-)
diff --git a/app-misc/uwufetch/files/uwufetch-2.0-cc.patch b/app-misc/uwufetch/files/uwufetch-2.0-cc.patch
new file mode 100644
index 000000000..1e013a329
--- /dev/null
+++ b/app-misc/uwufetch/files/uwufetch-2.0-cc.patch
@@ -0,0 +1,11 @@
+--- Makefile 2022-12-01 16:12:15.695821291 -0500
++++ Makefile 2022-12-05 08:00:42.879825137 -0500
+@@ -4,7 +4,7 @@
+ UWUFETCH_VERSION = $(shell git describe --tags)
+ CFLAGS = -O3 -DUWUFETCH_VERSION=\"$(UWUFETCH_VERSION)\"
+ CFLAGS_DEBUG = -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"$(UWUFETCH_VERSION)\"
+-CC = cc
++CC ?= cc
+ AR = ar
+ DESTDIR = /usr
+ RELEASE_SCRIPTS = release_scripts/*.sh
diff --git a/app-misc/uwufetch/files/uwufetch-2.0-cflags-ldflags.patch b/app-misc/uwufetch/files/uwufetch-2.0-cflags-ldflags.patch
new file mode 100644
index 000000000..32d6824ad
--- /dev/null
+++ b/app-misc/uwufetch/files/uwufetch-2.0-cflags-ldflags.patch
@@ -0,0 +1,20 @@
+--- Makefile 2022-12-05 08:07:54.867207190 -0500
++++ Makefile-tmp 2022-12-05 08:14:19.101530405 -0500
+@@ -2,7 +2,7 @@
+ BIN_FILES = uwufetch.c
+ LIB_FILES = fetch.c
+ UWUFETCH_VERSION = $(shell git describe --tags)
+-CFLAGS = -O3 -DUWUFETCH_VERSION=\"$(UWUFETCH_VERSION)\"
++CFLAGS := $(CFLAGS) -O3 -DUWUFETCH_VERSION=\"$(UWUFETCH_VERSION)\"
+ CFLAGS_DEBUG = -Wall -Wextra -g -pthread -DUWUFETCH_VERSION=\"$(UWUFETCH_VERSION)\"
+ CC ?= cc
+ AR = ar
+@@ -64,7 +64,7 @@
+ endif
+
+ build: $(BIN_FILES) lib
+- $(CC) $(CFLAGS) -o $(NAME) $(BIN_FILES) lib$(LIB_FILES:.c=.a)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(NAME) $(BIN_FILES) lib$(LIB_FILES:.c=.a)
+
+ lib: $(LIB_FILES)
+ $(CC) $(CFLAGS) -fPIC -c -o $(LIB_FILES:.c=.o) $(LIB_FILES)
diff --git a/app-misc/uwufetch/files/uwufetch-2.0-no-install-soname.patch b/app-misc/uwufetch/files/uwufetch-2.0-no-install-soname.patch
new file mode 100644
index 000000000..1a39f94dc
--- /dev/null
+++ b/app-misc/uwufetch/files/uwufetch-2.0-no-install-soname.patch
@@ -0,0 +1,12 @@
+--- Makefile 2022-12-05 08:42:56.586585774 -0500
++++ Makefile-tmp 2022-12-05 08:43:24.063183118 -0500
+@@ -92,8 +92,7 @@
+
+ install: build
+ mkdir -pv $(DESTDIR)/$(PREFIX) $(DESTDIR)/$(LIBDIR)/$(NAME) $(DESTDIR)/$(MANDIR) ${DESTDIR}/$(ETC_DIR)/$(NAME) ${DESTDIR}/include ${DESTDIR}/lib/uwufetch
+- cp $(NAME) $(DESTDIR)/$(PREFIX)
+- cp lib$(LIB_FILES:.c=.so) $(DESTDIR)/$(LIBDIR)
++ cp $(NAME) $(DESTDIR)/$(PREFIX)
+ cp $(LIB_FILES:.c=.h) $(DESTDIR)/include/
+ cp -r res/* $(DESTDIR)/lib/$(NAME)
+ cp default.config ${DESTDIR}/$(ETC_DIR)/$(NAME)/config
diff --git a/app-misc/uwufetch/files/uwufetch-2.0-soname.patch b/app-misc/uwufetch/files/uwufetch-2.0-soname.patch
index 691b1e805..133fd250c 100644
--- a/app-misc/uwufetch/files/uwufetch-2.0-soname.patch
+++ b/app-misc/uwufetch/files/uwufetch-2.0-soname.patch
@@ -1,11 +1,11 @@
---- Makefile 2022-10-04 12:10:11.990564393 -0400
-+++ Makefile-tmp 2022-10-04 12:48:43.320067178 -0400
-@@ -64,7 +64,7 @@
- endif
-
- build: $(BIN_FILES) lib
-- $(CC) $(CFLAGS) -o $(NAME) $(BIN_FILES) lib$(LIB_FILES:.c=.a)
-+ $(CC) $(CFLAGS) -Wl -soname -o $(NAME) $(BIN_FILES) lib$(LIB_FILES:.c=.a)
-
+--- Makefile 2022-12-05 08:30:04.452071661 -0500
++++ Makefile 2022-12-05 08:35:10.611197290 -0500
+@@ -69,7 +69,7 @@
lib: $(LIB_FILES)
$(CC) $(CFLAGS) -fPIC -c -o $(LIB_FILES:.c=.o) $(LIB_FILES)
+ $(AR) rcs lib$(LIB_FILES:.c=.a) $(LIB_FILES:.c=.o)
+- $(CC) $(CFLAGS) -shared -o lib$(LIB_FILES:.c=.so) $(LIB_FILES:.c=.o)
++ $(CC) $(CFLAGS) -shared -Wl,-soname,lib$(LIB_FILES:.c=.so).$(UWUFETCH_VERSION) -o lib$(LIB_FILES:.c=.so) $(LIB_FILES:.c=.o)
+
+ release: build
+ mkdir -pv $(NAME)_$(UWUFETCH_VERSION)-$(PLATFORM_ABBR)
diff --git a/app-misc/uwufetch/uwufetch-2.0.ebuild b/app-misc/uwufetch/uwufetch-2.0.ebuild
index 8faba78df..7eef0ac1b 100644
--- a/app-misc/uwufetch/uwufetch-2.0.ebuild
+++ b/app-misc/uwufetch/uwufetch-2.0.ebuild
@@ -23,17 +23,21 @@ BDEPEND=""
src_prepare() {
eapply -p0 "${FILESDIR}/${P}-destdir.patch"
- #eapply -p0 "${FILESDIR}/${P}-soname.patch"
eapply -p0 "${FILESDIR}/${P}-lib64.patch"
eapply -p0 "${FILESDIR}/${P}-includedir.patch"
eapply -p0 "${FILESDIR}/${P}-reslib.patch"
eapply -p0 "${FILESDIR}/${P}-nocompressman.patch"
+ eapply -p0 "${FILESDIR}/${P}-cc.patch"
+ eapply -p0 "${FILESDIR}/${P}-cflags-ldflags.patch"
+ eapply -p0 "${FILESDIR}/${P}-soname.patch"
+ eapply -p0 "${FILESDIR}/${P}-no-install-soname.patch"
eapply_user
}
src_compile() {
emake build
+ cp libfetch.so "libfetch.so.1"
}
src_install() {
@@ -41,5 +45,7 @@ src_install() {
mv "${D}/usr/etc" "${D}/etc"
- dodoc uwufetch.1
+ doman uwufetch.1
+ dolib.so libfetch.so.1
+ dosym "libfetch.so.1" "/usr/$(get_libdir)/libfetch.so.1"
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-06 6:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 6:09 [gentoo-commits] repo/proj/guru:master commit in: app-misc/uwufetch/files/, app-misc/uwufetch/ Viorel Munteanu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox