~ruther/guix-local

0aeb38eac6f0e8ab22d34faf4dae275f17a5fea1 — Danny Milosavljevic 1 year, 6 months ago 84e5c2d
gnu: Add modglue.

* gnu/packages/patches/modglue-fix-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add reference to it.
* gnu/packages/engineering.scm (modglue): New variable.

Change-Id: I3ffe9e8b258f49021a21b17f088bebb44245cbad
3 files changed, 53 insertions(+), 0 deletions(-)

M gnu/local.mk
M gnu/packages/engineering.scm
A gnu/packages/patches/modglue-fix-build.patch
M gnu/local.mk => gnu/local.mk +1 -0
@@ 1829,6 1829,7 @@ dist_patch_DATA =						\
  %D%/packages/patches/mpc123-initialize-ao.patch		\
  %D%/packages/patches/mpg321-CVE-2019-14247.patch		\
  %D%/packages/patches/mpg321-gcc-10.patch			\
  %D%/packages/patches/modglue-fix-build.patch		\
  %D%/packages/patches/module-init-tools-moduledir.patch	\
  %D%/packages/patches/monero-use-system-miniupnpc.patch			\
  %D%/packages/patches/mono-1.2.6-bootstrap.patch		\

M gnu/packages/engineering.scm => gnu/packages/engineering.scm +35 -0
@@ 4812,6 4812,41 @@ server for Python and pypy3.")
    (home-page "https://freeopcua.github.io/")
    (license license:lgpl3+)))

(define-public modglue
  (package
    (name "modglue")
    (version "1.20")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://github.com/kpeeters/modglue.git")
                     (commit "89d65f5be9c737123b7beb721bd96c4eed650d9a")))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0cfrp2wyyfb6c71s5skg2g7gdg7bpvv77x6rvw7r9dqvamxsgmih"))
              (patches
               (search-patches "modglue-fix-build.patch"))))
    (build-system gnu-build-system)
    (arguments
     `(#:parallel-build? #f
       #:make-flags
       (list "TIMESTAMP=-DDATETIME=\\\"\\\" -DHOSTNAME=\\\"\\\"")
       #:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda _
             (invoke "make" "-C" "src" "tests"))))))
    (native-inputs
     (list pkg-config libtool))
    (inputs
     (list libsigc++-2))
    (synopsis "C++ library for handling of multiple co-processes")
    (description "This package provides a C++ library for handling of
multiple co-processes in cadabra.")
    (home-page "https://cadabra.science/")
    (license license:gpl2+)))

(define-public cadabra2
  (package
    (name "cadabra2")

A gnu/packages/patches/modglue-fix-build.patch => gnu/packages/patches/modglue-fix-build.patch +17 -0
@@ 0,0 1,17 @@
Author: Danny Milosavljevic <dannym+c@friendly-machines.com>
Date: 23 Dec 2024
License: GPL2+

diff -ru orig/l34h8423ap03vfm6xj8lby3363vgbg5l-modglue-1.20-checkout/src/pipe.cc l34h8423ap03vfm6xj8lby3363vgbg5l-modglue-1.20-checkout/src/pipe.cc
--- orig/l34h8423ap03vfm6xj8lby3363vgbg5l-modglue-1.20-checkout/src/pipe.cc	2024-12-23 20:23:47.132475052 +0100
+++ l34h8423ap03vfm6xj8lby3363vgbg5l-modglue-1.20-checkout/src/pipe.cc	2024-12-23 20:24:08.028172621 +0100
@@ -241,8 +241,8 @@
 		struct iovec iov[1];
 		struct msghdr msg;
 		struct {
-				struct cmsghdr cm;
 				int  fd;
+				struct cmsghdr cm;
 		} cmsg;
 		
 		memset( &msg, 0, sizeof(msg) );