From d4c75cc1a72be2b4eefcf651df996e5b5cf5c8c7 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Wed, 27 Dec 2023 15:33:38 +0100 Subject: [PATCH] Fix pkgconfig file regression (rhbz#2255937) --- leptonica.spec | 5 ++++- leptonica_cmake.patch | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/leptonica.spec b/leptonica.spec index 240d85d..856e420 100644 --- a/leptonica.spec +++ b/leptonica.spec @@ -12,7 +12,7 @@ Name: leptonica Version: 1.84.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C library for efficient image processing and image analysis operations License: Leptonica @@ -197,6 +197,9 @@ ln -s %{mingw64_libdir}/libleptonica.dll.a %{buildroot}%{mingw64_libdir}/liblept %changelog +* Wed Dec 27 2023 Michael J Gruber - 1.84.0-2 +- Fix pkgconfig file regression (rhbz#2255937) + * Sun Dec 24 2023 Sandro Mani - 1.84.0-1 - Update to 1.84.0 diff --git a/leptonica_cmake.patch b/leptonica_cmake.patch index 8b218a0..f4160b3 100644 --- a/leptonica_cmake.patch +++ b/leptonica_cmake.patch @@ -1,6 +1,6 @@ -diff -rupN --no-dereference leptonica-1.84.0/CMakeLists.txt leptonica-1.84.0-new/CMakeLists.txt ---- leptonica-1.84.0/CMakeLists.txt 2023-12-24 09:24:30.000000000 +0100 -+++ leptonica-1.84.0-new/CMakeLists.txt 2023-12-24 12:06:45.573436362 +0100 +diff -rupN --no-dereference leptonica-1.84.0-orig/CMakeLists.txt leptonica-1.84.0/CMakeLists.txt +--- leptonica-1.84.0-orig/CMakeLists.txt 2023-12-24 09:24:30.000000000 +0100 ++++ leptonica-1.84.0/CMakeLists.txt 2023-12-27 13:49:02.576324545 +0100 @@ -71,7 +71,7 @@ option(ENABLE_WEBP "Enable WebP support" option(ENABLE_OPENJPEG "Enable OpenJPEG support" ON) @@ -30,9 +30,9 @@ diff -rupN --no-dereference leptonica-1.84.0/CMakeLists.txt leptonica-1.84.0-new install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LeptonicaConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/LeptonicaConfig-version.cmake DESTINATION ${leptonica_INSTALL_CMAKE_DIR}) -diff -rupN --no-dereference leptonica-1.84.0/prog/CMakeLists.txt leptonica-1.84.0-new/prog/CMakeLists.txt ---- leptonica-1.84.0/prog/CMakeLists.txt 2023-12-24 09:24:30.000000000 +0100 -+++ leptonica-1.84.0-new/prog/CMakeLists.txt 2023-12-24 12:06:45.581436579 +0100 +diff -rupN --no-dereference leptonica-1.84.0-orig/prog/CMakeLists.txt leptonica-1.84.0/prog/CMakeLists.txt +--- leptonica-1.84.0-orig/prog/CMakeLists.txt 2023-12-24 09:24:30.000000000 +0100 ++++ leptonica-1.84.0/prog/CMakeLists.txt 2023-12-27 13:49:02.576324545 +0100 @@ -12,7 +12,7 @@ function(add_prog_target target) if (BUILD_SHARED_LIBS) target_compile_definitions (${target} PRIVATE -DLIBLEPT_IMPORTS) @@ -42,21 +42,22 @@ diff -rupN --no-dereference leptonica-1.84.0/prog/CMakeLists.txt leptonica-1.84. set_target_properties (${target} PROPERTIES FOLDER prog) endfunction(add_prog_target) ######################################## -diff -rupN --no-dereference leptonica-1.84.0/src/CMakeLists.txt leptonica-1.84.0-new/src/CMakeLists.txt ---- leptonica-1.84.0/src/CMakeLists.txt 2023-12-24 09:24:30.000000000 +0100 -+++ leptonica-1.84.0-new/src/CMakeLists.txt 2023-12-24 12:06:45.588436769 +0100 -@@ -16,7 +16,9 @@ string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS +diff -rupN --no-dereference leptonica-1.84.0-orig/src/CMakeLists.txt leptonica-1.84.0/src/CMakeLists.txt +--- leptonica-1.84.0-orig/src/CMakeLists.txt 2023-12-24 09:24:30.000000000 +0100 ++++ leptonica-1.84.0/src/CMakeLists.txt 2023-12-27 14:34:36.751976070 +0100 +@@ -16,7 +16,10 @@ string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS add_library (leptonica ${src} ${hdr}) set_target_properties (leptonica PROPERTIES VERSION 6.0.0) set_target_properties (leptonica PROPERTIES SOVERSION 6) -set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica$<$:-${PROJECT_VERSION}$<$:d>>) ++set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica) +if(MINGW) +set_target_properties (leptonica PROPERTIES SUFFIX "-6${CMAKE_SHARED_LIBRARY_SUFFIX}") +endif(MINGW) if (BUILD_SHARED_LIBS) target_compile_definitions (leptonica PRIVATE -DLIBLEPT_EXPORTS) -@@ -66,7 +68,7 @@ if (UNIX) +@@ -66,7 +69,7 @@ if (UNIX) ${CMAKE_COMMAND} -E create_symlink "$" ${old_target} DEPENDS ${PROJECT_NAME} COMMENT "Creating lept symlink") @@ -65,7 +66,7 @@ diff -rupN --no-dereference leptonica-1.84.0/src/CMakeLists.txt leptonica-1.84.0 endif(SYM_LINK) endif() -@@ -89,7 +91,7 @@ else() +@@ -89,7 +92,7 @@ else() export(TARGETS leptonica APPEND FILE ${CMAKE_BINARY_DIR}/LeptonicaTargets.cmake) endif()