From 35ada7008601fdb9664914698ea1207ddba3b45a Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sun, 24 Dec 2023 12:10:04 +0100 Subject: [PATCH] Update to 1.84.0 --- .gitignore | 1 + leptonica.spec | 11 ++++++-- leptonica_cmake.patch | 65 +++++++++++++++++++++++++++++-------------- sources | 2 +- 4 files changed, 54 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 495436c..cceb45f 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /leptonica-1.82.0.tar.gz /leptonica-1.83.0.tar.gz /leptonica-1.83.1.tar.gz +/leptonica-1.84.0.tar.gz diff --git a/leptonica.spec b/leptonica.spec index 7b57984..240d85d 100644 --- a/leptonica.spec +++ b/leptonica.spec @@ -11,15 +11,17 @@ %endif Name: leptonica -Version: 1.83.1 -Release: 2%{?dist} +Version: 1.84.0 +Release: 1%{?dist} Summary: C library for efficient image processing and image analysis operations License: Leptonica URL: https://github.com/danbloomberg/leptonica Source0: https://github.com/DanBloomberg/leptonica/archive/%{version}/%{name}-%{version}.tar.gz # Honour LIB_SÙFFIX -# Fix library version +# Add missing -lm +# Fix library name on win32 +# Don't add _ suffix to pkgconfig filename Patch0: leptonica_cmake.patch BuildRequires: cmake @@ -195,6 +197,9 @@ ln -s %{mingw64_libdir}/libleptonica.dll.a %{buildroot}%{mingw64_libdir}/liblept %changelog +* Sun Dec 24 2023 Sandro Mani - 1.84.0-1 +- Update to 1.84.0 + * Thu Jul 20 2023 Fedora Release Engineering - 1.83.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/leptonica_cmake.patch b/leptonica_cmake.patch index 163377a..8b218a0 100644 --- a/leptonica_cmake.patch +++ b/leptonica_cmake.patch @@ -1,8 +1,8 @@ -diff -rupN --no-dereference leptonica-1.83.1/CMakeLists.txt leptonica-1.83.1-new/CMakeLists.txt ---- leptonica-1.83.1/CMakeLists.txt 2023-01-26 07:12:24.000000000 +0100 -+++ leptonica-1.83.1-new/CMakeLists.txt 2023-01-28 23:06:59.880773377 +0100 -@@ -60,7 +60,7 @@ option(LIBWEBP_SUPPORT "Build with WebP - option(OPENJPEG_SUPPORT "Build with OpenJPEG support" ON) +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 +@@ -71,7 +71,7 @@ option(ENABLE_WEBP "Enable WebP support" + option(ENABLE_OPENJPEG "Enable OpenJPEG support" ON) set(leptonica_INSTALL_CMAKE_DIR - "lib/cmake/leptonica" @@ -10,30 +10,53 @@ diff -rupN --no-dereference leptonica-1.83.1/CMakeLists.txt leptonica-1.83.1-new CACHE STRING "Install destination for CMake package files") if(NOT SW_BUILD) -@@ -307,7 +307,7 @@ configure_file( +@@ -358,7 +358,7 @@ configure_file(lept.pc.cmake ${CMAKE_CUR + # to resolve generator expression in OUTPUT_NAME + file( + GENERATE +- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lept_$.pc ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lept.pc + INPUT ${CMAKE_CURRENT_BINARY_DIR}/lept.pc.in) + + configure_file( +@@ -368,8 +368,8 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/LeptonicaConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LeptonicaConfig.cmake @ONLY) --install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lept.pc DESTINATION lib/pkgconfig) -+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lept.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig) +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lept_$.pc +- DESTINATION lib/pkgconfig) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lept.pc ++ DESTINATION lib${LIB_SUFFIX}/pkgconfig) 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.83.1/src/CMakeLists.txt leptonica-1.83.1-new/src/CMakeLists.txt ---- leptonica-1.83.1/src/CMakeLists.txt 2023-01-26 07:12:24.000000000 +0100 -+++ leptonica-1.83.1-new/src/CMakeLists.txt 2023-01-28 23:06:59.880773377 +0100 -@@ -20,8 +20,8 @@ add_library (leptoni +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 +@@ -12,7 +12,7 @@ function(add_prog_target target) + if (BUILD_SHARED_LIBS) + target_compile_definitions (${target} PRIVATE -DLIBLEPT_IMPORTS) + endif() +- target_link_libraries (${target} leptonica) ++ target_link_libraries (${target} leptonica m) + 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 + add_library (leptonica ${src} ${hdr}) set_target_properties (leptonica PROPERTIES VERSION 6.0.0) set_target_properties (leptonica PROPERTIES SOVERSION 6) - if (WIN32) --set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica-${VERSION_PLAIN}) --set_target_properties (leptonica PROPERTIES DEBUG_OUTPUT_NAME leptonica-${VERSION_PLAIN}d) +-set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica$<$:-${PROJECT_VERSION}$<$:d>>) ++if(MINGW) +set_target_properties (leptonica PROPERTIES SUFFIX "-6${CMAKE_SHARED_LIBRARY_SUFFIX}") -+set_target_properties (leptonica PROPERTIES SUFFIX "-6${CMAKE_SHARED_LIBRARY_SUFFIX}") - else() - set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica) - set_target_properties (leptonica PROPERTIES DEBUG_OUTPUT_NAME leptonica) -@@ -70,7 +70,7 @@ if (UNIX) ++endif(MINGW) + + if (BUILD_SHARED_LIBS) + target_compile_definitions (leptonica PRIVATE -DLIBLEPT_EXPORTS) +@@ -66,7 +68,7 @@ if (UNIX) ${CMAKE_COMMAND} -E create_symlink "$" ${old_target} DEPENDS ${PROJECT_NAME} COMMENT "Creating lept symlink") @@ -42,7 +65,7 @@ diff -rupN --no-dereference leptonica-1.83.1/src/CMakeLists.txt leptonica-1.83.1 endif(SYM_LINK) endif() -@@ -89,7 +89,7 @@ else() +@@ -89,7 +91,7 @@ else() export(TARGETS leptonica APPEND FILE ${CMAKE_BINARY_DIR}/LeptonicaTargets.cmake) endif() diff --git a/sources b/sources index 2badf66..f0157ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (leptonica-1.83.1.tar.gz) = 48f8769255064ff324bb6bcb7db35af64123a8b68b0f4d64a16fed64dc6dde69cdb4b6220c087d8177983315c3d8e258143d60d42ff4328d021a588c7a66946f +SHA512 (leptonica-1.84.0.tar.gz) = f4b2eebfa991e6a49432e13de86d57d8efe427216a757a47e6ed00babbb74c141f271b5a70aafbad9e4dedbdec0cb6245e6c0fb56e3c68c01b437022a05a9af2