diff options
author | Peter Volkov <pva@gentoo.org> | 2011-10-04 07:11:35 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2011-10-04 07:11:35 +0000 |
commit | e0129141e250716e51bca6d9dcfd6598cee23e90 (patch) | |
tree | 1b72c0e82fce8cf1ef7a61a9e038a29d20ab465a /net-im/psi/files | |
parent | Do not use internal zlib header handling; this invalidates the need for zutil.h (diff) | |
download | gentoo-2-e0129141e250716e51bca6d9dcfd6598cee23e90.tar.gz gentoo-2-e0129141e250716e51bca6d9dcfd6598cee23e90.tar.bz2 gentoo-2-e0129141e250716e51bca6d9dcfd6598cee23e90.zip |
Fix minizip related build issue, bug #384681. Thank Paul Volkov for report and rion for fix.
(Portage version: 2.1.10.20/cvs/Linux x86_64)
Diffstat (limited to 'net-im/psi/files')
-rw-r--r-- | net-im/psi/files/psi-0.14-minizip-detection.patch | 281 |
1 files changed, 281 insertions, 0 deletions
diff --git a/net-im/psi/files/psi-0.14-minizip-detection.patch b/net-im/psi/files/psi-0.14-minizip-detection.patch new file mode 100644 index 000000000000..61ad4114f308 --- /dev/null +++ b/net-im/psi/files/psi-0.14-minizip-detection.patch @@ -0,0 +1,281 @@ +=== modified file 'conf_windows.pri' +--- conf_windows.pri 2011-10-04 06:27:15 +0000 ++++ conf_windows.pri 2011-10-04 06:27:28 +0000 +@@ -5,7 +5,7 @@ + #CONFIG += qca-static + + # tell iris to use our internal libz +-CONFIG += psi-zip ++CONFIG += psi-winzlib + + # OpenSSL + qca-static { + +=== modified file 'configure' +--- configure 2011-10-04 06:27:15 +0000 ++++ configure 2011-10-04 06:27:38 +0000 +@@ -955,41 +955,68 @@ + { + #ifdef Q_OS_WIN + // HACK: on windows, always use psi's bundled zlib +- conf->addExtra("CONFIG += psi-zip"); ++ conf->addExtra("CONFIG += psi-winzlib psi-minizip"); + return true; + #else +- QString inc, lib; ++ QStringList incs; ++ QString version, libs, other; + QString s; + +- s = conf->getenv("QC_WITH_ZLIB_INC"); +- if(!s.isEmpty()) { +- if(!conf->checkHeader(s, "zlib.h")) +- return false; +- inc = s; +- } +- else { +- if(!conf->findHeader("zlib.h", QStringList(), &s)) +- return false; +- inc = s; +- } +- +- s = conf->getenv("QC_WITH_ZLIB_LIB"); +- if(!s.isEmpty()) { +- if(!conf->checkLibrary(s, "z")) +- return false; +- lib = s; +- } +- else { +- if(!conf->findLibrary("z", &s)) +- return false; +- lib = s; +- } +- +- if(!inc.isEmpty()) ++ if(!conf->findPkgConfig("zlib", VersionAny, "", &version, &incs, &libs, &other)) { ++ ++ s = conf->getenv("QC_WITH_ZLIB_INC"); ++ if(!s.isEmpty()) { ++ if(!conf->checkHeader(s, "zlib.h")) ++ return false; ++ } ++ else { ++ if(!conf->findHeader("zlib.h", QStringList(), &s)) ++ return false; ++ } ++ incs.append(s); ++ ++ s = conf->getenv("QC_WITH_ZLIB_LIB"); ++ if(!s.isEmpty()) { ++ if(!conf->checkLibrary(s, "z")) ++ return false; ++ } ++ else { ++ if(!conf->findLibrary("z", &s)) ++ return false; ++ } ++ libs = QString("-L%1 -lz").arg(s); ++ } ++ ++ foreach(const QString &inc, incs) { + conf->addIncludePath(inc); +- if(!lib.isEmpty()) +- conf->addLib(QString("-L") + s); +- conf->addLib("-lz"); ++ } ++ conf->addLib(libs); ++ ++ incs.clear(); ++ libs.clear(); ++ if(!conf->findPkgConfig("minizip", VersionAny, "", &version, &incs, &libs, &other)) { ++ ++ s = conf->getenv("QC_WITH_MINIZIP_INC"); ++ if ((!s.isEmpty() && conf->checkHeader(s, "unzip.h")) || ++ (s.isEmpty() && conf->findHeader("unzip.h", QStringList(), &s))) { ++ incs.append(s); ++ } ++ ++ s = conf->getenv("QC_WITH_MINIZIP_LIB"); ++ if((!s.isEmpty() && conf->checkLibrary(s, "minizip")) || ++ (s.isEmpty() && conf->findLibrary("minizip", &s))) { ++ libs = QString("-L%1 -lminizip").arg(s); ++ } ++ } ++ ++ if (!incs.isEmpty() && !libs.isEmpty()) { ++ foreach(const QString &inc, incs) { ++ conf->addIncludePath(inc); ++ } ++ conf->addLib(libs); ++ } else { ++ conf->addExtra("CONFIG += psi-minizip"); ++ } + + return true; + #endif + +=== modified file 'qcm/zlib.qcm' +--- qcm/zlib.qcm 2011-10-04 06:27:15 +0000 ++++ qcm/zlib.qcm 2011-10-04 06:27:38 +0000 +@@ -26,41 +26,68 @@ + { + #ifdef Q_OS_WIN + // HACK: on windows, always use psi's bundled zlib +- conf->addExtra("CONFIG += psi-zip"); ++ conf->addExtra("CONFIG += psi-winzlib psi-minizip"); + return true; + #else +- QString inc, lib; ++ QStringList incs; ++ QString version, libs, other; + QString s; + +- s = conf->getenv("QC_WITH_ZLIB_INC"); +- if(!s.isEmpty()) { +- if(!conf->checkHeader(s, "zlib.h")) +- return false; +- inc = s; +- } +- else { +- if(!conf->findHeader("zlib.h", QStringList(), &s)) +- return false; +- inc = s; +- } +- +- s = conf->getenv("QC_WITH_ZLIB_LIB"); +- if(!s.isEmpty()) { +- if(!conf->checkLibrary(s, "z")) +- return false; +- lib = s; +- } +- else { +- if(!conf->findLibrary("z", &s)) +- return false; +- lib = s; +- } +- +- if(!inc.isEmpty()) ++ if(!conf->findPkgConfig("zlib", VersionAny, "", &version, &incs, &libs, &other)) { ++ ++ s = conf->getenv("QC_WITH_ZLIB_INC"); ++ if(!s.isEmpty()) { ++ if(!conf->checkHeader(s, "zlib.h")) ++ return false; ++ } ++ else { ++ if(!conf->findHeader("zlib.h", QStringList(), &s)) ++ return false; ++ } ++ incs.append(s); ++ ++ s = conf->getenv("QC_WITH_ZLIB_LIB"); ++ if(!s.isEmpty()) { ++ if(!conf->checkLibrary(s, "z")) ++ return false; ++ } ++ else { ++ if(!conf->findLibrary("z", &s)) ++ return false; ++ } ++ libs = QString("-L%1 -lz").arg(s); ++ } ++ ++ foreach(const QString &inc, incs) { + conf->addIncludePath(inc); +- if(!lib.isEmpty()) +- conf->addLib(QString("-L") + s); +- conf->addLib("-lz"); ++ } ++ conf->addLib(libs); ++ ++ incs.clear(); ++ libs.clear(); ++ if(!conf->findPkgConfig("minizip", VersionAny, "", &version, &incs, &libs, &other)) { ++ ++ s = conf->getenv("QC_WITH_MINIZIP_INC"); ++ if ((!s.isEmpty() && conf->checkHeader(s, "unzip.h")) || ++ (s.isEmpty() && conf->findHeader("unzip.h", QStringList(), &s))) { ++ incs.append(s); ++ } ++ ++ s = conf->getenv("QC_WITH_MINIZIP_LIB"); ++ if((!s.isEmpty() && conf->checkLibrary(s, "minizip")) || ++ (s.isEmpty() && conf->findLibrary("minizip", &s))) { ++ libs = QString("-L%1 -lminizip").arg(s); ++ } ++ } ++ ++ if (!incs.isEmpty() && !libs.isEmpty()) { ++ foreach(const QString &inc, incs) { ++ conf->addIncludePath(inc); ++ } ++ conf->addLib(libs); ++ } else { ++ conf->addExtra("CONFIG += psi-minizip"); ++ } + + return true; + #endif + +=== modified file 'src/conf_iris.pri' +--- src/conf_iris.pri 2011-10-04 06:27:15 +0000 ++++ src/conf_iris.pri 2011-10-04 06:27:28 +0000 +@@ -13,11 +13,6 @@ + CONFIG += crypto + } + +-# use zlib from psi if necessary +-psi-zip { +- INCLUDEPATH += $$PWD/libpsi/tools/zip/minizip/win32 +-} +- + mac { + # Universal binaries + qc_universal:contains(QT_CONFIG,x86):contains(QT_CONFIG,ppc) { + +=== modified file 'src/libpsi/tools/zip/zip.cpp' +--- src/libpsi/tools/zip/zip.cpp 2011-10-04 06:27:15 +0000 ++++ src/libpsi/tools/zip/zip.cpp 2011-10-04 06:27:43 +0000 +@@ -22,7 +22,11 @@ + #include <QStringList> + #include <QFile> + ++#ifdef PSIMINIZIP + #include "minizip/unzip.h" ++#else ++#include <minizip/unzip.h> ++#endif + #include "zip.h" + + class UnZipPrivate + +=== modified file 'src/libpsi/tools/zip/zip.pri' +--- src/libpsi/tools/zip/zip.pri 2011-10-04 06:27:15 +0000 ++++ src/libpsi/tools/zip/zip.pri 2011-10-04 06:29:25 +0000 +@@ -2,17 +2,21 @@ + $$PWD/zip.h + + SOURCES += \ +- $$PWD/zip.cpp \ +- $$PWD/minizip/unzip.c ++ $$PWD/zip.cpp ++ ++psi-minizip { ++ SOURCES += $$PWD/minizip/unzip.c ++ DEFINES += PSIMINIZIP ++} + + INCLUDEPATH += $$PWD + DEPENDPATH += $$PWD + +-win32: { ++psi-winzlib { + INCLUDEPATH += $$PWD/minizip/win32 + DEPENDPATH += $$PWD/minizip/win32 + LIBS += $$PWD/minizip/win32/libz.a + } +-mac: { ++mac { + QMAKE_LFLAGS += -lz + } + |