[PATCH 1/1] gnu: Add camlidl

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal

Debbugs page

Sharlatan Hellseher wrote 4 years ago
(address . guix-patches@gnu.org)
CAO+9K5rgUuK5G_RgCnB04zFL70uPcWEuM8GKzxJ1BrtyfG-teA@mail.gmail.com
Hi Guix team!
I've got some extra packages to extend build of plplot (similar like
in Debian project
Related issues:
Workflow:
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From ce12e3783ad0e63a73a7ddc3471a0c82083b6283 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Wed, 17 Feb 2021 22:45:08 +0000
Subject: [PATCH] gnu: Add camlidl

* gnu/packages/ocaml.scm (camlidl): New variable.
---
gnu/packages/ocaml.scm | 65 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)

Toggle diff (85 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index dec1f8405e..335fec50f0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2020 divoplade <d@divoplade.fr>
;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
+;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -251,6 +252,70 @@ functional, imperative and object-oriented styles of programming.")
for building OCaml library and programs.")
(license license:lgpl2.1+)))
+(define-public camlidl
+ (package
+ (name "camlidl")
+ (version "1.09")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/xavierleroy/camlidl")
+ (commit "camlidl109")))
+ (sha256
+ (base32 "0zrkaq7fk23b2b9vg6jwdjx7l0hdqp4synbbrw1zcg8gjf6n3c80"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;; No test suite
+ #:make-flags
+ (list
+ (string-append
+ "BINDIR=" (assoc-ref %outputs "out") "/bin")
+ (string-append
+ "OCAMLLIB=" (assoc-ref %outputs "out") "/lib/ocaml/site-lib/camlidl"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (let* ((cores (parallel-job-count))
+ (dash-j (format #f "-j~a" cores)))
+ (copy-file "config/Makefile.unix" "config/Makefile")
+ (invoke "make" dash-j "all"))
+ #t))
+ (add-before 'install 'create-target-directories
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (string-append (assoc-ref outputs "out"))))
+ (mkdir-p
+ (string-append out "/bin"))
+ (mkdir-p
+ (string-append out "/lib/ocaml/site-lib/camlidl/stublibs"))
+ (mkdir-p
+ (string-append out "/lib/ocaml/site-lib/camlidl/caml")))
+ #t))
+ (add-after 'install 'install-meta
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (with-output-to-file
+ (string-append out "/lib/ocaml/site-lib/camlidl/META")
+ (lambda _
+ (display
+ (string-append
+ "description = \"Stub code generator for OCaml/C interface\"
+version = \"" ,version "\"
+directory = \"^\"
+archive(byte) = \"com.cma\"
+archive(native) = \"com.cmxa\"")))))
+ #t)))))
+ (native-inputs
+ `(("ocaml" ,ocaml)))
+ (home-page "https://github.com/xavierleroy/camlidl")
+ (synopsis "Stub code generator for OCaml/C interface")
+ (description
+ "Camlidl is a stub code generator for Objective Caml. It generates stub
+code for interfacing Caml with C from an IDL description of the C functions.")
+ (license license:lgpl2.1)))
+
(define-public ocaml-extlib
(package
(name "ocaml-extlib")
--
2.30.0
Ludovic Courtès wrote 4 years ago
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 46603-done@debbugs.gnu.org)
87ft03jcsq.fsf@gnu.org
Hi Sharlatan,

Sharlatan Hellseher <sharlatanus@gmail.com> skribis:

Toggle quote (7 lines)
> From ce12e3783ad0e63a73a7ddc3471a0c82083b6283 Mon Sep 17 00:00:00 2001
> From: Sharlatan Hellseher <sharlatanus@gmail.com>
> Date: Wed, 17 Feb 2021 22:45:08 +0000
> Subject: [PATCH] gnu: Add camlidl
>
> * gnu/packages/ocaml.scm (camlidl): New variable.

Applied with the minor changes below. Thanks!

Ludo’.
Toggle diff (29 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 82a2aac812..0948377d08 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -478,7 +478,8 @@ for building OCaml library and programs.")
(url "https://github.com/xavierleroy/camlidl")
(commit "camlidl109")))
(sha256
- (base32 "0zrkaq7fk23b2b9vg6jwdjx7l0hdqp4synbbrw1zcg8gjf6n3c80"))))
+ (base32 "0zrkaq7fk23b2b9vg6jwdjx7l0hdqp4synbbrw1zcg8gjf6n3c80"))
+ (file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ;; No test suite
@@ -493,10 +494,10 @@ for building OCaml library and programs.")
(delete 'configure)
(replace 'build
(lambda _
- (let* ((cores (parallel-job-count))
- (dash-j (format #f "-j~a" cores)))
- (copy-file "config/Makefile.unix" "config/Makefile")
- (invoke "make" dash-j "all"))
+ (copy-file "config/Makefile.unix" "config/Makefile")
+ ;; Note: do not pass '-jN' as this appears to not be
+ ;; parallel-safe (race condition related to libcamlidl.a).
+ (invoke "make" "all")
#t))
(add-before 'install 'create-target-directories
(lambda* (#:key outputs #:allow-other-keys)
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 46603@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 46603
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help