From patchwork Sat Feb 6 21:35:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandru-Sergiu Marton X-Patchwork-Id: 26935 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 6C01C27BC22; Sat, 6 Feb 2021 21:36:30 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 485C927BC1E for ; Sat, 6 Feb 2021 21:36:29 +0000 (GMT) Received: from localhost ([::1]:35250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8VFj-0001Lo-E7 for patchwork@mira.cbaines.net; Sat, 06 Feb 2021 16:36:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8VFK-0001LI-J3 for guix-patches@gnu.org; Sat, 06 Feb 2021 16:36:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8VFK-0003Fb-Bl for guix-patches@gnu.org; Sat, 06 Feb 2021 16:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l8VFK-0008N9-9H for guix-patches@gnu.org; Sat, 06 Feb 2021 16:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46352] [PATCH 1/4] gnu: Add dyncall. Resent-From: Alexandru-Sergiu Marton Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 06 Feb 2021 21:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46352 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46352@debbugs.gnu.org Cc: Alexandru-Sergiu Marton Received: via spool by 46352-submit@debbugs.gnu.org id=B46352.161264733532132 (code B ref 46352); Sat, 06 Feb 2021 21:36:02 +0000 Received: (at 46352) by debbugs.gnu.org; 6 Feb 2021 21:35:35 +0000 Received: from localhost ([127.0.0.1]:46569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8VEp-0008Lx-1Q for submit@debbugs.gnu.org; Sat, 06 Feb 2021 16:35:35 -0500 Received: from mout02.posteo.de ([185.67.36.66]:41475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8VEi-0008LS-WB for 46352@debbugs.gnu.org; Sat, 06 Feb 2021 16:35:29 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B0BAD2400FC for <46352@debbugs.gnu.org>; Sat, 6 Feb 2021 22:35:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.ro; s=2017; t=1612647318; bh=7d/dH3lbK4R4g/BEAOiNdCevwRNA95BUJeUHDL6KsyU=; h=From:To:Cc:Subject:Date:From; b=SyxxIMqtpfoqv2oFFlSPwy0lYpJe8+nyeelnRlUmqZIoRaJWRdaNhgfBRtJGTipdJ sx5DAUXEwwjxrFYhGnXKZFF1tCJKTh3aV2JJs4uOtIUYLCWOAUbKXaU6A9mJxsLRvJ cBv7xiMuIgC99ge43bSAK37RHJKOgQH6OrYNyfh8NHTwB/wVbA3QkJ0TiOKEurlfT8 b71+ALP3CmOTR4Va4V9SDwTHUOagumyD9DNP7LljO+7cLcdgFeqN0ZTDSHMUZry8lJ LKw9ln7RMbrk7KXZLI71olZ4MTHohEFdkZqM2E4EgKZNu9H2Hp13+jY7pDavi4Ga2F TClgWhkDlN5PQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DY5DQ0YPnz6tmF; Sat, 6 Feb 2021 22:35:17 +0100 (CET) From: Alexandru-Sergiu Marton Date: Sat, 6 Feb 2021 23:35:08 +0200 Message-Id: <20210206213511.11551-1-brown121407@posteo.ro> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210206213332.11417-1-brown121407@posteo.ro> References: <20210206213332.11417-1-brown121407@posteo.ro> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/c.scm (dyncall): New variable. --- gnu/packages/c.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index d9e5e4d7de..db9938003f 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020 Katherine Cox-Buday ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2020 Greg Hogan +;;; Copyright © 2021 Alexandru-Sergiu Marton ;;; ;;; This file is part of GNU Guix. ;;; @@ -614,3 +615,41 @@ event stream encoding, a binary format for bidirectional client-server communication.") (home-page "https://github.com/awslabs/aws-c-event-stream") (license license:asl2.0))) + +(define-public dyncall + (package + (name "dyncall") + (version "1.2") + (source (origin + (method url-fetch) + (uri (string-append "https://www.dyncall.org/r" version + "/dyncall-" version ".tar.gz")) + (sha256 + (base32 + "1mq832l2w17mvxd1sq50my8ykjfyzd52kizm0h3mc89l4k0590g8")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "CC=" ,(cc-for-target))) + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((bash (string-append (assoc-ref inputs "bash") + "/bin/bash")) + (out (assoc-ref outputs "out"))) + (invoke bash "./configure" + (string-append "--prefix=" out))))) + (replace 'check + (lambda* (#:key inputs #:allow-other-keys) + (let ((make (string-append (assoc-ref inputs "make") + "/bin/make"))) + (invoke make "tests" + (string-append "CC=" ,(cc-for-target))))))))) + (synopsis "Library for calling C functions dynamically") + (description "The dyncall library encapsulates architecture-, OS- and +compiler-specific function call semantics in a virtual bind argument +parameters from left to right and then call interface allowing programmers to +call C functions in a completely dynamic manner.") + (home-page "https://www.dyncall.org/") + (license license:isc)))