Add patch to fix installation of glade resources for flatpak builds
This commit is contained in:
parent
bb0e064257
commit
c8a6638791
59
fix-glade-installation-directories.patch
Normal file
59
fix-glade-installation-directories.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 09ed933fc4153602d343047abfdb450877b431f1 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Catanzaro <mcatanzaro@igalia.com>
|
||||
Date: Mon, 22 Jul 2019 11:13:10 -0500
|
||||
Subject: [PATCH] Don't install glade files outside build prefix
|
||||
|
||||
When using pkg-config variables to get installation directory locations,
|
||||
we must be careful to redefine any pkgconfig variables necessary to
|
||||
ensure the installation does not occur outside the build prefix. We
|
||||
could do, e.g.:
|
||||
|
||||
module_dir = gladeui_dep.get_pkgconfig_variable(
|
||||
'moduledir',
|
||||
define_variable: ['libdir', libdir)])
|
||||
|
||||
Except in the particular case of glade, this is not possible because the
|
||||
pkg-config file uses absolute paths (i.e. the moduledir variable is not
|
||||
relative to libdir, and not even relative to prefix!) so there's no way
|
||||
to override it. This means we can't use the pkg-config directories at
|
||||
all.
|
||||
|
||||
If bored, fixing glade might be fun to do. In the meantime, we'll need
|
||||
to install these manually. This fixes the files being installed under
|
||||
/usr instead of /app when building a Fedora flatpak.
|
||||
---
|
||||
glade/meson.build | 4 ++--
|
||||
meson.build | 1 +
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/glade/meson.build b/glade/meson.build
|
||||
index 5351d7b..76a6552 100644
|
||||
--- a/glade/meson.build
|
||||
+++ b/glade/meson.build
|
||||
@@ -1,9 +1,9 @@
|
||||
if glade_catalog
|
||||
|
||||
glade_xml = 'libhandy.xml'
|
||||
-module_dir = gladeui_dep.get_pkgconfig_variable('moduledir')
|
||||
+module_dir = join_paths(libdir, 'glade', 'modules')
|
||||
dtd = join_paths(meson.current_source_dir(), 'glade-catalog.dtd')
|
||||
-glade_catalogdir = gladeui_dep.get_pkgconfig_variable('catalogdir')
|
||||
+glade_catalogdir = join_paths(datadir, 'glade', 'catalogs')
|
||||
|
||||
libglade_hdy_sources = [
|
||||
'glade-hdy-header-group.c',
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 655ff9c..fe4c80b 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -109,6 +109,7 @@ add_project_arguments(
|
||||
|
||||
# Setup various paths that subdirectory meson.build files need
|
||||
package_subdir = get_option('package_subdir') # When used as subproject
|
||||
+datadir = join_paths(get_option('datadir'), package_subdir)
|
||||
libdir = join_paths(get_option('libdir'), package_subdir)
|
||||
girdir = join_paths(get_option('datadir'), package_subdir, 'gir-1.0')
|
||||
typelibdir = join_paths(get_option('libdir'), package_subdir, 'girepository-1.0')
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
Name: libhandy
|
||||
Version: 0.0.10
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Library with GTK+ widgets for mobile phones
|
||||
|
||||
License: LGPLv2+
|
||||
URL: https://source.puri.sm/Librem5/libhandy/
|
||||
Source0: https://source.puri.sm/Librem5/libhandy/-/archive/v%{version}/libhandy-v%{version}.tar.bz2
|
||||
|
||||
# This is needed to use libhandy in Fedora flatpak builds. There's no
|
||||
# upstream MR because I don't want to create an account on source.puri.sm.
|
||||
# I've contacted the maintainer, Adrien, to let him know about this patch.
|
||||
Patch0: fix-glade-installation-directories.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gtk-doc
|
||||
BuildRequires: meson
|
||||
@ -57,6 +62,9 @@ developing applications that use %{name}.
|
||||
%{_datadir}/vala/
|
||||
|
||||
%changelog
|
||||
* Mon Jul 22 2019 Michael Catanzaro <mcatanzaro@gnome.org> - 0.0.10-2
|
||||
- Add patch to fix installation of glade resources for flatpak builds
|
||||
|
||||
* Thu Jun 13 2019 Yanko Kaneti <yaneti@declera.com> - 0.0.10-1
|
||||
- Update to 0.0.10
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user