Updated patches
This commit is contained in:
parent
4901626a6f
commit
b9c8ce4d1b
|
@ -1,4 +1,4 @@
|
||||||
From c1439dad32221805c30d2b435fd3e9ccf989eacc Mon Sep 17 00:00:00 2001
|
From 61218921749f92de241fa79480a536b67a4e4925 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||||
Date: Fri, 14 Apr 2017 11:01:58 +0200
|
Date: Fri, 14 Apr 2017 11:01:58 +0200
|
||||||
Subject: [PATCH] Avoid several warnings in cmake-files from Qt5
|
Subject: [PATCH] Avoid several warnings in cmake-files from Qt5
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
From 8bbc9902b8b55a147372f80657aa938c2904c773 Mon Sep 17 00:00:00 2001
|
From 5e04743f9fb669d26d3814b1b9ba089d0a8c5b14 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||||
Date: Thu, 13 Apr 2017 21:11:26 +0200
|
Date: Thu, 13 Apr 2017 21:11:26 +0200
|
||||||
Subject: [PATCH] Add $(ENV:YUI_PREFERED_BACKEND) to set prefered UI-backend
|
Subject: [PATCH] Add $(ENV:YUI_PREFERED_BACKEND) to set prefered UI-backend
|
||||||
|
|
||||||
---
|
---
|
||||||
README.md | 40 +++++++++++++++++++++++-
|
README.md | 40 +++++++++++++++-
|
||||||
src/YUILoader.cc | 93 ++++++++++++++++++++++++++++++++++----------------------
|
src/YUILoader.cc | 144 +++++++++++++++++++++++++++++++++++--------------------
|
||||||
src/YUILoader.h | 41 +++++++++++++++++++++++--
|
src/YUILoader.h | 41 ++++++++++++++--
|
||||||
3 files changed, 133 insertions(+), 41 deletions(-)
|
3 files changed, 170 insertions(+), 55 deletions(-)
|
||||||
|
|
||||||
diff --git a/README.md b/README.md
|
diff --git a/README.md b/README.md
|
||||||
index 8b982cb..c3b91a0 100644
|
index 8b982cb..c3b91a0 100644
|
||||||
|
@ -65,7 +65,7 @@ index 8b982cb..c3b91a0 100644
|
||||||
```
|
```
|
||||||
-
|
-
|
||||||
diff --git a/src/YUILoader.cc b/src/YUILoader.cc
|
diff --git a/src/YUILoader.cc b/src/YUILoader.cc
|
||||||
index 7933ae4..2be22c2 100644
|
index 7933ae4..2370a61 100644
|
||||||
--- a/src/YUILoader.cc
|
--- a/src/YUILoader.cc
|
||||||
+++ b/src/YUILoader.cc
|
+++ b/src/YUILoader.cc
|
||||||
@@ -42,11 +42,29 @@
|
@@ -42,11 +42,29 @@
|
||||||
|
@ -101,7 +101,7 @@ index 7933ae4..2be22c2 100644
|
||||||
|
|
||||||
// Taken from: https://specifications.freedesktop.org/menu-spec/menu-spec-1.1.html#onlyshowin-registry
|
// Taken from: https://specifications.freedesktop.org/menu-spec/menu-spec-1.1.html#onlyshowin-registry
|
||||||
isGtk = ( ( strstr( envDesktop, "Cinnamon" ) != NULL ) || isGtk );
|
isGtk = ( ( strstr( envDesktop, "Cinnamon" ) != NULL ) || isGtk );
|
||||||
@@ -58,61 +76,62 @@ void YUILoader::loadUI( bool withThreads )
|
@@ -58,74 +76,88 @@ void YUILoader::loadUI( bool withThreads )
|
||||||
isGtk = ( ( strstr( envDesktop, "Unity" ) != NULL ) || isGtk );
|
isGtk = ( ( strstr( envDesktop, "Unity" ) != NULL ) || isGtk );
|
||||||
isGtk = ( ( strstr( envDesktop, "XFCE" ) != NULL ) || isGtk );
|
isGtk = ( ( strstr( envDesktop, "XFCE" ) != NULL ) || isGtk );
|
||||||
|
|
||||||
|
@ -145,6 +145,9 @@ index 7933ae4..2be22c2 100644
|
||||||
+ bool haveQt = pluginExists( YUIPlugin_Qt );
|
+ bool haveQt = pluginExists( YUIPlugin_Qt );
|
||||||
|
|
||||||
- if ( envDisplay && !wantNcurses )
|
- if ( envDisplay && !wantNcurses )
|
||||||
|
+ wantedGUI="";
|
||||||
|
+
|
||||||
|
+ // Set the UI-Plugin
|
||||||
+ if ( ( haveGtk || haveQt ) && strcmp ( envDisplay, "" ) &&
|
+ if ( ( haveGtk || haveQt ) && strcmp ( envDisplay, "" ) &&
|
||||||
+ ( !wantNcurses || !isatty( STDOUT_FILENO ) ) )
|
+ ( !wantNcurses || !isatty( STDOUT_FILENO ) ) )
|
||||||
{
|
{
|
||||||
|
@ -156,14 +159,9 @@ index 7933ae4..2be22c2 100644
|
||||||
// Do we want to use Gtk instead?
|
// Do we want to use Gtk instead?
|
||||||
- if ( haveGtk && ( isGtk || wantGtk ) && !wantQt )
|
- if ( haveGtk && ( isGtk || wantGtk ) && !wantQt )
|
||||||
- wantedGUI = YUIPlugin_Gtk;
|
- wantedGUI = YUIPlugin_Gtk;
|
||||||
+ if ( haveGtk && ( ( ( isGtk || wantGtk ) && !wantQt ) || !haveQt ) )
|
-
|
||||||
+ wantedGUI = YUIPlugin_Gtk;
|
|
||||||
|
|
||||||
- if ( strcmp( wantedGUI.c_str(), "" ) )
|
- if ( strcmp( wantedGUI.c_str(), "" ) )
|
||||||
+ yuiMilestone () << "Using UI-plugin: \"" << wantedGUI << "\""<< std::endl;
|
- {
|
||||||
+
|
|
||||||
+ try
|
|
||||||
{
|
|
||||||
- yuiMilestone () << "Using UI-backend: \"" << wantedGUI << "\""<< std::endl;
|
- yuiMilestone () << "Using UI-backend: \"" << wantedGUI << "\""<< std::endl;
|
||||||
- try
|
- try
|
||||||
- {
|
- {
|
||||||
|
@ -175,29 +173,97 @@ index 7933ae4..2be22c2 100644
|
||||||
- {
|
- {
|
||||||
- YUI_CAUGHT( ex );
|
- YUI_CAUGHT( ex );
|
||||||
- }
|
- }
|
||||||
+ YSettings::loadedUI( wantedGUI, true );
|
- }
|
||||||
+ loadPlugin( wantedGUI, withThreads );
|
+ if ( haveGtk && ( ( ( isGtk || wantGtk ) && !wantQt ) || !haveQt ) )
|
||||||
|
+ wantedGUI = YUIPlugin_Gtk;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if ( isatty( STDOUT_FILENO ) )
|
||||||
|
+ else if ( haveNcurses && isatty( STDOUT_FILENO ) )
|
||||||
|
{
|
||||||
|
- //
|
||||||
|
- // NCurses UI
|
||||||
|
- //
|
||||||
|
-
|
||||||
|
+ // We use NCurses.
|
||||||
|
wantedGUI = YUIPlugin_NCurses;
|
||||||
|
- yuiMilestone () << "Using UI-backend: \"" << wantedGUI << "\""<< std::endl;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // Load the wanted UI-plugin.
|
||||||
|
+ if( wantedGUI != "" )
|
||||||
|
+ {
|
||||||
|
+ yuiMilestone () << "Using UI-plugin: \"" << wantedGUI << "\""<< std::endl;
|
||||||
|
+ YSettings::loadedUI( wantedGUI, true );
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
- YSettings::loadedUI( wantedGUI, true );
|
||||||
|
loadPlugin( wantedGUI, withThreads );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
catch ( YUIException & ex )
|
||||||
|
{
|
||||||
|
YUI_CAUGHT( ex );
|
||||||
|
+
|
||||||
|
+ // Default to NCurses, if possible.
|
||||||
|
+ if( wantedGUI != YUIPlugin_NCurses && haveNcurses && isatty( STDOUT_FILENO ) )
|
||||||
|
+ {
|
||||||
|
+ yuiWarning () << "Defaulting to: \"" << YUIPlugin_NCurses << "\""<< std::endl;
|
||||||
|
+ YSettings::loadedUI( YUIPlugin_NCurses, true );
|
||||||
|
+
|
||||||
|
+ try
|
||||||
|
+ {
|
||||||
|
+ loadPlugin( YUIPlugin_NCurses, withThreads );
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ catch ( YUIException & ex )
|
||||||
|
+ {
|
||||||
|
+ YUI_CAUGHT( ex );
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
YUI_RETHROW( ex ); // what else to do here?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
else
|
||||||
|
{
|
||||||
|
YUI_THROW( YUICantLoadAnyUIException() );
|
||||||
|
@@ -197,15 +229,25 @@ void YUILoader::loadExternalWidgets ( const std::string& name, const std::string
|
||||||
|
wantedGUI.append( "-" );
|
||||||
|
wantedGUI.append( YSettings::loadedUI() );
|
||||||
|
|
||||||
|
- try
|
||||||
|
+ bool haveExternal = pluginExists( wantedGUI );
|
||||||
|
+
|
||||||
|
+ if( haveExternal )
|
||||||
|
{
|
||||||
|
- loadExternalWidgetsPlugin(name, wantedGUI, symbol );
|
||||||
|
- return;
|
||||||
|
+ try
|
||||||
|
+ {
|
||||||
|
+ loadExternalWidgetsPlugin(name, wantedGUI, symbol );
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ catch ( YUIException & ex )
|
+ catch ( YUIException & ex )
|
||||||
+ {
|
+ {
|
||||||
+ YUI_CAUGHT( ex );
|
+ YUI_CAUGHT( ex );
|
||||||
}
|
+ YUI_RETHROW( ex ); // what else to do here?
|
||||||
|
+ }
|
||||||
}
|
}
|
||||||
|
- catch ( YUIException & ex )
|
||||||
- if ( isatty( STDOUT_FILENO ) )
|
+
|
||||||
+ if ( haveNcurses && isatty( STDOUT_FILENO ) )
|
+ else
|
||||||
{
|
{
|
||||||
//
|
- YUI_CAUGHT( ex );
|
||||||
// NCurses UI
|
- YUI_RETHROW( ex ); // what else to do here?
|
||||||
//
|
+ YUI_THROW( YUICantLoadAnyUIException() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wantedGUI = YUIPlugin_NCurses;
|
|
||||||
- yuiMilestone () << "Using UI-backend: \"" << wantedGUI << "\""<< std::endl;
|
|
||||||
+ yuiMilestone () << "Using UI-plugin: \"" << wantedGUI << "\""<< std::endl;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
diff --git a/src/YUILoader.h b/src/YUILoader.h
|
diff --git a/src/YUILoader.h b/src/YUILoader.h
|
||||||
index 1086b65..b5180b0 100644
|
index 1086b65..b5180b0 100644
|
||||||
--- a/src/YUILoader.h
|
--- a/src/YUILoader.h
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
Name: lib%{libsuffix}
|
Name: lib%{libsuffix}
|
||||||
Version: 3.3.1
|
Version: 3.3.1
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: GUI-abstraction library
|
Summary: GUI-abstraction library
|
||||||
|
|
||||||
License: (LGPLv2 or LGPLv3) and MIT
|
License: (LGPLv2 or LGPLv3) and MIT
|
||||||
|
@ -23,8 +23,8 @@ Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
# Improvements, submitted upstream.
|
# Improvements, submitted upstream.
|
||||||
# See: https://github.com/libyui/libyui/pull/115
|
# See: https://github.com/libyui/libyui/pull/115
|
||||||
Patch0: https://github.com/besser82/libyui/commit/8bbc9902b8b55a147372f80657aa938c2904c773.patch#/%{name}-3.3.1-env_YUI_PREFERED_BACKEND.patch
|
Patch0: https://github.com/besser82/libyui/commit/5e04743f9fb669d26d3814b1b9ba089d0a8c5b14.patch#/%{name}-3.3.1-env_YUI_PREFERED_BACKEND.patch
|
||||||
Patch1: https://github.com/besser82/libyui/commit/c1439dad32221805c30d2b435fd3e9ccf989eacc.patch#/%{name}-3.3.1-CMP0043.patch
|
Patch1: https://github.com/besser82/libyui/commit/61218921749f92de241fa79480a536b67a4e4925.patch#/%{name}-3.3.1-CMP0043.patch
|
||||||
|
|
||||||
BuildRequires: boost-devel
|
BuildRequires: boost-devel
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
|
@ -146,6 +146,9 @@ popd
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Apr 15 2017 Björn Esser <besser82@fedoraproject.org> - 3.3.1-5
|
||||||
|
- Updated patches
|
||||||
|
|
||||||
* Fri Apr 14 2017 Björn Esser <besser82@fedoraproject.org> - 3.3.1-4
|
* Fri Apr 14 2017 Björn Esser <besser82@fedoraproject.org> - 3.3.1-4
|
||||||
- Add README.md to %%doc
|
- Add README.md to %%doc
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue