From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6F11A158091 for ; Wed, 8 Jun 2022 05:06:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A756E0824; Wed, 8 Jun 2022 05:06:16 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A81CDE0824 for ; Wed, 8 Jun 2022 05:06:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 88F1D340FB4 for ; Wed, 8 Jun 2022 05:06:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D76F8471 for ; Wed, 8 Jun 2022 05:06:12 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1654664765.95cae20e05d591fbb744f6e4921e46f996811b40.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/symengine/, sci-libs/symengine/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/symengine/files/symengine-0.9.0-pthread-cmake.patch sci-libs/symengine/symengine-0.9.0-r1.ebuild sci-libs/symengine/symengine-0.9.0.ebuild X-VCS-Directories: sci-libs/symengine/ sci-libs/symengine/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 95cae20e05d591fbb744f6e4921e46f996811b40 X-VCS-Branch: master Date: Wed, 8 Jun 2022 05:06:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e4440d93-169e-4f08-ab3f-368e16685413 X-Archives-Hash: 24b0b5e19d03da73f78d23c0a1276509 commit: 95cae20e05d591fbb744f6e4921e46f996811b40 Author: Sam James gentoo org> AuthorDate: Wed Jun 8 05:05:57 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jun 8 05:06:05 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95cae20e sci-libs/symengine: fix pthread detection Closes: https://bugs.gentoo.org/849803 Signed-off-by: Sam James gentoo.org> .../files/symengine-0.9.0-pthread-cmake.patch | 63 ++++++++++++++++++++++ ...gine-0.9.0.ebuild => symengine-0.9.0-r1.ebuild} | 3 +- sci-libs/symengine/symengine-0.9.0.ebuild | 1 + 3 files changed, 66 insertions(+), 1 deletion(-) diff --git a/sci-libs/symengine/files/symengine-0.9.0-pthread-cmake.patch b/sci-libs/symengine/files/symengine-0.9.0-pthread-cmake.patch new file mode 100644 index 000000000000..0fa049dbf218 --- /dev/null +++ b/sci-libs/symengine/files/symengine-0.9.0-pthread-cmake.patch @@ -0,0 +1,63 @@ +From 6ad9620ffc578abdb920b84ea5e393c726389ac0 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Wed, 8 Jun 2022 06:02:25 +0100 +Subject: [PATCH] cmake: fix pthread detection + +The homebrew FindPTHREAD.cmake module was hardcoding the path to libpthread +in the installed CMake config file which broke consumers when upgrading from +< glibc-2.34 (e.g. glibc-2.33 -> glibc-2.34). + +CMake provides FindThreads which does the job fine for us. Tested with both +glibc-2.33 (with a previously bad generated file, and then fixed) and glibc-2.35. + +This should be fine on musl and friends too. This brings symengine in line +with most CMake packages. + +Bug: https://bugs.gentoo.org/849803 +Fixes: https://github.com/symengine/symengine/issues/1910 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -335,11 +335,10 @@ if (WITH_PIRANHA) + endif() + + if (WITH_PTHREAD) +- find_package(PTHREAD REQUIRED) +- include_directories(SYSTEM ${PTHREAD_INCLUDE_DIRS}) +- set(LIBS ${LIBS} ${PTHREAD_TARGETS}) ++ find_package(Threads) ++ set(THREADS_PREFER_PTHREAD_FLAG ON) ++ set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT}) + set(HAVE_SYMENGINE_PTHREAD yes) +- set(PKGS ${PKGS} "PTHREAD") + endif() + + if (WITH_MPFR) +@@ -761,10 +760,6 @@ if (WITH_BOOST) + endif() + + message("WITH_PTHREAD: ${WITH_PTHREAD}") +-if (WITH_PTHREAD) +- message("PTHREAD_INCLUDE_DIRS: ${PTHREAD_INCLUDE_DIRS}") +- message("PTHREAD_LIBRARIES: ${PTHREAD_LIBRARIES}") +-endif() + + message("WITH_MPC: ${WITH_MPC}") + if (WITH_MPC) +--- a/cmake/FindPTHREAD.cmake ++++ /dev/null +@@ -1,14 +0,0 @@ +-include(LibFindMacros) +- +-libfind_include(pthread.h pthread) +-libfind_library(pthread pthread) +- +-set(PTHREAD_LIBRARIES ${PTHREAD_LIBRARY}) +-set(PTHREAD_INCLUDE_DIRS ${PTHREAD_INCLUDE_DIR}) +-set(PTHREAD_TARGETS pthread) +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(PTHREAD DEFAULT_MSG PTHREAD_LIBRARIES +- PTHREAD_INCLUDE_DIRS) +- +-mark_as_advanced(PTHREAD_INCLUDE_DIR PTHEARD_LIBRARY) + diff --git a/sci-libs/symengine/symengine-0.9.0.ebuild b/sci-libs/symengine/symengine-0.9.0-r1.ebuild similarity index 96% copy from sci-libs/symengine/symengine-0.9.0.ebuild copy to sci-libs/symengine/symengine-0.9.0-r1.ebuild index bf374c6ddaca..d0cb975cca8a 100644 --- a/sci-libs/symengine/symengine-0.9.0.ebuild +++ b/sci-libs/symengine/symengine-0.9.0-r1.ebuild @@ -31,7 +31,8 @@ DEPEND="${RDEPEND} BDEPEND="doc? ( app-doc/doxygen[dot] )" PATCHES=( - "${FILESDIR}/${PN}-0.7.0-cmake-build-type.patch" + "${FILESDIR}"/${PN}-0.7.0-cmake-build-type.patch + "${FILESDIR}"/${PN}-0.9.0-pthread-cmake.patch ) pkg_pretend() { diff --git a/sci-libs/symengine/symengine-0.9.0.ebuild b/sci-libs/symengine/symengine-0.9.0.ebuild index bf374c6ddaca..98e672759860 100644 --- a/sci-libs/symengine/symengine-0.9.0.ebuild +++ b/sci-libs/symengine/symengine-0.9.0.ebuild @@ -32,6 +32,7 @@ BDEPEND="doc? ( app-doc/doxygen[dot] )" PATCHES=( "${FILESDIR}/${PN}-0.7.0-cmake-build-type.patch" + "${FILESDIR}"/symengine-0.9.0-pthread-cmake.patch ) pkg_pretend() {