Merge in changes from el6 (that should also work in f20 and f21).

This commit is contained in:
Brad Bell 2015-02-09 08:09:27 -07:00
commit 3739095df0

View file

@ -16,7 +16,7 @@
Name: cppad
Version: 20150000.4
Release: 2%{?dist}
Release: 3%{?dist}
Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc
# Only noarch.rpms provided. The user can compile with or without debugging
@ -66,6 +66,12 @@ In addition, printable versions of the documentation,
as a single web page, in both HTML and XML, can be found at that web site.
# ----------------------------------------------------------------------------
%clean
# Cleanup build root at the beginning in case mock has
# cleanup_on_failure set to zero.
rm -rf %{buildroot}
%prep
%setup -q
@ -77,6 +83,18 @@ includedir=%{buildroot}%{_includedir}
sed \
-e "s|\(INCLUDE_DIRECTORIES(\).*{cppad_SOURCE_DIR}|\1 SYSTEM $includedir|" \
-i.stamp CMakeLists.txt
#
# Make speed/src/libspeed_src a static instead of shared library. This should
# be fixed in the upstream source and not necessary next year; i.e, 2016.
sed \
-e 's|ADD_LIBRARY(speed_src|& STATIC|' \
-i.stamp speed/src/CMakeLists.txt
# Fix an exact equal check that should be a near equal check. This should
# be fixed in the upstream source and not necessary next year; i.e, 2016.
sed \
-e 's|(y\[i\] == check\[i\])|CppAD::NearEqual(y[i], check[i], 1e-10, 1e-10)|' \
-i.stamp test_more/optimize.cpp
# Remove installation of cppad_colpack.cpp becasue it is not used
# by the Fedora installation. This should be fixed in the upstream source
@ -111,6 +129,7 @@ sed -i.stamp example/example.cpp -f example.sed
# 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 --version
%cmake \
-D CMAKE_VERBOSE_MAKEFILE=0 \
\
@ -119,7 +138,7 @@ sed -i.stamp example/example.cpp -f example.sed
-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_cxx_flags='-Wall -ansi -pedantic-errors -std=c++98 -Wshadow' \
-D cppad_test_vector=cppad \
-D cppad_max_num_theads=64 \
-D cppad_sparse_list=YES \
@ -137,10 +156,6 @@ make install DESTDIR=%{buildroot}
%check
make check
%clean
# cleanup
rm -rf %{buildroot}
%files devel
%defattr(-,root,root,-)
%doc COPYING ChangeLog AUTHORS uw_copy_040507.html
@ -153,6 +168,14 @@ rm -rf %{buildroot}
# ----------------------------------------------------------------------------
%changelog
* Mon Feb 09 2015 Brad Bell <bradbell at seanet dot com> - 20150000.4-3
- 1: Change std=c++11 to std=c++98 so works with rel6 (also so works
- in f20 and f21 when std=c++11 is not specified).
- 2: Change speed/src/libspeed_src to be a static library because it is only
- used for testing (shared library was not being found on epl6).
- 3: Cleanup %%{buildroot} at start so it can be used for debugging on failure.
- 4: Fix an exact equal check that should have been a near equal check.
* Sun Feb 01 2015 Brad Bell <bradbell at seanet dot com> - 20150000.4-2
- Fix rmplint warning about macro-in-comment.
- Edit comments at top of about warnings that won't be fixed.