Meson build fixups

This commit is contained in:
Lubomir Rintel 2017-11-08 11:32:30 +01:00
parent 9ba8afd970
commit 769850b499
3 changed files with 202 additions and 2 deletions

View File

@ -0,0 +1,25 @@
From b5a1297a027d47ffcf248df8e95eb4268e737b98 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Wed, 8 Nov 2017 10:34:37 +0100
Subject: [PATCH 1/2] meson: belatedly bump the version
(cherry picked from commit f5f919e903bb9ffe2e5ee34a59ccb78792c08c3b)
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index c8583c6a..658b2a8c 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project(
'network-manager-applet', 'c',
- version: '1.8.5',
+ version: '1.8.6',
license: 'GPL2+',
default_options: [
'b_lundef=true',
--
2.14.2

View File

@ -0,0 +1,170 @@
From 93a73fe56a59bedd0e7a9e6628029f4c4b57ed98 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Tue, 7 Nov 2017 22:11:47 +0100
Subject: [PATCH 2/2] meson: Make sure the entire wireless-security static lib
is used
Otherwise ld will not link in the gresources, which contain no "needed"
(as far as ld can determine) symbols.
(cherry picked from commit 6a0967b1b013dfff01da681006a825050bb06661)
---
src/connection-editor/meson.build | 5 +++--
src/libnm-gtk/meson.build | 5 +++--
src/libnma/meson.build | 5 +++--
src/meson.build | 10 +++++++++-
src/wireless-security/meson.build | 10 ----------
5 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/src/connection-editor/meson.build b/src/connection-editor/meson.build
index 990f1b47..004303e4 100644
--- a/src/connection-editor/meson.build
+++ b/src/connection-editor/meson.build
@@ -76,14 +76,14 @@ incs = [
top_inc,
utils_inc,
src_inc,
- shared_inc
+ shared_inc,
+ wireless_security_inc
]
deps = [
gtk_dep,
libnm_dep,
libnma_dep,
- libwireless_security_libnm_dep,
m_dep
]
@@ -117,6 +117,7 @@ executable(
c_args: cflags,
link_args: ldflags,
link_depends: linker_script_ver,
+ link_whole: libwireless_security_libnm,
install: true,
install_dir: nma_bindir
)
diff --git a/src/libnm-gtk/meson.build b/src/libnm-gtk/meson.build
index 9aaf2194..cc6785da 100644
--- a/src/libnm-gtk/meson.build
+++ b/src/libnm-gtk/meson.build
@@ -39,7 +39,8 @@ incs = [
top_inc,
shared_inc,
src_inc,
- libnma_inc
+ libnma_inc,
+ wireless_security_inc
]
deps = [
@@ -47,7 +48,6 @@ deps = [
gudev_dep,
libnm_glib_dep,
libutils_libnm_glib_dep,
- libwireless_security_libnm_glib_dep
]
cflags = [
@@ -77,6 +77,7 @@ libnm_gtk = shared_library(
c_args: cflags,
link_args: ldflags,
link_depends: symbol_map,
+ link_whole: libwireless_security_libnm_glib,
install: true,
install_dir: nma_libdir
)
diff --git a/src/libnma/meson.build b/src/libnma/meson.build
index 0659268a..98a72aa7 100644
--- a/src/libnma/meson.build
+++ b/src/libnma/meson.build
@@ -47,7 +47,8 @@ incs = [
top_inc,
shared_inc,
src_inc,
- libnma_inc
+ libnma_inc,
+ wireless_security_inc
]
deps = [
@@ -55,7 +56,6 @@ deps = [
gudev_dep,
libnm_dep,
libutils_libnm_dep,
- libwireless_security_libnm_dep
]
cflags = [
@@ -102,6 +102,7 @@ libnma = shared_library(
c_args: cflags,
link_args: ldflags,
link_depends: symbol_map,
+ link_whole: libwireless_security_libnm,
install: true,
install_dir: nma_libdir
)
diff --git a/src/meson.build b/src/meson.build
index c8e28723..45ff2463 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -61,13 +61,20 @@ sources += gnome.compile_resources(
dependencies: resource_data
)
+incs = [
+ top_inc,
+ utils_inc,
+ src_inc,
+ shared_inc,
+ wireless_security_inc
+]
+
deps = [
gtk_dep,
libnm_dep,
libnma_dep,
libnotify_dep,
libsecret_dep,
- libwireless_security_libnm_dep,
m_dep
]
@@ -109,6 +116,7 @@ executable(
c_args: cflags,
link_args: ldflags,
link_depends: linker_script_ver,
+ link_whole: libwireless_security_libnm,
install: true,
install_dir: nma_bindir
)
diff --git a/src/wireless-security/meson.build b/src/wireless-security/meson.build
index e3efcdb4..a4fbe97d 100644
--- a/src/wireless-security/meson.build
+++ b/src/wireless-security/meson.build
@@ -57,11 +57,6 @@ libwireless_security_libnm = static_library(
dependencies: deps
)
-libwireless_security_libnm_dep = declare_dependency(
- link_with: libwireless_security_libnm,
- include_directories: wireless_security_inc
-)
-
if enable_libnm_gtk
deps = [
gtk_dep,
@@ -78,9 +73,4 @@ if enable_libnm_gtk
dependencies: deps,
c_args: cflags
)
-
- libwireless_security_libnm_glib_dep = declare_dependency(
- link_with: libwireless_security_libnm_glib,
- include_directories: wireless_security_inc
- )
endif
--
2.14.2

View File

@ -20,6 +20,8 @@ Obsoletes: NetworkManager-gnome < %{obsoletes_ver}
Source: https://download.gnome.org/sources/network-manager-applet/%{real_version_major}/%{name}-%{real_version}.tar.xz
Patch1: 0001-nm-applet-no-notifications.patch
Patch2: 0001-meson-belatedly-bump-the-version.patch
Patch3: 0002-meson-Make-sure-the-entire-wireless-security-static-.patch
Requires: NetworkManager >= %{nm_version}
Requires: NetworkManager-glib >= %{nm_version}
@ -122,6 +124,8 @@ This package deprecates libnm-gtk.
%prep
%setup -q -n "%{name}-%{real_version}"
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%meson \
@ -138,8 +142,6 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/gnome-vpn-properties
%find_lang nm-applet
cat nm-applet.lang >> %{name}.lang
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
# validate .desktop and autostart files
desktop-file-validate $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/nm-applet.desktop
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/nm-connection-editor.desktop
@ -237,6 +239,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%changelog
* Wed Nov 08 2017 Lubomir Rintel <lkundrak@v3.sk> - 1.8.6-2
- Meson build fixups
* Tue Nov 07 2017 Lubomir Rintel <lkundrak@v3.sk> - 1.8.6-1
- Update to 1.8.6 release
- Switch to Meson build system