[libplist] fix ftbfs, work harder to ensure CMAKE_INSTALL_LIBDIR macro is correct

Rex Dieter rdieter at fedoraproject.org
Wed Apr 11 14:00:16 UTC 2012


commit bcc2fb6bd47794b3509c85e1baa3433e723b56ba
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Wed Apr 11 09:02:20 2012 -0500

    fix ftbfs, work harder to ensure CMAKE_INSTALL_LIBDIR macro is correct

 libplist-1.8-cmake_lib_suffix.patch |   17 +++++++++++++++++
 libplist.spec                       |   10 +++++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/libplist-1.8-cmake_lib_suffix.patch b/libplist-1.8-cmake_lib_suffix.patch
new file mode 100644
index 0000000..941bbaf
--- /dev/null
+++ b/libplist-1.8-cmake_lib_suffix.patch
@@ -0,0 +1,17 @@
+diff -up libplist-1.8/CMakeLists.txt.cmake_lib_suffix libplist-1.8/CMakeLists.txt
+--- libplist-1.8/CMakeLists.txt.cmake_lib_suffix	2012-01-11 08:29:30.000000000 -0600
++++ libplist-1.8/CMakeLists.txt	2012-04-11 08:57:36.208333767 -0500
+@@ -11,8 +11,12 @@ SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DI
+ 
+ cmake_minimum_required(VERSION 2.6)
+ 
++IF(${CMAKE_VERSION} VERSION_GREATER 2.8.4)
++  INCLUDE(GNUInstallDirs)
++ENDIF()
++
+ IF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
+-   SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
++   SET(CMAKE_INSTALL_LIBDIR lib${LIB_SUFFIX} CACHE PATH "Output directory for libraries")
+ ENDIF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
+ 
+ FIND_PACKAGE( LibXml2 REQUIRED )
diff --git a/libplist.spec b/libplist.spec
index 8524552..2c407ab 100644
--- a/libplist.spec
+++ b/libplist.spec
@@ -2,7 +2,7 @@
 
 Name:          libplist
 Version:       1.8
-Release:       2%{?dist}
+Release:       3%{?dist}
 Summary:       Library for manipulating Apple Binary and XML Property Lists
 
 Group:         System Environment/Libraries
@@ -10,6 +10,10 @@ License:       LGPLv2+
 URL:           http://www.libimobiledevice.org/
 Source0:       http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2
 
+## upstreamable patches
+# add support for GNUInstallDirs (where available) and ${LIB_SUFFIX} convention
+Patch50: libplist-1.8-cmake_lib_suffix.patch
+
 BuildRequires: libxml2-devel
 BuildRequires: python-devel
 BuildRequires: swig
@@ -38,6 +42,7 @@ Requires: python
 
 %prep
 %setup -q
+%patch50 -p1 -b .cmake_lib_suffix
 
 %build
 export CMAKE_PREFIX_PATH=/usr
@@ -74,6 +79,9 @@ make install DESTDIR=$RPM_BUILD_ROOT
 %{python_sitearch}/plist
 
 %changelog
+* Wed Apr 11 2012 Rex Dieter <rdieter at fedoraproject.org> 1.8-3
+- fix ftbfs, work harder to ensure CMAKE_INSTALL_LIBDIR macro is correct 
+
 * Fri Mar 23 2012 Peter Robinson <pbrobinson at fedoraproject.org> - 1.8-2
 - Fix RPATH issue with cmake, disable parallel build as it causes other problems
 


More information about the scm-commits mailing list