Accepting request 583526 from home:derselbst:branches:multimedia:libs

Add 0001-Fix-pkgconfig-file-for-absolute-paths-347.patch to fix pkgconfig file generation when absolute lib and include paths are used, see (boo#1084081). Should fix builds of depending packages like KDE Minuet and others.

OBS-URL: https://build.opensuse.org/request/show/583526
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/fluidsynth?expand=0&rev=45
This commit is contained in:
Takashi Iwai 2018-03-06 16:54:54 +00:00 committed by Git OBS Bridge
parent ca11111ccf
commit 915ac375e5
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From c98e050515718d9e46c36921407f0d4cf036dd94 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <krop@users.noreply.github.com>
Date: Tue, 6 Mar 2018 17:21:15 +0100
Subject: [PATCH] Fix pkgconfig file for absolute paths (#347)
When building fluidsynth, we can use relative or absolute paths for LIB_INSTALL_DIR and INCLUDE_INSTALL_DIR. Check whether the two vars were defined absolute before writing fluidsynth.pc.
Fixes https://bugzilla.opensuse.org/1084081
---
CMakeLists.txt | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 975eb83..07d64e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -461,8 +461,16 @@ add_subdirectory ( doc )
# pkg-config support
set ( prefix "${CMAKE_INSTALL_PREFIX}" )
set ( exec_prefix "\${prefix}" )
-set ( libdir "\${exec_prefix}/${LIB_INSTALL_DIR}" )
-set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" )
+if ( IS_ABSOLUTE "${LIB_INSTALL_DIR}" )
+ set ( libdir "${LIB_INSTALL_DIR}" )
+else ()
+ set ( libdir "\${exec_prefix}/${LIB_INSTALL_DIR}" )
+endif ()
+if ( IS_ABSOLUTE "${INCLUDE_INSTALL_DIR}" )
+ set ( includedir "${INCLUDE_INSTALL_DIR}" )
+else ()
+ set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" )
+endif ()
configure_file ( fluidsynth.pc.in
${CMAKE_BINARY_DIR}/fluidsynth.pc IMMEDIATE @ONLY )
install ( FILES ${CMAKE_BINARY_DIR}/fluidsynth.pc
--
2.13.6

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Mar 6 16:09:17 UTC 2018 - tom.mbrt@googlemail.com
- Add 0001-Fix-pkgconfig-file-for-absolute-paths-347.patch
to fix pkgconfig file generation when absolute lib and include
paths are used (boo#1084081)
-------------------------------------------------------------------
Fri Mar 2 16:47:20 UTC 2018 - tom.mbrt@googlemail.com

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# fix build for older distros and architectures where _fillupdir is
# not yet defined by using the old path as recommended by
# https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25_fillupdir
@ -31,6 +32,7 @@ Group: Productivity/Multimedia/Sound/Midi
Url: http://www.fluidsynth.org/
Source: https://github.com/FluidSynth/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1000: baselibs.conf
Patch1: 0001-Fix-pkgconfig-file-for-absolute-paths-347.patch
BuildRequires: cmake >= 3.0.2
BuildRequires: ladspa-devel
BuildRequires: pkgconfig
@ -69,6 +71,7 @@ This package contains the shared library for Fluidsynth.
%prep
%setup -q
%patch1 -p1
%build
%cmake \