public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/podofo/files/, app-text/podofo/
@ 2017-10-16  7:35 Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2017-10-16  7:35 UTC (permalink / raw
  To: gentoo-commits

commit:     3eb5eefcc21a755a7e29c791944532359a53ec04
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 16 07:30:31 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 16 07:35:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3eb5eefc

app-text/podofo: bug 614756 compile error with openssl-1.1

Thanks to Mark Wright <gienah <AT> gentoo.org> for the
initial patch.

Fixes: https://bugs.gentoo.org/614756
Package-Manager: Portage-2.3.11, Repoman-2.3.3

 .../podofo-0.9.6_pre20170629-openssl-1.1.patch     | 114 +++++++++++++++++++++
 app-text/podofo/podofo-0.9.6_pre20170629.ebuild    |   4 +
 2 files changed, 118 insertions(+)

diff --git a/app-text/podofo/files/podofo-0.9.6_pre20170629-openssl-1.1.patch b/app-text/podofo/files/podofo-0.9.6_pre20170629-openssl-1.1.patch
new file mode 100644
index 00000000000..22b1e419312
--- /dev/null
+++ b/app-text/podofo/files/podofo-0.9.6_pre20170629-openssl-1.1.patch
@@ -0,0 +1,114 @@
+From f5da3b4d9e35a2df272f2f4056c3647454eaea95 Mon Sep 17 00:00:00 2001
+From: Zac Medico <zmedico@gmail.com>
+Date: Sun, 15 Oct 2017 23:04:57 -0700
+Subject: [PATCH] podofosign: fix compile errors with openssl-1.1.0f
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+https://sourceforge.net/p/podofo/mailman/message/36077904/
+
+This fixes the following compile errors with openssl-1.1.0f:
+
+tools/podofosign/podofosign.cpp:877:32: error: ‘OpenSSL_add_all_algorithms’ was not declared in this scope
+     OpenSSL_add_all_algorithms();
+                                ^
+tools/podofosign/podofosign.cpp:878:29: error: ‘ERR_load_crypto_strings’ was not declared in this scope
+     ERR_load_crypto_strings();
+                             ^
+tools/podofosign/podofosign.cpp:1085:22: error: ‘ERR_free_strings’ was not declared in this scope
+     ERR_free_strings();
+                      ^
+
+This patch has been tested on Linux with openssl-1.0.2l and
+openssl-1.1.0f.
+
+Bug: https://bugs.gentoo.org/614756
+---
+ CMakeLists.txt                  | 12 ++++++++++--
+ tools/podofosign/podofosign.cpp |  7 +++++++
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0c9a2ce..b4f7b3c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -325,6 +325,14 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+ FIND_PACKAGE(ZLIB REQUIRED)
+ MESSAGE("Found zlib headers in ${ZLIB_INCLUDE_DIR}, library at ${ZLIB_LIBRARIES}")
+ 
++FIND_PACKAGE(OpenSSL)
++if(OpenSSL_FOUND)
++  SET(PODOFO_HAVE_OPENSSL TRUE)
++  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)
+ FIND_PACKAGE(LIBCRYPTO)
+ 
+ IF(LIBCRYPTO_FOUND)
+@@ -334,6 +342,7 @@ IF(LIBCRYPTO_FOUND)
+ ELSE(LIBCRYPTO_FOUND)
+ 	MESSAGE("OpenSSL's libCrypto not found. Encryption support will be disabled")
+ ENDIF(LIBCRYPTO_FOUND)
++ENDIF(OpenSSL_FOUND)
+ 
+ FIND_PACKAGE(LIBIDN)
+ 
+@@ -393,8 +402,6 @@ ENDIF(CppUnit_FOUND)
+ 
+ ENDIF(NOT PODOFO_BUILD_LIB_ONLY)
+ 
+-FIND_PACKAGE(OpenSSL)
+-
+ FIND_PACKAGE(FREETYPE REQUIRED)
+ MESSAGE("Found freetype library at ${FREETYPE_LIBRARIES}, headers ${FREETYPE_INCLUDE_DIR}")
+ 
+@@ -499,6 +506,7 @@ SET(PODOFO_LIB_DEPENDS
+   ${LIBCRYPTO_LDFLAGS}
+   ${LIBCRYPTO_LIBRARIES}
+   ${LIBJPEG_LIBRARIES}
++  ${OPENSSL_LIBRARIES}
+   ${PLATFORM_SYSTEM_LIBRARIES}
+   ${stlport_libraries_if_use_stlport}
+   ${FREETYPE_LIBRARIES}
+diff --git a/tools/podofosign/podofosign.cpp b/tools/podofosign/podofosign.cpp
+index b8f5f61..a7be1e5 100644
+--- a/tools/podofosign/podofosign.cpp
++++ b/tools/podofosign/podofosign.cpp
+@@ -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 @@ int main( int argc, char* argv[] )
+         outputfile = NULL;
+     }
+ 
++#ifdef PODOFO_HAVE_OPENSSL_1_1
++    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 @@ int main( int argc, char* argv[] )
+         result = e.GetError();
+     }
+ 
++#ifndef PODOFO_HAVE_OPENSSL_1_1
+     ERR_free_strings();
++#endif
+ 
+     if( pSignField )
+         delete pSignField;
+-- 

diff --git a/app-text/podofo/podofo-0.9.6_pre20170629.ebuild b/app-text/podofo/podofo-0.9.6_pre20170629.ebuild
index eb201c16581..6362b4ee003 100644
--- a/app-text/podofo/podofo-0.9.6_pre20170629.ebuild
+++ b/app-text/podofo/podofo-0.9.6_pre20170629.ebuild
@@ -30,8 +30,12 @@ DEPEND="${RDEPEND}
 	test? ( dev-util/cppunit )"
 
 DOCS="AUTHORS ChangeLog TODO"
+PATCHES=(
+	"${FILESDIR}/${P}-openssl-1.1.patch"
+)
 
 src_prepare() {
+	cmake-utils_src_prepare
 	local x sed_args
 
 	# The 0.9.6 ABI is not necessarily stable, so make PODOFO_SOVERSION


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/podofo/files/, app-text/podofo/
@ 2017-11-23 21:27 Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2017-11-23 21:27 UTC (permalink / raw
  To: gentoo-commits

commit:     7d445832c8128d6d9427ccddf8465b92c65145d7
Author:     Michelangelo Scopelliti <kernelpanic <AT> gmx <DOT> it>
AuthorDate: Thu Nov 23 21:24:52 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Nov 23 21:27:32 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d445832

app-text/podofo: fix for libressl (bug 635890)

Closes: https://bugs.gentoo.org/635890
Package-Manager: Portage-2.3.16, Repoman-2.3.6

 ...ofo-0.9.6_pre20171027-libressl-bug-635890.patch | 26 ++++++++++++++++++++++
 app-text/podofo/podofo-0.9.6_pre20171027.ebuild    |  4 ++++
 2 files changed, 30 insertions(+)

diff --git a/app-text/podofo/files/podofo-0.9.6_pre20171027-libressl-bug-635890.patch b/app-text/podofo/files/podofo-0.9.6_pre20171027-libressl-bug-635890.patch
new file mode 100644
index 00000000000..2b25dc7b685
--- /dev/null
+++ b/app-text/podofo/files/podofo-0.9.6_pre20171027-libressl-bug-635890.patch
@@ -0,0 +1,26 @@
+From 85e66b066de98f38e0430428906d5cf5396876a0 Mon Sep 17 00:00:00 2001
+From: Michelangelo Scopelliti <kernelpanic@gmx.it>
+Date: Thu, 23 Nov 2017 12:29:36 +0000
+Subject: [PATCH] Fix to compile with libressl (does not have OPENSSL_init_ssl)
+
+Bug: https://bugs.gentoo.org/635890
+---
+ tools/podofosign/podofosign.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/podofosign/podofosign.cpp b/tools/podofosign/podofosign.cpp
+index a7be1e5..5c9d146 100644
+--- a/tools/podofosign/podofosign.cpp
++++ b/tools/podofosign/podofosign.cpp
+@@ -875,7 +875,7 @@ int main( int argc, char* argv[] )
+         outputfile = NULL;
+     }
+ 
+-#ifdef PODOFO_HAVE_OPENSSL_1_1
++#if defined (PODOFO_HAVE_OPENSSL_1_1) && !defined (LIBRESSL_VERSION_NUMBER)
+     OPENSSL_init_ssl(0, NULL);
+ #else
+     OpenSSL_add_all_algorithms();
+-- 
+2.13.6
+

diff --git a/app-text/podofo/podofo-0.9.6_pre20171027.ebuild b/app-text/podofo/podofo-0.9.6_pre20171027.ebuild
index 67a8f21dd4d..b7e200e657a 100644
--- a/app-text/podofo/podofo-0.9.6_pre20171027.ebuild
+++ b/app-text/podofo/podofo-0.9.6_pre20171027.ebuild
@@ -29,6 +29,10 @@ DEPEND="${RDEPEND}
 	boost? ( dev-util/boost-build )
 	test? ( dev-util/cppunit )"
 
+PATCHES=(
+	"${FILESDIR}/${P}-libressl-bug-635890.patch"
+)
+
 DOCS="AUTHORS ChangeLog TODO"
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-23 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-16  7:35 [gentoo-commits] repo/gentoo:master commit in: app-text/podofo/files/, app-text/podofo/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2017-11-23 21:27 Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox