From patchwork Tue Mar 12 22:51:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 61733 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CC55027BBE9; Tue, 12 Mar 2024 22:55:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C4F5827BBE2 for ; Tue, 12 Mar 2024 22:55:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkB10-00010F-MW; Tue, 12 Mar 2024 18:54:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkB04-0000BG-QD for guix-patches@gnu.org; Tue, 12 Mar 2024 18:53:37 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkB03-0000La-7f for guix-patches@gnu.org; Tue, 12 Mar 2024 18:53:35 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rkB0b-0001nb-Tb for guix-patches@gnu.org; Tue, 12 Mar 2024 18:54:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69591] [PATCH v2 15/31] gnu: clog: Add "-DUSE_SYSTEM_LIBS=ON" configure flag. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Mar 2024 22:54:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69591 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69591@debbugs.gnu.org Cc: David Elsing Received: via spool by 69591-submit@debbugs.gnu.org id=B69591.17102840216670 (code B ref 69591); Tue, 12 Mar 2024 22:54:09 +0000 Received: (at 69591) by debbugs.gnu.org; 12 Mar 2024 22:53:41 +0000 Received: from localhost ([127.0.0.1]:44093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkB08-0001jQ-AS for submit@debbugs.gnu.org; Tue, 12 Mar 2024 18:53:40 -0400 Received: from mout01.posteo.de ([185.67.36.65]:56955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkAzi-0001ej-Rb for 69591@debbugs.gnu.org; Tue, 12 Mar 2024 18:53:16 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 89517240027 for <69591@debbugs.gnu.org>; Tue, 12 Mar 2024 23:52:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710283952; bh=lxHue7KnJOjOt+2cy/oMu+a975rW1LBK7rRWTmDpSdk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=GB39bbWKejfs9JDqlVUlI9WH8MidsymvdgbdkmA2MmXW7p8yMQ1SX7phcm6ub9dff GTUqyWclTlT+LBJ6PCVGBf+fZvibzxmV1If+nMbXyBznkKYYPApnWg3y1Yu9TysoN2 tdqt2/TOCmNY506rLyeY1Nmu1HjjDDEEDD8+0nX6559emdzhxxbLGQvMAXRQ+fikSa dX+A2bzCezGnuE0isXo9xSQaD3m/rheJKBoXCph3ssfBXDTo2WTHYMHs5qmkzQQYeY KD2BAlY5nVdKyfC4W6aMSMKvjhmDbsmYKPB3epigZliaDp8wEEp3TwSqRjiwzOxYW/ 37LleTmCug/3g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TvTS01GHFz6tx2; Tue, 12 Mar 2024 23:52:32 +0100 (CET) From: David Elsing Date: Tue, 12 Mar 2024 22:51:43 +0000 Message-ID: <20240312225211.16427-15-david.elsing@posteo.net> In-Reply-To: <20240312224712.15578-1-david.elsing@posteo.net> References: <20240312224712.15578-1-david.elsing@posteo.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/parallel.scm (clog)[arguments]: Add "-DUSE_SYSTEM_LIBS=ON" to #:configure-flags. * gnu/packages/patches/clog-fix-shared-build.patch: Adjust patch. --- gnu/packages/parallel.scm | 13 ++++--- .../patches/clog-fix-shared-build.patch | 39 ++----------------- 2 files changed, 12 insertions(+), 40 deletions(-) diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index a210ca0313..93d82a7d72 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -524,11 +524,14 @@ (define-public clog (inherit (package-source cpuinfo)) (patches (search-patches "clog-fix-shared-build.patch")))) (arguments - (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON") - #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda _ - (chdir "deps/clog")))))) + (list + #:configure-flags + ''("-DBUILD_SHARED_LIBS=ON" + "-DUSE_SYSTEM_LIBS=ON") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "deps/clog")))))) (native-inputs (list googletest)) (inputs '()) (synopsis "C-style logging library based on printf") diff --git a/gnu/packages/patches/clog-fix-shared-build.patch b/gnu/packages/patches/clog-fix-shared-build.patch index bf80544b90..eb305339f5 100644 --- a/gnu/packages/patches/clog-fix-shared-build.patch +++ b/gnu/packages/patches/clog-fix-shared-build.patch @@ -1,50 +1,19 @@ Author: Antero Mejr -Notes: Disabled function visibility hacks and googletest download. Enabled -non-static builds. +Notes: Disabled function visibility hacks. Enabled non-static builds. diff --git a/deps/clog/CMakeLists.txt b/deps/clog/CMakeLists.txt -index 083f519..b7b225a 100644 +index 6e50c41..db02e95 100644 --- a/deps/clog/CMakeLists.txt +++ b/deps/clog/CMakeLists.txt -@@ -38,20 +38,8 @@ SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps - SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps - CACHE PATH "Confu-style dependencies binary directory") +@@ -55,7 +55,7 @@ IF(CLOG_BUILD_TESTS) + ENDIF() --IF(CLOG_BUILD_TESTS) -- IF(NOT DEFINED GOOGLETEST_SOURCE_DIR) -- MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)") -- CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt") -- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . -- WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download") -- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build . -- WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download") -- SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory") -- ENDIF() --ENDIF() -- # ---[ clog library -ADD_LIBRARY(clog STATIC src/clog.c) +ADD_LIBRARY(clog src/clog.c) SET_TARGET_PROPERTIES(clog PROPERTIES C_STANDARD 99 C_EXTENSIONS NO) -@@ -74,16 +62,6 @@ INSTALL(TARGETS clog - - # ---[ clog tests - IF(CLOG_BUILD_TESTS) -- # ---[ Build google test -- IF(NOT TARGET gtest) -- IF(MSVC AND NOT CLOG_RUNTIME_TYPE STREQUAL "static") -- SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -- ENDIF() -- ADD_SUBDIRECTORY( -- "${GOOGLETEST_SOURCE_DIR}" -- "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest") -- ENDIF() -- - ADD_EXECUTABLE(clog-test test/clog.cc) - SET_TARGET_PROPERTIES(clog-test PROPERTIES - CXX_STANDARD 11 diff --git a/deps/clog/include/clog.h b/deps/clog/include/clog.h index 4143761..aa9000f 100644 --- a/deps/clog/include/clog.h