gnu: ocaml-bitstring: Use dune-build-system.

* gnu/packages/ocaml.scm (ocaml-bitstring): Use dune-build-system.
(ocaml4.02-bitstring)[build-system]: Use ocaml-build-system explicitly.
master
Julien Lepiller 2018-11-19 23:28:15 +01:00
parent 59fa09e1cd
commit f93246a541
No known key found for this signature in database
GPG Key ID: 43111F4520086A0C
1 changed files with 42 additions and 53 deletions

View File

@ -1615,31 +1615,19 @@ ocaml-migrate-parsetree")
(sha256 (sha256
(base32 (base32
"15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps")))) "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
(build-system ocaml-build-system) (build-system dune-build-system)
(native-inputs (native-inputs
`(("camlp4" ,camlp4) `(("camlp4" ,camlp4)
("time" ,time) ("time" ,time)
("autoconf" ,autoconf) ("autoconf" ,autoconf)
("automake" ,automake) ("automake" ,automake)
("bisect" ,ocaml-bisect) ("bisect" ,ocaml-bisect)))
("dune" ,dune)))
(propagated-inputs (propagated-inputs
`(("camlp4" ,camlp4) `(("camlp4" ,camlp4)
("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned))) ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
(arguments (arguments
`(#:tests? #f; Tests fail to build `(#:tests? #f; Tests fail to build
#:phases #:jbuild? #t))
(modify-phases %standard-phases
(delete 'configure)
(replace 'build
(lambda _
(invoke "jbuilder" "build" "@install")
#t))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(invoke "dune" "install"
"--prefix" (assoc-ref outputs "out"))
#t)))))
(properties (properties
`((ocaml4.02-variant . ,(delay ocaml4.02-bitstring)))) `((ocaml4.02-variant . ,(delay ocaml4.02-bitstring))))
(home-page "https://github.com/xguerin/bitstring") (home-page "https://github.com/xguerin/bitstring")
@ -1665,44 +1653,45 @@ powerful.")
(base32 (base32
"0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8")) "0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8"))
(patches (search-patches "ocaml-bitstring-fix-configure.patch")))) (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
(arguments (build-system ocaml-build-system)
`(#:ocaml ,ocaml-4.02 (arguments
#:findlib ,ocaml4.02-findlib `(#:ocaml ,ocaml-4.02
#:configure-flags #:findlib ,ocaml4.02-findlib
(list "CAMLP4OF=camlp4of" "--enable-coverage") #:configure-flags
#:make-flags (list "CAMLP4OF=camlp4of" "--enable-coverage")
(list (string-append "BISECTLIB=" #:make-flags
(assoc-ref %build-inputs "bisect") (list (string-append "BISECTLIB="
"/lib/ocaml/site-lib") (assoc-ref %build-inputs "bisect")
(string-append "OCAMLCFLAGS=-g -I " "/lib/ocaml/site-lib")
(assoc-ref %build-inputs "camlp4") (string-append "OCAMLCFLAGS=-g -I "
"/lib/ocaml/site-lib/camlp4 -I " (assoc-ref %build-inputs "camlp4")
"$(BISECTLIB)/bisect") "/lib/ocaml/site-lib/camlp4 -I "
(string-append "OCAMLOPTFLAGS=-g -I " "$(BISECTLIB)/bisect")
(assoc-ref %build-inputs "camlp4") (string-append "OCAMLOPTFLAGS=-g -I "
"/lib/ocaml/site-lib/camlp4 -I " (assoc-ref %build-inputs "camlp4")
"$(BISECTLIB)/bisect")) "/lib/ocaml/site-lib/camlp4 -I "
#:phases "$(BISECTLIB)/bisect"))
(modify-phases %standard-phases #:phases
(add-after 'install 'link-lib (modify-phases %standard-phases
(lambda* (#:key outputs #:allow-other-keys) (add-after 'install 'link-lib
(let* ((out (assoc-ref outputs "out")) (lambda* (#:key outputs #:allow-other-keys)
(stubs (string-append out (let* ((out (assoc-ref outputs "out"))
"/lib/ocaml/site-lib/stubslibs")) (stubs (string-append out
(lib (string-append out "/lib/ocaml/site-lib/stubslibs"))
"/lib/ocaml/site-lib/bitstring"))) (lib (string-append out
(mkdir-p stubs) "/lib/ocaml/site-lib/bitstring")))
(symlink (string-append lib "/dllbitstring.so") (mkdir-p stubs)
(string-append stubs "/dllbitstring.so"))) (symlink (string-append lib "/dllbitstring.so")
#t)) (string-append stubs "/dllbitstring.so")))
(add-before 'configure 'fix-configure #t))
(lambda* (#:key inputs #:allow-other-keys) (add-before 'configure 'fix-configure
(substitute* "Makefile.in" (lambda* (#:key inputs #:allow-other-keys)
(("@abs_top_builddir@") (substitute* "Makefile.in"
(string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH")))) (("@abs_top_builddir@")
(substitute* "configure" (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
(("-/bin/sh") (string-append "-" (assoc-ref inputs "bash") (substitute* "configure"
"/bin/sh")))))))) (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
"/bin/sh"))))))))
(native-inputs (native-inputs
`(("camlp4" ,camlp4-4.02) `(("camlp4" ,camlp4-4.02)
("time" ,time) ("time" ,time)