Fix pkgconfig file regression (rhbz#2255937)

This commit is contained in:
Michael J Gruber 2023-12-27 15:33:38 +01:00
parent 35ada70086
commit d4c75cc1a7
2 changed files with 17 additions and 13 deletions

View File

@ -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 <mjg@fedoraproject.org> - 1.84.0-2
- Fix pkgconfig file regression (rhbz#2255937)
* Sun Dec 24 2023 Sandro Mani <manisandro@gmail.com> - 1.84.0-1
- Update to 1.84.0

View File

@ -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$<$<BOOL:${WIN32}>:-${PROJECT_VERSION}$<$<CONFIG:DEBUG>: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 "$<TARGET_FILE:leptonica>" ${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()