pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/kdelibs3 Fix build with openssl-1.0. From markd.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ef39eb7132be
branches:  trunk
changeset: 398502:ef39eb7132be
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Aug 31 20:54:26 2009 +0000

description:
Fix build with openssl-1.0. From markd.
Enable openssl again on NetBSD-current. Bump PKGREVISION.

diffstat:

 x11/kdelibs3/Makefile         |  14 +----
 x11/kdelibs3/distinfo         |   7 +-
 x11/kdelibs3/patches/patch-bd |  50 +++++++++++++++++++---
 x11/kdelibs3/patches/patch-be |  94 ++++++++++++++++++++++++++++++++++++++++++-
 x11/kdelibs3/patches/patch-bg |  13 +++++
 5 files changed, 155 insertions(+), 23 deletions(-)

diffs (297 lines):

diff -r b47e2c8b7197 -r ef39eb7132be x11/kdelibs3/Makefile
--- a/x11/kdelibs3/Makefile     Mon Aug 31 20:17:48 2009 +0000
+++ b/x11/kdelibs3/Makefile     Mon Aug 31 20:54:26 2009 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.144 2009/08/29 11:26:29 wiz Exp $
+# $NetBSD: Makefile,v 1.145 2009/08/31 20:54:26 wiz Exp $
 
 DISTNAME=      kdelibs-${_KDE_VERSION}
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    x11
 COMMENT=       Support libraries for the KDE integrated X11 desktop
 
@@ -19,6 +19,7 @@
                        ${PKG_SYSCONFDIR}/xdg/menus/applications.menu
 
 CONFIGURE_ARGS+=       --with-distribution="NetBSD pkgsrc"
+CONFIGURE_ARGS+=       --with-ssl-dir="${BUILDLINK_PREFIX.openssl}"
 
 SGML_CATALOGS=         ${PREFIX}/share/kde/apps/ksgmltools2/customization/catalog
 SGML_CATALOGS+=                ${PREFIX}/share/kde/apps/ksgmltools2/docbook/xml-dtd-4.1.2/docbook.cat
@@ -92,14 +93,6 @@
 GCC_REQD+=             2.95
 .endif
 
-.if ${OPSYS} == "NetBSD" && (${OS_VERSION:M5.99.1[5-9]*} || ${OS_VERSION:M5.99[2-9]*} || ${OS_VERSION:M[6-9]*})
-# no openssl for us due to incompatible API changes (STACK, ...)
-CONFIGURE_ARGS+=       --without-ssl
-.else
-CONFIGURE_ARGS+=       --with-ssl-dir="${BUILDLINK_PREFIX.openssl}"
-.include "../../security/openssl/buildlink3.mk"
-.endif
-
 .include "../../meta-pkgs/kde3/kde3.mk"
 
 .include "../../archivers/bzip2/buildlink3.mk"
@@ -113,6 +106,7 @@
 .include "../../graphics/openexr/buildlink3.mk"
 .include "../../graphics/tiff/buildlink3.mk"
 .include "../../net/mDNSResponder/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
 .include "../../textproc/aspell/buildlink3.mk"
 .include "../../textproc/libxml2/buildlink3.mk"
 .include "../../textproc/libxslt/buildlink3.mk"
diff -r b47e2c8b7197 -r ef39eb7132be x11/kdelibs3/distinfo
--- a/x11/kdelibs3/distinfo     Mon Aug 31 20:17:48 2009 +0000
+++ b/x11/kdelibs3/distinfo     Mon Aug 31 20:54:26 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.95 2009/08/18 11:57:33 markd Exp $
+$NetBSD: distinfo,v 1.96 2009/08/31 20:54:26 wiz Exp $
 
 SHA1 (kdelibs-3.5.10.tar.bz2) = c930a25f4419134def55b8466c3a6f737227fb82
 RMD160 (kdelibs-3.5.10.tar.bz2) = 4c960664283c83ebc8e68932ca9044336fcff223
@@ -17,9 +17,10 @@
 SHA1 (patch-ap) = 94037230bb3d12549195d52b98ffdd821f94f90d
 SHA1 (patch-aq) = 18f3885a73cd9169cf4f9c9d97420e639f7fec3c
 SHA1 (patch-bc) = 434a48d290aa9716b8c6e372419460ebd33cf8ea
-SHA1 (patch-bd) = 552c072d9e369420b2a54944cb4b0d0f75555468
-SHA1 (patch-be) = fdf2d64acb70b46ec4c71bed9ee89fa34fd5dd3d
+SHA1 (patch-bd) = 852a12b66968595bf1be4538f8ebf88f031592a4
+SHA1 (patch-be) = b7c2ed2856565ef3c831046a909e289409199e48
 SHA1 (patch-bf) = 4c74d7a09760a6b3e2fb3e736dd627252a8b372e
+SHA1 (patch-bg) = 403db490f848a2937af4d27cba3beaae17dbe791
 SHA1 (patch-bv) = ad0cd6ff687785bb9395608d07d0001309c9c6a6
 SHA1 (patch-cc) = 136bedb27637ab1679871a4940999e8d32c54a09
 SHA1 (patch-ce) = e9f7a348b0e4be1475ba8f56a8b474f139eb7781
diff -r b47e2c8b7197 -r ef39eb7132be x11/kdelibs3/patches/patch-bd
--- a/x11/kdelibs3/patches/patch-bd     Mon Aug 31 20:17:48 2009 +0000
+++ b/x11/kdelibs3/patches/patch-bd     Mon Aug 31 20:54:26 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-bd,v 1.13 2008/05/17 02:28:17 markd Exp $
+$NetBSD: patch-bd,v 1.14 2009/08/31 20:54:27 wiz Exp $
 
 --- kio/kssl/kopenssl.cc.orig  2006-07-22 20:16:39.000000000 +1200
 +++ kio/kssl/kopenssl.cc
@@ -99,7 +99,32 @@
  // FIXME: #define here for the various OS types to optimize
     libnamess
             #ifdef hpux
-@@ -355,6 +351,11 @@ KConfig *cfg;
+@@ -330,8 +326,12 @@ KConfig *cfg;
+              << "libssl.so." SHLIB_VERSION_NUMBER
+              #endif
+              << "libssl.so"
++             #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++             << "libssl.so.1"
++             #else
+            << "libssl.so.0"
+              #endif
++             #endif
+            ;
+ 
+    libnamesc
+@@ -347,14 +347,23 @@ KConfig *cfg;
+              << "libcrypto.so." SHLIB_VERSION_NUMBER
+              #endif
+              << "libcrypto.so"
++             #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++             << "libcrypto.so.1"
++             #else
+            << "libcrypto.so.0"
+              #endif
++             #endif
+            ;
+ #endif
+ 
     for (QStringList::Iterator it = libpaths.begin();
                                it != libpaths.end();
                                ++it) {
@@ -111,7 +136,7 @@
        for (QStringList::Iterator shit = libnamesc.begin();
                                   shit != libnamesc.end();
                                   ++shit) {
-@@ -368,6 +369,7 @@ KConfig *cfg;
+@@ -368,6 +377,7 @@ KConfig *cfg;
              _cryptoLib = ll->globalLibrary(alib.latin1());
           if (_cryptoLib) break;
        }
@@ -119,7 +144,7 @@
        if (_cryptoLib) break;
     }
  
-@@ -404,9 +406,14 @@ KConfig *cfg;
+@@ -404,9 +414,14 @@ KConfig *cfg;
        K_BIO_ctrl = (long (*) (BIO *,int,long,void *)) _cryptoLib->symbol("BIO_ctrl");
        K_BIO_write = (int (*) (BIO *b, const void *data, int len)) _cryptoLib->symbol("BIO_write");
        K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *,BIO*, char*, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) _cryptoLib->symbol("PEM_ASN1_write_bio");
@@ -134,7 +159,7 @@
        K_X509_print_fp = (int (*)(FILE*, X509*)) _cryptoLib->symbol("X509_print_fp");
        K_i2d_PKCS12 = (int (*)(PKCS12*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS12");
        K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12*)) _cryptoLib->symbol("i2d_PKCS12_fp");
-@@ -497,16 +504,14 @@ KConfig *cfg;
+@@ -497,16 +512,14 @@ KConfig *cfg;
  #endif
     }
  
@@ -156,7 +181,7 @@
        for (QStringList::Iterator shit = libnamess.begin();
                                   shit != libnamess.end();
                                   ++shit) {
-@@ -520,10 +525,10 @@ KConfig *cfg;
+@@ -520,10 +533,10 @@ KConfig *cfg;
                _sslLib = ll->globalLibrary(alib.latin1());
           if (_sslLib) break;
        }
@@ -169,7 +194,16 @@
     if (_sslLib) {
  #ifdef KSSL_HAVE_SSL
        // stand back from your monitor and look at this.  it's fun! :)
-@@ -957,6 +962,8 @@ int KOpenSSLProxy::PEM_write_bio_X509(BI
+@@ -568,7 +581,7 @@ KConfig *cfg;
+       K_SSL_set_session = (int (*)(SSL*,SSL_SESSION*)) _sslLib->symbol("SSL_set_session");
+       K_d2i_SSL_SESSION = (SSL_SESSION* (*)(SSL_SESSION**,unsigned char**, long)) _sslLib->symbol("d2i_SSL_SESSION");
+       K_i2d_SSL_SESSION = (int (*)(SSL_SESSION*,unsigned char**)) _sslLib->symbol("i2d_SSL_SESSION");
+-      K_SSL_get_ciphers = (STACK *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
++      K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
+ #endif
+ 
+ 
+@@ -957,6 +970,8 @@ int KOpenSSLProxy::PEM_write_bio_X509(BI
  }
  
  
@@ -178,7 +212,7 @@
  ASN1_METHOD *KOpenSSLProxy::X509_asn1_meth(void) {
     if (K_X509_asn1_meth) return (K_X509_asn1_meth)();
     else return 0L;
-@@ -968,6 +975,13 @@ int KOpenSSLProxy::ASN1_i2d_fp(FILE *out
+@@ -968,6 +983,13 @@ int KOpenSSLProxy::ASN1_i2d_fp(FILE *out
          return (K_ASN1_i2d_fp)((int (*)())K_i2d_ASN1_HEADER, out, x);
     else return -1;
  }
diff -r b47e2c8b7197 -r ef39eb7132be x11/kdelibs3/patches/patch-be
--- a/x11/kdelibs3/patches/patch-be     Mon Aug 31 20:17:48 2009 +0000
+++ b/x11/kdelibs3/patches/patch-be     Mon Aug 31 20:54:26 2009 +0000
@@ -1,8 +1,18 @@
-$NetBSD: patch-be,v 1.6 2008/05/17 02:28:17 markd Exp $
+$NetBSD: patch-be,v 1.7 2009/08/31 20:54:27 wiz Exp $
 
 --- kio/kssl/kopenssl.h.orig   2006-07-22 20:16:39.000000000 +1200
 +++ kio/kssl/kopenssl.h
-@@ -447,10 +447,12 @@ public:
+@@ -47,6 +47,9 @@ class KOpenSSLProxyPrivate;
+ #include <openssl/evp.h>
+ #include <openssl/stack.h>
+ #include <openssl/bn.h>
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++typedef _STACK STACK;
++#endif
+ #undef crypt
+ #endif
+ 
+@@ -447,10 +450,12 @@ public:
     int PEM_write_bio_X509(BIO *bp, X509 *x);
  
  
@@ -15,3 +25,83 @@
  
  
     /*
+@@ -525,24 +530,52 @@ public:
+     */
+    char *sk_pop(STACK *s);
+ 
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++   /*
++    * Pop off the stack with OpenSSL 1.x
++    */
++   char *sk_pop(void *s) { return sk_pop(reinterpret_cast<STACK*>(s)); }
++#endif
++
+ 
+    /* 
+     *   Free the stack
+     */
+    void sk_free(STACK *s);
+ 
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++   /*
++    * Free the stack with OpenSSL 1.x
++    */
++   void sk_free(void *s) { return sk_free(reinterpret_cast<STACK*>(s)); }
++#endif
++
+ 
+    /* 
+     *  Number of elements in the stack
+     */
+    int sk_num(STACK *s);
+ 
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++   /*
++    * Number of elements in the stack with OpenSSL 1.x
++    */
++   int sk_num(void *s) { return sk_num(reinterpret_cast<STACK*>(s)); }
++#endif
++
+ 
+    /* 
+     *  Value of element n in the stack
+     */
+    char *sk_value(STACK *s, int n);
+ 
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++   /*
++    * Value of element n in the stack with OpenSSL 1.x
++    */
++   char *sk_value(void *s, int n) { return sk_value(reinterpret_cast<STACK*>(s), n); }
++#endif
++
+ 
+    /* 
+     *  Create a new stack
+@@ -555,12 +588,26 @@ public:
+     */
+    int sk_push(STACK *s, char *d);
+ 
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++   /*
++    * Add an element to the stack with OpenSSL 1.x
++    */
++   int sk_push(void *s, void *d) { return sk_push(reinterpret_cast<STACK*>(s), reinterpret_cast<char*>(d)); }
++#endif
++
+ 
+    /* 
+     *  Duplicate the stack
+     */
+    STACK *sk_dup(STACK *s);
+ 
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++   /*
++    * Duplicate the stack with OpenSSL 1.x
++    */
++   STACK *sk_dup(void *s) { return sk_dup(reinterpret_cast<STACK*>(s)); }
++#endif
++
+ 
+    /*
+     *  Convert an ASN1_INTEGER to it's text form
diff -r b47e2c8b7197 -r ef39eb7132be x11/kdelibs3/patches/patch-bg
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/kdelibs3/patches/patch-bg     Mon Aug 31 20:54:26 2009 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-bg,v 1.5 2009/08/31 20:54:27 wiz Exp $
+
+--- kio/kssl/ksmimecrypto.cc.orig      2005-10-11 04:05:44.000000000 +1300
++++ kio/kssl/ksmimecrypto.cc
+@@ -87,7 +87,7 @@ KSMIMECryptoPrivate::KSMIMECryptoPrivate
+ 
+ 
+ STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(QPtrList<KSSLCertificate> &certs) {
+-    STACK_OF(X509) *x509 = sk_new(NULL);
++    STACK_OF(X509) *x509 = reinterpret_cast<STACK_OF(X509)*>(sk_new(NULL));
+     KSSLCertificate *cert = certs.first();
+     while(cert) {
+       sk_X509_push(x509, cert->getCert());



Home | Main Index | Thread Index | Old Index