PDA

View Full Version : Patch to build under Ubuntu



tanner
01-25-2009, 05:27 PM
Here's the patch that used to get showeq-5.13.0.0 to build under ubuntu 8.04 and ubuntu 8.10, I just did a svn diff -and- yes some of it changes things specific to ubuntu, but I believe upstream and filter out the stuff needed to resolve the gcc3 vs gcc4 issue by seeing the patch below:





Property changes on: .
__________________________________________________ _________________
Name: svn:ignore
- Makefile
Makefile.in
*.dbg
conf.h
config.cache
config.guess
config.log
config.status
config.sub
configure
libtool
ltmain.sh
stamp-h
stamp-h.in
*~
.*.swp
+ .bzr


Index: src/itemdbtool.cpp
================================================== =================
--- src/itemdbtool.cpp (revision 719)
+++ src/itemdbtool.cpp (working copy)
@@ -469,7 +469,7 @@

/////////////////////////////////
// Display database file information
- printstat(PKGDATADIR, "PKGDATADIR");
+ printstat(DATA_INSTALL_DIR, "DATA_INSTALL_DIR");

QString dbExt;

Index: src/map.cpp
================================================== =================
--- src/map.cpp (revision 719)
+++ src/map.cpp (working copy)
@@ -17,7 +17,7 @@


#include "map.h"
-#include "ui_mapicondialog.h"
+#include "mapicondialog.h"
#include "util.h"
#include "main.h"
#include "filtermgr.h"
Index: src/drawmap.cpp
================================================== =================
--- src/drawmap.cpp (revision 719)
+++ src/drawmap.cpp (working copy)
@@ -568,7 +568,7 @@
QRegExp slashExp("/");
mapName.replace(slashExp, "_");

- mapName.prepend(PKGDATADIR "maps/");
+ mapName.prepend(DATA_INSTALL_DIR "maps/");
loadFileMap ((const char*)mapName);
paintMap();
}
@@ -603,12 +603,12 @@
"</HTML>\n";

// otherwise display an HTML form to allow the user to choose a map
- QDir mapDir(PKGDATADIR "maps/", "*.map", (QDir::Name | QDir::IgnoreCase),
+ QDir mapDir(DATA_INSTALL_DIR "maps/", "*.map", (QDir::Name | QDir::IgnoreCase),
(QDir::Files | QDir::Readable));

if (!mapDir.exists())
{
- out << "<H1>The map directory '" PKGDATADIR "/maps/' doesn't exist!</H1>\n";
+ out << "<H1>The map directory '" DATA_INSTALL_DIR "/maps/' doesn't exist!</H1>\n";
out << footer;
return 0;
}
Index: src/messagefilterdialog.h
================================================== =================
--- src/messagefilterdialog.h (revision 719)
+++ src/messagefilterdialog.h (working copy)
@@ -46,7 +46,7 @@
void messageTypeSelectionChanged();
void existingFilterSelectionChanged(QListBoxItem * item);
void removedFilter(uint32_t mask, uint8_t filter);
- void addedFilter(uint32_t mask, uint8_t filter, const MessageFilter& filter);
+ void addedFilter(uint32_t mask, uint8_t filterid, const MessageFilter& filter);

protected:
void clearFilter();
Index: src/messagefilter.h
================================================== =================
--- src/messagefilter.h (revision 719)
+++ src/messagefilter.h (working copy)
@@ -99,7 +99,7 @@

signals:
void removed(uint32_t mask, uint8_t filter);
- void added(uint32_t mask, uint8_t filter, const MessageFilter& filter);
+ void added(uint32_t mask, uint8_t filter, const MessageFilter& filter2);

protected:
MessageFilter* m_filters[maxMessageFilters];
Index: src/mapicon.h
================================================== =================
--- src/mapicon.h (revision 719)
+++ src/mapicon.h (working copy)
@@ -211,7 +211,7 @@
protected:
// static paint methods
typedef void (*IconImageFunction)(QPainter&p, const QPoint& point,
- int size, int size);
+ int size, int sizeWH);
static void paintNone(QPainter&p, const QPoint& point,
int size, int sizeWH);
static void paintCircle(QPainter&p, const QPoint& point,
Index: src/datalocationmgr.cpp
================================================== =================
--- src/datalocationmgr.cpp (revision 719)
+++ src/datalocationmgr.cpp (working copy)
@@ -8,6 +8,7 @@
*
*/

+#include "config.h"
#include "datalocationmgr.h"
#include "diagnosticmessages.h"

Index: src/messagewindow.h
================================================== =================
--- src/messagewindow.h (revision 719)
+++ src/messagewindow.h (working copy)
@@ -180,7 +180,7 @@
void setCaption();
virtual void restoreFont();
void removedFilter(uint32_t mask, uint8_t filter);
- void addedFilter(uint32_t mask, uint8_t filter, const MessageFilter& filter);
+ void addedFilter(uint32_t mask, uint8_t filterid, const MessageFilter& filter);

protected:
void addMessage(const MessageEntry& message);
Index: src/util.h
================================================== =================
--- src/util.h (revision 719)
+++ src/util.h (working copy)
@@ -10,9 +10,7 @@

#ifdef __FreeBSD__
#include <sys/types.h>
-long int lrint(double x);
-long int lrintf(float x);
-long int lroundf(float x);
+#include <math.h>
#else
#include <stdint.h>
#endif
Index: src/packetcapture.cpp
================================================== =================
--- src/packetcapture.cpp (revision 719)
+++ src/packetcapture.cpp (working copy)
@@ -8,14 +8,32 @@
* Portions Copyright 2001-2003 Zaphod ([email protected]).
*/

+#include "config.h"
+
/* Implementation of Packet class */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <netinet/ip.h>
+
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+
+#ifdef HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#warning socket
+# include <sys/socket.h>
+#endif
+
#include <netinet/udp.h>
#include <netinet/if_ether.h>
-#include <arpa/inet.h>

#include "packetcapture.h"
#include "diagnosticmessages.h"
Index: src/messageshell.cpp
================================================== =================
--- src/messageshell.cpp (revision 719)
+++ src/messageshell.cpp (working copy)
@@ -20,6 +20,10 @@
#include "filtermgr.h"
#include "util.h"

+#ifndef HAVE_STRNLEN
+# include "strnlen.h"
+#endif
+
//----------------------------------------------------------------------
// MessageShell
MessageShell::MessageShell(Messages* messages, EQStr* eqStrings,
Index: src/messages.h
================================================== =================
--- src/messages.h (revision 719)
+++ src/messages.h (working copy)
@@ -49,7 +49,7 @@

protected slots:
void removedFilter(uint32_t mask, uint8_t filter);
- void addedFilter(uint32_t mask, uint8_t filter, const MessageFilter& filter);
+ void addedFilter(uint32_t mask, uint8_t filterid, const MessageFilter& filter);

signals:
void newMessage(const MessageEntry& message);

purple
01-25-2009, 07:04 PM
I put in the gcc stuff, which I assume is not allowing same named params (which were in the .h but not in the .cpp for some odd reason).

I didn't take the freebsd stuff. If someone wants to separate it and submit a FreeBSD patch, that'd be better than putting it in something that is supposed to be for Ubuntu.

Why the change from PKGDATADIR to DATA_INSTALL_DIR?

tanner
01-26-2009, 12:09 PM
Why the change from PKGDATADIR to DATA_INSTALL_DIR?

Default name used but debuild (dpkg-buildpackage) makes writting debian/rules a whole lot easier.