unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 56080@debbugs.gnu.org
Subject: [bug#56080] [PATCH 4/4] gnu: bap: Update to 2.5.0-alpha.
Date: Sun, 19 Jun 2022 09:51:50 +0200	[thread overview]
Message-ID: <20220619075150.10754-4-julien@lepiller.eu> (raw)
In-Reply-To: <20220619075150.10754-1-julien@lepiller.eu>

* gnu/packages/ocaml.scm (bap): Update to 2.5.0-alpha.
---
 gnu/packages/ocaml.scm | 104 ++++++++++++++++++++++-------------------
 1 file changed, 55 insertions(+), 49 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 59a883b400..06fee0ed59 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4074,7 +4074,7 @@ (define-public ocaml-ppx-bap
 (define-public bap
   (package
     (name "bap")
-    (version "2.0.0")
+    (version "2.5.0-alpha")
     (home-page "https://github.com/BinaryAnalysisPlatform/bap")
     (source (origin
               (method git-fetch)
@@ -4084,58 +4084,64 @@ (define-public bap
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0lb9xkfp67wjjqr75p6krivmjra7l5673236v9ny4gp0xi0755bk"))))
+                "1fw9pp0xnssc08qqfkcafffap4f46hw7zmk80gif5yc4nazga8w5"))))
    (build-system ocaml-build-system)
-   (native-inputs
-    `(("ocaml-oasis" ,(package-with-ocaml4.07 ocaml-oasis))
-      ("clang" ,clang-3.8)
-      ("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
-   (propagated-inputs
-    `(("camlzip" ,(package-with-ocaml4.07 camlzip))
-      ("ocaml-bitstring" ,(package-with-ocaml4.07 ocaml-bitstring))
-      ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
-      ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
-      ("ocaml-ezjsonm" ,(package-with-ocaml4.07 ocaml-ezjsonm))
-      ("ocaml-fileutils" ,(package-with-ocaml4.07 ocaml-fileutils))
-      ("ocaml-frontc" ,(package-with-ocaml4.07 ocaml-frontc))
-      ("ocaml-graph" ,(package-with-ocaml4.07 ocaml-graph))
-      ("ocaml-ocurl" ,(package-with-ocaml4.07 ocaml-ocurl))
-      ("ocaml-piqi" ,(package-with-ocaml4.07 ocaml-piqi))
-      ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
-      ("ocaml-utop" ,ocaml4.07-utop)
-      ("ocaml-uuidm" ,(package-with-ocaml4.07 ocaml-uuidm))
-      ("ocaml-uri" ,ocaml4.07-uri)
-      ("ocaml-zarith" ,(package-with-ocaml4.07 ocaml-zarith))))
-   (inputs
-    (list gmp llvm-3.8 ncurses))
    (arguments
-    `(#:use-make? #t
+    (list
+      #:use-make? #t
       #:phases
-      (modify-phases %standard-phases
-        (add-before 'configure 'fix-ncurses
-          (lambda _
-            (substitute* "oasis/llvm"
-              (("-lcurses") "-lncurses"))
-            #t))
-        (replace 'configure
-          (lambda* (#:key outputs inputs #:allow-other-keys)
-            ;; add write for user, to prevent a failure in the install phase
-            (for-each
-              (lambda (file)
-                (let ((stat (stat file)))
-                  (chmod file (+ #o200 (stat:mode stat)))))
-              (find-files "." "."))
-            (invoke "./configure" "--prefix"
-                    (assoc-ref outputs "out")
-                    "--libdir"
-                    (string-append
+      #~(modify-phases %standard-phases
+          (add-before 'configure 'fix-ncurses
+            (lambda _
+              (substitute* "oasis/llvm"
+                (("-lcurses") "-lncurses"))
+              #t))
+          (replace 'configure
+            (lambda* (#:key outputs inputs #:allow-other-keys)
+              (for-each make-file-writable (find-files "." "."))
+              ;; Package name changed
+              (substitute* "oasis/elf-loader"
+                (("bitstring.ppx") "ppx_bitstring"))
+              ;; We don't have a monolithic llvm
+              (substitute* "oasis/llvm.setup.ml.in"
+                (("llvm_static = \"true\"") "true"))
+              (invoke "./configure" "--prefix"
                       (assoc-ref outputs "out")
-                      "/lib/ocaml/site-lib")
-                    "--with-llvm-version=3.8"
-                    "--with-llvm-config=llvm-config"
-                    "--enable-everything"))))
-       #:ocaml ,ocaml-4.07
-       #:findlib ,ocaml4.07-findlib))
+                      "--libdir"
+                      (string-append
+                        (assoc-ref outputs "out")
+                        "/lib/ocaml/site-lib")
+                      (string-append "--with-llvm-version=" #$(package-version llvm))
+                      "--with-llvm-config=llvm-config"
+                      "--disable-ghidra"
+                      "--disable-llvm-static"
+                      "--enable-llvm"
+                      "--enable-everything"))))))
+   (native-inputs (list clang ocaml-oasis ocaml-ounit))
+   (propagated-inputs
+     (list
+       camlzip
+       ocaml-bitstring
+       ocaml-cmdliner
+       ocaml-core-kernel
+       ocaml-ezjsonm
+       ocaml-fileutils
+       ocaml-frontc
+       ocaml-graph
+       ocaml-linenoise
+       ocaml-ocurl
+       ocaml-piqi
+       ocaml-ppx-bap
+       ocaml-ppx-bitstring
+       ocaml-re
+       ocaml-uri
+       ocaml-utop
+       ocaml-uuidm
+       ocaml-yojson
+       ocaml-z3
+       ocaml-zarith))
+   (inputs
+    (list gmp llvm ncurses))
    (synopsis "Binary Analysis Platform")
    (description "Binary Analysis Platform is a framework for writing program
 analysis tools, that target binary files.  The framework consists of a plethora
-- 
2.36.1





  parent reply	other threads:[~2022-06-19  7:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-19  7:18 [bug#56080] [PATCH]: gnu: bap: Update to 2.5.0-alpha Julien Lepiller
2022-06-19  7:51 ` [bug#56080] [PATCH 1/4] gnu: Add ocaml-linenoise Julien Lepiller
2022-06-19  7:51   ` [bug#56080] [PATCH 2/4] gnu: Add ocaml-ppx-bap Julien Lepiller
2022-06-19  7:51   ` [bug#56080] [PATCH 3/4] gnu: Add ocaml-ppx-bitstring Julien Lepiller
2022-06-19  7:51   ` Julien Lepiller [this message]
2022-06-22 20:50 ` [bug#56080] [PATCH]: gnu: bap: Update to 2.5.0-alpha Ludovic Courtès
2022-06-28 17:37   ` bug#56080: " Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220619075150.10754-4-julien@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=56080@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).