Advance to version 2016 of upstream source.

This commit is contained in:
Brad Bell 2016-01-01 09:26:33 -07:00
commit 18cc6ccdea
3 changed files with 48 additions and 36 deletions

View file

@ -1,22 +1,23 @@
# ----------------------------------------------------------------------------
# The comamnds 'rpmlint cppad.spec' and 'fedpkg lint' generate the warning:
# The comamnd 'fedpkg lint' generates the warning:
#
# cppad.spec:71: W: rpm-buildroot-usage
# cppad.spec:87: W: rpm-buildroot-usage
# %%prep includedir=%%{buildroot}%%{_includedir}
#
# See http://comments.gmane.org/gmane.linux.redhat.fedora.devel/144920
# ----------------------------------------------------------------------------
# The command 'fedpkg lint' generates the following warnings:
# The command 'fedpkg lint' generates the warning:
#
# W: spelling-error Summary(en_US) devel -> delve, devil, revel
# W: spelling-error %%description -l en_US devel -> delve, devil, revel
#
# These uses of devel refer to cppad-devel and hence are not spelling errors.
# The only occurances of devel in this file are of the form cppad-devel.
# These refer to the corresponding subpackage and are not spelling errors.
# ----------------------------------------------------------------------------
Name: cppad
Version: 20150000.9
Release: 3%{?dist}
Version: 20160000.0
Release: 1%{?dist}
Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc
# Only noarch.rpms provided. The user can compile with or without debugging
@ -86,27 +87,28 @@ rm -rf %{buildroot}
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
-ibak 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.
# The include directory set above is loaded by the install procedure,
# but cppad_lib is needed for the install procedure. Currently cppad_lib
# only contains the cppad_colpack object which is not needed by the Fedora
# distribution. This may or may not be true for next year 2017.
cat << EOF > CMakeLists.sed
/^INSTALL/! b skip
N
/cppad_colpack.cpp/! b skip
N
N
d
: skip
/^ADD_SUBDIRECTORY(cppad_lib)/d
/^\tcppad_lib$/d
EOF
sed -f CMakeLists.sed -i CMakeLists.txt
sed -f CMakeLists.sed -ibak CMakeLists.txt
sed -f CMakeLists.sed -ibak cppad_ipopt/example/CMakeLists.txt
sed -f CMakeLists.sed -ibak cppad_ipopt/speed/CMakeLists.txt
sed -f CMakeLists.sed -ibak cppad_ipopt/test/CMakeLists.txt
sed -f CMakeLists.sed -ibak cppad_lib/CMakeLists.txt
sed -f CMakeLists.sed -ibak example/CMakeLists.txt
sed -f CMakeLists.sed -ibak example/ipopt_solve/CMakeLists.txt
sed -f CMakeLists.sed -ibak speed/adolc/CMakeLists.txt
sed -f CMakeLists.sed -ibak speed/cppad/CMakeLists.txt
sed -f CMakeLists.sed -ibak speed/profile/CMakeLists.txt
sed -f CMakeLists.sed -ibak test_more/CMakeLists.txt
# change example/example.cpp to print out machine epsilon
cat << EOF > example.sed
@ -118,7 +120,7 @@ int main(void)\\
\\
|
EOF
sed -i.stamp example/example.cpp -f example.sed
sed -ibak example/example.cpp -f example.sed
# See https://fedoraproject.org/wiki/Packaging:Cmake?rd=Packaging/cmake
# and http://www.coin-or.org/CppAD/Doc/cmake.htm
@ -131,18 +133,18 @@ sed -i.stamp example/example.cpp -f example.sed
%cmake \
-D CMAKE_VERBOSE_MAKEFILE=0 \
\
-D cmake_install_prefix=%{_prefix} \
-D cppad_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++98 -Wshadow' \
-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 \
-D cppad_deprecated=NO \
.
make %{?_smp_mflags}
@ -166,6 +168,17 @@ make check
# ----------------------------------------------------------------------------
%changelog
* Fri Jan 1 2016 Brad Bell <bradbell at seanet do com> - 20160000.0-1
- Advance to version 2016 of cppad.
- Remove patch for static testing library (fixed upstream).
- Remove patch to avoid install of cppad_colpack.cpp (fixed upstream).
- Change cmake_install_prefix -> cppad_prefix (changed upstream).
- Change c++98 to c++11 so installed version can support both (new capability).
- Remove setting cppad_implicit_ctor_from_any type (no longer in upstream).
- Add setting cppad_deprecated (new upstream flag).
- Change original copy of files from *.stamp to *.bak
- Patch CMakeLists.txt files to remove building and use of cppad_lib object.
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20150000.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild