From 62ce804ae41a1fc1421eeb1e166df95dc3f29839 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Jan 20 2017 14:11:05 +0000 Subject: Advance from cppad-20160000.0 -> cppad-20170000.1. --- diff --git a/cppad.spec b/cppad.spec index 245c0e8..31a01ae 100644 --- a/cppad.spec +++ b/cppad.spec @@ -1,10 +1,10 @@ # ---------------------------------------------------------------------------- # The comamnd 'fedpkg lint' generates the warning: # -# cppad.spec:87: W: rpm-buildroot-usage +# cppad.spec:89: W: rpm-buildroot-usage # %%prep includedir=%%{buildroot}%%{_includedir} # -# See http://comments.gmane.org/gmane.linux.redhat.fedora.devel/144920 +# See https://lists.fedoraproject.org/pipermail/devel/2011-January/147969.html # ---------------------------------------------------------------------------- # The command 'fedpkg lint' generates the warning: # @@ -15,13 +15,15 @@ # These refer to the corresponding subpackage and are not spelling errors. # ---------------------------------------------------------------------------- +# Release starts with 1; https://fedoraproject.org/wiki/Packaging:Versioning Name: cppad -Version: 20160000.0 -Release: 2%{?dist} +Version: 20170000.1 +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 -# Nothing useful in *debuginfo +# Nothing useful in *debuginfo. If status of cppad_lib changes, this may +# also change (see mention of cppad_lib below). %global debug_package %{nil} Group: Development/Libraries @@ -87,61 +89,64 @@ rm -rf %{buildroot} includedir=%{buildroot}%{_includedir} sed \ -e "s|\(INCLUDE_DIRECTORIES(\).*{cppad_SOURCE_DIR}|\1 SYSTEM $includedir|" \ - -ibak CMakeLists.txt + -i.bak CMakeLists.txt # 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. +# distribution. This may or may not be true for next year 2018. cat << EOF > CMakeLists.sed /^ADD_SUBDIRECTORY(cppad_lib)/d /^\tcppad_lib$/d EOF -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 -/^int main(void)/N -s|^int main(void)\n{|# include \\ -int main(void)\\ -{ // print machine epsilon\\ - std::cout << "DBL_EPSILON =" << DBL_EPSILON << std::endl;\\ -\\ -| -EOF -sed -ibak example/example.cpp -f example.sed +list=`find . -name 'CMakeLists.txt' | \ + sed -e '/^\.\/CMakeLists.txt/d' -e '/^\.\/cppad_lib\/CMakeLists.txt/d'` +for file in $list +do + if grep 'cppad_lib' "$file" > /dev/null + then + # cppad_lib is set in ./CMakeLists.txt and used in other files + cp "$file" "$file.bak" + sed -i "$file" -e '/^\t*${cppad_lib}$/d' + if grep 'cppad_lib' "$file" > /dev/null + then + echo "Edit of $file failed." + exit 1 + fi + fi +done # See https://fedoraproject.org/wiki/Packaging:Cmake?rd=Packaging/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. +# Cannot use %%{_includedir}, $${_libdir}, %%{_datadir}, %%{_docdir} +# because they are absolute paths. 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 \ + -G 'Unix Makefiles' \ \ -D cppad_prefix=%{_prefix} \ + -D cppad_postfix='' \ -D cmake_install_includedirs=include \ + -D cmake_install_libdirs=lib \ -D cmake_install_datadir=share \ -D cmake_install_docdir=share/doc \ \ + -D adolc_prefix='' \ + -D colpack_prefix='' \ + -D eigen_prefix='' \ + -D fadbad_prefix='' \ + -D ipopt_prefix='' \ + -D sacado_prefix='' \ + \ -D cppad_cxx_flags='-Wall -ansi -pedantic-errors -std=c++11 -Wshadow' \ + -D cppad_profile_flag='' \ + \ -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_deprecated=NO \ @@ -168,6 +173,17 @@ make check # ---------------------------------------------------------------------------- %changelog +* Fri Jan 20 2017 Brad Bell - 20170000.1-1 +- Advance to version 2017 of cppad. +- New link for discussion of fedpkg lint warning rpm-builroot-usage +- (old link seems to have disappeared). +- Change CMakeLists.txtbak -> CMakeLists.txt.bak. +- Use find to create list of CMakeLists.txt files and check that edit +- of these files goes as expected. +- Include explicit setting of all possible cmake command options +- (empty prefix setting correspond to packages not included). +- cppad_sparse_list=YES removed (YES is now always chosen by upstream source) + * Wed Feb 03 2016 Fedora Release Engineering - 20160000.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild