From d2fca9ff082c3b1a8a22d068f024537af03aefc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Sat, 30 May 2020 21:40:06 +0100 Subject: patches/tdnf-2.1.1_pre.local.patch: fix libtdnfcli library dependencies. vars/tdnf.vars:pkg_tdnf_configure(): export ${PKG_CONFIG{,_LIBDIR}} during execution. vars/tdnf.vars:pkg_tdnf_configure(): define ${OPENSSL_LIBRARY} as ${PKG_PREFIX}/lib/libcrypto.so. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lucio Andrés Illanes Albornoz Signed-off-by: Neal Gompa --- patches/tdnf-2.1.1_pre.local.patch | 22 ++++++++++++++++++++++ vars/tdnf.vars | 33 +++++++++++++++++++++------------ 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/patches/tdnf-2.1.1_pre.local.patch b/patches/tdnf-2.1.1_pre.local.patch index 52459566..15189a8e 100644 --- a/patches/tdnf-2.1.1_pre.local.patch +++ b/patches/tdnf-2.1.1_pre.local.patch @@ -26,3 +26,25 @@ index 25ee54e..b126bb0 100644 -- 2.26.1 +--- tdnf-2.1.1/tools/cli/lib/CMakeLists.txt.orig 2020-05-29 18:28:42.000000000 +0100 ++++ tdnf-2.1.1/tools/cli/lib/CMakeLists.txt 2020-05-30 21:15:15.525966612 +0100 +@@ -6,6 +6,8 @@ + # of the License are located in the COPYING file of this distribution. + # + ++include_directories(${CMAKE_SOURCE_DIR}/include) ++ + # configure pkgconfig file + configure_file( + tdnfcli.pc.in +@@ -26,6 +28,10 @@ + updateinfocmd.c + ) + ++target_link_libraries(${LIB_TDNF_CLI} ++ ${LIB_TDNF} ++ ${LIB_TDNF_COMMON} ++) + + set_target_properties(${LIB_TDNF_CLI} PROPERTIES + VERSION ${PROJECT_VERSION} diff --git a/vars/tdnf.vars b/vars/tdnf.vars index d33a55ea..c95150c4 100644 --- a/vars/tdnf.vars +++ b/vars/tdnf.vars @@ -3,20 +3,29 @@ # pkg_tdnf_configure() { - if ! rtl_fileop rm config.cache \ - || ! env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" PREFIX="" \ - cmake -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ - -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ - -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ - -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="ONLY" \ - -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="ONLY" \ - -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="NEVER" \ - -DCMAKE_FIND_ROOT_PATH="${PKG_PREFIX}" \ - -DCMAKE_INSTALL_PREFIX="" \ - -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ + local _rc=0; + rtl_export_vars \ + PKG_CONFIG "${PKG_PKG_CONFIG:-}" \ + PKG_CONFIG_LIBDIR "${PKG_PKG_CONFIG_LIBDIR:-}"; + if ! rtl_fileop rm config.cache \ + || ! env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" PREFIX="" \ + cmake -DCMAKE_AR="${PREFIX}/bin/${PKG_AR}" \ + -DCMAKE_C_COMPILER="${PREFIX}/bin/${PKG_CC}" \ + -DCMAKE_CXX_COMPILER="${PREFIX}/bin/${PKG_TARGET}-g++" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="ONLY" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="NEVER" \ + -DCMAKE_FIND_ROOT_PATH="${PKG_PREFIX}" \ + -DCMAKE_INSTALL_PREFIX="" \ + -DCMAKE_RANLIB="${PREFIX}/bin/${PKG_RANLIB}" \ + -DOPENSSL_LIBRARY="${PKG_PREFIX}/lib/libcrypto.so" \ "../tdnf-${PKG_VERSION}"; then - return 1; + _rc=1; fi; + rtl_export_vars -u \ + PKG_CONFIG "${PKG_PKG_CONFIG:-}" \ + PKG_CONFIG_LIBDIR "${PKG_PKG_CONFIG_LIBDIR:-}"; + return "${_rc}"; }; # vim:filetype=sh textwidth=0 -- cgit v1.2.3