From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:44279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVyfZ-0004Yo-Gs for guix-patches@gnu.org; Wed, 29 May 2019 09:31:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVyfY-0007xi-DF for guix-patches@gnu.org; Wed, 29 May 2019 09:31:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44809) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hVyfY-0007xZ-Aj for guix-patches@gnu.org; Wed, 29 May 2019 09:31:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hVyfY-0002f4-7J for guix-patches@gnu.org; Wed, 29 May 2019 09:31:04 -0400 Subject: [bug#35984] [PATCH 2/9] gnu: Add swap-bytes. Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:43986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVyeX-00042w-8z for guix-patches@gnu.org; Wed, 29 May 2019 09:30:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVyeW-0006cG-6r for guix-patches@gnu.org; Wed, 29 May 2019 09:30:01 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:53767) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVyeW-0006aK-1G for guix-patches@gnu.org; Wed, 29 May 2019 09:30:00 -0400 Received: from localhost.localdomain (lfbn-1-4117-19.w92-169.abo.wanadoo.fr [92.169.116.19]) (Authenticated sender: mail@ambrevar.xyz) by relay11.mail.gandi.net (Postfix) with ESMTPSA id E7377100014 for ; Wed, 29 May 2019 13:29:56 +0000 (UTC) From: Pierre Neidhardt Date: Wed, 29 May 2019 15:29:49 +0200 Message-Id: <20190529132956.7454-2-mail@ambrevar.xyz> In-Reply-To: <20190529132956.7454-1-mail@ambrevar.xyz> References: <20190529132917.7142-1-mail@ambrevar.xyz> <20190529132956.7454-1-mail@ambrevar.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 35984@debbugs.gnu.org * gnu/packages/lisp.scm (cl-swap-bytes, ecl-swap-bytes, sbcl-swap-bytes): New variables. --- gnu/packages/lisp.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 27a868c559..537150dd61 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -5350,3 +5350,39 @@ decoding routines for IDNA, the International Domain Names in Applications.") (define-public ecl-idna (sbcl-package->ecl-package sbcl-idna)) + +(define-public sbcl-swap-bytes + (package + (name "sbcl-swap-bytes") + (build-system asdf-build-system/sbcl) + (version "1.1") + (home-page "https://github.com/sionescu/swap-bytes") + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1qysbv0jngdfkv53y874qjhcxc4qi8ixaqq6j8bzxh5z0931wv55")))) + (inputs + `(("trivial-features" ,sbcl-trivial-features))) + (native-inputs + `(("fiveam" ,sbcl-fiveam))) + (arguments + ;; TODO: Tests fail, why? + `(#:tests? #f)) + (synopsis "Efficient endianness conversion for Common Lisp") + (description "This Common Lisp library provides optimized byte-swapping +primitives. The library can change endianness of unsigned integers of length +1/2/4/8. Very useful in implementing various network protocols and file +formats.") + (license license:expat))) + +(define-public cl-swap-bytes + (sbcl-package->cl-source-package sbcl-swap-bytes)) + +(define-public ecl-swap-bytes + (sbcl-package->ecl-package sbcl-swap-bytes)) -- 2.21.0