fluidsynth/0001-Fix-pkgconfig-file-for-absolute-paths-347.patch
Takashi Iwai 915ac375e5 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
2018-03-06 16:54:54 +00:00

39 lines
1.4 KiB
Diff

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