From patchwork Sat Jan 9 14:42:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Legoll X-Patchwork-Id: 26289 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 5BDF527BC0F; Sat, 9 Jan 2021 14:44:17 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,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 A57F827BC0E for ; Sat, 9 Jan 2021 14:44:16 +0000 (GMT) Received: from localhost ([::1]:34968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyFTT-0005ED-TQ for patchwork@mira.cbaines.net; Sat, 09 Jan 2021 09:44:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyFTG-0005Dv-W8 for guix-patches@gnu.org; Sat, 09 Jan 2021 09:44:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyFTF-00028C-V3 for guix-patches@gnu.org; Sat, 09 Jan 2021 09:44:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kyFTF-0007Bt-TN for guix-patches@gnu.org; Sat, 09 Jan 2021 09:44:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45744] [PATCH] gnu: Add libx86emu. Resent-From: Vincent Legoll Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Jan 2021 14:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45744 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45744@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161020339327575 (code B ref -1); Sat, 09 Jan 2021 14:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jan 2021 14:43:13 +0000 Received: from localhost ([127.0.0.1]:51416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyFSS-0007Ah-U8 for submit@debbugs.gnu.org; Sat, 09 Jan 2021 09:43:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:57168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyFSR-0007AZ-3K for submit@debbugs.gnu.org; Sat, 09 Jan 2021 09:43:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyFSQ-00055D-SC for guix-patches@gnu.org; Sat, 09 Jan 2021 09:43:10 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:43392) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyFSN-0001oU-DR for guix-patches@gnu.org; Sat, 09 Jan 2021 09:43:10 -0500 Received: by mail-wr1-x430.google.com with SMTP id y17so11743935wrr.10 for ; Sat, 09 Jan 2021 06:43:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HYuCleAl/9lB1wMazhrFdOW7QJeHCVS9J//nkH5rnVA=; b=m/ooPGJ7T9lGZGV4E8GoKRnfKnu/kSlRmy3+WEZLjDQBbqooc7yuGgXi+phfNuePEv BYSbTG1Ymg7v5xkv+HUJEoVZ4Yzq8MObq1BQ0iERB14k/g/u9B4vWwlLQLTgb7bPviSF 5QZSkmQTo/G5XlIxr8YtFmCFKYGvtMBzhpGOot4kNGXbqpJdumu88vTE8TUyrqoE9z3I BcDGR4gbBBJrDZKLbx4bPqGVCvzI45tENs1R812ojcK36NA5S0VpSDfhs36CpglOiqJc tf7+hkQtOBvuu8nV5+VEhey6UbStVbbdcMkqSOmPcFzIN3C296Ek1tYyc8pyNVEE3Tn5 zyUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HYuCleAl/9lB1wMazhrFdOW7QJeHCVS9J//nkH5rnVA=; b=Z2W1LtF64W55aIMu/MVakWfJ95y4NrLgfWy30rnQmDIDl5/Q3PZyXqJz4TZ1gBXmbF kisIdn3vcC0hEUy14EI0OlveJ00qEyHjdGKdS4AnXHY/MTRfwkUf0KeHNgpch2zAMOye +DCGihj2PD8oJNYr3EKn73x9TEP8F3+5ZchIldu5ZwFiIBfBYhfaDKymWdPH5eNsCXLB +Ddx3lKnGCVC9sRttmbGv+Qma4+Cuaph1+gDADaqx64TkeOX3RYsaJ16zwRN5byv3lRN 2oTKEjBAtJgAe+Dgruy8UL56jsPF15KgBFsrhjJtAu6TfDeVmjX0vhe7ksmLUuZDIRBf SnfA== X-Gm-Message-State: AOAM532Gt6Wf5d3GFrGRmhrHZ/zLQtHuuUxET56YwFVS0xVGSIFSvrOc HAE1FOL5StVac3po5K8uYmEz1a+sg10= X-Google-Smtp-Source: ABdhPJzhubbj0ifXBEpXaUAOEg/Ad8mUI4krNIXFXdhd7Gpu5XSIc+tp4BNjj3PKYCySlukfKX/Rug== X-Received: by 2002:adf:ebc2:: with SMTP id v2mr8400040wrn.88.1610203385881; Sat, 09 Jan 2021 06:43:05 -0800 (PST) Received: from localhost.localdomain (se167-1-82-242-148-1.fbx.proxad.net. [82.242.148.1]) by smtp.gmail.com with ESMTPSA id e17sm17579158wrw.84.2021.01.09.06.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Jan 2021 06:43:05 -0800 (PST) From: Vincent Legoll Date: Sat, 9 Jan 2021 15:42:56 +0100 Message-Id: <20210109144256.2209-1-vincent.legoll@gmail.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=vincent.legoll@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Vincent Legoll Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/emulators.scm (libx86emu): New variable. --- gnu/packages/emulators.scm | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 1d94090f48..4b76dcef79 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -72,6 +72,7 @@ #:use-module (gnu packages music) #:use-module (gnu packages ncurses) #:use-module (gnu packages networking) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) @@ -591,6 +592,53 @@ and Game Boy Color games.") ;; BSD-3, and "discord-rpc" is Expat. (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3 license:expat)))) +(define-public libx86emu + (package + (name "libx86emu") + (version "3.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/wfeldt/libx86emu") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "104xqc6nj9rpi7knl3dfqvasf087hlz2n5yndb1iycw35a6j509b")))) + (build-system gnu-build-system) + (native-inputs + `(("nasm" ,nasm) + ("perl" ,perl))) ; for the `./test/prepare_test' script + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'version-file + (lambda _ + (invoke "chmod" "-x" "./git2log") ; we are not in a full git repository + (with-output-to-file "./VERSION" ; emulate what git2log would have done + (lambda _ + (display ,version))) + #t)) + (replace 'check + (lambda _ + (invoke "make" "test"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "make" "install" + (string-append "DESTDIR=" (assoc-ref outputs "out")) + (string-append "LIBDIR=" (assoc-ref outputs "out") "/usr/lib")) ; avoid using `ldd /bin/sh' to choose between 32 and 64 bits libdir + #t)) + (delete 'configure)))) + (home-page "https://github.com/wfeldt/libx86emu") + (synopsis "x86 emulation library") + (description "libx86emu is a small library to emulate x86 instructions. The +focus here is not a complete emulation (use qemu for this) but to cover enough +for typical firmware blobs. At the moment 'regular' 32-bit instructions are +covered together with basic protected mode support. Not done are fpu, mmx, or +any of the other instruction set extensions.") + (license (license:non-copyleft + "https://github.com/wfeldt/libx86emu/blob/master/LICENSE")))) + (define-public sameboy (package (name "sameboy")