summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/valknut/dcoptions.patch55
-rw-r--r--network/valknut/doinst.sh1
-rw-r--r--network/valknut/main.patch (renamed from network/valknut/valknut-0.4.9.patch)0
-rw-r--r--network/valknut/valknut.SlackBuild12
4 files changed, 63 insertions, 5 deletions
diff --git a/network/valknut/dcoptions.patch b/network/valknut/dcoptions.patch
new file mode 100644
index 0000000000..1d218cc2ed
--- /dev/null
+++ b/network/valknut/dcoptions.patch
@@ -0,0 +1,55 @@
+--- valknut/dcoptions.cpp.orig 2014-12-02 20:28:59.039798842 +0100
++++ valknut/dcoptions.cpp 2014-12-02 22:25:06.352312671 +0100
+@@ -808,15 +808,18 @@
+ {
+ PushButton_GETINTERNETIP->setEnabled(false);
+
+- QHttpRequestHeader header( "GET", "/ip.php" );
+- header.setValue( "Host", "wxdcgui.sourceforge.net" );
++ //QHttpRequestHeader header( "GET", "/ip.php" );
++ QHttpRequestHeader header( "GET", "/" );
++ //header.setValue( "Host", "wxdcgui.sourceforge.net" );
++ header.setValue( "Host", "www.myip.se" );
+ QString useragent = QString("Valknut/") + PACKAGE_VERSION;
+ //printf("User-Agent=%s\n", useragent.toAscii().constData());
+ header.setValue( "User-Agent", useragent );
+
+ m_pHttp = new QHttp();
+ connect( m_pHttp, SIGNAL(done(bool)), this, SLOT(slotGotInternetIP(bool)) );
+- m_pHttp->setHost( "wxdcgui.sourceforge.net" );
++ //m_pHttp->setHost( "wxdcgui.sourceforge.net" );
++ m_pHttp->setHost( "www.myip.se" );
+ m_pHttp->request( header );
+ }
+
+@@ -834,20 +837,25 @@
+ else
+ {
+ QString html = QString(m_pHttp->readAll());
+- int start = html.indexOf("<ip>");
+- int end = html.indexOf("</ip>",start);
+-
++
++ int start = html.indexOf("<b>");
++ // We need the 2nd "bold" (<b>) attribute
++ start = html.indexOf("<b>",start+3);
++ int end = html.indexOf("</b>",start);
++
+ if ( ( start == -1 ) || ( end < start ) )
+ {
+ QMessageBox::warning(
+ this,
+ tr("Get Internet IP"),
+- tr("Unexpected response from ") + "http://wxdcgui.sourceforge.net"
++ tr("Unexpected response from ") + "http://www.myip.se"
++ // tr("Unexpected response from ") + "http://wxdcgui.sourceforge.net"
+ );
+ }
+ else
+ {
+- start += 10;
++ //start += 10; // wxgui.sourceforge.net
++ start += 21; // www.myip.se
+ QString ip = html.mid( start, end - start );
+
+ if ( QHostAddress().setAddress(ip) )
diff --git a/network/valknut/doinst.sh b/network/valknut/doinst.sh
index 4e8ba7071d..5fb28930db 100644
--- a/network/valknut/doinst.sh
+++ b/network/valknut/doinst.sh
@@ -1,4 +1,3 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
-
diff --git a/network/valknut/valknut-0.4.9.patch b/network/valknut/main.patch
index 8106bbd384..8106bbd384 100644
--- a/network/valknut/valknut-0.4.9.patch
+++ b/network/valknut/main.patch
diff --git a/network/valknut/valknut.SlackBuild b/network/valknut/valknut.SlackBuild
index 5f586c448e..e9a39d993e 100644
--- a/network/valknut/valknut.SlackBuild
+++ b/network/valknut/valknut.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=valknut
VERSION=${VERSION:-0.4.9}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -69,7 +69,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-patch -p0 < "$CWD"/valknut-0.4.9.patch valknut/main.cpp
+# Main patch
+patch -p0 < "$CWD"/main.patch valknut/main.cpp
+
+# Dcoptions (myip) patch
+patch -p0 < "$CWD"/dcoptions.patch valknut/dcoptions.cpp
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -89,14 +93,14 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING* ChangeLog INSTALL NEWS README TODO "$PKG"/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING* ChangeLog INSTALL NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
+
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
-# Remove misplaced file - this one is already available in usr/doc/$PRGNAM-$VERSION
rm $PKG/usr/share/valknut/COPYING
cd $PKG