#
# spec file for package cloog-isl
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           cloog-isl
Version:        0.18.1
Release:        2.1.2
Summary:        The Chunky Loop Generator
License:        LGPL-2.1
Group:          Development/Languages/C and C++
Url:            http://www.cloog.org/
Source:         cloog-%{version}.tar.gz
Source1:        baselibs.conf
BuildRequires:  gmp-devel
BuildRequires:  isl-devel
Conflicts:      cloog
Provides:       cloog
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
CLooG is a free software and library to generate code for scanning
Z-polyhedra. It is used by the GCC Graphite optimization framework.

%package devel
Summary:        Development tools for CLOOG
Group:          Development/Languages/C and C++
Requires:       isl-devel
Requires:       libcloog-isl4 = %{version}-%{release}
Conflicts:      cloog-devel

%description devel
Development tools and headers for the Chunky Loop Generator.

%package -n libcloog-isl4
Summary:        The CLOOG shared library using ISL
Group:          Development/Languages/C and C++

%description -n libcloog-isl4
The shared library for the Chunky Loop Generator using the ISL backend.

%prep
%setup -q -n cloog-%{version}

%build
%configure --disable-static --with-isl=system
make %{_smp_mflags}

%check
make %{_smp_mflags} check

%install
make DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_libdir}/*.la
rm -rf %{buildroot}%{_libdir}/pkgconfig
rm -f %{buildroot}%{_libdir}/cloog-isl/cloog-isl-config.cmake
rm -f %{buildroot}%{_libdir}/isl/isl-config.cmake

%post -n libcloog-isl4 -p /sbin/ldconfig

%postun -n libcloog-isl4 -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_bindir}/cloog

%files -n libcloog-isl4
%defattr(-,root,root,-)
%{_libdir}/libcloog-isl.so.4*

%files devel
%defattr(-,root,root,-)
%{_includedir}/cloog
%{_libdir}/libcloog-isl.so

%changelog
* Thu Feb 13 2014 rguenther@suse.com
- Update to cloog version 0.18.1.
  * Latest bugfixes.
- Remove obsolete cloog-tests.patch patch.
* Fri Aug  2 2013 tchvatal@suse.com
- Bock also cloog package, collision on /usr/bin/cloog and provide
  the same as the binaries are swapable, just backend
  implementation and lib differs.
- Remove clean phase as it is default one
* Mon Jul 29 2013 dvaleev@suse.com
- Pick upstream commits to adress test failures (cloog-tests.patch)
* Fri Jan 11 2013 rguenther@suse.com
- Update to cloog version 0.18.0.
  * Bumps SONAME to libcloog-isl4.
  * Update to isl 0.11.1.
  * Clast annotations for openmp and vectorization.
  * Statement-wise loop separation.
  * Clast traversal and node filtering support.
  * Support for OpenSCoP coordinates extension.
* Tue Jul  3 2012 rguenther@suse.com
- Add isl-devel requires to cloog-isl-devel.
* Fri Jun 22 2012 rguenther@suse.com
- Use upstream ISL as packaged in isl-devel.
* Thu Mar  1 2012 rguenther@suse.com
- Update to cloog version 0.17.0.
  * Bumps SONAME to libcloog-isl3.
* Fri Jul 22 2011 rguenther@novell.com
- Update to cloog version 0.16.3.
  * Bumps SONAME to libcloog-isl2.
- Do not build shared libisl, nor package it in any way.  Instead
  link it statically into libcloog-isl.
- Do not package the static libcloog-isl.
* Tue Jan 25 2011 rguenther@novell.com
- Package cloog version 0.16.1.