From 65f34652c522716bbb060eac0f9e457d949f1eef Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Sat, 25 Jul 2020 11:09:28 -0400 Subject: [PATCH 40/54] gnu: libchamplain: Update package definition. * gnu/packages/gnome.scm (libchamplain) [version]: Update to 0.12.20. [source][sha256]: Modify base32. [patches]: Add libchamplain-memphis-demos.patch. [build-system]: Change from gnu to meson. [outputs]: New outputs "demo" and "doc". [arguments]<#:glib-or-gtk?>: New argument. <#:configure-flags>[--enable-vala]: Remove flag. [-Dmemphis]: New flag. [-Dgtk_doc]: New flag. [-Ddemos]: New flag. <#:phases>['patch-docbook-xml]: New phase. ['enable-demos]: New phase. ['move-doc]: New phase. ['move-demos]: New phase. [native-inputs]: Add docbook-xml, gjs, glib:bin, gtk-doc and python-wrapper. [propagated-inputs]: Remove glib:bin. Add memphis. [synopsis]: Modify. [description]: Modify. [home-page]: Modify. --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 105 +++++++++++++----- .../patches/libchamplain-memphis-demos.patch | 24 ++++ 3 files changed, 104 insertions(+), 26 deletions(-) create mode 100644 gnu/packages/patches/libchamplain-memphis-demos.patch diff --git a/gnu/local.mk b/gnu/local.mk index b70762f4ce..6fe674ffec 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1175,6 +1175,7 @@ dist_patch_DATA = \ %D%/packages/patches/libbase-use-own-logging.patch \ %D%/packages/patches/libbonobo-activation-test-race.patch \ %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \ + %D%/packages/patches/libchamplain-memphis-demos.patch \ %D%/packages/patches/libdrm-realpath-virtio.patch \ %D%/packages/patches/libextractor-exiv2.patch \ %D%/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 73bf202a16..4ad165c764 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -6083,37 +6083,90 @@ implements the ClutterGstPlayer interface using playbin.") (define-public libchamplain (package (name "libchamplain") - (version "0.12.16") - (source (origin - (method url-fetch) - (uri (string-append - "mirror://gnome/sources/libchamplain/0.12/libchamplain-" - version ".tar.xz")) - (sha256 - (base32 - "13chvc2n074i0jw5jlb8i7cysda4yqx58ca6y3mrlrl9g37k2zja")))) - (build-system gnu-build-system) - (arguments '(#:configure-flags '("--enable-vala"))) + (version "0.12.20") + (source + (origin + (method url-fetch) + (uri + (string-append + "mirror://gnome/sources/libchamplain/0.12/libchamplain-" + version ".tar.xz")) + (sha256 + (base32 "0rihpb0npqpihqcdz4w03rq6xl7jdckfqskvv9diq2hkrnzv8ch2")) + (patches + (search-patches + ;; To fix the upstream bug, + ;; https://gitlab.gnome.org/GNOME/libchamplain/-/issues/55 + "libchamplain-memphis-demos.patch")))) + (build-system meson-build-system) + (outputs '("out" "demos" "doc")) + (arguments + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:configure-flags + (list + "-Dmemphis=true" + "-Dgtk_doc=true" + "-Ddemos=true") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "docs/reference" + (substitute* "champlain-docs.xml" + (("http://www.oasis-open.org/docbook/xml/4.1.2/") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/")))) + #t)) + (add-before 'configure 'enable-demos + (lambda _ + (with-directory-excursion "demos" + (substitute* "meson.build" + (("install: false,") + "install: true,"))) + #t)) + (add-after 'install 'move-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc"))) + (mkdir-p (string-append doc "/share")) + (rename-file + (string-append out "/share/gtk-doc") + (string-append doc "/share/gtk-doc")) + #t))) + (add-after 'move-doc 'move-demos + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (demos (assoc-ref outputs "demos"))) + (mkdir-p (string-append demos "/bin")) + (rename-file + (string-append out "/bin") + (string-append demos "/bin")) + #t)))))) (native-inputs - `(("gobject-introspection" ,gobject-introspection) + `(("docbook-xml" ,docbook-xml-4.1.2) + ("gjs" ,gjs) + ("glib:bin" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("gtk-doc" ,gtk-doc) ("pkg-config" ,pkg-config) - ("vala" ,vala))) + ("python" ,python-wrapper) + ("vapigen" ,vala))) (propagated-inputs - `(("libsoup" ,libsoup) - ("sqlite" ,sqlite) + `(("cairo" ,cairo) ("clutter" ,clutter) ("clutter-gtk" ,clutter-gtk) - ("glib:bin" ,glib "bin") ;glib-mkenums, etc. - ("cairo" ,cairo) - ("gtk+3" ,gtk+) - ("glib" ,glib))) - (home-page "https://projects.gnome.org/libchamplain/") - (synopsis "C library providing a ClutterActor to display maps") - (description - "libchamplain is a C library providing a ClutterActor to display maps. -It also provides a Gtk+ widget to display maps in Gtk+ applications. Python -and Perl bindings are also available. It supports numerous free map sources -such as OpenStreetMap, OpenCycleMap, OpenAerialMap, and Maps for free.") + ("glib" ,glib) + ("gtk+" ,gtk+) + ("libsoup" ,libsoup) + ("memphis" ,memphis) + ("sqlite" ,sqlite))) + (synopsis "Map Widget") + (description "LibChamplain is a Gtk+ widget displaying zoomable and pannable +maps that can be loaded from various network sources. It supports overlay +layers, markers, and custom elements displayed on top of the maps. The library +is written in C but other language mappings are also available thanks to +GObject-Introspection.") + (home-page "https://https://wiki.gnome.org/Projects/libchamplain") (license license:lgpl2.1+))) (define-public gom diff --git a/gnu/packages/patches/libchamplain-memphis-demos.patch b/gnu/packages/patches/libchamplain-memphis-demos.patch new file mode 100644 index 0000000000..6ebccd0671 --- /dev/null +++ b/gnu/packages/patches/libchamplain-memphis-demos.patch @@ -0,0 +1,24 @@ +From 84df89f5490e995d271b4ac56999450e94bfd563 Mon Sep 17 00:00:00 2001 +From: Raghav Gururajan +Date: Sat, 25 Jul 2020 10:21:45 -0400 +Subject: [PATCH] [PATCH]: Fix demos build with memphis. + +--- + demos/meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/demos/meson.build b/demos/meson.build +index cf852d1..bf9b3bb 100644 +--- a/demos/meson.build ++++ b/demos/meson.build +@@ -85,6 +85,7 @@ if build_with_memphis and build_gtk_widgetry + dependencies: [ + libchamplain_dep, + libchamplain_gtk_dep, ++ memphis_dep, + ] + ) + endforeach +-- +GitLab + -- 2.27.0