From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id qHnKMSzYQmU0pAAA9RJhRA:P1 (envelope-from ) for ; Wed, 01 Nov 2023 23:58:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qHnKMSzYQmU0pAAA9RJhRA (envelope-from ) for ; Wed, 01 Nov 2023 23:58:52 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8C62014B12 for ; Wed, 1 Nov 2023 23:58:52 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b="jMh/UmMp"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698879532; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=A1ZHrAkP+UNzCvRAXTdTT00UX9wdra+yd2TR68SMCig=; b=CDfAQZLu03Xzi9EvJz6unsfQEGIX9uLbcc8uubwuzMr/y6AM5Ah/3H620IlZiGDPXu+Juc OSvqr4ejg0Xz8pmmw/tOczRwBcCV92p/rX19LqmvYxOcyX1m/b7AVQwL4keKL2J4mLhMcj L88sB0oXG0cZNaY2MMO7KTu3mXcbwJw3RerthF1P/yZCd0ME54p1d4m/gTlAR4YM6U6TpG zyk+Y7VMGy3uEnDhpI2Yic3oSjKEX0zTmDoPqpl7kZkj7AsRhdY0V1C71ExlVR6Uh2QCCO QAUrW9Yk/leVhvoCERU24PhmGOTadO8G86EqgSl5y9d+ikA7ktqxMWNADHx3uA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b="jMh/UmMp"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698879532; a=rsa-sha256; cv=none; b=AL8YFQC03P+KnqJkgOqCU4HQ8e39fi6/9Gq9ZMwO4Y4pOVL0TQiPoVMSM0OEKZZoDsCexm yCn+z08K2otfGdC6p08FbPO6+52fjZkVTmZpxLPsueCvXXMJyOXpKaSVyYsha8YhVRjYC5 lrsNxjbmzkeH4k4ExyGte59pWhvCfdlW+BDx5l0RFuq6rP2Ec6a7jOxsNuHCmMwg9otH+E 0O0dIhl95ZP10hIRAXyTFikyibNzImzKcgQU2WfnIjLidVwlF0cpTNN5R6vusGG+Ls3D1H EQgmyCoggphYe/glVAmCePQNFITxhQb1Hdi7VgZ9P2yrfWdsJLb5iTTLZHkARQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyKAO-0002yM-SR; Wed, 01 Nov 2023 18:58:28 -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 1qyKAN-0002y5-CV for guix-patches@gnu.org; Wed, 01 Nov 2023 18:58:27 -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 1qyKAN-0002eh-4K for guix-patches@gnu.org; Wed, 01 Nov 2023 18:58:27 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyKAv-00008f-N4 for guix-patches@gnu.org; Wed, 01 Nov 2023 18:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66889] [PATCH 1/2] gnu: Add pcg-c. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Nov 2023 22:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66889 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66889@debbugs.gnu.org Cc: David Elsing Received: via spool by 66889-submit@debbugs.gnu.org id=B66889.1698879500442 (code B ref 66889); Wed, 01 Nov 2023 22:59:01 +0000 Received: (at 66889) by debbugs.gnu.org; 1 Nov 2023 22:58:20 +0000 Received: from localhost ([127.0.0.1]:53487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyKAG-000073-2U for submit@debbugs.gnu.org; Wed, 01 Nov 2023 18:58:20 -0400 Received: from mout01.posteo.de ([185.67.36.65]:41293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyKAD-00006m-O0 for 66889@debbugs.gnu.org; Wed, 01 Nov 2023 18:58:19 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 19116240027 for <66889@debbugs.gnu.org>; Wed, 1 Nov 2023 23:57:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698879457; bh=sqARyrM0aLI29QB2VF9GybgySBMyuP/3pCRbajb0wtk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=jMh/UmMp3wMwTxO7eAVmWIiENm/nHjlaFoGWx2RbILaWv83iefeih/90xCnxjvVZI 8qYZRgQ3ErBzTwAo00DN/lym3261c86PG8LUnyHg0/yRoXpJ1O/k+LfCc6NCY6J2zs p+Aup1AZF0JmlhA0+JGhIrljaf8aFxQbW99NB4w9eEFrgvROrljTFUcSHKa902aA/K 54wZ+ZrAQHi1OwuySEFW15H2cpzkra/Xl0qBP47xXa9ygkJJRXl+P++JSCF9j4Wlnl E0Te/vKYquifrEVU4bZzFOnU9IB8EdrukcVucGH58D0qpprGS46vf9GqRhKKlH98fc cRssHOSCOFGkA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SLMpm4mvhz9rxG; Wed, 1 Nov 2023 23:57:36 +0100 (CET) From: David Elsing Date: Wed, 1 Nov 2023 22:57:14 +0000 Message-ID: <1c639973fbed48a27da78c45d4332f3cae458738.1698878711.git.david.elsing@posteo.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 3.69 X-Spam-Score: 3.69 X-Migadu-Queue-Id: 8C62014B12 X-Migadu-Scanner: mx13.migadu.com X-TUID: WmKEN3+1KUk4 * gnu/packages/c.scm (pcg-c): New variable. --- gnu/packages/c.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index ea58c68262..0c218b9656 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2022 Antero Mejr ;;; Copyright © 2023 zamfofex ;;; Copyright © 2023 Foundation Devices, Inc. +;;; Copyright © 2023 David Elsing ;;; ;;; This file is part of GNU Guix. ;;; @@ -1585,3 +1586,57 @@ (define-public ispc program instances execute in parallel on the hardware.") (home-page "https://github.com/ispc/ispc") (license license:bsd-3))) + +(define-public pcg-c + (let ((commit "83252d9c23df9c82ecb42210afed61a7b42402d7") + (revision "1")) + (package + (name "pcg-c") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/imneme/pcg-c") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0768h0vw75a3smk39qsz1504v04a43s5w1ili1ijbixxv8gm42nf")) + (modules '((guix build utils))) + ;; Autogenerated files with some tests from test-high. If + ;; 128-bit integers are not supported, the build fails, but + ;; this is checked when building the tests. + (snippet #~(delete-file-recursively "sample")))) + (build-system gnu-build-system) + (arguments + (list + #:test-target "test" + #:make-flags + #~(list + "CC=gcc" + (string-append "PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'disable-sample + (lambda _ + (substitute* "Makefile" + ((".*cd sample.*") "")))) + (add-after 'unpack 'set-shared-library + (lambda _ + (substitute* '("Makefile" "src/Makefile") + (("\\.a") "\\.so") + ((".*ar .*") "\t$(CC) $(CFLAGS) -o $@ $(LDFLAGS) -shared $^") + ((".*ranlib.*") "") + ((".*CFLAGS \\+=.*O3.*" orig) + (string-append orig "CFLAGS += -fPIC\n"))))) + (add-before 'install 'make-dirs + (lambda _ + (mkdir-p (string-append #$output "/lib")) + (mkdir-p (string-append #$output "/include"))))))) + (home-page "https://www.pcg-random.org") + (synopsis "C implementation of the PCG random generators") + (description "The Permuted Congruential Generator (PCG) extends the +Linear Congruential Generator (LCG) with a permutation function to increase +output randomness while retaining speed, simplicity, and conciseness.") + (license (list license:expat license:asl2.0))))) ; dual licensed -- 2.41.0