Add ssl and [ia]spell path fixes from kde3.
This commit is contained in:
parent
fd2b741b34
commit
546098b0a9
4 changed files with 233 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 2007/12/12 03:17:10 mwdavies Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2007/12/16 19:55:05 mwdavies Exp $
|
||||
|
||||
DISTNAME= kdelibs-${_KDE_VERSION}
|
||||
CATEGORIES= x11
|
||||
|
@ -25,6 +25,19 @@ REPLACE_PERL+= \
|
|||
|
||||
CHECK_PORTABILITY_SKIP+=kate/tests/highlight.sh
|
||||
|
||||
SUBST_CLASSES+= kdelibsfix
|
||||
SUBST_STAGE.kdelibsfix= pre-configure
|
||||
SUBST_MESSAGE.kdelibsfix= Fixing hardcoded paths.
|
||||
SUBST_FILES.kdelibsfix= \
|
||||
kde3support/kdeui/k3sconfig.cpp \
|
||||
kio/kssl/kopenssl.cpp
|
||||
SUBST_SED.kdelibsfix= -e 's:@LOCALBASE@:${LOCALBASE}:g'
|
||||
|
||||
#.if ${OPSYS} == "NetBSD"
|
||||
## make sure zone.tab is installed
|
||||
#DEPENDS+= zonetab-[0-9]*:../../time/zonetab
|
||||
#.endif
|
||||
|
||||
.include "../../wip/kde4/kde4.mk"
|
||||
|
||||
# Soprano
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
$NetBSD: distinfo,v 1.1.1.1 2007/12/12 03:17:11 mwdavies Exp $
|
||||
$NetBSD: distinfo,v 1.2 2007/12/16 19:55:05 mwdavies Exp $
|
||||
|
||||
SHA1 (kdelibs-3.97.0.tar.bz2) = 0999d91bac5e664627bdf57a7954b10df5e49c06
|
||||
RMD160 (kdelibs-3.97.0.tar.bz2) = b1571f40182e04fcbd32f09599a645a13131f22e
|
||||
Size (kdelibs-3.97.0.tar.bz2) = 9018721 bytes
|
||||
SHA1 (patch-aa) = 21d84c488efcba05056b8fe0c0ae851bef1be989
|
||||
SHA1 (patch-ab) = c155e4e7c353d3ad708134dc67c0b872ac9d2734
|
||||
SHA1 (patch-ac) = 9012bfedaa791fa12a098da4a7d9cc2103167206
|
||||
SHA1 (patch-ad) = 2a0dfd3dda071654c89b8dda3db8885e2a55ba2b
|
||||
|
|
175
kdelibs4/patches/patch-ac
Normal file
175
kdelibs4/patches/patch-ac
Normal file
|
@ -0,0 +1,175 @@
|
|||
$NetBSD: patch-ac,v 1.1 2007/12/16 19:55:05 mwdavies Exp $
|
||||
|
||||
--- kio/kssl/kopenssl.cpp.orig 2007-11-21 23:48:08.000000000 +1300
|
||||
+++ kio/kssl/kopenssl.cpp
|
||||
@@ -237,7 +237,7 @@ void KOpenSSLProxy::destroy() {
|
||||
delete x;
|
||||
}
|
||||
|
||||
-#ifdef __OpenBSD__
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
@@ -260,10 +260,20 @@ static QString findMostRecentLib(QString
|
||||
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
QString numberpart = (*it).mid(s);
|
||||
uint endmaj = numberpart.indexOf('.');
|
||||
- if (endmaj == -1)
|
||||
- continue;
|
||||
bool ok;
|
||||
- int maj = numberpart.left(endmaj).toInt(&ok);
|
||||
+ int maj;
|
||||
+ if (endmaj == -1) {
|
||||
+ int maj = numberpart.toInt(&ok);
|
||||
+ if (!ok)
|
||||
+ continue;
|
||||
+ if (maj <= bestmaj)
|
||||
+ continue;
|
||||
+ bestmaj = maj;
|
||||
+ bestmin = -1;
|
||||
+ best = (*it);
|
||||
+ continue;
|
||||
+ }
|
||||
+ maj = numberpart.left(endmaj).toInt(&ok);
|
||||
if (!ok)
|
||||
continue;
|
||||
int min = numberpart.mid(endmaj+1).toInt(&ok);
|
||||
@@ -296,54 +306,23 @@ KOpenSSLProxy::KOpenSSLProxy()
|
||||
if (!upath.isEmpty())
|
||||
libpaths << upath;
|
||||
|
||||
-#ifdef Q_OS_WIN
|
||||
- d->cryptoLib = new KLibrary("libeay32.dll");
|
||||
- if (!d->cryptoLib->load()) {
|
||||
- delete d->cryptoLib;
|
||||
- d->cryptoLib = 0;
|
||||
- }
|
||||
-#elif defined(__OpenBSD__)
|
||||
- {
|
||||
- QString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto");
|
||||
- if (!libname.isNull()) {
|
||||
- d->cryptoLib = new KLibrary(libname);
|
||||
- d->cryptoLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
|
||||
- if (!d->cryptoLib->load()) {
|
||||
- delete d->cryptoLib;
|
||||
- d->cryptoLib = 0;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-#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 "/"
|
||||
+ << "@LOCALBASE@/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
|
||||
@@ -383,6 +362,17 @@ KOpenSSLProxy::KOpenSSLProxy()
|
||||
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()) {
|
||||
+ d->cryptoLib = new KLibrary(libname);
|
||||
+ d->cryptoLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
|
||||
+ if (!d->cryptoLib->load()) {
|
||||
+ delete d->cryptoLib;
|
||||
+ d->cryptoLib = 0;
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
for (QStringList::Iterator shit = libnamesc.begin();
|
||||
shit != libnamesc.end();
|
||||
++shit) {
|
||||
@@ -405,6 +395,7 @@ KOpenSSLProxy::KOpenSSLProxy()
|
||||
d->cryptoLib = 0;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
if (d->cryptoLib) break;
|
||||
}
|
||||
|
||||
@@ -534,28 +525,20 @@ KOpenSSLProxy::KOpenSSLProxy()
|
||||
#endif
|
||||
}
|
||||
|
||||
-#ifdef Q_OS_WIN
|
||||
- d->sslLib = new KLibrary("ssleay32.dll");
|
||||
- if (!d->sslLib->load()) {
|
||||
- delete d->sslLib;
|
||||
- d->sslLib = 0;
|
||||
- }
|
||||
-#elif defined(__OpenBSD__)
|
||||
- {
|
||||
- QString libname = findMostRecentLib("/usr/lib", "ssl");
|
||||
- if (!libname.isNull()) {
|
||||
- d->sslLib = new KLibrary(libname);
|
||||
- d->sslLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
|
||||
- if (!d->sslLib->load()) {
|
||||
- delete d->sslLib;
|
||||
- d->sslLib = 0;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-#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()) {
|
||||
+ d->sslLib = new KLibrary(libname);
|
||||
+ d->sslLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
|
||||
+ if (!d->sslLib->load()) {
|
||||
+ delete d->sslLib;
|
||||
+ d->sslLib = 0;
|
||||
+ }
|
||||
+ }
|
||||
+#else
|
||||
for (QStringList::Iterator shit = libnamess.begin();
|
||||
shit != libnamess.end();
|
||||
++shit) {
|
||||
@@ -577,9 +560,9 @@ KOpenSSLProxy::KOpenSSLProxy()
|
||||
d->sslLib = 0;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
if (d->sslLib) break;
|
||||
}
|
||||
-#endif
|
||||
|
||||
if (d->sslLib) {
|
||||
#ifdef KSSL_HAVE_SSL
|
40
kdelibs4/patches/patch-ad
Normal file
40
kdelibs4/patches/patch-ad
Normal file
|
@ -0,0 +1,40 @@
|
|||
$NetBSD: patch-ad,v 1.1 2007/12/16 19:55:05 mwdavies Exp $
|
||||
|
||||
--- kde3support/kdeui/k3sconfig.cpp.orig 2007-10-08 20:41:19.000000000 +1300
|
||||
+++ kde3support/kdeui/k3sconfig.cpp
|
||||
@@ -464,6 +464,8 @@ void K3SpellConfig::getAvailDictsIspell
|
||||
// dictionary path
|
||||
QFileInfo dir ("/usr/lib/ispell");
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
+ dir.setFile ("@LOCALBASE@/lib");
|
||||
+ if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/local/lib/ispell");
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/local/share/ispell");
|
||||
@@ -536,6 +538,8 @@ void K3SpellConfig::getAvailDictsAspell
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/lib" KDELIBSUFF "/aspell-0.60");
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
+ dir.setFile ("@LOCALBASE@/lib");
|
||||
+ if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/local/lib" KDELIBSUFF "/aspell");
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/share/aspell");
|
||||
@@ -620,6 +624,8 @@ K3SpellConfig::fillDicts( QComboBox* box
|
||||
// dictionary path
|
||||
QFileInfo dir ("/usr/lib/ispell");
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
+ dir.setFile ("@LOCALBASE@/lib");
|
||||
+ if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/local/lib/ispell");
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/local/share/ispell");
|
||||
@@ -698,6 +704,8 @@ K3SpellConfig::fillDicts( QComboBox* box
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/lib" KDELIBSUFF "/aspell-0.60");
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
+ dir.setFile ("@LOCALBASE@/lib");
|
||||
+ if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/local/lib" KDELIBSUFF "/aspell");
|
||||
if (!dir.exists() || !dir.isDir())
|
||||
dir.setFile ("/usr/share/aspell");
|
Loading…
Reference in a new issue