mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 20:43:09 -04:00
dev-libs/tfdn: add 1.11.0-r1 for bug #972554
Signed-off-by: amielke <gentoo@amielke.de>
This commit is contained in:
57
dev-libs/tfdn/files/tfdn-1.11.0-glibc-2.43-once-flag.patch
Normal file
57
dev-libs/tfdn/files/tfdn-1.11.0-glibc-2.43-once-flag.patch
Normal file
@@ -0,0 +1,57 @@
|
||||
--- a/include/the_Foundation/c11threads.h 2026-04-19 00:30:03.038445115 +0200
|
||||
+++ b/include/the_Foundation/c11threads.h 2026-04-19 00:30:03.069844680 +0200
|
||||
@@ -31,7 +31,12 @@
|
||||
typedef pthread_mutex_t mtx_t;
|
||||
typedef pthread_cond_t cnd_t;
|
||||
typedef pthread_key_t tss_t;
|
||||
+#ifndef __once_flag_defined
|
||||
+#ifndef ONCE_FLAG_INIT
|
||||
+#define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
|
||||
+#endif
|
||||
typedef pthread_once_t once_flag;
|
||||
+#endif
|
||||
|
||||
typedef int (*thrd_start_t)(void*);
|
||||
typedef void (*tss_dtor_t)(void*);
|
||||
@@ -90,7 +95,9 @@
|
||||
|
||||
/* ---- misc ---- */
|
||||
|
||||
+#ifndef __once_flag_defined
|
||||
void call_once(once_flag *flag, void (*func)(void));
|
||||
+#endif
|
||||
|
||||
iEndPublic
|
||||
|
||||
--- a/src/c11threads.c 2026-04-19 00:30:03.041073068 +0200
|
||||
+++ b/src/c11threads.c 2026-04-19 00:30:03.069936752 +0200
|
||||
@@ -35,7 +35,9 @@
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
+#ifndef __once_flag_defined
|
||||
#define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
|
||||
+#endif
|
||||
|
||||
#ifdef C11THREADS_NO_TIMED_MUTEX
|
||||
# define PTHREAD_MUTEX_TIMED_NP PTHREAD_MUTEX_NORMAL
|
||||
@@ -184,6 +186,8 @@
|
||||
|
||||
void *tss_get(tss_t key) { return pthread_getspecific(key); }
|
||||
|
||||
+#ifndef __once_flag_defined
|
||||
void call_once(once_flag *flag, void (*func)(void)) {
|
||||
pthread_once(flag, func);
|
||||
}
|
||||
+#endif
|
||||
--- a/src/string.c 2026-04-19 00:30:03.043229412 +0200
|
||||
+++ b/src/string.c 2026-04-19 00:30:03.070124145 +0200
|
||||
@@ -1196,7 +1196,7 @@
|
||||
#if defined(iHaveC11Threads)
|
||||
static once_flag inited = ONCE_FLAG_INIT;
|
||||
#else
|
||||
- static once_flag inited = PTHREAD_ONCE_INIT;
|
||||
+ static once_flag inited = ONCE_FLAG_INIT;
|
||||
#endif
|
||||
call_once(&inited, &bufKeyInit);
|
||||
|
||||
56
dev-libs/tfdn/tfdn-1.11.0-r1.ebuild
Normal file
56
dev-libs/tfdn/tfdn-1.11.0-r1.ebuild
Normal file
@@ -0,0 +1,56 @@
|
||||
# Copyright 2021-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DOCS_BUILDER="doxygen"
|
||||
DOCS_DEPEND="app-text/doxygen[dot]"
|
||||
DOCS_CONFIG_NAME="the_Foundation.doxygen"
|
||||
inherit cmake docs flag-o-matic
|
||||
|
||||
MY_PN="the_foundation"
|
||||
DESCRIPTION="Opinionated C11 library for low-level functionality"
|
||||
HOMEPAGE="https://git.skyjake.fi/skyjake/the_Foundation"
|
||||
SRC_URI="https://git.skyjake.fi/skyjake/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_PN}"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0/1.11"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="cpu_flags_x86_sse4_1 curl debug ssl"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/tfdn-1.11.0-glibc-2.43-once-flag.patch
|
||||
)
|
||||
|
||||
DEPEND="
|
||||
dev-libs/libpcre2:=
|
||||
dev-libs/libunistring:=
|
||||
virtual/zlib:=
|
||||
curl? ( net-misc/curl )
|
||||
ssl? ( dev-libs/openssl:= )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DTFDN_ENABLE_WARN_ERROR=OFF
|
||||
-DTFDN_ENABLE_DEBUG_OUTPUT=$(usex debug)
|
||||
-DTFDN_ENABLE_SSE41=$(usex cpu_flags_x86_sse4_1)
|
||||
-DTFDN_ENABLE_TESTS=OFF # not actual tests
|
||||
-DTFDN_ENABLE_TLSREQUEST=$(usex ssl)
|
||||
-DTFDN_ENABLE_WEBREQUEST=$(usex curl)
|
||||
)
|
||||
|
||||
append-cppflags $(usex debug "-UNDEBUG" "-DNDEBUG")
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
docs_compile
|
||||
}
|
||||
Reference in New Issue
Block a user