summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2011-10-04 07:11:35 +0000
committerPeter Volkov <pva@gentoo.org>2011-10-04 07:11:35 +0000
commite0129141e250716e51bca6d9dcfd6598cee23e90 (patch)
tree1b72c0e82fce8cf1ef7a61a9e038a29d20ab465a /net-im/psi
parentDo not use internal zlib header handling; this invalidates the need for zutil.h (diff)
downloadgentoo-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')
-rw-r--r--net-im/psi/ChangeLog7
-rw-r--r--net-im/psi/files/psi-0.14-minizip-detection.patch281
-rw-r--r--net-im/psi/psi-0.14-r2.ebuild3
3 files changed, 289 insertions, 2 deletions
diff --git a/net-im/psi/ChangeLog b/net-im/psi/ChangeLog
index 767ba5df429a..0ff9f89d2de1 100644
--- a/net-im/psi/ChangeLog
+++ b/net-im/psi/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-im/psi
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/psi/ChangeLog,v 1.212 2011/07/31 19:59:31 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/psi/ChangeLog,v 1.213 2011/10/04 07:11:35 pva Exp $
+
+ 04 Oct 2011; Peter Volkov <pva@gentoo.org> psi-0.14-r2.ebuild,
+ +files/psi-0.14-minizip-detection.patch:
+ Fix minizip related build issue, bug #384681. Thank Paul Volkov for report
+ and rion for fix.
31 Jul 2011; Jeroen Roovers <jer@gentoo.org> psi-0.14-r2.ebuild:
Stable for HPPA (bug #372591).
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
+ }
+
diff --git a/net-im/psi/psi-0.14-r2.ebuild b/net-im/psi/psi-0.14-r2.ebuild
index 94508c706fa0..2e7b12ea9117 100644
--- a/net-im/psi/psi-0.14-r2.ebuild
+++ b/net-im/psi/psi-0.14-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/psi/psi-0.14-r2.ebuild,v 1.6 2011/07/31 19:59:31 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/psi/psi-0.14-r2.ebuild,v 1.7 2011/10/04 07:11:35 pva Exp $
EAPI="2"
@@ -51,6 +51,7 @@ S=${WORKDIR}/${MY_P}
src_prepare() {
epatch "${FILESDIR}/psi-0.14-qt-compat.patch"
+ epatch "${FILESDIR}/psi-0.14-minizip-detection.patch"
if use extras; then
# some patches from psi+ project http://code.google.com/p/psi-dev