From b4f6e923bc8ea5c65dfb306d31943461fa8cd00ca252b3a0c96eed59e3af2268 Mon Sep 17 00:00:00 2001 From: Bruno Friedmann Date: Mon, 4 Nov 2013 12:58:03 +0000 Subject: [PATCH] Accepting request 205447 from home:lnt-sysadmin:branches:X11:RemoteDesktop - Allow build on SLES11: * converted pkgconfig() BuildRequires to package names * added FindALSA.cmake * use 'make install' instead of '%make_install' macro This is a less intrusive change than the original https://build.opensuse.org/request/show/155396 OBS-URL: https://build.opensuse.org/request/show/205447 OBS-URL: https://build.opensuse.org/package/show/X11:RemoteDesktop/freerdp?expand=0&rev=41 --- FindALSA.cmake | 46 ++++++++++++++++++++++++++++++++++++++++++++++ freerdp.changes | 8 ++++++++ freerdp.spec | 14 +++++++++----- 3 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 FindALSA.cmake diff --git a/FindALSA.cmake b/FindALSA.cmake new file mode 100644 index 0000000..9a315d5 --- /dev/null +++ b/FindALSA.cmake @@ -0,0 +1,46 @@ +# - Find alsa +# Find the alsa libraries (asound) +# +# This module defines the following variables: +# ALSA_FOUND - True if ALSA_INCLUDE_DIR & ALSA_LIBRARY are found +# ALSA_LIBRARIES - Set when ALSA_LIBRARY is found +# ALSA_INCLUDE_DIRS - Set when ALSA_INCLUDE_DIR is found +# +# ALSA_INCLUDE_DIR - where to find asoundlib.h, etc. +# ALSA_LIBRARY - the asound library +# + +#============================================================================= +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Philip Lowman +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +find_path(ALSA_INCLUDE_DIR NAMES asoundlib.h + PATH_SUFFIXES alsa + DOC "The ALSA (asound) include directory" +) + +find_library(ALSA_LIBRARY NAMES asound + DOC "The ALSA (asound) library" +) + +# handle the QUIETLY and REQUIRED arguments and set ALSA_FOUND to TRUE if +# all listed variables are TRUE + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALSA DEFAULT_MSG ALSA_LIBRARY ALSA_INCLUDE_DIR) + +if(ALSA_FOUND) + set( ALSA_LIBRARIES ${ALSA_LIBRARY} ) + set( ALSA_INCLUDE_DIRS ${ALSA_INCLUDE_DIR} ) +endif() + +mark_as_advanced(ALSA_INCLUDE_DIR ALSA_LIBRARY) diff --git a/freerdp.changes b/freerdp.changes index 90aeedb..0a1ccad 100644 --- a/freerdp.changes +++ b/freerdp.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Oct 31 17:58:21 UTC 2013 - lnt-sysadmin@lists.lrz.de + +- Allow build on SLES11: + * converted pkgconfig() BuildRequires to package names + * added FindALSA.cmake + * use 'make install' instead of '%make_install' macro + ------------------------------------------------------------------- Thu Sep 12 07:03:02 UTC 2013 - crrodriguez@opensuse.org diff --git a/freerdp.spec b/freerdp.spec index dc7eb66..c4ef3fc 100644 --- a/freerdp.spec +++ b/freerdp.spec @@ -26,6 +26,7 @@ License: Apache-2.0 Group: Productivity/Networking/Other Url: http://www.freerdp.com/ Source0: https://github.com/downloads/FreeRDP/FreeRDP/%{name}-%{version}.tar.gz +Source1: FindALSA.cmake # PATCH-FIX-UPSTREAM freerdp-fix-FindPCSC-macro.patch https://github.com/FreeRDP/FreeRDP/issues/562 gberh@opensuse.org -- Fix the build by setting PCSC_LIBRARIES and PCSC_INCLUDE_DIRS variables explicitly which are otherwise empty Patch1: freerdp-fix-FindPCSC-macro.patch # PATCH-FIX-UPSTREAM freerdp-fix-pulse-no-device-name.patch bnc#785437 gber@opensuse.org -- Fix a segfault in case device name is not provided @@ -38,10 +39,10 @@ BuildRequires: ed BuildRequires: xmlto BuildRequires: xorg-x11-devel BuildRequires: zlib-devel -BuildRequires: pkgconfig(alsa) -BuildRequires: pkgconfig(libpcsclite) -BuildRequires: pkgconfig(libpulse) -BuildRequires: pkgconfig(openssl) +BuildRequires: alsa-devel +BuildRequires: pcsc-lite-devel +BuildRequires: libpulse-devel +BuildRequires: libopenssl-devel Recommends: libfreerdp-plugins BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -88,6 +89,9 @@ ed -s CMakeLists.txt 2>/dev/null <<'EOF' ,s/FREERDP_PLUGIN_PATH "\${CMAKE_INSTALL_PREFIX}\/\${CMAKE_INSTALL_LIBDIR}\/freerdp"/FREERDP_PLUGIN_PATH "\${CMAKE_INSTALL_PREFIX}\/\${CMAKE_INSTALL_LIBDIR}\/%{libname}"/ w EOF +%if 0%{?sles_version} == 11 + cp %SOURCE1 cmake/ +%endif %build mkdir build @@ -110,7 +114,7 @@ make %{?_smp_mflags} VERBOSE=1 %install cd build -%make_install +make install 'DESTDIR=%{buildroot}' # remove keymaps as we make use of libxkbfile # rm -rf $RPM_BUILD_ROOT/usr/share/freerdp/keymaps/