diff options
author | Tilman Keskinoz <arved@FreeBSD.org> | 2005-06-14 12:18:48 +0000 |
---|---|---|
committer | Tilman Keskinoz <arved@FreeBSD.org> | 2005-06-14 12:18:48 +0000 |
commit | ba7917858536824c563ad170d0cd77894c76b992 (patch) | |
tree | 88db5266cbf35a43f63d0cd180858b9955da7acf /science/gsystem | |
parent | 3d10bd7a67aa305aceec32d0cf76726d8bc92e5a (diff) | |
download | ports-ba7917858536824c563ad170d0cd77894c76b992.tar.gz ports-ba7917858536824c563ad170d0cd77894c76b992.zip |
Notes
Diffstat (limited to 'science/gsystem')
-rw-r--r-- | science/gsystem/Makefile | 15 | ||||
-rw-r--r-- | science/gsystem/distinfo | 4 | ||||
-rw-r--r-- | science/gsystem/files/patch-client-not-configured-message.diff | 20 | ||||
-rw-r--r-- | science/gsystem/files/patch-makinstall-no-docs.diff | 35 | ||||
-rw-r--r-- | science/gsystem/files/patch-network-reconnect.diff | 266 | ||||
-rw-r--r-- | science/gsystem/pkg-message | 8 | ||||
-rw-r--r-- | science/gsystem/pkg-plist | 69 |
7 files changed, 377 insertions, 40 deletions
diff --git a/science/gsystem/Makefile b/science/gsystem/Makefile index 2a13f3932883..f776c335a671 100644 --- a/science/gsystem/Makefile +++ b/science/gsystem/Makefile @@ -6,7 +6,7 @@ # PORTNAME= gsystem -PORTVERSION= 0.4.1 +PORTVERSION= 0.5.1 CATEGORIES= science devel games MASTER_SITES= ftp://ftp.g-system.at/pub/gsystem/releases/development/${PORTVERSION}/ DISTNAME= G-System-${PORTVERSION} @@ -17,7 +17,8 @@ COMMENT= A multi-user virtual reality evolution and life simulation framework BUILD_DEPENDS= qmake:${PORTSDIR}/devel/qmake USE_BZIP2= yes -USE_QT_VER= 3 + +USE_KDELIBS_VER= 3 INSTALLS_SHLIB= yes NO_FILTER_SHLIBS= yes @@ -28,7 +29,7 @@ QMAKESPEC= freebsd-g++ .include <bsd.port.pre.mk> .if ${OSVERSION} < 500000 -BROKEN= does not compile with gcc 2.95 +BROKEN= "does not compile with gcc 2.95" .endif do-configure: @@ -41,11 +42,15 @@ do-build: cd ${WRKSRC}; \ export QTDIR=${QTDIR}; \ export QMAKESPEC=${QMAKESPEC}; \ - ./compile; + ./scripts/compile; do-install: cd ${WRKSRC}; \ export G_PREFIX=${PREFIX}; \ - ./makeinstall; + export G_NO_INST_DOCS=yes; \ + ./scripts/makeinstall; + +post-install: + @${CAT} ${PKGMESSAGE}; .include <bsd.port.post.mk> diff --git a/science/gsystem/distinfo b/science/gsystem/distinfo index e87becc2bdd8..c2697ad95f03 100644 --- a/science/gsystem/distinfo +++ b/science/gsystem/distinfo @@ -1,2 +1,2 @@ -MD5 (G-System-0.4.1.tar.bz2) = f7d944226d0492d6fb6070d1b3328797 -SIZE (G-System-0.4.1.tar.bz2) = 116102 +MD5 (G-System-0.5.1.tar.bz2) = 74a5173cdf267f71218c935e24469135 +SIZE (G-System-0.5.1.tar.bz2) = 414373 diff --git a/science/gsystem/files/patch-client-not-configured-message.diff b/science/gsystem/files/patch-client-not-configured-message.diff new file mode 100644 index 000000000000..aaebbe56ac9a --- /dev/null +++ b/science/gsystem/files/patch-client-not-configured-message.diff @@ -0,0 +1,20 @@ +Index: src/guniverseclient/main.cpp +=================================================================== +--- src/guniverseclient/main.cpp (revision 511) ++++ src/guniverseclient/main.cpp (working copy) +@@ -35,6 +35,7 @@ + #include <kmainwindow.h> + #include <kcmdlineargs.h> + #include <kaboutdata.h> ++#include <kmessagebox.h> + + #include <qstring.h> + #include <qfile.h> +@@ -133,6 +134,7 @@ + else + { + qWarning(QString("failed to load configuration file: ") + filename); ++ KMessageBox::error(0,QString("The configuration %1 could not be loaded, please run \"god\" to create the desired configuration! Then restart the client. Details can be found in the G System README file.\n\nIf you don't know what to do, contact us at http://www.g-system.at/").arg(filename),"Client not configured!"); + QTimer::singleShot(10,&a,SLOT(quit())); + } + diff --git a/science/gsystem/files/patch-makinstall-no-docs.diff b/science/gsystem/files/patch-makinstall-no-docs.diff new file mode 100644 index 000000000000..055522be11cd --- /dev/null +++ b/science/gsystem/files/patch-makinstall-no-docs.diff @@ -0,0 +1,35 @@ +Index: scripts/makeinstall +=================================================================== +--- scripts/makeinstall (revision 508) ++++ scripts/makeinstall (working copy) +@@ -93,13 +93,18 @@ + done + cd $current_dir + +-echo "Installing documentation into $G_PREFIX/share/doc/gsystem" ++if [ -z $G_NO_INST_DOCS ] ++then + +-mkdir -p $G_PREFIX/share/doc/gsystem ++ echo "Installing documentation into $G_PREFIX/share/doc/gsystem" ++ mkdir -p $G_PREFIX/share/doc/gsystem ++ cp -r ./doc/gdocs/* $G_PREFIX/share/doc/gsystem + +-cp -r ./doc/gdocs/* $G_PREFIX/share/doc/gsystem ++ checkreturn $? + +-checkreturn $? ++else ++ echo "Not installing documentation." ++fi + + username=`whoami` + +@@ -129,4 +134,5 @@ + echo "ENJOY!!" + echo "" + +-exit 0 +\ No newline at end of file ++exit 0 ++ diff --git a/science/gsystem/files/patch-network-reconnect.diff b/science/gsystem/files/patch-network-reconnect.diff new file mode 100644 index 000000000000..9129a620b0da --- /dev/null +++ b/science/gsystem/files/patch-network-reconnect.diff @@ -0,0 +1,266 @@ +Index: src/worldengine/GXmlDataController.cpp +=================================================================== +--- src/worldengine/GXmlDataController.cpp (revision 547) ++++ src/worldengine/GXmlDataController.cpp (working copy) +@@ -1306,6 +1306,14 @@ + + void GXmlDataController::sendUserMessage(QString message, QString destination) + { ++ //@todo: this doesn't work??? ++// XMPP::Jid destjid; ++// destjid.set(destination); ++// if (!destjid.isValid()) ++// { ++// qWarning(QString("Destination %1 not a valid JID, not sending message!").arg(destination)); ++// return; ++// } + QDomDocument d; + QDomElement e = d.createElement("message"); + d.appendChild(e); +Index: src/worldengine/GXmppNetwork.cpp +=================================================================== +--- src/worldengine/GXmppNetwork.cpp (revision 547) ++++ src/worldengine/GXmppNetwork.cpp (working copy) +@@ -94,19 +94,22 @@ + : GXmlNetwork(parent,name), + Active(FALSE), + Connected(FALSE), ++ Connecting(FALSE), + XmppLayerCreated(FALSE), + XmppConnector(NULL), + Tls(NULL), + TlsHandler(NULL), + Stream(NULL), + NetworkId(full_jid), +- MessageQueue(new GXmppMessageQueue()) ++ MessageQueue(new GXmppMessageQueue()), ++ StayConnected(FALSE) + { + connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(closeNetwork())); + +- QTimer* heartbeat_timer = new QTimer(this,"heartbeat timer"); +- connect(heartbeat_timer,SIGNAL(timeout()),this,SLOT(sendHeartbeat())); +- heartbeat_timer->start(55000); ++// QTimer* heartbeat_timer = new QTimer(this,"heartbeat timer"); ++// connect(heartbeat_timer,SIGNAL(timeout()),this,SLOT(sendHeartbeat())); ++// heartbeat_timer->start(55000); ++ // see XMPP::ClientStream::setNoopTime() which is now used + } + + GXmppNetwork::~GXmppNetwork() +@@ -123,8 +126,9 @@ + { + if (XmppLayerCreated) + { +- qWarning("XMPP Layer already created!"); +- return true; ++ qWarning("XMPP Layer already created! Destroying it first..."); ++ this->deleteXmppLayer(true); ++ qWarning("XMPP Layer now destroyed"); + } + + //XMPP related setup +@@ -241,6 +245,11 @@ + XmppConnector=NULL; + } + ++ this->Connected = false; ++ this->Connecting = false; ++ this->Active = false; ++ this->XmppLayerCreated = false; ++ + return true; + } + +@@ -296,6 +305,14 @@ + + bool GXmppNetwork::initNetwork() + { ++ if (this->Connecting) ++ { ++ qWarning("Already in the process of connecting the network"); ++ return false; ++ } ++ ++ this->Connecting = true; ++ + QMutexLocker lock(this); + if (!this->createXmppLayer()) + { +@@ -332,7 +349,7 @@ + Tls->setCertificateStore(certStore); + } + +-// Stream->setNoopTime(55000); // every 55 seconds ++ Stream->setNoopTime(55000); // every 55 seconds + qDebug("Connecting XMPP network with JID " + this->getNetworkId()); + qDebug("Warning: if you get a segmentation fault next, this probably means"); + qDebug(" that the server you want to connect to (the domain part"); +@@ -344,15 +361,22 @@ + return true; + } + ++void GXmppNetwork::reconnectNetwork() ++{ ++ QTimer::singleShot(100,this,SLOT(initNetwork())); ++} ++ + bool GXmppNetwork::closeNetwork() + { + QMutexLocker lock(this); ++ this->StayConnected = false; + if (this->Connected) + { + qDebug("Disconnecting XMPP Stream..."); + this->Stream->close(); + this->Connected = false; + this->Active = false; // correct place? ++ this->Connecting = false; + return true; + } + else +@@ -379,6 +403,15 @@ + qWarning("Destination is empty, not sending message!"); + return false; + } ++ ++ //@todo this doesn't seem to be functional(??) ++ XMPP::Jid destjid(destination); ++ if (!destjid.isValid()) ++ { ++ qWarning(QString("Destination %1 not a valid JID, not sending message!").arg(destination)); ++ return false; ++ } ++ + // qDebug(QString("type range for user events: %1 to %2").arg(QString::number(QEvent::User)).arg(QString::number(QEvent::MaxUser))); + QDomDocument d; + QDomElement e = d.createElement("message"); +@@ -386,15 +419,24 @@ + e.setAttribute("to",destination); + e.appendChild(d.importNode(data,"true")); + +- if (!this->isSubscribed(destination)) ++ if (!this->isSubscribed(destination) || !this->isConnected()) + { +- qWarning(QString("Delaying sending of message, destination %1 is not yet available").arg(destination)); ++ if (!this->isConnected() && this->StayConnected) ++ { ++ qWarning("Network is not connected! Reconnecting..."); ++ this->reconnectNetwork(); ++ } ++ else ++ { ++ qWarning(QString("Delaying sending of message, destination %1 is not yet available").arg(destination)); ++ this->makeDestinationAvailable(destination); ++ } + this->MessageQueue->add(destination,d.toString()); +- this->makeDestinationAvailable(destination); + } + else + { +- QApplication::postEvent(this,new QNetworkSendEvent(d.toString())); ++ this->send(d.toString()); ++// QApplication::postEvent(this,new QNetworkSendEvent(d.toString())); + } + + return true; +@@ -455,7 +497,7 @@ + + bool GXmppNetwork::isConnected() + { +- if (this->Active && this->Connected && Stream->isAuthenticated()) ++ if (this->Active && this->Connected && Stream->isAuthenticated() && Stream->isActive()) + return true; + else + return false; +@@ -505,7 +547,9 @@ + + void GXmppNetwork::clientStreamConnected() + { ++ this->Connecting = false; + this->Connected = true; ++ this->StayConnected = true; + qDebug("XMPP Stream connected"); + } + +@@ -553,7 +597,12 @@ + + void GXmppNetwork::clientStreamConnectionClosed() + { +- qDebug("XMPP Stream connection closed"); ++ qDebug("XMPP Stream connection closed."); ++ if (this->StayConnected) ++ { ++ qDebug("Using timer for delayed recreation of the XMPP layer..."); ++ this->reconnectNetwork(); ++ } + } + + void GXmppNetwork::clientStreamDelayedCloseFinished() +@@ -765,7 +814,7 @@ + } + else if(err == XMPP::ClientStream::ErrProtocol) + { +- s = "conntest: XMPP protocol error"; ++ s = "XMPP protocol error"; + } + else if(err == XMPP::ClientStream::ErrStream) + { +@@ -870,6 +919,12 @@ + s = "broken security layer (SASL)"; + + qWarning(s); ++ ++ if (!this->isConnected() && this->StayConnected) ++ { ++ qWarning("XMPP Stream got disconnected, reconnecting..."); ++ QTimer::singleShot(100,this,SLOT(initNetwork())); ++ } + } + + //END XMPP slots and signals for network management // +Index: src/worldengine/GXmppNetwork.h +=================================================================== +--- src/worldengine/GXmppNetwork.h (revision 547) ++++ src/worldengine/GXmppNetwork.h (working copy) +@@ -81,6 +81,11 @@ + bool Connected; + + /** ++ * Currently connecting? ++ */ ++ bool Connecting; ++ ++ /** + * XMPP related objects created. + */ + bool XmppLayerCreated; +@@ -130,6 +135,14 @@ + */ + GXmppMessageQueue* MessageQueue; + ++ /** ++ * Set to true if the network should stay connected. ++ * In this case reinitializing the network will be done ++ * automatically if the network got disconnected. ++ * closeNetwork() sets this to false before shutting down. ++ */ ++ bool StayConnected; ++ + protected slots: + + /** +@@ -208,6 +221,13 @@ + * Initialization. + */ + virtual bool initNetwork(); ++ ++ /** ++ * Issues a single shot timer to call initNetwork() ++ * Useful when wanting to reconnect but being in the middle ++ * of something (that is, in a slot) ++ */ ++ virtual void reconnectNetwork(); + + /** + * Shuts down the network. diff --git a/science/gsystem/pkg-message b/science/gsystem/pkg-message new file mode 100644 index 000000000000..63d48535540f --- /dev/null +++ b/science/gsystem/pkg-message @@ -0,0 +1,8 @@ +To use the G Universe server (guniverse) please create a configuration +with the god binary in /usr/local/etc/gweconfig.xml. + +To use the G Universe client (gunverseclient) please run god +for every user that wants to connect to the G Universe. The +configuration should be stored in $HOME/.guniverseclient.xml + +The gdemo does not need any configuration. diff --git a/science/gsystem/pkg-plist b/science/gsystem/pkg-plist index f5c250c3b7f1..20667176e489 100644 --- a/science/gsystem/pkg-plist +++ b/science/gsystem/pkg-plist @@ -1,50 +1,53 @@ -bin/gdemo -lib/libGCS.so.0.4.1 -lib/libGCS.so -lib/libGCS.so.0 -lib/libGWE.so.0.4.1 -lib/libGWE.so -lib/libGWE.so.0 -lib/libGBE.so.0.4.1 lib/libGBE.so lib/libGBE.so.0 -lib/libGCE.so.0.4.1 +lib/libGBE.so.0.5 +lib/libGBE.so.0.5.1 lib/libGCE.so lib/libGCE.so.0 -lib/libGCS.so.0.4 -lib/libGWE.so.0.4 -lib/libGBE.so.0.4 -lib/libGCE.so.0.4 -include/G/Camera.h -include/G/GActiveElementInfluence.h +lib/libGCE.so.0.5 +lib/libGCE.so.0.5.1 +lib/libGCS.so +lib/libGCS.so.0 +lib/libGCS.so.0.5 +lib/libGCS.so.0.5.1 +lib/libGWE.so +lib/libGWE.so.0 +lib/libGWE.so.0.5 +lib/libGWE.so.0.5.1 include/G/GAgent.h -include/G/GAttractAgent.h -include/G/GDynamicGeneratorAgent.h -include/G/GDynamicGeneratorCategory.h include/G/GElement.h include/G/GElementID.h include/G/GElementInfluence.h include/G/GEnergy.h -include/G/GEnergyFormAgent.h include/G/GForm.h -include/G/GInfluenceableAgent.h -include/G/GInvestigationAgent.h include/G/GMatrix44.h -include/G/GMoveAgent.h include/G/GObject.h -include/G/GOpenGLForm.h +include/G/GVector3.h +include/G/GWorldData.h +include/G/GCoreXmlSerializer.h +include/G/GDataController.h +include/G/GStorage.h +include/G/GWorldEngineFactory.h +include/G/GXmlDataController.h +include/G/GXmlNetwork.h +include/G/GXmppNetwork.h +include/G/GweAdvancedController.h +include/G/GweController.h +include/G/GweFactoryOption.h +include/G/GweSimpleController.h +include/G/GAttractAgent.h +include/G/GDynamicGeneratorAgent.h +include/G/GDynamicGeneratorCategory.h +include/G/GEnergyFormAgent.h +include/G/GMoveAgent.h include/G/GPlanetCategory.h -include/G/GPositionalInfluence.h include/G/GRadiatingAgent.h -include/G/GReparentAgent.h -include/G/GReparentInfluence.h include/G/GSolarsystemCategory.h -include/G/GSolarsystemForm.h -include/G/GVector3.h -include/G/GWEInterface.h -include/G/GWEInterfaceSimple.h -include/G/InvestigationInterface.h -include/G/InvestigationInterfaceImp.h -include/G/OpenGLFrame.h include/G/PseudoRNG.h +include/G/GCamera.h +include/G/GOpenGLFrame.h +bin/gdemo +bin/god +bin/guniverse +bin/guniverseclient @dirrm include/G |