From e49477a1e569be5938f3486a66410aebdc3a701e Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sat, 31 Jan 2015 19:31:22 -0700 Subject: [PATCH] Advance from upstream source from version 20140000.2 to version 20150000.4. Improve clarity of cmake command used to configure the tests. --- cppad.spec | 61 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/cppad.spec b/cppad.spec index 12e97d1..fb4c53b 100644 --- a/cppad.spec +++ b/cppad.spec @@ -8,11 +8,11 @@ # ---------------------------------------------------------------------------- Name: cppad -Version: 20140000.2 -Release: 3%{?dist} +Version: 20150000.4 +Release: 1%{?dist} Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc -# Only noarch.rpms provided. +# Only noarch.rpms provided. The user can compile with or without debugging # Nothing useful in *debuginfo %global debug_package %{nil} @@ -21,7 +21,7 @@ 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 +BuildRequires: cmake >= 2.8 %description C++ Algorithmic Differentiation (AD), see %{name}-devel, %{name}-doc. @@ -73,13 +73,19 @@ sed \ -e "s|\(INCLUDE_DIRECTORIES(\).*{cppad_SOURCE_DIR}|\1 SYSTEM $includedir|" \ -i.stamp CMakeLists.txt -# Patch for Fedora 20 and greater. Upstream plans to change source -# so not needed when %%{version} is greater than or equal 20140000: -# This did not get fixed in 2014, lets try for 2015. -# -# Change /usr/share/doc/%%{name}-%%{version} -> /usr/share/doc/%%{name} -sed -e 's|\(${cppad_abs_docdir}/cppad\)-${cppad_version}|\1|' \ - -i CMakeLists.txt +# Remove installation of cppad_colpack.cpp becasue it is not used +# by the Fedora installation. This should be fixed in the upstream source +# and not necessary next year; i.e., 2016. +cat << EOF > CMakeLists.sed +/^INSTALL/! b skip +N +/cppad_colpack.cpp/! b skip +N +N +d +: skip +EOF +sed -f CMakeLists.sed -i CMakeLists.txt # change example/example.cpp to print out machine epsilon cat << EOF > example.sed @@ -94,12 +100,27 @@ EOF sed -i.stamp example/example.cpp -f example.sed # See https://fedoraproject.org/wiki/Packaging:Cmake?rd=Packaging/cmake -# for suggestions on using cmake. +# and http://www.coin-or.org/CppAD/Doc/cmake.htm %build +# +# Cannot use %{_includedir}, or %{_docdir} because they are absolute. +# Relative values would be more flexible because they can be combined with +# %{_prefix} to get absolute values. %cmake \ - -D CMAKE_VERBOSE_MAKEFILE=0 \ - -D cppad_documentation=YES \ - -D cppad_cxx_flags='-Wall -ansi -pedantic-errors -std=c++98 -Wshadow' \ + -D CMAKE_VERBOSE_MAKEFILE=0 \ + \ + -D cmake_install_prefix=%{_prefix} \ + -D cmake_install_includedirs=include \ + -D cmake_install_datadir=share \ + -D cmake_install_docdir=share/doc \ + \ + -D cppad_cxx_flags='-Wall -ansi -pedantic-errors -std=c++11 -Wshadow' \ + -D cppad_test_vector=cppad \ + -D cppad_max_num_theads=64 \ + -D cppad_sparse_list=YES \ + -D cppad_tape_id_type=size_t \ + -D cppad_tape_addr_type=size_t \ + -D cppad_implicit_ctor_from_any_type=NO \ . make %{?_smp_mflags} @@ -121,15 +142,19 @@ rm -rf %{buildroot} %{_includedir}/%{name} %{_datadir}/pkgconfig/%{name}.pc -# CMakeLists.txt is assuming %%{_docdir} is the same as %%{_datadir}/doc. -# In version 20140000, we should should add a -D cmake_install_docdir argument -# to cmake command so this is no longer necessary. %files doc %defattr(-,root,root,-) %{_docdir}/%{name} # ---------------------------------------------------------------------------- %changelog +* Sat Jan 31 2015 Brad Bell - 20150000.4-1 +- Advance to version 2015 of cppad. +- Ensure cmake >= 2.8; see https://bugzilla.redhat.com/show_bug.cgi?id=896116 +- Remove patch for location of docdir (fixed upstream). +- Patch CMakeLists.txt to remove install of cppad_colpack.cpp (it is not used). +- List all cmake options (including defaults) that are used by this install. + * Sat Aug 16 2014 Fedora Release Engineering - 20140000.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild