diff --git a/cppad.spec b/cppad.spec index fcdf60d..76b2959 100644 --- a/cppad.spec +++ b/cppad.spec @@ -9,7 +9,7 @@ Name: cppad Version: 20130000.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc # Only noarch.rpms provided. @@ -21,7 +21,6 @@ License: GPLv3 URL: http://www.coin-or.org/CppAD/ Source: http://www.coin-or.org/download/source/CppAD/%{name}-%{version}.gpl.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: cmake >= 2.6 %description C++ Algorithmic Differentiation (AD), see %{name}-devel, %{name}-doc. @@ -63,13 +62,17 @@ as a single web page, in both HTML and XML, can be found at that web site. %setup -q -# Replace cppad_SOURCE_DIR by the system include directory so that +# We will replace top_srcdir by the system include directory so that # installed files, instead of local files, are used for testing. # (Note next line generates rpm-buildroot-usage warning from rpmlint.) includedir=%{buildroot}%{_includedir} -sed \ --e "s|\(INCLUDE_DIRECTORIES(\).*{cppad_SOURCE_DIR}|\1 SYSTEM $includedir|" \ - -i.stamp CMakeLists.txt +for file in `find . -name 'makefile.in'` +do + if ! (echo $file | grep 'speed/src/makefile.in' > /dev/null) + then + sed -e "s|-I\$(top_srcdir)\([^/]\)|-I$includedir\1|" -i "$file" + fi +done # change example/example.cpp to print out machine epsilon cat << EOF > example.sed @@ -86,11 +89,13 @@ sed -i.stamp example/example.cpp -f example.sed # See https://fedoraproject.org/wiki/Packaging:Cmake?rd=Packaging/cmake # for suggestions on using cmake. %build -%cmake \ - -D CMAKE_VERBOSE_MAKEFILE=0 \ - -D cppad_documentation=YES \ - -D cppad_cxx_flags='-Wall -ansi -pedantic-errors -std=c++98 -Wshadow' \ - . +./configure \ + --prefix='/usr' \ + CXX_FLAGS='-Wall -ansi -pedantic-errors -std=c++98' \ + OPENMP_FLAGS='-fopenmp' \ + --with-sparse_list \ + --with-Documentation + make %{?_smp_mflags} %install @@ -99,7 +104,7 @@ make install DESTDIR=%{buildroot} # use the installed include files to compile and run the tests %check -make check +make test %clean # cleanup @@ -117,6 +122,12 @@ rm -rf %{buildroot} # ---------------------------------------------------------------------------- %changelog +* Thu Jan 17 2013 Brad Bell - 20130000.1-1 +- Change build from using cmake to using auto-tools because Red-Hat +- will not fix problems with cmake 2.6; see +- https://bugzilla.redhat.com/show_bug.cgi?id=896116 +- (cmake mailing list suggests upgrading to 2.8) + * Tue Jan 08 2013 Brad Bell - 20130000.1-1 - Use a new upstream source. - Remove the patches that were fixed in the upstream source.