# Conditional build:
%bcond_without osl # OpenScop support
#
+%define isl_ver 0.12.1
Summary: The Chunky Loop Generator
Summary(pl.UTF-8): Chunky Loop Generator - generator pętli cząstkowych
Name: cloog-isl
-Version: 0.18.1
+Version: 0.18.2
Release: 1
License: LGPL v2.1+
Group: Development/Tools
Source0: http://www.bastoul.net/cloog/pages/download/cloog-%{version}.tar.gz
-# Source0-md5: e34fca0540d840e5d0f6427e98c92252
+# Source0-md5: 69116aa6cd5e73f6b688d871875e1292
+Patch0: cloog-missing.patch
URL: http://www.cloog.org/
BuildRequires: autoconf >= 2.13
BuildRequires: automake
BuildRequires: gmp-devel >= 5.0.2
BuildRequires: gmp-c++-devel >= 5.0.2
-BuildRequires: isl-devel >= 0.08
+BuildRequires: isl-devel >= %{isl_ver}
BuildRequires: libtool
%{?with_osl:BuildRequires: osl-devel}
BuildRequires: texinfo-texi2dvi
Summary: Chunky Loop Generator shared library - isl based version
Summary(pl.UTF-8): Biblioteka współdzielona Chunky Loop Generatora - wersja oparta na isl
Group: Libraries
-Requires: isl >= 0.08
+Requires: isl >= %{isl_ver}
%description libs
Chunky Loop Generator shared library - isl based version.
Requires: %{name}-libs = %{version}-%{release}
Requires: gmp-devel >= 5.0.2
Requires: gmp-c++-devel >= 5.0.2
-Requires: isl-devel >= 0.08
+Requires: isl-devel >= %{isl_ver}
%{?with_osl:Requires: osl-devel}
Provides: cloog-devel = %{version}
%prep
%setup -q -n cloog-%{version}
+%patch0 -p1
%build
# with_gmp_exec_prefix=yes avoids adding -L/lib to LDFLAGS
--- /dev/null
+--- cloog-0.18.2/cmake.orig/cloog-isl-config.cmake 1970-01-01 01:00:00.000000000 +0100
++++ cloog-0.18.2/cmake/cloog-isl-config.cmake 2014-02-16 08:01:14.805795240 +0100
+@@ -0,0 +1,26 @@
++# Try to find the cloog-isl library
++
++# CLOOG_ISL_FOUND - System has cloog-isl lib
++# CLOOG_ISL_INCLUDE_DIR - The cloog-isl include directory
++# CLOOG_ISL_LIBRARY - Library needed to use cloog-isl
++
++
++if (CLOOG_ISL_INCLUDE_DIR AND CLOOG_ISL_LIBRARY)
++ # Already in cache, be silent
++ set(CLOOG_ISL_FIND_QUIETLY TRUE)
++endif()
++
++find_path(CLOOG_ISL_INCLUDE_DIR NAMES cloog/isl/cloog.h)
++find_library(CLOOG_ISL_LIBRARY NAMES cloog-isl)
++
++if (CLOOG_ISL_LIBRARY AND CLOOG_ISL_INCLUDE_DIR)
++ message(STATUS "Library cloog-isl found =) ${CLOOG_ISL_LIBRARY}")
++else()
++ message(STATUS "Library cloog-isl not found =(")
++endif()
++
++
++include(FindPackageHandleStandardArgs)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLOOG_ISL DEFAULT_MSG CLOOG_ISL_INCLUDE_DIR CLOOG_ISL_LIBRARY)
++
++mark_as_advanced(CLOOG_ISL_INCLUDE_DIR CLOOG_ISL_LIBRARY)
+--- cloog-0.18.2/cmake.orig/isl-config.cmake 1970-01-01 01:00:00.000000000 +0100
++++ cloog-0.18.2/cmake/isl-config.cmake 2014-02-16 08:01:14.805795240 +0100
+@@ -0,0 +1,25 @@
++# Try to find the isl library
++
++# ISL_FOUND - System has isl lib
++# ISL_INCLUDE_DIR - The isl include directory
++# ISL_LIBRARY - Library needed to use isl
++
++
++if (ISL_INCLUDE_DIR AND ISL_LIBRARY)
++ # Already in cache, be silent
++ set(ISL_FIND_QUIETLY TRUE)
++endif()
++
++find_path(ISL_INCLUDE_DIR NAMES isl/version.h)
++find_library(ISL_LIBRARY NAMES isl)
++
++if (ISL_LIBRARY AND ISL_INCLUDE_DIR)
++ message(STATUS "Library isl found =) ${ISL_LIBRARY}")
++else()
++ message(STATUS "Library isl not found =(")
++endif()
++
++include(FindPackageHandleStandardArgs)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(ISL DEFAULT_MSG ISL_INCLUDE_DIR ISL_LIBRARY)
++
++mark_as_advanced(ISL_INCLUDE_DIR ISL_LIBRARY)