forked from pool/freerdp
Accepting request 1133870 from home:jtorres:branches:X11:RemoteDesktop
- Add freerdp-allow-compiling-with-old-c++-compiler.patch * This allows building with older Leap versions which use gcc7-c++. - Use cups-devel instead of relying on pkgconfig. * Older Leap versions were unable to find it that way. - Fix some package naming and versioning. OBS-URL: https://build.opensuse.org/request/show/1133870 OBS-URL: https://build.opensuse.org/package/show/X11:RemoteDesktop/freerdp?expand=0&rev=159
This commit is contained in:
parent
2eac49bd98
commit
ac098044ad
75
freerdp-allow-compiling-with-old-c++-compiler.patch
Normal file
75
freerdp-allow-compiling-with-old-c++-compiler.patch
Normal file
@ -0,0 +1,75 @@
|
||||
From 922615efd603f3e9c0df2bb858011763461b7c22 Mon Sep 17 00:00:00 2001
|
||||
From: Joan Torres <joan.torres@suse.com>
|
||||
Date: Mon, 18 Dec 2023 12:36:49 +0100
|
||||
Subject: [PATCH] [proxy,modules] allow compiling with old c++ compiler
|
||||
|
||||
For dyn-channel-dump.
|
||||
|
||||
On C++17 there's the filesystem standard library.
|
||||
Newer c++ compilers use it with <filesystem>.
|
||||
However, older c++ compilers use it with <experimental/filesystem>.
|
||||
---
|
||||
.../dyn-channel-dump/dyn-channel-dump.cpp | 18 +++++++++++++-----
|
||||
1 file changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/server/proxy/modules/dyn-channel-dump/dyn-channel-dump.cpp b/server/proxy/modules/dyn-channel-dump/dyn-channel-dump.cpp
|
||||
index a56afe077..990281904 100644
|
||||
--- a/server/proxy/modules/dyn-channel-dump/dyn-channel-dump.cpp
|
||||
+++ b/server/proxy/modules/dyn-channel-dump/dyn-channel-dump.cpp
|
||||
@@ -32,7 +32,15 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
+#if __has_include(<filesystem>)
|
||||
#include <filesystem>
|
||||
+namespace fs = std::filesystem;
|
||||
+#elif __has_include(<experimental/filesystem>)
|
||||
+#include <experimental/filesystem>
|
||||
+namespace fs = std::experimental::filesystem;
|
||||
+#else
|
||||
+#error Could not find system header "<filesystem>" or "<experimental/filesystem>"
|
||||
+#endif
|
||||
|
||||
#include <freerdp/server/proxy/proxy_modules_api.h>
|
||||
#include <freerdp/server/proxy/proxy_context.h>
|
||||
@@ -122,15 +130,15 @@ class ChannelData
|
||||
|
||||
bool ensure_path_exists()
|
||||
{
|
||||
- if (!std::filesystem::exists(_base))
|
||||
+ if (!fs::exists(_base))
|
||||
{
|
||||
- if (!std::filesystem::create_directories(_base))
|
||||
+ if (!fs::create_directories(_base))
|
||||
{
|
||||
WLog_ERR(TAG, "Failed to create dump directory %s", _base.c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
- else if (!std::filesystem::is_directory(_base))
|
||||
+ else if (!fs::is_directory(_base))
|
||||
{
|
||||
WLog_ERR(TAG, "dump path %s is not a directory", _base.c_str());
|
||||
return false;
|
||||
@@ -158,7 +166,7 @@ class ChannelData
|
||||
}
|
||||
|
||||
private:
|
||||
- std::filesystem::path filepath(const std::string& channel, bool back, uint64_t count) const
|
||||
+ fs::path filepath(const std::string& channel, bool back, uint64_t count) const
|
||||
{
|
||||
auto name = idstr(channel, back);
|
||||
char cstr[32] = {};
|
||||
@@ -181,7 +189,7 @@ class ChannelData
|
||||
}
|
||||
|
||||
private:
|
||||
- std::filesystem::path _base;
|
||||
+ fs::path _base;
|
||||
std::vector<std::string> _channels_to_dump;
|
||||
|
||||
std::mutex _mux;
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 18 11:57:05 UTC 2023 - Joan Torres <joan.torres@suse.com>
|
||||
|
||||
- Add freerdp-allow-compiling-with-old-c++-compiler.patch
|
||||
* This allows building with older Leap versions which use gcc7-c++.
|
||||
|
||||
- Use cups-devel instead of relying on pkgconfig.
|
||||
* Older Leap versions were unable to find it that way.
|
||||
|
||||
- Fix some package naming and versioning.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 15 11:02:39 UTC 2023 - Joan Torres <joan.torres@suse.com>
|
||||
|
||||
|
78
freerdp.spec
78
freerdp.spec
@ -30,8 +30,9 @@
|
||||
%global _with_gss 1
|
||||
|
||||
%define major_version 3
|
||||
%define rdtk_sover 0
|
||||
%define libfreerdp_package %{major_version}-%{major_version}
|
||||
%define rdtk_version 0
|
||||
%define rdtk_package %{rdtk_version}-%{rdtk_version}
|
||||
%define uwac_version 0
|
||||
%define uwac_package %{uwac_version}-%{uwac_version}
|
||||
|
||||
@ -44,8 +45,10 @@ Group: Productivity/Networking/Other
|
||||
URL: https://www.freerdp.com/
|
||||
Source0: https://github.com/FreeRDP/FreeRDP/archive/%{version}.tar.gz#/FreeRDP-%{version}.tar.gz
|
||||
Source1: freerdp-rpmlintrc
|
||||
Patch0: freerdp-allow-compiling-with-old-c++-compiler.patch
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: cmake >= 2.8
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: ed
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
@ -54,7 +57,6 @@ BuildRequires: libgsm-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
BuildRequires: pkgconfig(cairo)
|
||||
BuildRequires: pkgconfig(cups)
|
||||
BuildRequires: pkgconfig(fuse3)
|
||||
BuildRequires: pkgconfig(gstreamer-1.0)
|
||||
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
|
||||
@ -70,6 +72,7 @@ BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(libpcsclite)
|
||||
BuildRequires: pkgconfig(libpkcs11-helper-1)
|
||||
BuildRequires: pkgconfig(libpulse)
|
||||
BuildRequires: pkgconfig(libswscale)
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: pkgconfig(libusb-1.0)
|
||||
%{?_with_openh264:BuildRequires: pkgconfig(openh264)}
|
||||
@ -155,8 +158,8 @@ Summary: Remote Desktop Viewer client library
|
||||
Group: System/Libraries
|
||||
Obsoletes: lib%{name} < %{version}-%{release}
|
||||
Provides: lib%{name} = %{version}-%{release}
|
||||
Obsoletes: lib%{name}2 < %{version}-%{release}
|
||||
Provides: lib%{name}2 = %{version}-%{release}
|
||||
Obsoletes: lib%{name}3 < %{version}-%{release}
|
||||
Provides: lib%{name}3 = %{version}-%{release}
|
||||
|
||||
%description -n lib%{name}%{libfreerdp_package}
|
||||
FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
|
||||
@ -167,7 +170,7 @@ libraries used by the client.
|
||||
Summary: Development Files for freerdp
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: lib%{name}%{libfreerdp_package} = %{version}-%{release}
|
||||
Requires: lib%{name}-server-proxy%{major_version}
|
||||
Requires: lib%{name}-server-proxy%{libfreerdp_package}
|
||||
Requires: winpr-devel = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
@ -177,8 +180,8 @@ based on libfreerdp.
|
||||
%package -n libwinpr%{libfreerdp_package}
|
||||
Summary: Windows Portable Runtime
|
||||
Group: Productivity/Networking/Other
|
||||
Obsoletes: libwinpr2 < %{version}-%{release}
|
||||
Provides: libwinpr2 = %{version}-%{release}
|
||||
Obsoletes: libwinpr3 < %{version}-%{release}
|
||||
Provides: libwinpr3 = %{version}-%{release}
|
||||
|
||||
%description -n libwinpr%{libfreerdp_package}
|
||||
WinPR provides API compatibility for applications targeting non-Windows
|
||||
@ -192,8 +195,8 @@ Requires: cmake >= 2.8
|
||||
# WinPRTargets-*.cmake defines targets for winpr-hash and winpr-makecert
|
||||
Requires: freerdp-server = %{version}-%{release}
|
||||
Requires: libwinpr%{libfreerdp_package} = %{version}-%{release}
|
||||
Obsoletes: libwinpr2-devel < %{version}-%{release}
|
||||
Provides: libwinpr2-devel = %{version}-%{release}
|
||||
Obsoletes: libwinpr3-devel < %{version}-%{release}
|
||||
Provides: libwinpr3-devel = %{version}-%{release}
|
||||
|
||||
%description -n winpr-devel
|
||||
This package contains header files for developing applications that
|
||||
@ -219,34 +222,34 @@ Provides: libuwac0-devel = %{version}-%{release}
|
||||
This package contains header files for developing applications that
|
||||
use the uwac library.
|
||||
|
||||
%package -n librdtk%{rdtk_sover}
|
||||
%package -n librdtk%{rdtk_package}
|
||||
Summary: FreeRDP Toolkit
|
||||
Group: Development/Languages/C and C++
|
||||
|
||||
%description -n librdtk%{rdtk_sover}
|
||||
%description -n librdtk%{rdtk_package}
|
||||
This package contains the library for the Remote Desktop Toolkit.
|
||||
|
||||
%package -n rdtk%{rdtk_sover}-devel
|
||||
%package -n rdtk%{rdtk_package}-devel
|
||||
Summary: FreeRDP Toolkit development files
|
||||
Group: Development/Languages/C and C++
|
||||
Requires: librdtk%{rdtk_sover} = %{version}-%{release}
|
||||
Requires: librdtk%{rdtk_package} = %{version}-%{release}
|
||||
|
||||
%description -n rdtk%{rdtk_sover}-devel
|
||||
%description -n rdtk%{rdtk_package}-devel
|
||||
This package contains the development files for RDTK.
|
||||
|
||||
%package -n lib%{name}-server-proxy%{major_version}
|
||||
%package -n lib%{name}-server-proxy%{libfreerdp_package}
|
||||
Summary: FreeRDP Server Proxy library
|
||||
Group: Development/Languages/C and C++
|
||||
|
||||
%description -n lib%{name}-server-proxy%{major_version}
|
||||
%description -n lib%{name}-server-proxy%{libfreerdp_package}
|
||||
This package contains the FreeRDP Server Proxy library files.
|
||||
|
||||
%package -n %{name}-server-proxy%{major_version}-devel
|
||||
%package -n %{name}-server-proxy%{libfreerdp_package}-devel
|
||||
Summary: FreeRDP Server Proxy library development files
|
||||
Group: Development/Languages/C and C++
|
||||
Requires: lib%{name}-server-proxy%{major_version} = %{version}-%{release}
|
||||
Requires: lib%{name}-server-proxy%{libfreerdp_package} = %{version}-%{release}
|
||||
|
||||
%description -n %{name}-server-proxy%{major_version}-devel
|
||||
%description -n %{name}-server-proxy%{libfreerdp_package}-devel
|
||||
This package contains the FreeRDP server proxy development files.
|
||||
|
||||
%prep
|
||||
@ -336,10 +339,10 @@ cd build
|
||||
%postun -n libwinpr%{libfreerdp_package} -p /sbin/ldconfig
|
||||
%post -n libuwac%{uwac_package} -p /sbin/ldconfig
|
||||
%postun -n libuwac%{uwac_package} -p /sbin/ldconfig
|
||||
%post -n librdtk%{rdtk_sover} -p /sbin/ldconfig
|
||||
%postun -n librdtk%{rdtk_sover} -p /sbin/ldconfig
|
||||
%post -n lib%{name}-server-proxy%{major_version} -p /sbin/ldconfig
|
||||
%postun -n lib%{name}-server-proxy%{major_version} -p /sbin/ldconfig
|
||||
%post -n librdtk%{rdtk_package} -p /sbin/ldconfig
|
||||
%postun -n librdtk%{rdtk_package} -p /sbin/ldconfig
|
||||
%post -n lib%{name}-server-proxy%{libfreerdp_package} -p /sbin/ldconfig
|
||||
%postun -n lib%{name}-server-proxy%{libfreerdp_package} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%{_bindir}/x%{name}
|
||||
@ -425,30 +428,19 @@ cd build
|
||||
%{_libdir}/libuwac%{uwac_version}.so
|
||||
%{_libdir}/pkgconfig/uwac%{uwac_version}.pc
|
||||
|
||||
%files -n librdtk%{rdtk_sover}
|
||||
%{_libdir}/librdtk%{rdtk_sover}.so.*
|
||||
%files -n librdtk%{rdtk_package}
|
||||
%{_libdir}/librdtk%{rdtk_version}.so.*
|
||||
|
||||
%files -n rdtk%{rdtk_sover}-devel
|
||||
%dir %{_includedir}/rdtk0/
|
||||
%dir %{_includedir}/rdtk0/rdtk
|
||||
%{_includedir}/rdtk0/rdtk/api.h
|
||||
%{_includedir}/rdtk0/rdtk/build-config.h
|
||||
%{_includedir}/rdtk0/rdtk/buildflags.h
|
||||
%{_includedir}/rdtk0/rdtk/config.h
|
||||
%{_includedir}/rdtk0/rdtk/rdtk.h
|
||||
%{_includedir}/rdtk0/rdtk/version.h
|
||||
%dir %{_libdir}/cmake/rdtk0
|
||||
%{_libdir}/cmake/rdtk0/rdtk-relwithdebinfo.cmake
|
||||
%{_libdir}/cmake/rdtk0/rdtk.cmake
|
||||
%{_libdir}/cmake/rdtk0/rdtkConfig.cmake
|
||||
%{_libdir}/cmake/rdtk0/rdtkConfigVersion.cmake
|
||||
%{_libdir}/pkgconfig/rdtk0.pc
|
||||
%{_libdir}/librdtk0.so
|
||||
%files -n rdtk%{rdtk_package}-devel
|
||||
%{_libdir}/cmake/rdtk%{rdtk_version}
|
||||
%{_includedir}/rdtk%{rdtk_version}
|
||||
%{_libdir}/librdtk%{rdtk_version}.so
|
||||
%{_libdir}/pkgconfig/rdtk%{rdtk_version}.pc
|
||||
|
||||
%files -n lib%{name}-server-proxy%{major_version}
|
||||
%files -n lib%{name}-server-proxy%{libfreerdp_package}
|
||||
%{_libdir}/libfreerdp-server-proxy%{major_version}.so.*
|
||||
|
||||
%files -n %{name}-server-proxy%{major_version}-devel
|
||||
%files -n %{name}-server-proxy%{libfreerdp_package}-devel
|
||||
%{_libdir}/pkgconfig/freerdp-server-proxy%{major_version}.pc
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user