View Issue Details

IDProjectCategoryView StatusLast Update
0015130ScribusBuild Systempublic2021-11-09 21:39
Reporteru ltd. Assigned Tocbradney  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Platformamd64OSalike debianOS Version9
Product Version1.5.4.svn 
Fixed in Version1.5.8.svn 
Summary0015130: Fix FindLIBPODOFO.cmake
Description1. I use a local copy of the headers and therefore need to tune the config.h location. -> made tunable with this patch.

2. On my system "OpenSSL" will be found as "OPENSSL".
TagsCMake, patch
PatchYes

Activities

u ltd.

2018-02-05 09:40

reporter  

scribus-20180205-095552-jonas-buildpart.patch (2,661 bytes)   
Index: cmake/modules/FindLIBPODOFO.cmake
===================================================================
--- cmake/modules/FindLIBPODOFO.cmake	(Revision 22369)
+++ cmake/modules/FindLIBPODOFO.cmake	(Arbeitskopie)
@@ -34,20 +34,25 @@
 )
 
 if(LIBPODOFO_INCLUDE_DIR AND LIBPODOFO_LIBRARY)
-	file(STRINGS "${LIBPODOFO_INCLUDE_DIR}/podofo/base/podofo_config.h" PODOFO_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$")
-	file(STRINGS "${LIBPODOFO_INCLUDE_DIR}/podofo/base/podofo_config.h" PODOFO_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$")
-	file(STRINGS "${LIBPODOFO_INCLUDE_DIR}/podofo/base/podofo_config.h" PODOFO_PATCH_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+[0-9]+$")
+	if(NOT LIBPODOFO_CONFIG_H)
+		set(LIBPODOFO_CONFIG_H "${LIBPODOFO_INCLUDE_DIR}/podofo/base/podofo_config.h" CACHE FILEPATH "Alternative place of podofo_config.h")
+	endif()
+	
+	file(STRINGS "${LIBPODOFO_CONFIG_H}" PODOFO_MAJOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+[0-9]+$")
+	file(STRINGS "${LIBPODOFO_CONFIG_H}" PODOFO_MINOR_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+[0-9]+$")
+	file(STRINGS "${LIBPODOFO_CONFIG_H}" PODOFO_PATCH_VER_LINE REGEX "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+[0-9]+$")
 	string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MAJOR[ \t]+([0-9]+)$" "\\1" PODOFO_MAJOR_VER "${PODOFO_MAJOR_VER_LINE}")
 	string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_MINOR[ \t]+([0-9]+)$" "\\1" PODOFO_MINOR_VER "${PODOFO_MINOR_VER_LINE}")
 	string(REGEX REPLACE "^#define[ \t]+PODOFO_VERSION_PATCH[ \t]+([0-9]+)$" "\\1" PODOFO_PATCH_VER "${PODOFO_PATCH_VER_LINE}")
-	#message(STATUS "PODOFO MAJOR VERSION ${PODOFO_MAJOR_VER}")
-	#message(STATUS "PODOFO MINOR VERSION ${PODOFO_MINOR_VER}")
-	#message(STATUS "PODOFO PATCH VERSION ${PODOFO_PATCH_VER}")
+	message(STATUS "PODOFO MAJOR VERSION ${PODOFO_MAJOR_VER}")
+	message(STATUS "PODOFO MINOR VERSION ${PODOFO_MINOR_VER}")
+	message(STATUS "PODOFO PATCH VERSION ${PODOFO_PATCH_VER}")
 	set(LIBPODOFO_VERSION "${PODOFO_MAJOR_VER}.${PODOFO_MINOR_VER}.${PODOFO_PATCH_VER}" CACHE STRING "PoDoFo version string")
 	if(LIBPODOFO_VERSION VERSION_GREATER "0.9.4")
-		# podofo 0.9.5 use OpenSSL includes in its public headers, we need to know OpenSSL include dirs
-		# (https://bugs.scribus.net/view.php?id=14838)
-		find_package(OpenSSL)
+		find_package(OpenSSL QUIET)
+		if (NOT OPENSSL_FOUND)
+			find_package(OPENSSL)
+		endif()
 		if (OPENSSL_FOUND)
 			message("OpenSSL found OK for installed version of PoDoFo (>= 0.9.5) - Enabling support for PDF embedded in AI")
 			set(LIBPODOFO_FOUND TRUE CACHE BOOLEAN "Was libpodofo found")

Issue History

Date Modified Username Field Change
2018-02-05 09:40 u ltd. New Issue
2018-02-05 09:40 u ltd. File Added: scribus-20180205-095552-jonas-buildpart.patch
2018-02-05 09:40 u ltd. Tag Attached: patch
2018-02-05 09:40 u ltd. Tag Attached: CMake
2021-10-27 21:23 cbradney Assigned To => cbradney
2021-10-27 21:23 cbradney Status new => resolved
2021-10-27 21:23 cbradney Resolution open => fixed
2021-10-27 21:23 cbradney Fixed in Version => 1.5.8.svn
2021-11-09 21:39 cbradney Status resolved => closed