diff --git a/ceres-solver.spec b/ceres-solver.spec index 3084a57..6391a92 100644 --- a/ceres-solver.spec +++ b/ceres-solver.spec @@ -16,6 +16,8 @@ Source0: http://%{name}.org/%{name}-%{version}.tar.gz # Also removes -Werror from the package cflags # Filed upstream at https://github.com/ceres-solver/ceres-solver/issues/193 Patch0: %{name}-1.11.0-cmakedir.patch +# Temporary workaround for bogus gflags-config.cmake, see #1359776 +Patch1: ceres-solver_gflags.patch # Exclude ppc64 because suitesparse is not available on ppc64 # https://lists.fedoraproject.org/pipermail/epel-devel/2015-May/011193.html ExcludeArch: ppc64 @@ -92,6 +94,7 @@ developing applications that use %{name}. %prep %setup -q %patch0 -p1 -b .cmakedir +%patch1 -p1 %build mkdir build @@ -103,7 +106,8 @@ pushd build %{cmake} .. \ %endif -DCXSPARSE_INCLUDE_DIR:PATH=%{_includedir}/suitesparse \ - -DBLAS_LIBRARIES:PATH=%{_libdir}/atlas/libsatlas.so + -DBLAS_LIBRARIES:PATH=%{_libdir}/atlas/libsatlas.so \ + -DGFLAGS_INCLUDE_DIR=%{_includedir} make %{?_smp_mflags} diff --git a/ceres-solver_gflags.patch b/ceres-solver_gflags.patch new file mode 100644 index 0000000..452c66f --- /dev/null +++ b/ceres-solver_gflags.patch @@ -0,0 +1,12 @@ +diff -rupN ceres-solver-1.11.0/cmake/FindGflags.cmake ceres-solver-1.11.0-new/cmake/FindGflags.cmake +--- ceres-solver-1.11.0/cmake/FindGflags.cmake 2015-10-11 22:57:44.000000000 +0200 ++++ ceres-solver-1.11.0-new/cmake/FindGflags.cmake 2016-07-25 14:45:21.720524347 +0200 +@@ -384,7 +384,7 @@ if (GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_ + if (FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION) + message(STATUS "Detected gflags version: ${gflags_VERSION}") + set(GFLAGS_FOUND ${gflags_FOUND}) +- set(GFLAGS_INCLUDE_DIR ${gflags_INCLUDE_DIR}) ++ set(GFLAGS_INCLUDE_DIR "/usr/include") + set(GFLAGS_LIBRARY ${gflags_LIBRARIES}) + + # gflags does not export the namespace in their CMake configuration, so