summaryrefslogtreecommitdiff
path: root/x11/kdelibs3/patches/patch-bd
blob: 97817dddb9c8ecde8c5e56e6e4414efa101d8ef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
$NetBSD: patch-bd,v 1.11 2006/09/11 09:10:01 joerg Exp $

--- kio/kssl/kopenssl.cc.orig	2006-07-22 08:16:39.000000000 +0000
+++ kio/kssl/kopenssl.cc
@@ -217,7 +217,7 @@ void KOpenSSLProxy::destroy() {
   _me = 0L;
 }
 
-#ifdef __OpenBSD__
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
 #include <qdir.h>
 #include <qstring.h>
 #include <qstringlist.h>
@@ -280,42 +280,23 @@ KConfig *cfg;
 
    delete cfg;
 
-#ifdef __OpenBSD__
-   {
-   QString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto");
-   if (!libname.isNull())
-         _cryptoLib = ll->globalLibrary(libname.latin1());
-   }
-#elif defined(__CYGWIN__)
-   libpaths << "/usr/bin/"             
-   		<< "/usr/local/bin"             
-   		<< "/usr/local/openssl/bin"     
-   		<< "/opt/openssl/bin"           
-   		<< "/opt/kde3/bin"              
-   		<< "";                          
-                                       
-   libnamess << "cygssl-0.9.7.dll"     
-		 << "cygssl.dll"                    
-		 << "libssl.dll"                    
-		 << "";                         
-                                       
-   libnamesc << "cygcrypto.dll"        
-		 << "libcrypto.dll"                 
-		 << "";                         
-#else
    libpaths
-            #ifdef _AIX
+#ifdef _AIX
             << "/opt/freeware/lib/"
-	    #endif
+#endif
 	    << "/usr/lib" KDELIBSUFF "/"
+	    << "/usr/pkg/lib/"
+#if !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
 	    << "/usr/ssl/lib" KDELIBSUFF "/"
 	    << "/usr/local/lib" KDELIBSUFF "/"
             << "/usr/local/openssl/lib" KDELIBSUFF "/"
             << "/usr/local/ssl/lib" KDELIBSUFF "/"
 	    << "/opt/openssl/lib" KDELIBSUFF "/"
 	    << "/lib" KDELIBSUFF "/"
+#endif
             << "";
     
+#if !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
 // FIXME: #define here for the various OS types to optimize
    libnamess
 	     #ifdef hpux
@@ -355,6 +336,11 @@ KConfig *cfg;
    for (QStringList::Iterator it = libpaths.begin();
                               it != libpaths.end();
                               ++it) {
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+	QString libname = findMostRecentLib(*it, "crypto");
+	if (!libname.isNull())
+		_cryptoLib = ll->globalLibrary(libname.latin1());
+#else
       for (QStringList::Iterator shit = libnamesc.begin();
                                  shit != libnamesc.end();
                                  ++shit) {
@@ -368,6 +354,7 @@ KConfig *cfg;
             _cryptoLib = ll->globalLibrary(alib.latin1());
          if (_cryptoLib) break;
       }
+#endif
       if (_cryptoLib) break;
    }
 
@@ -497,16 +484,14 @@ KConfig *cfg;
 #endif
    }
 
-#ifdef __OpenBSD__
-   {
-   QString libname = findMostRecentLib("/usr/lib", "ssl");
-   if (!libname.isNull())
-         _sslLib = ll->globalLibrary(libname.latin1());
-   }
-#else
    for (QStringList::Iterator it = libpaths.begin();
                               it != libpaths.end();
                               ++it) {
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+      QString libname = findMostRecentLib(*it, "ssl");
+      if (!libname.isNull())
+           _sslLib = ll->globalLibrary(libname.latin1());
+#else
       for (QStringList::Iterator shit = libnamess.begin();
                                  shit != libnamess.end();
                                  ++shit) {
@@ -520,9 +505,9 @@ KConfig *cfg;
          	_sslLib = ll->globalLibrary(alib.latin1());
          if (_sslLib) break;
       }
+#endif
       if (_sslLib) break;
    }
-#endif
 
    if (_sslLib) {
 #ifdef KSSL_HAVE_SSL