Moin,

Am Freitag, 8. April 2005 11:36 schrieb Alexander Rensmann:
> On Thursday 07 April 2005 18:06, Stefan Gehn wrote:
> > #ifdef HAVE_LIBGPGME
> > it seems, I don't have/want gpg and get:
>
> Please try this patch.
>

Here's my updated patch as yours didn't work due to missing symbols on licq 
startup:

[ERR] Unable to load plugin (kde-gui): /usr/local/lib/licq/licq_kde-gui.so:
undefined symbol: _ZN12GPGKeySelectC1EPKcmP7QWidget.

I'd actually prefer gpg*.cpp not being compiled at all, i.e. conditionally add 
the two files to SOURCES in Makefile.am depending on libgpgme being present 
or not.

Bye, Stefan aka mETz
? licq-nogpgme-compilefix.diff
? licq-nogpgme-compilefix2.diff
Index: src/gpgkeymanager.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/gpgkeymanager.cpp,v
retrieving revision 1.1
diff -u -3 -p -b -B -w -r1.1 gpgkeymanager.cpp
--- src/gpgkeymanager.cpp	7 Apr 2005 03:01:02 -0000	1.1
+++ src/gpgkeymanager.cpp	9 Apr 2005 16:42:53 -0000
@@ -15,6 +15,8 @@
 
 */
 
+#ifdef HAVE_LIBGPGME
+
 #include "gpgkeymanager.moc"
 
 #include <licq_user.h>
@@ -343,3 +345,5 @@ void KeyListItem::unsetKey()
 		gMainWindow->slot_updatedUser(&s);
 	}
 }
+
+#endif // HAVE_LIBGPGME
Index: src/gpgkeymanager.h
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/gpgkeymanager.h,v
retrieving revision 1.1
diff -u -3 -p -b -B -w -r1.1 gpgkeymanager.h
--- src/gpgkeymanager.h	7 Apr 2005 03:01:03 -0000	1.1
+++ src/gpgkeymanager.h	9 Apr 2005 16:42:53 -0000
@@ -1,6 +1,12 @@
 #ifndef GPGKEYMANAGER_H
 #define GPGKEYMANAGER_H
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_LIBGPGME
+
 #include <qvariant.h>
 #include <qdialog.h>
 #include <qlistview.h>
@@ -84,4 +90,6 @@ protected slots:
 	void slot_done();
 };
 
+#endif // HAVE_LIBGPGME
+
 #endif // GPGKEYMANAGER_H
Index: src/gpgkeyselect.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/gpgkeyselect.cpp,v
retrieving revision 1.1
diff -u -3 -p -b -B -w -r1.1 gpgkeyselect.cpp
--- src/gpgkeyselect.cpp	7 Apr 2005 03:01:04 -0000	1.1
+++ src/gpgkeyselect.cpp	9 Apr 2005 16:42:53 -0000
@@ -15,10 +15,6 @@
 
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #ifdef HAVE_LIBGPGME
 
 #include "gpgkeyselect.moc"
Index: src/gpgkeyselect.h
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/gpgkeyselect.h,v
retrieving revision 1.1
diff -u -3 -p -b -B -w -r1.1 gpgkeyselect.h
--- src/gpgkeyselect.h	7 Apr 2005 03:01:04 -0000	1.1
+++ src/gpgkeyselect.h	9 Apr 2005 16:42:53 -0000
@@ -1,6 +1,12 @@
 #ifndef GPGKEYSELECT_H
 #define GPGKEYSELECT_H
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_LIBGPGME
+
 #include "licqdialog.h"
 
 #include <qobject.h>
@@ -51,4 +57,6 @@ signals:
 	void signal_done();
 };
 
-#endif
+#endif //HAVE_LIBGPGME
+
+#endif //GPGKEYSELECT_H
Index: src/mainwin.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/mainwin.cpp,v
retrieving revision 1.354
diff -u -3 -p -b -B -w -r1.354 mainwin.cpp
--- src/mainwin.cpp	6 Apr 2005 09:26:07 -0000	1.354
+++ src/mainwin.cpp	9 Apr 2005 16:42:54 -0000
@@ -3689,6 +3689,7 @@ void CMainWindow::slot_miscmodes(int _nI
     u->SetAutoSecure( !u->AutoSecure() );
     break;
   case 7:
+#ifdef HAVE_LIBGPGME
     if ( strcmp(u->GPGKey(),"")!=0 )
       u->SetUseGPG( !u->UseGPG() );
     else
@@ -3698,6 +3699,7 @@ void CMainWindow::slot_miscmodes(int _nI
       new GPGKeySelect( m_szUserMenuId, m_nUserMenuPPID );
     }
     break;
+#endif
   case 8:
     u->SetSendRealIp( !u->SendRealIp() );
     break;
@@ -4061,8 +4063,10 @@ void CMainWindow::ApplyExtendedIcons(con
    if (pmSharedFiles.isNull())
      pmSharedFiles = QPixmap(pixSharedFiles_xpm);
 
+#ifdef HAVE_LIBGPGME
    pmGPGKey = QPixmap(pixKeyEnabled_xpm);
    pmGPGKeyDisabled = QPixmap(pixKeyDisabled_xpm);
+#endif
 
    if (!_bInitial)
    {
@@ -4389,7 +4393,9 @@ void CMainWindow::initMenu()
    mnuSystem->insertItem(tr("&Options..."), this, SLOT(popupOptionsDlg()));
    mnuSystem->insertItem(tr("S&kin Browser..."), this, SLOT(showSkinBrowser()));
    mnuSystem->insertItem(tr("&Plugin Manager..."), this, SLOT(showPluginDlg()));
+#ifdef HAVE_LIBGPGME
    mnuSystem->insertItem(pmGPGKey, tr("&GPG Key Manager..."), this, SLOT(showGPGKeyManager()));
+#endif
    mnuSystem->insertSeparator();
    mnuSystem->insertItem(tr("Sa&ve Settings"), this, SLOT(saveOptions()));
    mnuSystem->insertItem(tr("&Help"), mnuHelp);
@@ -4647,7 +4653,9 @@ void CMainWindow::showSkinBrowser()
 
 void CMainWindow::showGPGKeyManager()
 {
+#ifdef HAVE_LIBGPGME
   ( new GPGKeyManager() )->show();
+#endif
 }
 
 void CMainWindow::showPluginDlg()

Reply via email to