dev-libs/zxcvbn-c: Fix parallel build

Closes: https://bugs.gentoo.org/958271
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Andreas Sturmlechner 2025-07-02 19:37:04 +02:00
parent 0b74aad38d
commit f65b34c570
No known key found for this signature in database
GPG Key ID: AE591BBC73E4DD5E
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,33 @@
From 2c454989547390c944d02823b751e8ff4a3963e5 Mon Sep 17 00:00:00 2001
From: Pavel Seleznev <PNSeleznev@sberbank.ru>
Date: Wed, 19 Jun 2024 12:17:49 +0300
Subject: [PATCH] fixed flaky build: in parallel mode the creation link
operation can be happen in two threads
---
makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/makefile b/makefile
index 11ebe28..9ba626d 100644
--- a/makefile
+++ b/makefile
@@ -79,8 +79,7 @@ test-c++file: test.c zxcvbn-c++file.o
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
-DUSE_DICT_FILE -o test-c++file test.cpp zxcvbn-c++file.o $(LDFLAGS) -lm
-zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h
- if [ ! -e zxcvbn.cpp ]; then ln -s zxcvbn.c zxcvbn.cpp; fi
+zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h zxcvbn-c++inline.o
$(CXX) $(CPPFLAGS) $(CXXFLAGS) \
-DUSE_DICT_FILE -c -o zxcvbn-c++file.o zxcvbn.cpp
@@ -102,7 +101,7 @@ test: test-internals test-file test-inline test-c++inline test-c++file test-shli
@echo Finished
clean:
- rm -f test-file zxcvbn-file.o test-c++file zxcvbn-c++file.o
+ rm -f test-file zxcvbn-file.o test-c++file zxcvbn-c++file.o
rm -f test-inline test-internals zxcvbn-inline.o zxcvbn-inline-pic.o test-c++inline zxcvbn-c++inline.o
rm -f dict-*.h zxcvbn.dict zxcvbn.cpp test.cpp
rm -f dictgen

View File

@ -15,6 +15,7 @@ PATCHES=(
"${FILESDIR}"/${P}-libcxx-19.patch
"${FILESDIR}"/${P}-gcc15.patch
"${FILESDIR}"/${PN}-2.5-makefile-install.patch
"${FILESDIR}"/${PN}-2.5-parallel-build.patch # bug 958271
)
src_install() {