Advance upstream source to 20210000.5
This commit is contained in:
parent
e41fd191ef
commit
6e5d8bcb1b
1 changed files with 6 additions and 91 deletions
97
cppad.spec
97
cppad.spec
|
|
@ -12,8 +12,8 @@
|
|||
# Fedora Release starts with 1; see
|
||||
# https://fedoraproject.org/wiki/Packaging:Versioning
|
||||
Name: cppad
|
||||
Version: %{yyyymmdd}.3
|
||||
Release: 3%{?dist}
|
||||
Version: %{yyyymmdd}.5
|
||||
Release: 1%{?dist}
|
||||
Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc
|
||||
|
||||
License: EPL-2.0 or GPLv2+
|
||||
|
|
@ -85,95 +85,6 @@ tar -xzf %{_topdir}/SOURCES/%{yyyymmdd}.doc.tar.gz
|
|||
mv CppAD-%{yyyymmdd}.doc/doc CppAD-%{version}/doc
|
||||
mv CppAD-%{version}/COPYING COPYING
|
||||
mv CppAD-%{version}/uw_copy_040507.html uw_copy_040507.html
|
||||
# ---------------------------------------------------------------------------
|
||||
# Patch corresponding to bug fix in upstream source 20210000.4
|
||||
# ---------------------------------------------------------------------------
|
||||
cp CppAD-%{version}/include/cppad/core/abs_normal_fun.hpp \
|
||||
CppAD-%{version}/include/cppad/core/abs_normal_fun.bak
|
||||
for uu in vp pv vv
|
||||
do
|
||||
sed -i CppAD-%{version}/include/cppad/core/abs_normal_fun.hpp \
|
||||
-e "/ Zmul${uu}Op/N" \
|
||||
-e "/ Zmul${uu}Op/s|\n *CPPAD_ASSERT_NARG_NRES(op, 2, 1);||"
|
||||
done
|
||||
sed -i CppAD-%{version}/include/cppad/core/abs_normal_fun.hpp \
|
||||
-e 's|^\( *\)case ZmulvvOp:|\1case PowvvOp:\n&|'
|
||||
# ---------------------------------------------------------------------------
|
||||
# Patch corresponding to fix in upstream source 20210000.5
|
||||
# ---------------------------------------------------------------------------
|
||||
file="CppAD-%{version}/test_more/general/atomic_three.cpp"
|
||||
cat << EOF > junk.sed
|
||||
s|f.size_par() == 5;|f.size_par() == 6;|
|
||||
s|f.size_par() == 4;|f.size_par() == 5;|
|
||||
s|f.size_par() == 2;|f.size_par() == 3;|
|
||||
EOF
|
||||
sed -i $file -f junk.sed
|
||||
#
|
||||
file="CppAD-%{version}/test_more/general/new_dynamic.cpp"
|
||||
cat << EOF > junk.sed
|
||||
s|== num_dyn_ind + 1 + 2;|== num_dyn_ind + 1 + 3;|
|
||||
s|== nd + 2 + 2;|== nd + 2 + 3;|
|
||||
EOF
|
||||
sed -i $file -f junk.sed
|
||||
#
|
||||
file="CppAD-%{version}/include/cppad/local/optimize/optimize_run.hpp"
|
||||
cat << EOF > junk.sed
|
||||
/nan with type Base/! b one
|
||||
N;N;N
|
||||
d
|
||||
b end
|
||||
#
|
||||
: one
|
||||
/const size_t num_var/! b two
|
||||
s|^|# ifndef NDEBUG\\n|
|
||||
s|\$|\\n# endif|
|
||||
b end
|
||||
#
|
||||
: two
|
||||
/set new_par for the dependent dynamic parameters/! b three
|
||||
s|^| // index corresponding to the parameter zero\\
|
||||
addr_t zero_par_index = rec->put_con_par( Base(0) );\\n\\n|
|
||||
b end
|
||||
#
|
||||
: three
|
||||
/case FunapOp:/! b four
|
||||
N;N;N;N;N;N;N
|
||||
s|\\n *if.*||
|
||||
s|$|\\
|
||||
if( new_arg[0] == addr_t_max )\\
|
||||
new_arg[0] = zero_par_index;\\
|
||||
rec->PutArg(new_arg[0]);|
|
||||
b end
|
||||
#
|
||||
: four
|
||||
/if( size_t(new_arg.0.) < num_var )/! b five
|
||||
s|if|CPPAD_ASSERT_UNKNOWN|
|
||||
s|$|;\\
|
||||
if( new_arg[0] != 0 )|
|
||||
b end
|
||||
#
|
||||
: five
|
||||
/new_arg.0. =.*base_nan/! b six
|
||||
s|=.*|= zero_par_index;|
|
||||
: six
|
||||
/case FunrpOp:/! b seven
|
||||
N;N;N;N;N;N;N;N;N;N;N;N
|
||||
s|\\n *if.*||
|
||||
s|$|\\
|
||||
if( new_arg[0] == addr_t_max )\\
|
||||
{ // This parameter is not used here or anywhere.\\
|
||||
CPPAD_ASSERT_UNKNOWN( op_usage[i_op] == usage_t(no_usage) );\\
|
||||
new_arg[0] = zero_par_index;\\
|
||||
}\\
|
||||
rec->PutArg(new_arg[0]);\\
|
||||
//|
|
||||
b end
|
||||
#
|
||||
: seven
|
||||
s|rec->PutArg(0);.*|rec->PutArg( zero_par_index );|
|
||||
: end
|
||||
EOF
|
||||
sed -i $file -f junk.sed
|
||||
# ----------------------------------------------------------------------------
|
||||
# cppad_lib: replace soversion number and ensure build type is release
|
||||
sed -i.bak CppAD-%{version}/cppad_lib/CMakeLists.txt \
|
||||
|
|
@ -272,6 +183,10 @@ make %{?_smp_mflags} check
|
|||
|
||||
# ----------------------------------------------------------------------------
|
||||
%changelog
|
||||
* Sun Feb 28 2021 Brad Bell <bradbell at seanet dot com> - 20210000.5-1
|
||||
- Advance to upstream source 20210000.5
|
||||
- Remove patches that are no longer necessary.
|
||||
|
||||
* Thu Feb 18 2021 Brad Bell <bradbell at seanet dot com> - 20210000.3-3
|
||||
- Patch corresponding to bug fix in upstream source 20210000.5
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue