diff mbox series

[bug#51737,1/4] gnu: Add libglibutil.

Message ID OdeTLBG5QlqX97nEBGy9o2DKstnFnEwvfDLIL2C3dLf0fw846OHRNPnYM1TyJybcYoEe0K_4wBUM4RAzozLjPdMPIF9Fp7eVD-03hJg7jg4=@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:37 a.m. UTC
* gnu/packages/glib.scm (libglibutil): New variable.

--
2.33.1
diff mbox series

Patch

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 8ed1e3a944..6d8a6801da 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -14,6 +14,7 @@ 
 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -68,6 +69,7 @@  (define-module (gnu packages glib)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -749,6 +751,49 @@  (define-public glibmm-2.64
       `(("libsigc++" ,libsigc++)
         ("glib" ,glib)))))

+(define-public libglibutil
+  (package
+    (name "libglibutil")
+    (version "1.0.55")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.sailfishos.org/mer-core/libglibutil")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0zrxccpyfz4jf14zr6fj9b88p340s66lw5cnqkapfa72kl1rnp4q"))))
+    (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 'remove-usr-prefix
+           (lambda* _
+             (substitute* "libglibutil.pc.in"
+               (("/usr/include") (string-append %output "/include")))
+             (substitute* "Makefile"
+               (("usr/") ""))))
+         (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 `(("pkg-config" ,pkg-config)))
+    (inputs `(("glib" ,glib)))
+    (home-page "https://git.sailfishos.org/mer-core/libglibutil")
+    (synopsis "GLib utilites")
+    (description "This package provides library of glib utilities.")
+    (license license:bsd-3)))
+
 (define-public python2-pygobject-2
   (package
     (name "python2-pygobject")