From f5767bf07538a13243d818ba829c39ee9fa3b9eb Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Sep 17 2015 00:08:01 +0000 Subject: Fix assimp-config paths (rhbz#1263698) - Build against system boost instead of using included workaround --- diff --git a/assimp-3.1.1-cmakefix.patch b/assimp-3.1.1-cmakefix.patch new file mode 100644 index 0000000..b5b3f51 --- /dev/null +++ b/assimp-3.1.1-cmakefix.patch @@ -0,0 +1,26 @@ +diff -up ./assimp-config.cmake.in.cmakefix ./assimp-config.cmake.in +--- ./assimp-config.cmake.in.cmakefix 2014-06-14 19:00:10.000000000 -0400 ++++ ./assimp-config.cmake.in 2015-09-16 19:48:33.982445792 -0400 +@@ -10,10 +10,7 @@ + # ASSIMP_LIBRARY_DIRS - link directories + # ASSIMP_LIBRARIES - libraries to link plugins with + # ASSIMP_Boost_VERSION - the boost version assimp was compiled with +-get_filename_component(_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +-get_filename_component(_PREFIX "${_PREFIX}" PATH) +-get_filename_component(_PREFIX "${_PREFIX}" PATH) +-get_filename_component(ASSIMP_ROOT_DIR "${_PREFIX}" PATH) ++set(ASSIMP_ROOT_DIR "@CMAKE_INSTALL_PREFIX@") + + if( MSVC ) + # in order to prevent DLL hell, each of the DLLs have to be suffixed with the major version and msvc prefix +@@ -37,8 +34,8 @@ if( WIN32 ) + set( ASSIMP_CXX_FLAGS " -DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB") + endif() + set( ASSIMP_LINK_FLAGS "" ) +-set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@") +-set( ASSIMP_INCLUDE_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_INCLUDE_INSTALL_DIR@") ++set( ASSIMP_LIBRARY_DIRS "@ASSIMP_LIB_INSTALL_DIR@") ++set( ASSIMP_INCLUDE_DIRS "@ASSIMP_INCLUDE_INSTALL_DIR@") + set( ASSIMP_LIBRARIES assimp${ASSIMP_LIBRARY_SUFFIX}) + if (CMAKE_BUILD_TYPE EQUAL "DEBUG") + set( ASSIMP_LIBRARIES ${ASSIMP_LIBRARIES}D) diff --git a/assimp.spec b/assimp.spec index 11d0e24..26a1bb2 100644 --- a/assimp.spec +++ b/assimp.spec @@ -1,6 +1,6 @@ Name: assimp Version: 3.1.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library to import various 3D model formats into applications Group: Development/Libraries @@ -15,6 +15,9 @@ Patch0: %{name}-3.1.1-unbundle.patch Patch1: %{name}-3.1.1-docfix.patch # Add /usr/lib64 to library lookup paths for python modules Patch4: %{name}-3.1.1-pythonpath.patch +# Fix library and include paths in assimp-config.cmake +# Fixes rhbz#1263698, not submitted upstream +Patch5: %{name}-3.1.1-cmakefix.patch BuildRequires: boost-devel BuildRequires: cmake @@ -82,17 +85,19 @@ rm -rf contrib/poly2tri %patch0 -p1 -b .unbundle %patch1 -p1 -b .docfix %patch4 -p1 -b .pythonpath - +%patch5 -p0 -b .cmakefix %build mkdir build pushd build %cmake .. \ -DASSIMP_LIB_INSTALL_DIR=%{_libdir} \ + -DASSIMP_INCLUDE_INSTALL_DIR=%{_includedir} \ -DIRRXML_LIB_PATH=%{_libdir} \ -DIRRXML_INCLUDE_PATH=%{_includedir}/irrlicht/ \ -DPOLY2TRI_INCLUDE_PATH=%{_includedir}/poly2tri \ -DCLIPPER_INCLUDE_PATH=%{_includedir}/clipper \ - -DUSE_EXTERNAL_LIBS=ON + -DUSE_EXTERNAL_LIBS=ON \ + -DASSIMP_ENABLE_BOOST_WORKAROUND=OFF popd make %{?_smp_mflags} -C build @@ -144,6 +149,10 @@ rm -rf %{buildroot} %{python3_sitelib}/pyassimp %changelog +* Thu Sep 17 2015 Rich Mattes - 3.1.1-5 +- Fix assimp-config paths (rhbz#1263698) +- Build against system boost instead of using included workaround + * Thu Aug 27 2015 Jonathan Wakely - 3.1.1-4 - Rebuilt for Boost 1.59