Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 498818 Details for
Bug 614756
app-text/podofo fails to build against openssl-1.1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
podofo-0.9.6_pre20170629-openssl-1.1.patch
podofo-0.9.6_pre20170629-openssl-1.1.patch (text/plain), 9.67 KB, created by
Mark Wright
on 2017-10-16 04:14:03 UTC
(
hide
)
Description:
podofo-0.9.6_pre20170629-openssl-1.1.patch
Filename:
MIME Type:
Creator:
Mark Wright
Created:
2017-10-16 04:14:03 UTC
Size:
9.67 KB
patch
obsolete
>--- podofo-0.9.6_pre20170629-orig/cmake/modules/FindOpenSSL.cmake 2017-05-02 02:32:14.000000000 +1000 >+++ /dev/null 2017-10-12 21:07:41.713995926 +1100 >@@ -1,74 +0,0 @@ >-# - Try to find the OpenSSL encryption library >-# Once done this will define >-# >-# OPENSSL_FOUND - system has the OpenSSL library >-# OPENSSL_INCLUDE_DIR - the OpenSSL include directory >-# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL >- >-# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> >-# Modified by Craig Ringer, 2008: >-# - Handle !REQUIRED >-# >-# Redistribution and use is allowed according to the terms of the BSD license. >-# For details see the accompanying COPYING-CMAKE-SCRIPTS file. >- >- >-IF(OPENSSL_LIBRARIES) >- SET(OpenSSL_FIND_QUIETLY TRUE) >-ENDIF(OPENSSL_LIBRARIES) >- >-IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) >- SET(LIB_FOUND 1) >-ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) >- >-FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h ) >- >-IF(WIN32 AND MSVC) >- # /MD and /MDd are the standard values - if somone wants to use >- # others, the libnames have to change here too >- # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b >- >- FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32) >- FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32) >- >- IF(MSVC_IDE) >- IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) >- SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG}) >- ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) >- MESSAGE("OpenSSL: Could not find the debug and release version of openssl") >- MESSAGE("OpenSSL: Disabling OpenSSL") >- SET(OPENSSL_LIBRARIES) >- ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) >- ELSE(MSVC_IDE) >- STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) >- IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) >- SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG}) >- ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) >- SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE}) >- ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) >- ENDIF(MSVC_IDE) >- MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE) >-ELSE(WIN32 AND MSVC) >- >- FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD ) >- >-ENDIF(WIN32 AND MSVC) >- >-IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) >- SET(OPENSSL_FOUND TRUE) >-ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) >- SET(OPENSSL_FOUND FALSE) >-ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) >- >-IF (OPENSSL_FOUND) >- IF (NOT OpenSSL_FIND_QUIETLY) >- MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") >- ENDIF (NOT OpenSSL_FIND_QUIETLY) >-ELSE (OPENSSL_FOUND) >- IF (OpenSSL_FIND_REQUIRED) >- MESSAGE(FATAL_ERROR "Could NOT find OpenSSL") >- ENDIF (OpenSSL_FIND_REQUIRED) >-ENDIF (OPENSSL_FOUND) >- >-MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) >- >--- podofo-0.9.6_pre20170629-orig/cmake/modules/FindLIBCRYPTO.cmake 2017-05-02 02:32:14.000000000 +1000 >+++ /dev/null 2017-10-12 21:07:41.713995926 +1100 >@@ -1,88 +0,0 @@ >-# - Find libCrypto >-# Find the native OpenSSL LIBCRYPTO includes and library >-# >-# LIBCRYPTO_INCLUDE_DIR - where to find sha.h, etc. >-# LIBCRYPTO_LIBRARIES - List of libraries when using libCrypto. >-# LIBCRYPTO_FOUND - True if libCrypto found. >- >- >-IF (LIBCRYPTO_INCLUDE_DIR) >- # Already in cache, be silent >- SET(LIBCRYPTO_FIND_QUIETLY TRUE) >-ENDIF (LIBCRYPTO_INCLUDE_DIR) >- >-IF (NOT LIBCRYPTO_INCLUDE_DIR OR NOT LIBCRYPTO_LIBRARIES) >- FIND_PACKAGE(PkgConfig) >- >- IF (PKG_CONFIG_FOUND) >- PKG_CHECK_MODULES (LIBCRYPTO libcrypto) >- IF (LIBCRYPTO_FOUND) >- SET (LIBCRYPTO_INCLUDE_DIR ${LIBCRYPTO_INCLUDE_DIRS}) >- ENDIF (LIBCRYPTO_FOUND) >- ENDIF (PKG_CONFIG_FOUND) >-ENDIF (NOT LIBCRYPTO_INCLUDE_DIR OR NOT LIBCRYPTO_LIBRARIES) >- >-IF (NOT LIBCRYPTO_INCLUDE_DIR OR NOT LIBCRYPTO_LIBRARIES) >- # Require a regular OpenSSL even on OSX/iOS >- # IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") >- # # MacOSX has deprecated the use of openssl crypto functions >- # # and replaced it with API-compatible CommonCrypto >- # FIND_PATH(LIBCRYPTO_INCLUDE_DIR CommonCrypto/CommonDigest.h) >- # SET(LIBCRYPTO_LIBRARY_NAMES_RELEASE ${LIBCRYPTO_LIBRARY_NAMES_RELEASE} ${LIBCRYPTO_LIBRARY_NAMES} ssl) >- # SET(LIBCRYPTO_LIBRARY_NAMES_DEBUG ${LIBCRYPTO_LIBRARY_NAMES_DEBUG} ssld) >- # ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") >- FIND_PATH(LIBCRYPTO_INCLUDE_DIR openssl/sha.h) >- SET(LIBCRYPTO_LIBRARY_NAMES_RELEASE ${LIBCRYPTO_LIBRARY_NAMES_RELEASE} ${LIBCRYPTO_LIBRARY_NAMES} crypto) >- SET(LIBCRYPTO_LIBRARY_NAMES_DEBUG ${LIBCRYPTO_LIBRARY_NAMES_DEBUG} cryptod) >- # ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") >- >- FIND_LIBRARY(LIBCRYPTO_LIBRARY_RELEASE NAMES ${LIBCRYPTO_LIBRARY_NAMES_RELEASE} ) >- >- # Find a debug library if one exists and use that for debug builds. >- # This really only does anything for win32, but does no harm on other >- # platforms. >- FIND_LIBRARY(LIBCRYPTO_LIBRARY_DEBUG NAMES ${LIBCRYPTO_LIBRARY_NAMES_DEBUG}) >- >- INCLUDE(LibraryDebugAndRelease) >- SET_LIBRARY_FROM_DEBUG_AND_RELEASE(LIBCRYPTO) >- >- # handle the QUIETLY and REQUIRED arguments and set LIBCRYPTO_FOUND to TRUE if >- # all listed variables are TRUE >- INCLUDE(FindPackageHandleStandardArgs) >- FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBCRYPTO DEFAULT_MSG LIBCRYPTO_LIBRARY LIBCRYPTO_INCLUDE_DIR) >- >- IF(LIBCRYPTO_FOUND) >- SET( LIBCRYPTO_LIBRARIES ${LIBCRYPTO_LIBRARY} ) >- ELSE(LIBCRYPTO_FOUND) >- SET( LIBCRYPTO_LIBRARIES ) >- ENDIF(LIBCRYPTO_FOUND) >- >- MARK_AS_ADVANCED( LIBCRYPTO_LIBRARY LIBCRYPTO_INCLUDE_DIR ) >- >-ENDIF (NOT LIBCRYPTO_INCLUDE_DIR OR NOT LIBCRYPTO_LIBRARIES) >- >-# check whether using OpenSSL 1.1 API >-IF (DEFINED LIBCRYPTO_INCLUDE_DIR AND DEFINED LIBCRYPTO_LIBRARIES) >- INCLUDE(CheckCSourceCompiles) >- >- SET(CMAKE_REQUIRED_INCLUDES ${LIBCRYPTO_INCLUDE_DIR}) >- SET(CMAKE_REQUIRED_LIBRARIES ${LIBCRYPTO_LIBRARIES}) >- >- CHECK_C_SOURCE_COMPILES("#include <openssl/opensslv.h> >- #ifndef OPENSSL_VERSION_NUMBER >- #error No OPENSSL_VERSION_NUMBER defined >- #endif >- #if OPENSSL_VERSION_NUMBER < 0x10100000L >- #error This is not OpenSSL 1.1 or higher >- #endif >- int main(void) { return 0; }" PODOFO_HAVE_OPENSSL_1_1) >- >- CHECK_C_SOURCE_COMPILES("#include <openssl/opensslconf.h> >- #ifndef OPENSSL_NO_RC4 >- #error No OPENSSL_NO_RC4 defined >- #endif >- int main(void) { return 0; }" PODOFO_HAVE_OPENSSL_NO_RC4) >- >- UNSET(CMAKE_REQUIRED_INCLUDES) >- UNSET(CMAKE_REQUIRED_LIBRARIES) >-ENDIF (DEFINED LIBCRYPTO_INCLUDE_DIR AND DEFINED LIBCRYPTO_LIBRARIES) >--- podofo-0.9.6_pre20170629-orig/tools/podofosign/podofosign.cpp 2017-05-02 02:32:14.000000000 +1000 >+++ podofo-0.9.6_pre20170629/tools/podofosign/podofosign.cpp 2017-10-16 13:03:35.941998405 +1100 >@@ -27,6 +27,7 @@ > #include <openssl/evp.h> > #include <openssl/err.h> > #include <openssl/pem.h> >+#include <openssl/ssl.h> > #include <openssl/x509.h> > > #if defined(_WIN64) >@@ -874,11 +875,15 @@ > outputfile = NULL; > } > >+#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000 >+ OPENSSL_init_ssl(0, NULL); >+#else > OpenSSL_add_all_algorithms(); > ERR_load_crypto_strings(); > ERR_load_PEM_strings(); > ERR_load_ASN1_strings(); > ERR_load_EVP_strings(); >+#endif > > X509* cert = NULL; > EVP_PKEY* pkey = NULL; >@@ -1082,7 +1087,9 @@ > result = e.GetError(); > } > >+#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000 > ERR_free_strings(); >+#endif > > if( pSignField ) > delete pSignField; >--- podofo-0.9.6_pre20170629-orig/CMakeLists.txt 2017-07-04 07:47:51.000000000 +1000 >+++ podofo-0.9.6_pre20170629/CMakeLists.txt 2017-10-16 14:50:32.152603703 +1100 >@@ -325,15 +325,42 @@ > FIND_PACKAGE(ZLIB REQUIRED) > MESSAGE("Found zlib headers in ${ZLIB_INCLUDE_DIR}, library at ${ZLIB_LIBRARIES}") > >-FIND_PACKAGE(LIBCRYPTO) >- >-IF(LIBCRYPTO_FOUND) >+FIND_PACKAGE(OpenSSL REQUIRED) >+if(OpenSSL_FOUND) > SET(PODOFO_HAVE_OPENSSL TRUE) >- INCLUDE_DIRECTORIES(${LIBCRYPTO_INCLUDE_DIR}) >- MESSAGE("Found OpenSSL's libCrypto headers in ${LIBCRYPTO_INCLUDE_DIR}, library at ${LIBCRYPTO_LIBRARIES}") >-ELSE(LIBCRYPTO_FOUND) >- MESSAGE("OpenSSL's libCrypto not found. Encryption support will be disabled") >-ENDIF(LIBCRYPTO_FOUND) >+ INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIRS}) >+ LINK_DIRECTORIES(${OPENSSL_LIBRARIES}) >+ MESSAGE(STATUS "Using OpenSSL ${OPENSSL_VERSION}") >+ MESSAGE("Found OpenSSL ${OPENSSL_VERSION} headers in ${OPENSSL_INCLUDE_DIRS}, library at ${OPENSSL_LIBRARIES}") >+ELSE(OpenSSL_FOUND) >+ MESSAGE("OpenSSL not found. Encryption support will be disabled") >+ENDIF(OpenSSL_FOUND) >+ >+# check whether using OpenSSL 1.1 API >+IF (DEFINED OPENSSL_INCLUDE_DIR AND DEFINED OPENSSL_LIBRARIES) >+ INCLUDE(CheckCSourceCompiles) >+ >+ SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) >+ SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) >+ >+ CHECK_C_SOURCE_COMPILES("#include <openssl/opensslv.h> >+ #ifndef OPENSSL_VERSION_NUMBER >+ #error No OPENSSL_VERSION_NUMBER defined >+ #endif >+ #if OPENSSL_VERSION_NUMBER < 0x10100000L >+ #error This is not OpenSSL 1.1 or higher >+ #endif >+ int main(void) { return 0; }" PODOFO_HAVE_OPENSSL_1_1) >+ >+ CHECK_C_SOURCE_COMPILES("#include <openssl/opensslconf.h> >+ #ifndef OPENSSL_NO_RC4 >+ #error No OPENSSL_NO_RC4 defined >+ #endif >+ int main(void) { return 0; }" PODOFO_HAVE_OPENSSL_NO_RC4) >+ >+ UNSET(CMAKE_REQUIRED_INCLUDES) >+ UNSET(CMAKE_REQUIRED_LIBRARIES) >+ENDIF (DEFINED OPENSSL_INCLUDE_DIR AND DEFINED OPENSSL_LIBRARIES) > > FIND_PACKAGE(LIBIDN) > >@@ -496,8 +523,7 @@ > SET(PODOFO_LIB_DEPENDS > ${ZLIB_LIBRARIES} > ${LIBIDN_LIBRARIES} >- ${LIBCRYPTO_LDFLAGS} >- ${LIBCRYPTO_LIBRARIES} >+ ${OPENSSL_LIBRARIES} > ${LIBJPEG_LIBRARIES} > ${PLATFORM_SYSTEM_LIBRARIES} > ${stlport_libraries_if_use_stlport}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 614756
:
469238
| 498818