From patchwork Wed Mar 19 17:00:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 40440 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 63B5227BBE2; Wed, 19 Mar 2025 17:04:15 +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=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS 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 ECB6B27BBEB for ; Wed, 19 Mar 2025 17:04:11 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuwpc-0005a4-KG; Wed, 19 Mar 2025 13:03:54 -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 1tuwoq-0004q5-6g for guix-patches@gnu.org; Wed, 19 Mar 2025 13:03:13 -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 1tuwop-0007Z3-Tb for guix-patches@gnu.org; Wed, 19 Mar 2025 13:03:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=5EefmG5zdN14T7OqKNPGeXxoal7+14eFF8GdD2Bj6ts=; b=exBS1KnWlS03b+MSdtqnPAvvpIqyeSATGSGvPcY8ZF+cgAhpVmxMG3fxn2tjfo813Kd3Jg1d3TNk6f9QfC2LvBUnk6z8E880y+c9iNJXsQKLUoDNCptqBMAJS1jLuqrSXEpiZw/hoDPYWxYyRqFC4oJhov3U+s7xkPU/UbY1t4ADBVWfYgwqh3uG5sQxYndkttasvda7Qt0FyiU371dL1AxGRR8gBOO6LFumlN6ocLjgLAnu2h/SOxddGXoGzywUaY42tfRpn+YlOUUlHaqPWUaAJ2/e12dgSZ1saw+woZISIgbvTVKwEvShNkat0icVHNlc4uVbPLqsBsiZoxyXSg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tuwop-0005iM-NR for guix-patches@gnu.org; Wed, 19 Mar 2025 13:03:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#67755] [PATCH v6 1/8] gnu: Add jthread. Resent-From: "Sergio Pastor =?utf-8?b?UMOpcmV6?= " Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Mar 2025 17:03:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67755 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67755@debbugs.gnu.org Cc: Sergio Pastor =?utf-8?b?UMOpcmV6?= Received: via spool by 67755-submit@debbugs.gnu.org id=B67755.174240378221939 (code B ref 67755); Wed, 19 Mar 2025 17:03:03 +0000 Received: (at 67755) by debbugs.gnu.org; 19 Mar 2025 17:03:02 +0000 Received: from localhost ([127.0.0.1]:52871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tuwon-0005hZ-DD for submit@debbugs.gnu.org; Wed, 19 Mar 2025 13:03:02 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:48589) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tuwol-0005gm-49 for 67755@debbugs.gnu.org; Wed, 19 Mar 2025 13:02:59 -0400 Received: by mail-wr1-x442.google.com with SMTP id ffacd0b85a97d-394780e98easo4601936f8f.1 for <67755@debbugs.gnu.org>; Wed, 19 Mar 2025 10:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742403773; x=1743008573; darn=debbugs.gnu.org; h=mime-version:cc:to:subject:date:references:in-reply-to:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=5EefmG5zdN14T7OqKNPGeXxoal7+14eFF8GdD2Bj6ts=; b=YEXOy6HYPN2NXzzWOeEy5YYWvxY1RvT8cF+mhTxwMj5qjjLsTrNkC/Y3Ltn5u0Dy84 dGD9kKulYNEj0AeEtoft0CJoMx0tX7dr4nvKgdXNkUxs9SqFJb5wIdea1CCBjj32tDz1 cPBXuXoSZ4uRZgtNDJLdyYpq520I7S8CyahmwvvecikYc9zHILcpTyZEIMfIEVa1UWvy MnFCVUo+M9VhPXKNPeV5o1BBClI+wwt6UiWJ6OQ2u23q6x29HfOBiFbe249KyZ9nylWD Rk/JTPAWa/lWhtH1Lt/qGX1NzZrOrkUFXDpiZuPPas8wqMk6eaRmmEs154yR1ve7cY+N UROw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742403773; x=1743008573; h=mime-version:cc:to:subject:date:references:in-reply-to:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5EefmG5zdN14T7OqKNPGeXxoal7+14eFF8GdD2Bj6ts=; b=mNUjnxf3iMUO/b6NwbWbBKVy4qMzx8CQ5nY9VaOmJtVtPpAt3I4INsmP0z5XktmhN0 0QWX2omu6cY9Bm4ZI/b7mHaAcy6fPW5jvpbVSc7SSAqyYzHH2OxGz5lClp6jv+7ibI+1 1FcbQVZL2AUF9lJsaRhmktwCTjoi+/U8MM+YRjKjwSlR+mCsuLjUbkrSZc+tkjKw9kru 0mP8O6CtDFGJADXgWc8NZq3GxukJeiQW3ApPTBQpZKcGH90fPA4G1TYi8B1/gP+HOQFm Phge8UX92DsSfbyxii1Ud8TnWoyUgHn2iW8ie8PmJTFlZLcof2uyL40TYxI1hj8ZUyD1 G4tg== X-Gm-Message-State: AOJu0YxNoQAXVxA7OwBX1Bt8kcmAzaoXaUyIArkOrgb7R1EI0ixIFasm BRKTm1St2U54gqrAC2K75rKXN0oTgwPilEOCYFhNQCOWGCiZGDb0H4jJDagdkto= X-Gm-Gg: ASbGncufkvcBImd48rD5fy9aLc4ZF5JsMUvstb6U9pmPDBy9J8GWMv9w7H/p2pylhbM H2lYAraoNn6a4tbMY3pIIBPWplK8/UJCSchmWMp8OXFuFoRL+kqZGZhM70njzc3UA8okMQEWybW rRDKHB8UTuDyd+arqWj21mYe1/zWguAgoFZ9BQccyjKZ4Wn80oonHrHQelJ55XNAe63sF+nECdu tLhoZR0/7bHuiQEucsPP++uEpuidGjPPA56yuePrazLrM6p6RUaaXM+VUVy5ssWB/VOt6H9ZfzM r8nvKiBfRkNSk9aMm9ZWqDCguJnEUsFvfxmw4Y84MJm4mIF34MAXwdW2kNdBfSIAVk3nnmOd9x1 ab3hoJVFgtmO44LuGwwFGuWHwpohQC6I= X-Google-Smtp-Source: AGHT+IHShM66HXHO6GmKRU6LsEu2uY4R+1xaCwyAvf0BfqlBY8u7iodNox5TysDdYU5DbcTCQAFVOw== X-Received: by 2002:a5d:6489:0:b0:390:f6aa:4e80 with SMTP id ffacd0b85a97d-39973b449bdmr4878517f8f.53.1742403772319; Wed, 19 Mar 2025 10:02:52 -0700 (PDT) Received: from lumine.fritz.box (85-127-114-32.dsl.dynamic.surfer.at. [85.127.114.32]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-395c7df3419sm21049661f8f.9.2025.03.19.10.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Mar 2025 10:02:51 -0700 (PDT) From: "Sergio Pastor =?utf-8?b?UMOpcmV6?= " X-Google-Original-From: Sergio Pastor =?utf-8?b?UMOpcmV6?= Message-ID: In-Reply-To: References: Date: Wed, 19 Mar 2025 18:00:06 +0100 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/cpp.scm (jthread): New variable. Change-Id: I163ab0f8dbd9bc5ed0250612938f82926b07bc92 --- Note: this package appears unused in the rest of the series. gnu/packages/cpp.scm | 95 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 595ec82ccae..9673d607db1 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -118,6 +118,7 @@ (define-module (gnu packages cpp) #:use-module (gnu packages pretty-print) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages tls) + #:use-module (gnu packages tex) #:use-module (gnu packages web) #:use-module (gnu packages webkit) #:use-module (gnu packages xdisorg) @@ -1146,6 +1147,100 @@ (define-public nlohmann-json (define-public json-modern-cxx (deprecated-package "json-modern-cxx" nlohmann-json)) +(define-public jthread + (let ((commit "0fa8d394254886c555d6faccd0a3de819b7d47f8") + (revision "0")) + (package + (name "jthread") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/josuttis/jthread") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "11cq4zh7pv86c62ah5im00gxr4cw6d396dp9117z8s271j4lrp6f")) + (snippet + ;; NOTE: remove precompiled PDFs. + #~(begin + (use-modules (guix build utils)) + (for-each (lambda (file) + (delete-file file)) + (find-files "." ".pdf")) + (delete-file-recursively "doc"))))) + (outputs '("out" "doc")) + (build-system cmake-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (add-after 'unpack 'cd-and-generate-makefile + (lambda _ + (call-with-output-file "source/Makefile.h" + (lambda (port) + ;; GCC 2.95 fails to deal with anonymous unions in glibc's + ;; 'struct_rusage.h', so skip that. + (display "CXX17 := c++ -std=c++17 -pthread\n" port))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "-C" "source")))) + (add-after 'check 'build-docs + (lambda _ + (with-directory-excursion "tex" + ;; NOTE: remove strict versioning. + (substitute* "styles.tex" + (("lst@CheckVersion\\{1.6\\}") + "lst@CheckVersion{1.10}")) + (invoke "pdflatex" "std") + (invoke "pdflatex" "std")))) ;Rerun to update references. + (replace 'install + (lambda _ + (for-each (lambda (file) + (install-file file + (string-append #$output "/include"))) + '("source/condition_variable_any2.hpp" + "source/stop_token.hpp" "source/jthread.hpp")))) + (add-after 'install 'install-doc + (lambda _ + (let ((out (string-append #$output:doc "/share/doc/"))) + (mkdir-p out) + (copy-file "tex/std.pdf" + (string-append out + #$name "-" + #$version ".pdf")))))))) + (native-inputs + (list perl + (texlive-updmap.cfg + (list texlive-ulem + texlive-rsfs + texlive-memoir + texlive-substr + texlive-xcolor + texlive-isodate + texlive-caption + texlive-relsize + texlive-extract + texlive-xpatch + texlive-xkeyval + texlive-jknapltx + texlive-booktabs + texlive-enumitem + texlive-etoolbox + texlive-listings + texlive-microtype + texlive-underscore)))) + (home-page "https://github.com/josuttis/jthread") + (synopsis "C++ class for a joining and cooperative interruptible thread") + (description + "This package provides a reference implementation of @code{std::jthread}, +a cooperatively interruptible thread that is joined upon destruction.") + (license license:cc-by4.0)))) + (define-public tomlplusplus (package (name "tomlplusplus")