Commits

Nikolaj Sjujskij  committed 940ca40

Add qconf-less Psi with eegorov's patch for groupchats' WM_CLASS

  • Participants
  • Parent commits 4e6f681

Comments (0)

Files changed (8)

File net-im/psi/Manifest

+AUX croupchats_wmclass.patch 1743 RMD160 2515ae7ed45fb70fd5f279261d6313a8533ca0e9 SHA1 47194ae909eb165206d801e9eff697afdca28152 SHA256 7c60464c7133f6ab85db5068b5bbedd9160586f04bbb959f0b5b5b5d0cde13e2
+AUX psi-0.14-drop-debug-cflags.patch 1098 RMD160 519c2c7dfc4e72ac1e3fe910f9663a9d3bc9f2fe SHA1 f4c88403c01b670d763878538d58bd54d6bccdd0 SHA256 ca7878131af3697275fe7b83ffdbd89886ba6cea27a38aff495b0eb60c5ca5e6
+AUX psi-0.14-input-validation.patch 7440 RMD160 74d1fdcacd3481fcebae9107ba4b185946a2bb82 SHA1 8eb19e4e5b86f59e8adf5d5b98464017d811120d SHA256 4f8f52b6846b238586d8584d8ca5a62b56bd5bfad328765eb157dc95c83bf017
+AUX psi-0.14-minizip-detection.patch 6587 RMD160 50a69ac0ccb43bed814811468093f72757bb594c SHA1 eee7c1944118c90a9a33012464c5f8418f3b37a4 SHA256 7aba10692d2bd371f0c009abc8e99d2267f47a1ac15765294e232bd0ecd15f31
+AUX psi-0.14-qt-compat.patch 1492 RMD160 eafdbe9391496bfd2198eaf6aa0637b569331c4a SHA1 5639a2078b1cbe318a4ba7d930fead6101766b59 SHA256 1af6ebbe01094519fcdbbe442a3c5798d499da134a08787648e71783e7b0ba60
+DIST psi-0.14.tar.bz2 2168801 RMD160 0c4a07726c2f9819da0f8aa8f1982e939f1fc20f SHA1 f5f8e1a427339a4e9113b5fa513b01a42ae1be4b SHA256 aa014a20d59beb23ce2e853fac3d1d70b4b029591627ae0f0a6a3b9f7150a4c0
+DIST psi-0.14_langpack_for_packagers_2009-12-02.zip 2553616 RMD160 4c3ea59043b91d607a3e30f3cec574e5787a0553 SHA1 6c9ce5717bd3a46a0d1f5eabb3b4756099590435 SHA256 27e5cec1847454c9ac3726122b204d923e87c11e1e37e8960c49c17fd4d74dc2
+DIST psi-extra-iconsets-r1428.tar.bz2 3214991 RMD160 5aba49e65ca39209a4791c6e5eb400a54c4a9341 SHA1 969d55207eb89a5000442b57819e98b0a44f37c0 SHA256 1c7cb4a6915c43e7728b96d8eadd4d1359561f40169f10f1051a2c63c3bfbe1c
+DIST psi-extra-patches-r1428.tar.bz2 131700 RMD160 071eadf3a174f392cfb7202a85d2082b3256c76e SHA1 78cfe1f6b8a15852b9ed72c0dd569c9b4e6d9fac SHA256 a458f44773c53abe369b174d220038d3b1dce6bbab981d6baf7ca48ec211cf48
+EBUILD psi-0.14-r4.ebuild 4899 RMD160 0e8de06926129c140239dbea0c55302331c69ff1 SHA1 94fdafb766007d02fc4f25d04b14dca56fc2f90e SHA256 e4805add075c4262e14759001cb2bad38cd689c1a3ff8a868924bc0f93121117
+MISC metadata.xml 901 RMD160 b56b9d9611caf5e35ce7d1186ebbdce0161398ac SHA1 7b96a65fbdfc601cad76af9f16f94c6c0a860d3e SHA256 530ea0ee5daa3602232c8877bba0966f656acb0a26f61498d788908b30e678af

File net-im/psi/files/croupchats_wmclass.patch

+diff -uNr psi-0.14_orig/src/tabs/tabdlg.cpp psi-0.14/src/tabs/tabdlg.cpp
+--- psi-0.14_orig/src/tabs/tabdlg.cpp	2009-12-03 03:43:39.000000000 +0600
++++ psi-0.14/src/tabs/tabdlg.cpp	2011-08-22 16:29:32.058629407 +0700
+@@ -155,7 +155,6 @@
+ 
+ 	setAcceptDrops(true);
+ 
+-	X11WM_CLASS("tabs");
+ 	setLooks();
+ 
+ 	act_close_ = new QAction(this);
+@@ -193,6 +192,11 @@
+ 	}
+ }
+ 
++void TabDlg::setX11WmClass(const char * str)
++{
++	X11WM_CLASS(str);
++}
++
+ // FIXME: This is a bad idea to store pointers in QMimeData
+ Q_DECLARE_METATYPE(TabDlg*);
+ Q_DECLARE_METATYPE(TabbableWidget*);
+diff -uNr psi-0.14_orig/src/tabs/tabdlg.h psi-0.14/src/tabs/tabdlg.h
+--- psi-0.14_orig/src/tabs/tabdlg.h	2009-12-03 03:43:39.000000000 +0600
++++ psi-0.14/src/tabs/tabdlg.h	2011-08-22 16:29:55.788657123 +0700
+@@ -83,6 +83,7 @@
+ 	void setUserManagementEnabled(bool enabled); // default enabled
+ 	void setTabBarShownForSingles(bool enabled); // default enabled
+ 	void setSimplifiedCaptionEnabled(bool enabled); // default disabled
++	void setX11WmClass(const char * str);
+ 
+ protected:
+ 	void setShortcuts();
+diff -uNr psi-0.14_orig/src/tabs/tabmanager.cpp psi-0.14/src/tabs/tabmanager.cpp
+--- psi-0.14_orig/src/tabs/tabmanager.cpp	2009-12-03 03:43:39.000000000 +0600
++++ psi-0.14/src/tabs/tabmanager.cpp	2011-08-22 16:30:54.616726219 +0700
+@@ -98,6 +98,12 @@
+ 	tab->setUserManagementEnabled(userManagement_);
+ 	tab->setTabBarShownForSingles(tabSingles_);
+ 	tab->setSimplifiedCaptionEnabled(simplifiedCaption_);
++	if(kind == 'C')
++		tab->setX11WmClass("chat_tabs");
++	else if(kind == 'M')
++		tab->setX11WmClass("groupchat_tabs");
++	else
++		tab->setX11WmClass("unknown");
+ 	tabsetToKinds_.insert(tab, group);
+ 	for (int i=0; i < group.length(); i++) {
+ 		QChar k = group.at(i);

File net-im/psi/files/psi-0.14-drop-debug-cflags.patch

+Drop -g from CFLAGS
+
+--- qcm/buildmodeapp.qcm	2011-10-19 14:38:55.621699641 +0200
++++ qcm/buildmodeapp.qcm	2011-10-19 14:39:11.868700486 +0200
+@@ -130,8 +130,6 @@
+ 		if(qc_buildmode_separate_debug_info)
+ 		{
+ 			opts += "separate_debug_info";
+-			other += "*-g++*:QMAKE_CFLAGS += -g\n";
+-			other += "*-g++*:QMAKE_CXXFLAGS += -g\n";
+ 		}
+ 
+ 		QString str = QString("CONFIG += ") + opts.join(" ") + '\n';
+--- iris/qcm/extra.qcm.old	2011-10-19 14:39:40.268701738 +0200
++++ iris/qcm/extra.qcm	2011-10-19 14:40:01.904699887 +0200
+@@ -55,8 +55,6 @@
+ 		if(debug_info)
+ 		{
+ 			str += QString("CONFIG += separate_debug_info\n");
+-			str += "QMAKE_CFLAGS += -g\n";
+-			str += "QMAKE_CXXFLAGS += -g\n";
+ 		}
+ 		if(universal)
+ 		{
+--- iris/qcm/buildmode.qcm.old	2011-10-19 14:40:23.794701147 +0200
++++ iris/qcm/buildmode.qcm	2011-10-19 14:40:42.157701302 +0200
+@@ -186,8 +186,6 @@
+ 		if(qc_buildmode_separate_debug_info)
+ 		{
+ 			opts += "separate_debug_info";
+-			other += "QMAKE_CFLAGS += -g\n";
+-			other += "QMAKE_CXXFLAGS += -g\n";
+ 		}
+ 
+ 		QString str = QString("CONFIG += ") + opts.join(" ") + '\n';

File net-im/psi/files/psi-0.14-input-validation.patch

+commit c68fdd9926a38b2820bc5df97fd1905355a2640d
+Author: rion <rion4ik@gmail.com>
+Date:   Fri Oct 7 22:19:05 2011 +0600
+
+    Fixed QLabel CVE
+
+--- src/Certificates/CertificateDisplay.ui	2011-10-19 08:30:15 +0000
++++ src/Certificates/CertificateDisplay.ui	2011-10-19 08:31:23 +0000
+@@ -1,105 +1,118 @@
+-<ui version="4.0" >
++<?xml version="1.0" encoding="UTF-8"?>
++<ui version="4.0">
+  <class>CertificateDisplay</class>
+- <widget class="QDialog" name="CertificateDisplay" >
+-  <property name="geometry" >
++ <widget class="QDialog" name="CertificateDisplay">
++  <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+-    <width>518</width>
++    <width>525</width>
+     <height>369</height>
+    </rect>
+   </property>
+-  <property name="windowTitle" >
++  <property name="windowTitle">
+    <string>Certificate Information</string>
+   </property>
+-  <layout class="QVBoxLayout" >
+-   <property name="margin" >
++  <layout class="QVBoxLayout">
++   <property name="spacing">
++    <number>6</number>
++   </property>
++   <property name="margin">
+     <number>11</number>
+    </property>
+-   <property name="spacing" >
+-    <number>6</number>
+-   </property>
+    <item>
+-    <layout class="QHBoxLayout" >
+-     <property name="margin" >
++    <layout class="QHBoxLayout">
++     <property name="spacing">
++      <number>6</number>
++     </property>
++     <property name="margin">
+       <number>0</number>
+      </property>
+-     <property name="spacing" >
+-      <number>6</number>
+-     </property>
+      <item>
+-      <layout class="QVBoxLayout" >
+-       <property name="margin" >
++      <layout class="QVBoxLayout">
++       <property name="spacing">
++        <number>6</number>
++       </property>
++       <property name="margin">
+         <number>0</number>
+        </property>
+-       <property name="spacing" >
+-        <number>6</number>
+-       </property>
+        <item>
+-        <widget class="QLabel" name="textLabel4" >
+-         <property name="text" >
++        <widget class="QLabel" name="textLabel4">
++         <property name="text">
+           <string>Certificate Validation:</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+-        <widget class="QLabel" name="lb_valid" >
+-         <property name="text" >
++        <widget class="QLabel" name="lb_valid">
++         <property name="text">
+           <string/>
+          </property>
++         <property name="textFormat">
++          <enum>Qt::PlainText</enum>
++         </property>
+         </widget>
+        </item>
+        <item>
+-        <widget class="QLabel" name="textLabel2" >
+-         <property name="text" >
++        <widget class="QLabel" name="textLabel2">
++         <property name="text">
+           <string>Valid From:</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+-        <widget class="QLabel" name="lb_notBefore" >
+-         <property name="text" >
++        <widget class="QLabel" name="lb_notBefore">
++         <property name="text">
+           <string/>
+          </property>
++         <property name="textFormat">
++          <enum>Qt::PlainText</enum>
++         </property>
+         </widget>
+        </item>
+        <item>
+-        <widget class="QLabel" name="textLabel3" >
+-         <property name="text" >
++        <widget class="QLabel" name="textLabel3">
++         <property name="text">
+           <string>Valid Until:</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+-        <widget class="QLabel" name="lb_notAfter" >
+-         <property name="text" >
++        <widget class="QLabel" name="lb_notAfter">
++         <property name="text">
+           <string/>
+          </property>
++         <property name="textFormat">
++          <enum>Qt::PlainText</enum>
++         </property>
+         </widget>
+        </item>
+        <item>
+-        <widget class="QLabel" name="textLabel1" >
+-         <property name="text" >
++        <widget class="QLabel" name="textLabel1">
++         <property name="text">
+           <string>Serial Number:</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+-        <widget class="QLabel" name="lb_sn" >
+-         <property name="text" >
++        <widget class="QLabel" name="lb_sn">
++         <property name="text">
+           <string/>
+          </property>
++         <property name="textFormat">
++          <enum>Qt::PlainText</enum>
++         </property>
+         </widget>
+        </item>
+        <item>
+         <spacer>
+-         <property name="orientation" >
++         <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+-         <property name="sizeType" >
++         <property name="sizeType">
+           <enum>QSizePolicy::Expanding</enum>
+          </property>
+-         <property name="sizeHint" >
++         <property name="sizeHint" stdset="0">
+           <size>
+            <width>20</width>
+            <height>106</height>
+@@ -110,14 +123,14 @@
+       </layout>
+      </item>
+      <item>
+-      <widget class="QTextBrowser" name="tb_cert" >
+-       <property name="minimumSize" >
++      <widget class="QTextBrowser" name="tb_cert">
++       <property name="minimumSize">
+         <size>
+          <width>350</width>
+          <height>300</height>
+         </size>
+        </property>
+-       <property name="horizontalScrollBarPolicy" >
++       <property name="horizontalScrollBarPolicy">
+         <enum>Qt::ScrollBarAlwaysOff</enum>
+        </property>
+       </widget>
+@@ -125,35 +138,35 @@
+     </layout>
+    </item>
+    <item>
+-    <widget class="Line" name="line1" >
+-     <property name="frameShape" >
++    <widget class="Line" name="line1">
++     <property name="frameShape">
+       <enum>QFrame::HLine</enum>
+      </property>
+-     <property name="frameShadow" >
++     <property name="frameShadow">
+       <enum>QFrame::Sunken</enum>
+      </property>
+-     <property name="orientation" >
++     <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+     </widget>
+    </item>
+    <item>
+-    <layout class="QHBoxLayout" >
+-     <property name="margin" >
++    <layout class="QHBoxLayout">
++     <property name="spacing">
++      <number>6</number>
++     </property>
++     <property name="margin">
+       <number>0</number>
+      </property>
+-     <property name="spacing" >
+-      <number>6</number>
+-     </property>
+      <item>
+       <spacer>
+-       <property name="orientation" >
++       <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+-       <property name="sizeType" >
++       <property name="sizeType">
+         <enum>QSizePolicy::Expanding</enum>
+        </property>
+-       <property name="sizeHint" >
++       <property name="sizeHint" stdset="0">
+         <size>
+          <width>421</width>
+          <height>20</height>
+@@ -162,17 +175,17 @@
+       </spacer>
+      </item>
+      <item>
+-      <widget class="QPushButton" native="1" name="pb_close">
+-	    <property name="text">
+-		  <string>Close</string>
+-		</property>
+-	  </widget>
++      <widget class="QPushButton" name="pb_close">
++       <property name="text">
++        <string>Close</string>
++       </property>
++      </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+- <layoutdefault spacing="6" margin="11" />
++ <layoutdefault spacing="6" margin="11"/>
+  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+  <tabstops>
+   <tabstop>tb_cert</tabstop>
+

File net-im/psi/files/psi-0.14-minizip-detection.patch

+=== modified file 'conf_windows.pri'
+--- conf_windows.pri	2011-10-25 10:03:42 +0000
++++ conf_windows.pri	2011-10-25 10:04:13 +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-25 10:03:42 +0000
++++ configure	2011-10-25 10:04:13 +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-25 10:03:42 +0000
++++ qcm/zlib.qcm	2011-10-25 10:04:13 +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-25 10:03:42 +0000
++++ src/conf_iris.pri	2011-10-25 10:04:13 +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-25 10:03:42 +0000
++++ src/libpsi/tools/zip/zip.cpp	2011-10-25 10:04:13 +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-25 10:03:42 +0000
++++ src/libpsi/tools/zip/zip.pri	2011-10-25 10:04:13 +0000
+@@ -2,17 +2,20 @@
+ 	$$PWD/zip.h
+ 
+ SOURCES += \
+-	$$PWD/zip.cpp \
+-	$$PWD/minizip/unzip.c
+-
+-INCLUDEPATH += $$PWD
+-DEPENDPATH  += $$PWD
+-
+-win32: {
++ 	$$PWD/zip.cpp
++ 
++psi-minizip {
++	SOURCES += $$PWD/minizip/unzip.c
++	DEFINES += PSIMINIZIP
++	INCLUDEPATH += $$PWD
++	DEPENDPATH  += $$PWD
++}
++
++psi-winzlib {
+ 	INCLUDEPATH += $$PWD/minizip/win32
+ 	DEPENDPATH  += $$PWD/minizip/win32
+ 	LIBS += $$PWD/minizip/win32/libz.a
+ }
+-mac: {
++mac {
+ 	QMAKE_LFLAGS += -lz
+ }
+

File net-im/psi/files/psi-0.14-qt-compat.patch

+commit ec91add0e6398ad20c7a8f14a1a08c5e3282c5bd
+Author: Michail Pishchagin <mblsha@users.sourceforge.net>
+Date:   Tue Oct 19 11:26:31 2010 +0400
+
+    Fix crash in MUCAffiliationsModel on Qt 4.7 (closes #1087)
+    Based on 1610-psi-fix-crash-in-muc-configurator.diff from Psi+
+
+diff --git a/src/mucaffiliationsmodel.cpp b/src/mucaffiliationsmodel.cpp
+index 722b762..fd0a830 100644
+--- a/src/mucaffiliationsmodel.cpp
++++ b/src/mucaffiliationsmodel.cpp
+@@ -150,15 +150,18 @@ void MUCAffiliationsModel::resetAffiliationLists()
+ 
+ void MUCAffiliationsModel::resetAffiliationList(MUCItem::Affiliation a)
+ {
++	emit layoutAboutToBeChanged();
+ 	enabled_[(AffiliationListIndex) affiliationToIndex(a)] = false;
+ 	QModelIndex index = affiliationListIndex(a);
+ 	if (hasChildren(index)) {
+ 		removeRows(0,rowCount(index),index);
+ 	}
++	emit layoutChanged();
+ }
+ 
+ void MUCAffiliationsModel::setAffiliationListEnabled(MUCItem::Affiliation a, bool b)
+ {
++	emit layoutAboutToBeChanged();
+ 	QModelIndex index = affiliationListIndex(a);
+ 	enabled_[(AffiliationListIndex) index.row()] = b;
+ 	emit layoutChanged();
+@@ -208,6 +211,9 @@ void MUCAffiliationsModel::addItems(const QList<MUCItem>& items)
+ 	foreach(MUCItem item, items) {
+ 		QModelIndex list = affiliationListIndex(item.affiliation());
+ 		if (list.isValid() && !item.jid().isEmpty()) {
++			if (!dirty) {
++				emit layoutAboutToBeChanged();
++			}
+ 			int row = rowCount(list);
+ 			if (row == 0) {
+ 				enabled_[(AffiliationListIndex) list.row()] = true;

File net-im/psi/metadata.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-im</herd>
+<longdescription>Psi is a very good jabber client that uses QT</longdescription>
+<use>
+	<flag name='enchant'>Use enchant spell engine instead of aspell</flag>
+	<flag name='extras'>Enables extra non official patches</flag>
+	<flag name='iconsets'>Install additional iconsets, some of them has not clear licensing</flag>
+	<flag name='plugins'>Enable plugins support</flag>
+	<flag name='powersave'>Disable some non critical timers for much less CPU usage</flag>
+	<flag name='webkit'>Enable chatlog rendering using webkit</flag>
+	<flag name='whiteboarding'>Enable experimental interactive SVG drawing</flag>
+	<flag name='xscreensaver'>Use X screensaver protocol extension to monitor idle/active status based on mouse/keyboard events</flag>
+</use>
+</pkgmetadata>

File net-im/psi/psi-0.14-r4.ebuild

+# 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-r4.ebuild,v 1.7 2011/10/25 16:45:22 pva Exp $
+
+EAPI=4
+
+inherit eutils qt4-r2 multilib
+
+MY_P="${P/_rc/-rc}"
+
+DESCRIPTION="Qt4 Jabber client, with Licq-like interface"
+HOMEPAGE="http://psi-im.org/"
+# Langpack:
+# http://lists.affinix.com/pipermail/psi-devel-affinix.com/2009-August/008798.html
+# Later found his site: http://fs.scs-tsa.de/psi_l10n/
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2
+	http://fs.scs-tsa.de/psi_l10n/psi-0.14_langpack_for_packagers_2009-12-02.zip
+	extras? ( mirror://gentoo/${PN}-extra-patches-r1428.tar.bz2
+		mirror://gentoo/${PN}-extra-iconsets-r1428.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ppc ppc64 x86 ~x86-fbsd"
+IUSE="crypt dbus debug doc extras jingle spell ssl xscreensaver webkit"
+RESTRICT="test"
+
+LANGS="be cs de fr it ja pl pt_BR ru sl sv ur_PK zh_TW"
+for LNG in ${LANGS}; do
+	IUSE="${IUSE} linguas_${LNG}"
+	#SRC_URI="${SRC_URI} http://psi-im.org/download/lang/psi_${LNG/ur_PK/ur_pk}.qm"
+done
+
+RDEPEND=">=x11-libs/qt-gui-4.4:4[qt3support,dbus?]
+	>=x11-libs/qt-qt3support-4.4:4
+	>=app-crypt/qca-2.0.2:2
+	spell? ( >=app-text/enchant-1.3.0 )
+	xscreensaver? ( x11-libs/libXScrnSaver )
+	extras? ( webkit? ( x11-libs/qt-webkit ) )
+	app-arch/unzip
+	|| ( >=sys-libs/zlib-1.2.5.1-r2[minizip] <sys-libs/zlib-1.2.5.1-r1 )"
+
+DEPEND="${RDEPEND}
+	extras? ( sys-devel/qconf )
+	doc? ( app-doc/doxygen )"
+
+PDEPEND="crypt? ( app-crypt/qca-gnupg:2 )
+	jingle? ( net-im/psimedia
+		app-crypt/qca-ossl:2 )
+	ssl? ( app-crypt/qca-ossl:2 )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+	epatch "${FILESDIR}/psi-0.14-qt-compat.patch"
+	epatch "${FILESDIR}/psi-0.14-minizip-detection.patch"
+	epatch "${FILESDIR}/psi-0.14-input-validation.patch"
+	epatch "${FILESDIR}/psi-0.14-drop-debug-cflags.patch"
+	epatch "${FILESDIR}/croupchats_wmclass.patch"
+
+	if use extras; then
+		# some patches from psi+ project http://code.google.com/p/psi-dev
+		ewarn "You're about to build heavily patched version of Psi called Psi+."
+		ewarn "It has really nice features but still is under heavy development."
+		ewarn "Take a look at homepage for more info: http://code.google.com/p/psi-dev"
+		ewarn "If you wish to disable some patches just put"
+		ewarn "MY_EPATCH_EXCLUDE=\"list of patches\""
+		ewarn "into /etc/portage/env/${CATEGORY}/${PN} file."
+		ewarn
+		ewarn "Note: some patches depend on other. So if you disabled some patch"
+		ewarn "and other started to fail to apply, you'll have to disable patches"
+		ewarn "that fail too."
+		ebeep
+
+		EPATCH_EXCLUDE="${MY_EPATCH_EXCLUDE}
+			005-less-includes.diff
+			755-psiplus-fix-application-info-defines.diff
+			9999-psiplus-application-info.diff" \
+		EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch
+		sed -e 's/\(^#define PROG_CAPS_NODE	\).*/\1"http:\/\/psi-dev.googlecode.com\/caps";/' \
+			-e 's:\(^#define PROG_NAME "Psi\):\1+:' \
+				-i src/applicationinfo.cpp || die
+		qconf || die "Failed to create ./configure."
+	else
+		if use webkit; then
+			ewarn "Webkit support disabled as it is only available in Psi+"
+			ewarn "(USE='extras' enabled)."
+		fi
+	fi
+
+	rm -rf third-party/qca || die # We use system libraries.
+}
+
+src_configure() {
+	# unable to use econf because of non-standard configure script
+	# disable growl as it is a MacOS X extension only
+	local confcmd="./configure
+			--prefix=/usr
+			--qtdir=/usr
+			--disable-bundled-qca
+			--disable-growl
+			$(use dbus || echo '--disable-qdbus')
+			$(use debug && echo '--debug')
+			$(use spell || echo '--disable-aspell')
+			$(use spell || echo '--disable-enchant')
+			$(use xscreensaver || echo '--disable-xss')
+			$(use extras && { use webkit && echo '--enable-qtwebkit';} )"
+
+	echo ${confcmd}
+	${confcmd} || die "configure failed"
+	# Makefile is not always created...
+	[[ ! -f Makefile ]] && die "configure failed"
+}
+
+src_compile() {
+	eqmake4
+
+	emake
+
+	if use doc; then
+		cd doc || die
+		mkdir -p api || die # 259632
+		emake api_public
+	fi
+}
+
+src_install() {
+	emake INSTALL_ROOT="${D}" install
+	rm "${D}"/usr/share/psi/{COPYING,README} || die
+
+	# this way the docs will be installed in the standard gentoo dir
+	newdoc iconsets/roster/README README.roster
+	newdoc iconsets/system/README README.system
+	newdoc certs/README README.certs
+	dodoc README
+
+	if use doc; then
+		cd doc || die
+		dohtml -r api
+	fi
+
+	# install translations
+	cd "${WORKDIR}" || die
+	insinto /usr/share/${PN}/
+	local nolangs=true
+	for LNG in ${LANGS}; do
+		if use linguas_${LNG}; then
+			doins ${LNG}/${PN}_${LNG}.qm
+			newins ${LNG}/INFO INFO.${LNG}
+			nolangs=false
+		fi
+	done
+
+	# if linguas is empty install all translations
+	if ${nolangs}; then
+		for LNG in ${LANGS}; do
+			doins ${LNG}/${PN}_${LNG}.qm
+			newins ${LNG}/INFO INFO.${LNG}
+		done
+	fi
+
+	if use extras; then
+		cp -a "${WORKDIR}"/iconsets/* "${D}"/usr/share/${PN}/iconsets/ || die
+	fi
+}