From patchwork Fri Apr 1 10:11:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Scherer X-Patchwork-Id: 38266 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 0B43C27BBEA; Fri, 1 Apr 2022 11:18:48 +0100 (BST) 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 70D0227BBE9 for ; Fri, 1 Apr 2022 11:18:47 +0100 (BST) Received: from localhost ([::1]:60882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naEMg-0003Eg-IP for patchwork@mira.cbaines.net; Fri, 01 Apr 2022 06:18:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naEH8-0007h8-D5 for guix-patches@gnu.org; Fri, 01 Apr 2022 06:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47039) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naEH8-0006x6-3P for guix-patches@gnu.org; Fri, 01 Apr 2022 06:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naEH7-0003pR-So for guix-patches@gnu.org; Fri, 01 Apr 2022 06:13:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54581] Add emacs-sqlite3-api package Resent-From: Roman Scherer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Apr 2022 10:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54581 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Maxime Devos Cc: 54581@debbugs.gnu.org Received: via spool by 54581-submit@debbugs.gnu.org id=B54581.164880797014688 (code B ref 54581); Fri, 01 Apr 2022 10:13:01 +0000 Received: (at 54581) by debbugs.gnu.org; 1 Apr 2022 10:12:50 +0000 Received: from localhost ([127.0.0.1]:40936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naEGs-0003ok-UO for submit@debbugs.gnu.org; Fri, 01 Apr 2022 06:12:50 -0400 Received: from mail-ej1-f53.google.com ([209.85.218.53]:39827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naEGq-0003oQ-RU for 54581@debbugs.gnu.org; Fri, 01 Apr 2022 06:12:46 -0400 Received: by mail-ej1-f53.google.com with SMTP id dr20so4794346ejc.6 for <54581@debbugs.gnu.org>; Fri, 01 Apr 2022 03:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=8b4CAiF7kwyu+GzsYuxK2z7wjm1baRfziSk4xT1z1v8=; b=afqbtw61eeNKJ96o2NeGvJYx0dUujzS/VbXqKG45amXFkKHbBtJL09JyyFfd0QHcvo cTXJdTQO0dAoXMW5knlFHGqUN2sY/Mwhe1Y2DfwWPNVB5y9MEG12YZNoCmNLxsyVZcfS sXkEtWBjGUy0UiiTgmanYOV5tV16A1RvLmk5DVPIcwjR6xZOBSDFxVjdz5WHJrLt89tZ mMO5oaH+TmpBHhx2IiKBX+dVGCjRS1GKbt3ou51euGesNWXrtHAernvmeunczPL/0M3s TvHON6wGbi/94ChBq5hh0FVySuiRvmPyq98lX2Hi1maGubGA19OY7lUFTv8dHgJ/VYex 7PZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=8b4CAiF7kwyu+GzsYuxK2z7wjm1baRfziSk4xT1z1v8=; b=XBczXEEtRuWVKPYfMcojRHmnoDT6cEZOcEP9wNxGktMC0IX0vaUxAtWVAyrZva88CG +OJapazD5u688ypwu6OPqOiAq6VutlNbCREyxG5tj9jLN84rnfHETwgB2WIpN5SL7WIN NZPudEnMGhw/hi8uUnOEgngcEWznQslvgkfHCVYAhe5l+WU7UwBLBEGei/3RuHblwD83 nseA42cN/3KeJk6kxyxwMVnsY6cTkc082hU/7ogEsTfXZhdcWME1yNGfMPoYxxvKsZNp XJS7ur3ywag8CMGsC5aPZ9CmM9beQqau+64fzo/6QhA2ZFnIPt+LlCW8LlhPqxwB+Alc pnng== X-Gm-Message-State: AOAM532oFkk8typzLbNEneDZmTCoilW0KpACV+tjywY3WXah8govZ5zl dpsmLgVwUdRd2/a2PhXW+a2O+oyldTZz8E65 X-Google-Smtp-Source: ABdhPJxt5dV9xEGXtWs8DQ0ETFLANL4+KIuz3BX/MY50XXZpE/srordvM1BXxamf1PwwR/FCiXwpSA== X-Received: by 2002:a17:907:7ba3:b0:6df:b07c:ee35 with SMTP id ne35-20020a1709077ba300b006dfb07cee35mr8695771ejc.588.1648807958541; Fri, 01 Apr 2022 03:12:38 -0700 (PDT) Received: from thinkpad (tmo-117-244.customers.d1-online.com. [80.187.117.244]) by smtp.gmail.com with ESMTPSA id e10-20020a170906748a00b006dfaff31e88sm861896ejl.125.2022.04.01.03.12.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 03:12:38 -0700 (PDT) References: <87ils0g5uz.fsf@burningswell.com> <87zglbs1hp.fsf@burningswell.com> <6cf98cd1d3915a9808c1e074cfa6807d2f570322.camel@telenet.be> <87k0c9kvgb.fsf@burningswell.com> <11f5d0db1bb596cae8e2ee746a8dc77d5d6bbb37.camel@telenet.be> User-agent: mu4e 1.6.10; emacs 28.0.50 From: Roman Scherer Date: Fri, 01 Apr 2022 12:11:39 +0200 In-reply-to: <11f5d0db1bb596cae8e2ee746a8dc77d5d6bbb37.camel@telenet.be> Message-ID: <87fsmxkt7v.fsf@burningswell.com> 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 Ok, thank you. The attached patch uses the inverse condition now. Maxime Devos writes: > [[PGP Signed Part:Undecided]] > Roman Scherer schreef op vr 01-04-2022 om 11:07 [+0200]: >> I changed the #:tests? keyword to (%current-target-system), but I >> noticed the tests of the package are now not run anymore when I build >> the package. Is this expected? > > You need the inverse condition: > > #:tests? ,(not (%current-target-system)) > > otherwise, tests are only run when cross-compiling, and not when > building natively. > > Greetings, > Maxime. > > [[End of PGP Signed Part]] From 2f6a85911d6e6542c5ccbbecaf753605008ed7ea Mon Sep 17 00:00:00 2001 From: r0man Date: Sat, 26 Mar 2022 14:59:01 +0100 Subject: [PATCH] Add emacs-sqlite3-api package This patch adds the emacs-sqlite3-api package to Guix. The package provides a dynamic module for Emacs that allows direct access to the SQLite C interface. It only exposes a subset of the full SQLite C interface, but should satisfy most user's needs. The original source code uses a file called constants.c, which is checked into the repository, but can be generated by running make in the tools directory of the source. However, the procedure to generate this file downloads a list of constants from the SQLite website. We are patching the scripts to generate those constants, to not download anything from the internet to have a stable build process. --- gnu/packages/emacs-xyz.scm | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 42fc13f4c2..b3575e9297 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -5731,6 +5731,67 @@ (define-public emacs-sqlite It is not intended as a user interface.") (license license:gpl3+)))) +(define-public emacs-sqlite3-api + (let ((version "0.15") + (revision "0") + (commit "7cb4b660fe30deb8a4229f3abb18bd99ca9c971c")) + (package + (name "emacs-sqlite3-api") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pekingduck/emacs-sqlite3-api") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1b7if1dp6i5kqwhq25gna89xbca66i4mmgx1a5yn12kncfdgs6d7")))) + (build-system emacs-build-system) + (arguments + `(#:modules ((guix build emacs-build-system) + (guix build emacs-utils) + (guix build utils)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-module-load + (lambda* (#:key outputs #:allow-other-keys) + (chmod "sqlite3.el" #o644) + (emacs-substitute-sexps "sqlite3.el" + ("(require 'sqlite3-api nil t)" + `(module-load ,(string-append (assoc-ref outputs "out") + "/lib/sqlite3-api.so")))))) + (add-before 'check 'build-emacs-module + (lambda* (#:key outputs #:allow-other-keys) + ;; Remove code that fetches constants from the SQLite website + ;; and the call to generate a timestamp. + (invoke "sed" "--in-place" "3,4d;24,28d;31d" "tools/gen-consts.sh") + ;; Remove filter logic from the script that generates the constants. + (invoke "sed" "--in-place" "7,11d;18,22d" "tools/gen-consts.py") + ;; Generate the consts.c file. + (invoke "make" "--directory=tools") + ;; Remove the SQLITE_STATIC and SQLITE_TRANSIENT + ;; constants. They cause a compilation warning and would have + ;; been removed by the original script. + (invoke "sed" "--in-place" "/ifdef SQLITE_STATIC/,+2d" "consts.c") + (invoke "sed" "--in-place" "/ifdef SQLITE_TRANSIENT/,+2d" "consts.c") + ;; Compile the shared object file. + (invoke "make" (string-append "CC=" ,(cc-for-target))) + ;; Move the shared object file into /lib. + (install-file "sqlite3-api.so" + (string-append (assoc-ref outputs "out") + "/lib"))))) + #:tests? ,(not (%current-target-system)) + #:test-command '("make" "test" "EMACS=emacs"))) + (inputs (list sqlite)) + (native-inputs (list python sed)) + (home-page "https://github.com/pekingduck/emacs-sqlite3-api") + (synopsis "Dynamic module for Emacs to access the SQLite C interface") + (description "This package provides a dynamic module for Emacs that allows +direct access to the SQLite C interface. It only exposes a subset of the full +SQLite C interface, but should satisfy most user's needs.") + (license license:gpl3+)))) + (define-public emacs-sr-speedbar (let ((commit "77a83fb50f763a465c021eca7343243f465b4a47") (revision "0")) -- 2.34.0