From c4412fbc65f1992909cc45ed66ebcb018c66a377 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Tue, 9 Nov 2021 22:34:39 +0100 Subject: [PATCH v3 3/8] gnu: Add libglibutil. * gnu/packages/glib.scm (libglibutil): New variable. diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 61040c91e7..8c024c2df6 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Arthur Margerit ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -76,6 +77,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) @@ -928,6 +930,54 @@ (define-public glibmm-2.64 (modify-inputs (package-propagated-inputs glibmm) (replace "libsigc++" libsigc++-2))))) +(define-public libglibutil + (package + (name "libglibutil") + (version "1.0.65") + (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 + "0sc8xw5cbxcicipjp6ycbgqppn31lzsll4r9j6b0zxd747dziv54")))) + (build-system gnu-build-system) + (arguments + (list #: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 ".."))))))) + (native-inputs (list pkg-config)) + (inputs (list 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 python-pygobject (package (name "python-pygobject") -- 2.37.2