aboutsummaryrefslogtreecommitdiffstats
path: root/community/gnome-software/445.patch
blob: a60fb67e0957500a506add27fb40ba3ef8c73893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
From e91ea5d802b794947b21d438f3defdfd9309d860 Mon Sep 17 00:00:00 2001
From: Rasmus Thomsen <oss@cogitri.dev>
Date: Fri, 17 Apr 2020 14:45:59 +0200
Subject: [PATCH 1/2] build: use meson functionality to generate .pc file

This should be sufficiently stable now and also fixes a few things
in the pkgconfig file, like minimum required versions of dependants
and also fixes linking against gnome-software with pkgconfig, previously
only -L/usr/lib was passed to the linker and not -lgnome-software
---
 lib/meson.build | 45 +++++++++++----------------------------------
 1 file changed, 11 insertions(+), 34 deletions(-)

diff --git a/lib/meson.build b/lib/meson.build
index 376beebd..a41f63bb 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -1,40 +1,6 @@
 cargs = ['-DG_LOG_DOMAIN="Gs"']
 cargs += ['-DLOCALPLUGINDIR=""']
 
-# we can't use conf as this is set_quoted()
-
-pkconf = configuration_data()
-pkconf.set('prefix', get_option('prefix'))
-pkconf.set('libdir',
-           join_paths(get_option('prefix'),
-                      get_option('libdir')))
-pkconf.set('includedir',
-           join_paths(get_option('prefix'),
-                      get_option('includedir')))
-pkconf.set('GS_PLUGIN_API_VERSION', gs_plugin_api_version)
-pkconf.set('VERSION', meson.project_version())
-configure_file(
-  input : 'gnome-software.pc.in',
-  output : 'gnome-software.pc',
-  install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
-  configuration : pkconf
-)
-
-# XXX: This can probably be used (after testing), once
-# https://github.com/mesonbuild/meson/pull/1688 is merged
-#pkg = import('pkgconfig')
-#
-#pkg.generate(
-#    description : 'GNOME Software is a software center for GNOME',
-#    filebase : 'gnome-software',
-#    name : 'gnome-software',
-#    requires: [ 'gobject-2.0', 'gdk-3.0', 'appstream-glib', 'libsoup-2.4', 'gio-unix-2.0'],
-#    requires_private : [ 'gthread-2.0', 'atk' ],
-#    subdirs : [ 'gnome-software' ],
-#    variables : [ 'plugindir=${libdir}/lib/gs-plugins-' + gs_plugin_api_version ]
-#    version : meson.project_version()
-#)
-
 install_headers([
     'gnome-software.h',
     'gs-app.h',
@@ -98,6 +64,17 @@ libgnomesoftware = static_library(
   c_args : cargs,
 )
 
+pkg = import('pkgconfig')
+
+pkg.generate(
+    libgnomesoftware,
+    description : 'GNOME Software is a software center for GNOME',
+    filebase : 'gnome-software',
+    name : 'gnome-software',
+    subdirs : 'gnome-software',
+    variables : 'plugindir=${libdir}/gs-plugins-' + gs_plugin_api_version,
+)
+
 executable(
   'gnome-software-cmd',
   sources : [
-- 
2.24.1


From d3fae3b356edc59b53e476de19549c118a6bdc78 Mon Sep 17 00:00:00 2001
From: Rasmus Thomsen <oss@cogitri.dev>
Date: Fri, 17 Apr 2020 15:21:25 +0200
Subject: [PATCH 2/2] build: install libgnomesoftware

This is useful for e.g. out-of-tree plugins
---
 lib/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/meson.build b/lib/meson.build
index a41f63bb..1c00d4f3 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -62,6 +62,7 @@ libgnomesoftware = static_library(
   ],
   dependencies : librarydeps,
   c_args : cargs,
+  install: true,
 )
 
 pkg = import('pkgconfig')
-- 
2.24.1