diff mbox series

[bug#51737,2/4] gnu: Add libgbinder.

Message ID f0X-fmjm6HpduBHb9LOM6szjKRf30FPp9PkW4LfeCuokGHn0dwF36saOvMdaodwMl0Bo0sncib1Etr7ZZANwLu6-sV6c7SWCzlEH8wGaBOc=@protonmail.com
State New
Headers show
Series [bug#51737,1/4] gnu: Add libglibutil. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

phodina Nov. 10, 2021, 1:38 a.m. UTC
* gnu/packages/glib.scm (libgbinder): New variable.

--
2.33.1
diff mbox series

Patch

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 6d8a6801da..4f3e026d1b 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -751,6 +751,59 @@  (define-public glibmm-2.64
       `(("libsigc++" ,libsigc++)
         ("glib" ,glib)))))

+(define-public libgbinder
+  (package
+    (name "libgbinder")
+    (version "1.1.13")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mer-hybris/libgbinder")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "054kghsyyxk7lbsgwis1fczbgjlh0g0x6smwvcczd8dqacfclvpy"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
+                          (string-append "DESTDIR=" %output))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'fix-pkg-config-in
+           (lambda* _
+             (substitute* "Makefile"
+               (("usr/") ""))
+             (substitute* "libgbinder.pc.in"
+               (("@libdir@") (string-append (assoc-ref %outputs "out") "/lib"))
+               (("/usr/include") (string-append %output "/include")))))
+         (add-after 'install 'install-dev
+           (lambda* _
+             (invoke "make" "install-dev" (string-append "DESTDIR=" %output))))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (chdir "test")
+               (invoke "make" (string-append "CC=" ,(cc-for-target)))
+               (chdir "..") #t))))))
+    (native-inputs `(("bison" ,bison)
+                     ("flex" ,flex)
+                     ("pkg-config" ,pkg-config)))
+    (inputs `(("glib" ,glib)
+              ("libglibutil" ,libglibutil)))
+    (home-page "https://github.com/mer-hybris/libgbinder")
+    (synopsis "GLib-style interface to binder")
+    (description "This package provides GLib-style interface to binder:
+@enumerate
+@item Integration with GLib event loop
+@item Detection of 32 vs 64 bit kernel at runtime
+@item Asynchronous transactions that don't block the event thread
+@item Stable service manager and low-level transation APIs
+@end enumerate")
+    (license license:bsd-3)))
+
 (define-public libglibutil
   (package
     (name "libglibutil")