From 4a43efa7a7acf083268276999bb5a0e9ef3333b4 Mon Sep 17 00:00:00 2001 From: Antonio Trande Date: Wed, 28 Jul 2021 19:08:01 +0200 Subject: [PATCH] Fix pkgconfig file's entries --- cppad-fix_pkgconfig.patch | 26 ++++++++++++++++++++++++++ cppad.spec | 12 ++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 cppad-fix_pkgconfig.patch diff --git a/cppad-fix_pkgconfig.patch b/cppad-fix_pkgconfig.patch new file mode 100644 index 0000000..2835e2e --- /dev/null +++ b/cppad-fix_pkgconfig.patch @@ -0,0 +1,26 @@ +--- a/pkgconfig/cppad.pc.orig.in 2021-02-18 14:28:40.000000000 +0100 ++++ b/pkgconfig/cppad.pc.in 2021-07-28 18:23:38.761860174 +0200 +@@ -15,9 +15,9 @@ + # for the meaning of these variables. + # + prefix=@cppad_prefix@ +-exec_prefix=$(prefix) +-includedir=${prefix}/@cppad_includedir@ +-libdir=${exec_prefix}/@cppad_libdir@ ++exec_prefix=@cppad_prefix@ ++includedir=@cppad_prefix@/${cmake_install_includedirs}/cppad ++libdir=@cppad_prefix@/${cmake_install_libdirs} + # + # See https://people.freedesktop.org/~dbn/pkg-config-guide.html + # for the meaning of the settings below: +@@ -27,8 +27,8 @@ + Version: @cppad_version@ + URL: @cppad_url@ + # +-Cflags: -I${includedir} +-Libs: -L{libdir} -l@cppad_lib_list@ ++Cflags: -I@cppad_prefix@/${cmake_install_includedirs}/cppad ++Libs: -L@cppad_prefix@/${cmake_install_libdirs} @cppad_lib_list@ + Requires: + Libs.private @cppad_libs_private@ + Requires.private: @cppad_requires_private@ diff --git a/cppad.spec b/cppad.spec index 0c0f8e7..42091e5 100644 --- a/cppad.spec +++ b/cppad.spec @@ -13,7 +13,7 @@ # https://fedoraproject.org/wiki/Packaging:Versioning Name: cppad Version: %{yyyymmdd}.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc License: EPL-2.0 or GPLv2+ @@ -25,6 +25,9 @@ BuildRequires: gcc-c++ BuildRequires: cmake >= 2.8 BuildRequires: make +# Fix pkgconfig file's entries +Patch0: cppad-fix_pkgconfig.patch + # Starting with f33, need to define this macro to build in source directory %define __cmake_in_source_build 1 @@ -70,6 +73,9 @@ The documentation, for the most recent version of %{name}, can be found at # Create an empty directory named cppad-%%{version}, # changed into that directory and unpack Source0 and Source1. %setup -q -c -a 0 -a 1 +pushd CppAD-%{version} +%patch0 -p1 -b .backup +popd # # move the documentaion to the build directory mv CppAD-%{yyyymmdd}.doc/doc CppAD-%{version}/doc @@ -94,7 +100,6 @@ sed -i.bak CppAD-%{version}/cmake/set_compile_flags.cmake \ # test_more/debug_rel/CMakeLists.txt: remove def of CPPAD_DEBUG_AND_RELEASE sed -i.bak CppAD-%{version}/test_more/debug_rel/CMakeLists.txt \ -e 's|-DCPPAD_DEBUG_AND_RELEASE||' -# # ----------------------------------------------------------------------------- # build # ----------------------------------------------------------------------------- @@ -180,6 +185,9 @@ make %{?_smp_mflags} check # This enables one to check that the necessary files are installed. # ---------------------------------------------------------------------------- %changelog +* Wed Jul 28 2021 Antonio Trande - 20210000.5-4 +- Fix pkgconfig file's entries + * Wed Jul 21 2021 Fedora Release Engineering - 20210000.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild