diff --git a/.gitignore b/.gitignore index 6dd6f65..db91bc0 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,3 @@ # Most recent upstrem source /CppAD-20240000.3.tar.gz /CppAD-20250000.0.tar.gz -/CppAD-20260000.0.tar.gz diff --git a/cppad.spec b/cppad.spec index b3b1612..5fa54b6 100644 --- a/cppad.spec +++ b/cppad.spec @@ -12,7 +12,7 @@ # # year # The year corresponding to this version -%define year 2026 +%define year 2025 # # soversion # fedora uses its own soversion number for cppad_lib where @@ -29,7 +29,7 @@ # https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/ Name: cppad Version: %{year}0000.0 -Release: 1%{?dist} +Release: 4%{?dist} Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc # License: EPL-2.0 OR GPL-2.0-or-later @@ -38,7 +38,7 @@ Source: %{url}/archive/%{version}/CppAD-%{version}.tar.gz # BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: cmake >= 3.10 +BuildRequires: cmake >= 3.0 BuildRequires: make BuildRequires: python-xrst >= 2025.0 BuildRequires: python-sphinx_rtd_theme @@ -81,6 +81,11 @@ The documentation for the most recent version of %{name} can be found at # changed into that directory and unpack Source. %setup -q -c # +# atomic_op.hpp +# Fix warning. This should not be necessary when version > 20250000.0 +sed -i CppAD-%{version}/include/cppad/local/var_op/atomic_op.hpp \ + -e 's|arg_tmp\[1\];|*arg_tmp = { 0 };|' +# # xrst.toml # This is not a git repository so suppress the warning that could not double # check that all the files with xrst commands were included. @@ -92,6 +97,38 @@ echo 'data = [ ]' >> CppAD-%{version}/xrst.toml cp CppAD-%{version}/COPYING COPYING cp CppAD-%{version}/uw_copy_040507.html uw_copy_040507.html # +# fix bug +# should not be needed once version > 20250000.0 +cat << EOF > temp.sed +/setup_random(size_t& not_used)/! b end +: loop +N +/\\n *}/! b loop +s|^|# if ! CPPAD_IS_SAME_UNSIGNED_INT_SIZE_T\\n| +s|$|\\n# endif| +# +: end +EOF +sed -i.bak CppAD-%{version}/include/cppad/local/play/player.hpp -f temp.sed +# +# fix bug +# should not be needed once version > 20250000.0 +cat << EOF > temp.sed +/CHECK_CXX_SOURCE_COMPILES/! b end +s|^| SET(CMAKE_REQUIRED_DEFINITIONS "" )\\ + SET(CMAKE_REQUIRED_INCLUDES "" )\\ + SET(CMAKE_REQUIRED_LIBRARIES "" )\\ + IF( cppad_cxx_flags )\\ + SET(CMAKE_REQUIRED_FLAGS "\${cppad_cxx_flags} \${CMAKE_CXX_FLAGS}" )\\ + ELSE( cppad_cxx_flags )\\ + SET(CMAKE_REQUIRED_FLAGS "" )\\ + ENDIF( cppad_cxx_flags )\\ +| +# +: end +EOF +sed -i.bak CppAD-%{version}/cmake/compile_source_test.cmake -f temp.sed +# # cppad_lib/CMakeLists.txt # cppad_lib: replace soversion number and ensure build type is release sed -i.bak CppAD-%{version}/cppad_lib/CMakeLists.txt \ @@ -232,12 +269,6 @@ make %{?_smp_mflags} check %%clean # ---------------------------------------------------------------------------- %changelog -* Mon Jan 05 2026 Brad Bell - 20260000.0-1 -- New upstream source cppad-20260000.0. - -* Wed Jul 23 2025 Fedora Release Engineering - 20250000.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - * Wed Feb 05 2025 - 20250000.0-4 - python-toml is deprecated, so current xrst-python uses python-tomli instead diff --git a/sources b/sources index 8f40433..1f290de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (CppAD-20260000.0.tar.gz) = abe9dd9a971f8d154990d54c1f798c8cab6bf90d016bb288efbcb23a14331897762610295658eec04fb50e5c13b05f4bb6b50a4647d6f0468eb94833dc3400d2 +SHA512 (CppAD-20250000.0.tar.gz) = 05bb5a77e56f53f89f3e403943e64521bfd8e148ed142d9ce3ee695e10574567befce76cf31819fe1f580e45e9d11db0477388e18b78e410ca7ea528b04ec282