diff options
-rw-r--r-- | dev-libs/rocksdb/files/rocksdb-6.14.6-libatomic.patch | 118 | ||||
-rw-r--r-- | dev-libs/rocksdb/rocksdb-6.15.5.ebuild | 4 | ||||
-rw-r--r-- | dev-libs/rocksdb/rocksdb-6.17.3.ebuild | 4 | ||||
-rw-r--r-- | eclass/linux-info.eclass | 13 | ||||
-rw-r--r-- | net-dns/unbound/metadata.xml | 3 | ||||
-rw-r--r-- | net-dns/unbound/unbound-1.13.2.ebuild | 6 | ||||
-rwxr-xr-x | scripts/bootstrap.sh | 9 |
7 files changed, 119 insertions, 38 deletions
diff --git a/dev-libs/rocksdb/files/rocksdb-6.14.6-libatomic.patch b/dev-libs/rocksdb/files/rocksdb-6.14.6-libatomic.patch index 5ffcc8eee9ff..27f17aab8933 100644 --- a/dev-libs/rocksdb/files/rocksdb-6.14.6-libatomic.patch +++ b/dev-libs/rocksdb/files/rocksdb-6.14.6-libatomic.patch @@ -1,29 +1,105 @@ +From 38d79de10da65d234c70cbb36c24c58d189f76db Mon Sep 17 00:00:00 2001 +From: mrambacher <mrambach@gmail.com> +Date: Mon, 12 Apr 2021 20:06:57 -0400 +Subject: [PATCH 1/3] Add check to cmake to see if we need to link against + -latomic + +For some compilers/environments (e.g. Clang, riscv64), we need to link against -latomic. Check if this is a requirement and add the library to the third-party libs if it is. +--- + CMakeLists.txt | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 984c6197cb..460d350054 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -325,6 +325,26 @@ - add_definitions(-DROCKSDB_SUPPORT_THREAD_LOCAL) +@@ -312,7 +312,6 @@ int main() { + auto d = _mm_cvtsi128_si64(c); + } + " HAVE_SSE42) +-unset(CMAKE_REQUIRED_FLAGS) + if(HAVE_SSE42) + add_definitions(-DHAVE_SSE42) + add_definitions(-DHAVE_PCLMUL) +@@ -320,6 +319,26 @@ elseif(FORCE_SSE42) + message(FATAL_ERROR "FORCE_SSE42=ON but unable to compile with SSE4.2 enabled") endif() -+set(ATOMIC_TEST_SOURCE " ++# Check if -latomic is required or not ++if (NOT MSVC) ++ set(CMAKE_REQUIRED_FLAGS "--std=c++11") ++ CHECK_CXX_SOURCE_COMPILES(" +#include <atomic> ++std::atomic<uint64_t> x(0); +int main() { -+ std::atomic<bool> y (false); -+ std::atomic<uint64_t> x (0); -+ bool expected = true; -+ bool j = y.compare_exchange_weak(expected,false); -+ x++; ++ uint64_t i = x.load(std::memory_order_relaxed); ++ bool b = x.is_lock_free(); + return 0; -+}") -+CHECK_CXX_SOURCE_COMPILES("${ATOMIC_TEST_SOURCE}" ATOMICS_ARE_BUILTIN) -+if (NOT ATOMICS_ARE_BUILTIN) -+ set(CMAKE_REQUIRED_LIBRARIES atomic) -+ check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMICS_REQUIRE_LIBATOMIC) -+ unset(CMAKE_REQUIRED_LIBRARIES) -+ if (ATOMICS_REQUIRE_LIBATOMIC) -+ string(APPEND CMAKE_CXX_STANDARD_LIBRARIES " -latomic") -+ endif () -+endif () ++} ++" BUILTIN_ATOMIC) ++if (NOT BUILTIN_ATOMIC) ++ #TODO: Check if -latomic exists ++ list(APPEND THIRDPARTY_LIBS atomic) ++endif() ++endif() + - option(FAIL_ON_WARNINGS "Treat compile warnings as errors" ON) - if(FAIL_ON_WARNINGS) - if(MSVC) ++unset(CMAKE_REQUIRED_FLAGS) ++ + CHECK_CXX_SOURCE_COMPILES(" + #if defined(_MSC_VER) && !defined(__thread) + #define __thread __declspec(thread) + +From df7fdd69ac19f26601a80e35f70ec51913838a6e Mon Sep 17 00:00:00 2001 +From: mrambacher <mrambach@gmail.com> +Date: Wed, 14 Apr 2021 10:33:47 -0400 +Subject: [PATCH 2/3] Reset CMAKE_REQUIRED_FLAGS after compilation checks + +--- + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 460d350054..5d167855a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -296,6 +296,7 @@ else() + endif() + + include(CheckCXXSourceCompiles) ++set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + if(NOT MSVC) + set(CMAKE_REQUIRED_FLAGS "-msse4.2 -mpclmul") + endif() +@@ -337,7 +338,8 @@ if (NOT BUILTIN_ATOMIC) + endif() + endif() + +-unset(CMAKE_REQUIRED_FLAGS) ++# Reset the required flags ++set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) + + CHECK_CXX_SOURCE_COMPILES(" + #if defined(_MSC_VER) && !defined(__thread) + +From 4793c5c75351d5d7c609c27d0243c2138729c7b0 Mon Sep 17 00:00:00 2001 +From: mrambacher <mrambach@gmail.com> +Date: Fri, 16 Apr 2021 08:53:48 -0400 +Subject: [PATCH 3/3] Fix lint warning + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5d167855a7..558b985073 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -333,7 +333,7 @@ int main() { + } + " BUILTIN_ATOMIC) + if (NOT BUILTIN_ATOMIC) +- #TODO: Check if -latomic exists ++ #TODO: Check if -latomic exists + list(APPEND THIRDPARTY_LIBS atomic) + endif() + endif() diff --git a/dev-libs/rocksdb/rocksdb-6.15.5.ebuild b/dev-libs/rocksdb/rocksdb-6.15.5.ebuild index eca7931e3752..c8bb53cec446 100644 --- a/dev-libs/rocksdb/rocksdb-6.15.5.ebuild +++ b/dev-libs/rocksdb/rocksdb-6.15.5.ebuild @@ -25,6 +25,10 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-6.14.6-libatomic.patch +) + src_configure() { mycmakeargs=( -DFAIL_ON_WARNINGS=OFF diff --git a/dev-libs/rocksdb/rocksdb-6.17.3.ebuild b/dev-libs/rocksdb/rocksdb-6.17.3.ebuild index e441ef854c8d..76c4d651f8af 100644 --- a/dev-libs/rocksdb/rocksdb-6.17.3.ebuild +++ b/dev-libs/rocksdb/rocksdb-6.17.3.ebuild @@ -25,6 +25,10 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-6.14.6-libatomic.patch +) + src_configure() { mycmakeargs=( -DFAIL_ON_WARNINGS=OFF diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 8edd17c317d4..0b6df1bf5919 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -539,14 +539,11 @@ get_version() { # And contrary to existing functions I feel we shouldn't trust the # directory name to find version information as this seems insane. - # So we parse ${KERNEL_MAKEFILE}. We should be able to trust that - # the Makefile is simple enough to use the noexec extract function. - # This has been true for every release thus far, and it's faster - # than using make to evaluate the Makefile every time. - KV_MAJOR=$(getfilevar_noexec VERSION "${KERNEL_MAKEFILE}") - KV_MINOR=$(getfilevar_noexec PATCHLEVEL "${KERNEL_MAKEFILE}") - KV_PATCH=$(getfilevar_noexec SUBLEVEL "${KERNEL_MAKEFILE}") - KV_EXTRA=$(getfilevar_noexec EXTRAVERSION "${KERNEL_MAKEFILE}") + # So we parse ${KERNEL_MAKEFILE}. + KV_MAJOR=$(getfilevar VERSION "${KERNEL_MAKEFILE}") + KV_MINOR=$(getfilevar PATCHLEVEL "${KERNEL_MAKEFILE}") + KV_PATCH=$(getfilevar SUBLEVEL "${KERNEL_MAKEFILE}") + KV_EXTRA=$(getfilevar EXTRAVERSION "${KERNEL_MAKEFILE}") if [ -z "${KV_MAJOR}" -o -z "${KV_MINOR}" -o -z "${KV_PATCH}" ] then diff --git a/net-dns/unbound/metadata.xml b/net-dns/unbound/metadata.xml index b125fb7df610..844b7d8ad1dd 100644 --- a/net-dns/unbound/metadata.xml +++ b/net-dns/unbound/metadata.xml @@ -30,7 +30,8 @@ <flag name="ecs">Enable EDNS client subnet support</flag> <flag name="gost">Enable GOST support</flag> <flag name="http2">Enable HTTP/2 support for DoH<pkg>net-libs/nghttp2</pkg></flag> - <flag name="redis">Enable cache db backend which uses <pkg>dev-libs/hiredis</pkg></flag> + <flag name="redis">Enable cache db backend which uses<pkg>dev-libs/hiredis</pkg></flag> + <flag name="tfo">Enable TCP Fast Open client+server</flag> </use> <upstream> <remote-id type="github">NLnetLabs/unbound</remote-id> diff --git a/net-dns/unbound/unbound-1.13.2.ebuild b/net-dns/unbound/unbound-1.13.2.ebuild index 83b74f7345dc..4e61650bf380 100644 --- a/net-dns/unbound/unbound-1.13.2.ebuild +++ b/net-dns/unbound/unbound-1.13.2.ebuild @@ -14,7 +14,7 @@ SRC_URI="https://nlnetlabs.nl/downloads/unbound/${MY_P}.tar.gz" LICENSE="BSD GPL-2" SLOT="0/8" # ABI version of libunbound.so KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~x86" -IUSE="debug dnscrypt dnstap +ecdsa ecs gost +http2 python redis selinux static-libs systemd test threads" +IUSE="debug dnscrypt dnstap +ecdsa ecs gost +http2 python redis selinux static-libs systemd test +tfo threads" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" RESTRICT="!test? ( test )" @@ -100,12 +100,12 @@ multilib_src_configure() { $(multilib_native_use_with python pyunbound) \ $(use_with threads pthreads) \ $(use_with http2 libnghttp2) \ + $(use_enable tfo tfo-client) \ + $(use_enable tfo tfo-server) \ --disable-flto \ --disable-rpath \ --enable-event-api \ --enable-ipsecmod \ - --enable-tfo-client \ - --enable-tfo-server \ --with-libevent="${EPREFIX}"/usr \ $(multilib_native_usex redis --with-libhiredis="${EPREFIX}/usr" --without-libhiredis) \ --with-pidfile="${EPREFIX}"/run/unbound.pid \ diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 46026a79e1c9..a84263ba448e 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -1,7 +1,9 @@ #!/bin/bash -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +file_version="2021.0" # update manually: <year>.<counter> + # people who were here: # (drobbins, 06 Jun 2003) # (solar, Jul 2004) @@ -55,9 +57,6 @@ v_echo() { env "$@" } -cvsver="$Id$" # TODO: FIXME for Git era -cvsver=${cvsver##*,v } -cvsver=${cvsver%%Exp*} file_copyright=$(sed -n '/Copyright/!b;s/^# *//;p;q' $0) usage() { @@ -94,7 +93,7 @@ for opt in "$@" ; do --resume|-r) STRAP_EMERGE_OPTS="${STRAP_EMERGE_OPTS} --usepkg --buildpkg";; --verbose|-v) STRAP_EMERGE_OPTS="${STRAP_EMERGE_OPTS} -v" ; V_ECHO=v_echo;; --version|-V) - einfo "Gentoo Linux bootstrap ${cvsver}" + einfo "Gentoo Linux bootstrap ${file_version}" exit 0 ;; *) |