* [gentoo-commits] repo/proj/guru:dev commit in: net-misc/graftcp/, net-misc/graftcp/files/
@ 2024-04-01 9:09 Yuhang Zeng
0 siblings, 0 replies; only message in thread
From: Yuhang Zeng @ 2024-04-01 9:09 UTC (permalink / raw
To: gentoo-commits
commit: 0e71f03fe68682fccab80d6d2072b4896253daf0
Author: Yuhang Zeng <unlsycn <AT> unlsycn <DOT> com>
AuthorDate: Mon Apr 1 08:30:24 2024 +0000
Commit: Yuhang Zeng <unlsycn <AT> unlsycn <DOT> com>
CommitDate: Mon Apr 1 00:53:21 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0e71f03f
net-misc/graftcp: fix QA notice
Signed-off-by: Yuhang Zeng <unlsycn <AT> unlsycn.com>
.../files/0004-fix-parallel-build-dependency.patch | 37 ++++++++++++++++++++++
.../files/0005-let-graftcp-respect-LDFLAGS.patch | 25 +++++++++++++++
net-misc/graftcp/graftcp-0.7.1.ebuild | 8 ++++-
3 files changed, 69 insertions(+), 1 deletion(-)
diff --git a/net-misc/graftcp/files/0004-fix-parallel-build-dependency.patch b/net-misc/graftcp/files/0004-fix-parallel-build-dependency.patch
new file mode 100644
index 0000000000..c2905009d2
--- /dev/null
+++ b/net-misc/graftcp/files/0004-fix-parallel-build-dependency.patch
@@ -0,0 +1,37 @@
+From 2c1a891d5e11f0faf49e6a33a566342590ab62df Mon Sep 17 00:00:00 2001
+From: "mingang.he" <dustgle@gmail.com>
+Date: Thu, 22 Feb 2024 12:09:00 +0000
+Subject: [PATCH] Fix parallel build dependency, close #65
+
+This commit corrects the dependency issue in the Makefile which was causing errors during parallel builds. Specifically, it addresses the following changes:
+
+- Separate build rules for local/graftcp-local and local/mgraftcp to individually specify their dependencies and build commands.
+- Ensure local/mgraftcp explicitly depends on libgraftcp.a, and build it prior to local/mgraftcp to resolve potential race conditions.
+- The local/graftcp-local target does not depend on libgraftcp.a, hence a separate rule is created without this dependency.
+
+These adjustments ensure that each binary is built correctly respecting their precise dependencies, and thus preventing errors that may occur due to incorrect builds when using the -j option for parallel execution in make.
+---
+ Makefile | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 64d088a..22c46ab 100644
+--- a/Makefile
++++ b/Makefile
+@@ -67,8 +67,11 @@ libgraftcp.a: graftcp.o util.o cidr-trie.o conf.o
+ %.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+-$(GRAFTCP_LOCAL_BIN)::
+- $(MAKE) -C local VERSION=$(VERSION) CC=$(CC) CXX=$(CXX) AR=$(AR)
++local/graftcp-local:
++ $(MAKE) -C $(dir $@) VERSION=$(VERSION) CC=$(CC) CXX=$(CXX) AR=$(AR) $(notdir $@)
++
++local/mgraftcp: libgraftcp.a
++ $(MAKE) -C $(dir $@) VERSION=$(VERSION) CC=$(CC) CXX=$(CXX) AR=$(AR) $(notdir $@)
+
+ install:: graftcp $(GRAFTCP_LOCAL_BIN)
+ $(INSTALL) $< $(DESTDIR)$(BINDIR)/$<
+--
+2.44.0
+
diff --git a/net-misc/graftcp/files/0005-let-graftcp-respect-LDFLAGS.patch b/net-misc/graftcp/files/0005-let-graftcp-respect-LDFLAGS.patch
new file mode 100644
index 0000000000..fd3969f29b
--- /dev/null
+++ b/net-misc/graftcp/files/0005-let-graftcp-respect-LDFLAGS.patch
@@ -0,0 +1,25 @@
+From 17e60d1a6e9a1a8ee4e2c6016388a6ee5f1b2284 Mon Sep 17 00:00:00 2001
+From: unlsycn <unlsycn@unlsycn.com>
+Date: Mon, 1 Apr 2024 16:22:53 +0800
+Subject: [PATCH] let graftcp respect LDFLAGS
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 22c46ab..a9a6776 100644
+--- a/Makefile
++++ b/Makefile
+@@ -59,7 +59,7 @@ all:: $(TARGET)
+
+
+ graftcp: main.o graftcp.o util.o cidr-trie.o conf.o
+- $(CC) $^ -o $@
++ $(CC) $^ -o $@ $(LDFLAGS)
+
+ libgraftcp.a: graftcp.o util.o cidr-trie.o conf.o
+ $(AR) rcs $@ $^
+--
+2.44.0
+
diff --git a/net-misc/graftcp/graftcp-0.7.1.ebuild b/net-misc/graftcp/graftcp-0.7.1.ebuild
index 6bee869a11..e9dc3322d0 100644
--- a/net-misc/graftcp/graftcp-0.7.1.ebuild
+++ b/net-misc/graftcp/graftcp-0.7.1.ebuild
@@ -33,9 +33,15 @@ PATCHES="
${FILESDIR}/0001-build-not-enabling-service-in-install_systemd.patch
${FILESDIR}/0002-build-no-longer-strip-symbols.patch
${FILESDIR}/0003-version-v0.7.patch
+ ${FILESDIR}/0004-fix-parallel-build-dependency.patch
+ ${FILESDIR}/0005-let-graftcp-respect-LDFLAGS.patch
"
-MAKEOPTS="${MAKEOPTS} -j1"
+# Generated by nim
+QA_FLAGS_IGNORED="
+ /usr/bin/graftcp-local
+ /usr/bin/mgraftcp
+ "
src_prepare() {
default
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-01 9:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-01 9:09 [gentoo-commits] repo/proj/guru:dev commit in: net-misc/graftcp/, net-misc/graftcp/files/ Yuhang Zeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox