From patchwork Thu May 11 09:39:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: c4droid X-Patchwork-Id: 49933 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 B588827BBEE; Thu, 11 May 2023 10:42:31 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, 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 0025627BBED for ; Thu, 11 May 2023 10:42:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1px2oJ-0004Qh-0O; Thu, 11 May 2023 05:42:07 -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 1px2oF-0004OD-6P for guix-patches@gnu.org; Thu, 11 May 2023 05:42:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1px2oE-0004UQ-TX for guix-patches@gnu.org; Thu, 11 May 2023 05:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1px2oE-0004tP-7p for guix-patches@gnu.org; Thu, 11 May 2023 05:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63442] [PATCH] gnu: unicorn: Update to 2.0.1.post1. Resent-From: c4droid Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 May 2023 09:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63442 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63442@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168379809318766 (code B ref -1); Thu, 11 May 2023 09:42:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 May 2023 09:41:33 +0000 Received: from localhost ([127.0.0.1]:49750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px2nl-0004sc-8X for submit@debbugs.gnu.org; Thu, 11 May 2023 05:41:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:42830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1px2nf-0004sP-CK for submit@debbugs.gnu.org; Thu, 11 May 2023 05:41:31 -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 1px2nd-0004D5-2o for guix-patches@gnu.org; Thu, 11 May 2023 05:41:25 -0400 Received: from out203-205-221-221.mail.qq.com ([203.205.221.221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1px2nO-0004Ht-A5 for guix-patches@gnu.org; Thu, 11 May 2023 05:41:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1683798064; bh=GlICWR2UMUA5MG2XO75yJc8rlXYuYb+0RwmqmjsauSg=; h=Date:From:To:Subject; b=Py7aPtMRoaQbU6IJbR3gqPTsq06vlR2GMBub9+Y9N65W4qGIba5AjC2Q934PmCxoy DDOPiKWDLqAZEcyLrP8N9cMB62tSzTHVdbbDAgngqLesn3gIj2wyfhIKkNCSvjbeLl YTVMWU6AHfse8sZxexorcDbitQaYkBfPzF7do3Ws= Received: from Workstation ([113.200.58.194]) by newxmesmtplogicsvrsza12-0.qq.com (NewEsmtp) with SMTP id 9F7A4640; Thu, 11 May 2023 17:39:55 +0800 X-QQ-mid: xmsmtpt1683797995tjoa666sp Message-ID: X-QQ-XMAILINFO: NKv2G1wnhDBnlmyiugii+WyISp6pYwDsu6hlVDZart0RxS7iX8w3TSLIU0Mzkp T0s+rh9kRRRVM1GIcCd0QuvnnbvF9rPbNS0dwNCZUOqJYFbm/HqzedaqfxCm6s8cOXC20B4X2Xub zXaUUeu+yFC0licVz9N0MbAO2JxEXJEzEXue3M5H2gBq6/yEYuv/5O1Oy5NGjEvI02Z1nTh0ZmQr BJVxHU2Cr2bB/0nsysWJ8LWpo2siGoBEaseKDNQgNmv4sMsd2w0L5pVz/6V4PxL3/VJT4i0SXlSu WmugXbV69WZ4Ab1ckmM46+R4PLE/48J/6MxJfJUrX6KoaXiW7W9YE4Uqff4mmThMgHzBKZB2AvSc 5trX5xYNt6lG45h0Qwoj06fmGtqStE8ejmiEL1TqnsrwCBFo7umoU3DtuPNka6tQ7rMvNy6geFwr PG+nnzSgLFDYA/De+VuQc1BDeRvLNzWB27RbvbWRJ+pSTKxcXsBt48P+Ihn8AR9O93BZsDcN7Yh6 STSFG/Aj9hFnMsQd3wSKw3ytqEe4zkmqQVoodulmt5jAHhqy+0BSl9hVAooROrOnMhS5Bg3afE6v Tu/pvUxYbEz6DQcye+jo362MzodYo+GU5kxfjG5p9K87AY64pvpCjdLS6KaCbBTrIL5+pwEdVFkb xpbF8pZERbA0fyTAxdhPPTlaXpIo9EwUKGIaK88Jrm+gRZtioBRWIvCA05RUHEVj9WvFtbafxEpb /978t6PSrUBn0w3cTIjVmnkCteJLJDrhJ7HYhaDVc3FiYvtKmO4NDwmBk7buNU4KLt3iBjQU67zh tO/tGIIJ0hYHiUbmtSSv9oe1dC0VQM8EImuXzZNMsSZ1epQx33ZsGGlmTDC8+6Bu3HxZp8VFoYeH MF4M0/f7uacnMbNxtRDp/jdK8enfBJY4J3WmJ9k0TkGI3p25zsbcTKyG/ZdFAUOViRH918n6H9mf NvCo2FloIaUrkroZGtKg== Date: Thu, 11 May 2023 17:39:55 +0800 From: c4droid X-OQ-MSGID: MIME-Version: 1.0 Content-Disposition: inline Received-SPF: pass client-ip=203.205.221.221; envelope-from=c4droid@foxmail.com; helo=out203-205-221-221.mail.qq.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 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, HELO_DYNAMIC_IPADDR=1.951, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi, Guix! I noticed unicorn is using pyproject now, so I update the unicorn definition in my guix fork, I tested it on my local machine it can be built successfully. diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 13b60223..cc33c107 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -59,6 +59,7 @@ (define-module (gnu packages emulators) #:use-module (gnu packages build-tools) #:use-module (gnu packages cdrom) #:use-module (gnu packages check) + #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages cross-base) #:use-module (gnu packages curl) @@ -111,7 +112,8 @@ (define-module (gnu packages emulators) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) - #:use-module (guix build-system python)) + #:use-module (guix build-system python) + #:use-module (guix build-system pyproject)) (define-public vice (package @@ -2170,106 +2172,24 @@ (define-public bsnes performance, features, and ease of use.") (license license:gpl3))) -;; python-pwntools requires a -rc release of unicorn (define-public unicorn - (let ((unless-x86 - (lambda (code) - (if (member (%current-system) '("x86_64-linux" "i686-linux")) - '() - code)))) - (package - (name "unicorn") - (version "1.0.2-rc4") - ;; NOTE: unicorn ships a bundled QEMU, but with a lot of custom modifications. - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/unicorn-engine/unicorn") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "17nyccgk7hpc4hab24yn57f1xnmr7kq4px98zbp2bkwcrxny8gwy")))) - (outputs '("out" "python")) - ;; The main library is not written in Python, but the build process has - ;; little in common with any defined build system, so we might as well - ;; build on top of python-build-system and make use of all - ;; the Python-specific phases that can be reused. - (build-system python-build-system) - (arguments - `(#:modules ((srfi srfi-26) - (guix build python-build-system) - (guix build utils)) - #:phases - (modify-phases %standard-phases - (add-before 'build 'build-library - (lambda* (#:key inputs #:allow-other-keys) - (invoke "make" - "-j" (number->string (parallel-job-count)) - "UNICORN_STATIC=no" - "CC=gcc"))) - (add-after 'build-library 'install-library - (lambda* (#:key outputs #:allow-other-keys) - (invoke "make" "install" - "UNICORN_STATIC=no" - (string-append - "PREFIX=" - (assoc-ref outputs "out"))))) - (add-before 'build 'prepare-bindings - (lambda* (#:key outputs #:allow-other-keys) - (chdir "bindings/python") - ;; Set this environment variable so that the Python bindings - ;; don't build their own copy of the shared object, but use - ;; a dummy value such that the bindings test suite uses the - ;; same mechanism for loading the library as any other user. - (setenv "LIBUNICORN_PATH" "1") - (substitute* "unicorn/unicorn.py" - (("_path_list = \\[.*") - (string-append - "_path_list = [\"" - (assoc-ref outputs "out") - ;; eat the rest of the list - "/lib\"] + 0*["))) - #t)) - (add-before 'check 'check-library - (lambda* (#:key outputs #:allow-other-keys) - (for-each - (lambda (suite) - (with-directory-excursion - (string-append "../../tests/" suite) - (invoke "make" "test" "CC=gcc" - ,@(unless-x86 - '("AS=i686-unknown-linux-gnu-as" - "OBJCOPY=i686-unknown-linux-gnu-objcopy"))))) - '("unit" "regress")) - #t)) - (add-after 'install 'install-samples - (lambda* (#:key outputs #:allow-other-keys) - (let* ((python-samples (find-files "." "sample_.*")) - (c-samples (find-files "../../samples" ".*\\.c")) - (python-docdir - (string-append (assoc-ref outputs "python") - "/share/doc/unicorn/samples")) - (c-docdir - (string-append (assoc-ref outputs "out") - "/share/doc/unicorn/samples"))) - (for-each (cut install-file <> c-docdir) c-samples) - (for-each (cut install-file <> python-docdir) python-samples) - #t)))))) - (native-inputs - ;; NOTE: cross-binutils needs to be wrapped with unless-x86, as otherwise - ;; the linker provided by the package will be used, circumventing the ld-wrapper. - `(,@(unless-x86 - `(("assembler-for-tests" ,(cross-binutils "i686-unknown-linux-gnu")))) - ("cmocka" ,cmocka) - ("hexdump-for-tests" ,util-linux))) - (home-page "https://www.unicorn-engine.org") - (synopsis "Unicorn CPU emulator framework") - (description - "Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator + (package + (name "unicorn") + (version "2.0.1.post1") + (source (origin + (method url-fetch) + (uri (pypi-uri name version)) + (sha256 + (base32 + "0mlfs8qfi0clyncfkbxp6in0cpl747510i6bqymwid43xcirbikz")))) + ;; NOTE: Unicorn 2 using pyproject to build + (build-system pyproject-build-system) + (native-inputs (list cmake pkg-config)) + (home-page "http://www.unicorn-engine.org") + (synopsis "Unicorn CPU emulator framework") + (description "Uniforn is a lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU.") - (license license:gpl2+)))) + (license license:gpl2+))) (define-public ppsspp (package