ports/154148: [patch] astro/xglobe ported to Qt4
G. Paul Ziemba
p-fbsd-bugs at ziemba.us
Wed Jan 19 18:30:11 UTC 2011
>Number: 154148
>Category: ports
>Synopsis: [patch] astro/xglobe ported to Qt4
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 19 18:30:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: G. Paul Ziemba
>Release: FreeBSD 8.2-PRERELEASE i386
>Organization:
Olive Hill Networks, Inc.
>Environment:
System: FreeBSD hairball.ziemba.us 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0: Tue Jan 11 22:26:31 PST 2011 root at hairball:/usr/obj/usr/src/sys/GPZ-110111 i386
>Description:
current astro/xglobe depends on Qt3, whose presence seems to
interfere with building kdelibs4. It would be nice to remove
xglobe's dependency on Qt3.
>How-To-Repeat:
>Fix:
I ran qt3toqt4 on the source files and fixed assorted
qt3->qt4 transition problems. I hope someone who knows
Qt4 can review my use of XClearWindow(). Maybe there is
a Qt4 equivalent method.
--- patch-port begins here ---
diff -ruN xglobe.orig/Makefile xglobe/Makefile
--- xglobe.orig/Makefile 2011-01-11 20:35:54.000000000 -0800
+++ xglobe/Makefile 2011-01-19 09:50:35.000000000 -0800
@@ -15,9 +15,10 @@
MAINTAINER= ports at FreeBSD.org
COMMENT= Displays a view of the Earth (like xearth) with a rendered photo map
-USE_QT_VER= 3
+USE_QT_VER= 4
+QT_COMPONENTS= corelib gui qt3support moc_build
USE_GMAKE= yes
-MAKE_ENV= PTHREAD_LIBS=${PTHREAD_LIBS}
+MAKE_ENV= PTHREAD_LIBS=${PTHREAD_LIBS} QT_PREFIX=${QT_PREFIX}
do-install:
@${MKDIR} ${PREFIX}/share/xglobe/
diff -ruN xglobe.orig/files/patch-Makefile xglobe/files/patch-Makefile
--- xglobe.orig/files/patch-Makefile 1969-12-31 16:00:00.000000000 -0800
+++ xglobe/files/patch-Makefile 2011-01-19 09:41:17.000000000 -0800
@@ -0,0 +1,61 @@
+--- Makefile.orig 1999-07-19 05:56:27.000000000 -0700
++++ Makefile 2011-01-19 09:39:21.000000000 -0800
+@@ -4,43 +4,44 @@
+
+ ####### Installation directory
+
+-XGLOBE_DIR = /usr/local
+-XGLOBE_LIB_DIR = $(XGLOBE_DIR)/lib/xglobe
++XGLOBE_DIR = $(PREFIX)
++XGLOBE_LIB_DIR = $(XGLOBE_DIR)/share/xglobe
+ XGLOBE_BIN_DIR = $(XGLOBE_DIR)/bin
+
+ ####### Library directories - you may need to modify these
+
+-X11_INCLUDE_DIR = /usr/X11R6/include
+-QT_INCLUDE_DIR = $(QTDIR)/include
++X11_INCLUDE_DIR = $(LOCALBASE)/include
++QT_INCLUDE_DIR = $(QT_PREFIX)/include/qt4
+
+-QT_LIB_DIR = $(QTDIR)/lib
+-X11_LIB_DIR = /usr/X11R6/lib
++QT_LIB_DIR = $(QT_PREFIX)/lib/qt4
++X11_LIB_DIR = $(LOCALBASE)/lib
+
+
+ ####### Compiler and tools
+
+-CPP = g++
+-LINK = g++
+-MOC = moc
++CXX ?= c++
++CPP = ${CXX}
++LINK = ${CXX}
++MOC = moc-qt4
+ INSTALL = install
+
+ ####### compile and link options
+
+-CFLAGS = $(INCLUDE_DIRS) -DXGLOBE_LIB_DIR=\"$(XGLOBE_LIB_DIR)\" $(WITH_QIMGIO) -O2 -Wall
++CFLAGS += -DQT3_SUPPORT $(INCLUDE_DIRS) -DXGLOBE_LIB_DIR=\"$(XGLOBE_LIB_DIR)\" $(WITH_QIMGIO)
+
+ LFLAGS =
+
+-INCLUDE_DIRS = -I$(QT_INCLUDE_DIR) -I$(X11_INCLUDE_DIR)
++INCLUDE_DIRS = -I$(QT_INCLUDE_DIR) -I$(QT_INCLUDE_DIR)/Qt -I$(QT_INCLUDE_DIR)/QtGui -I$(X11_INCLUDE_DIR)
+
+ LIB_DIRS = -L$(QT_LIB_DIR) -L$(X11_LIB_DIR)
+
+-LIBS = -lX11 -lqt -lm
++LIBS = -lX11 -lQt3Support -lQtGui -lm ${PTHREAD_LIBS}
+ # If you want to use the QImageIO lib (to support jpg and png maps) use the
+ # next two lines and comment the one above
+ #WITH_QIMGIO = -DWITH_QIMAGEIO
+-#LIBS = -lX11 -lqt -lm -lqimgio
++#LIBS = -lX11 -lqt1 -lm -lqimgio
+ # If the linker complains about unresolved references try this:
+-#LIBS = -lX11 -lqt -lm -lqimgio -lpng -lz -ljpeg
++#LIBS = -lX11 -lqt1 -lm -lqimgio -lpng -lz -ljpeg
+
+ ####### Target
+
diff -ruN xglobe.orig/files/patch-aa xglobe/files/patch-aa
--- xglobe.orig/files/patch-aa 2008-11-18 01:11:47.000000000 -0800
+++ xglobe/files/patch-aa 1969-12-31 16:00:00.000000000 -0800
@@ -1,59 +0,0 @@
---- Makefile.orig Mon Jul 19 14:56:27 1999
-+++ Makefile Sat Jan 25 14:51:03 2003
-@@ -4,29 +4,30 @@
-
- ####### Installation directory
-
--XGLOBE_DIR = /usr/local
--XGLOBE_LIB_DIR = $(XGLOBE_DIR)/lib/xglobe
-+XGLOBE_DIR = $(PREFIX)
-+XGLOBE_LIB_DIR = $(XGLOBE_DIR)/share/xglobe
- XGLOBE_BIN_DIR = $(XGLOBE_DIR)/bin
-
- ####### Library directories - you may need to modify these
-
--X11_INCLUDE_DIR = /usr/X11R6/include
--QT_INCLUDE_DIR = $(QTDIR)/include
-+X11_INCLUDE_DIR = $(LOCALBASE)/include
-+QT_INCLUDE_DIR = $(QT_PREFIX)/include/
-
--QT_LIB_DIR = $(QTDIR)/lib
--X11_LIB_DIR = /usr/X11R6/lib
-+QT_LIB_DIR = $(QT_PREFIX)/lib
-+X11_LIB_DIR = $(LOCALBASE)/lib
-
-
- ####### Compiler and tools
-
--CPP = g++
--LINK = g++
-+CXX ?= c++
-+CPP = ${CXX}
-+LINK = ${CXX}
- MOC = moc
- INSTALL = install
-
- ####### compile and link options
-
--CFLAGS = $(INCLUDE_DIRS) -DXGLOBE_LIB_DIR=\"$(XGLOBE_LIB_DIR)\" $(WITH_QIMGIO) -O2 -Wall
-+CFLAGS += $(INCLUDE_DIRS) -DXGLOBE_LIB_DIR=\"$(XGLOBE_LIB_DIR)\" $(WITH_QIMGIO)
-
- LFLAGS =
-
-@@ -34,13 +35,13 @@
-
- LIB_DIRS = -L$(QT_LIB_DIR) -L$(X11_LIB_DIR)
-
--LIBS = -lX11 -lqt -lm
-+LIBS = -lX11 -lqt-mt -lm ${PTHREAD_LIBS}
- # If you want to use the QImageIO lib (to support jpg and png maps) use the
- # next two lines and comment the one above
- #WITH_QIMGIO = -DWITH_QIMAGEIO
--#LIBS = -lX11 -lqt -lm -lqimgio
-+#LIBS = -lX11 -lqt1 -lm -lqimgio
- # If the linker complains about unresolved references try this:
--#LIBS = -lX11 -lqt -lm -lqimgio -lpng -lz -ljpeg
-+#LIBS = -lX11 -lqt1 -lm -lqimgio -lpng -lz -ljpeg
-
- ####### Target
-
diff -ruN xglobe.orig/files/patch-desktopwidget.cpp xglobe/files/patch-desktopwidget.cpp
--- xglobe.orig/files/patch-desktopwidget.cpp 2003-01-25 14:29:56.000000000 -0800
+++ xglobe/files/patch-desktopwidget.cpp 2011-01-19 09:33:25.000000000 -0800
@@ -1,10 +1,36 @@
---- desktopwidget.cpp.orig Sun Jan 26 09:35:35 2003
-+++ desktopwidget.cpp Sun Jan 26 09:38:52 2003
-@@ -18,6 +18,7 @@
+--- desktopwidget.cpp.orig 1998-12-09 10:15:52.000000000 -0800
++++ desktopwidget.cpp 2011-01-18 22:40:26.000000000 -0800
+@@ -18,10 +18,14 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include "desktopwidget.h"
++//Added by qt3to4:
++#include <QPaintEvent>
++#include <QPixmap>
DesktopWidget::DesktopWidget(QWidget *parent, const char *name)
+- : QWidget( parent, name, WType_Desktop | WPaintDesktop)
++ : QWidget( parent, name, Qt::WType_Desktop | Qt::WPaintDesktop)
+ {
+ haveImage = FALSE;
+ currentImage = new QPixmap(width(), height());
+@@ -43,6 +47,7 @@
+ {
+ QPainter p(this);
+
++ printf("DesktopWidget::paintEvent\n");
+ if(!haveImage)
+ {
+ p.setFont(QFont("helvetica", 35));
+@@ -62,7 +67,8 @@
+
+ void DesktopWidget::updateDisplay(QImage *image)
+ {
+- ASSERT(image != NULL);
++ fprintf(stderr, "updateDisplay called\n");
++ Q_ASSERT(image != NULL);
+ currentImage->convertFromImage(*image);
+ haveImage = TRUE;
+ setBackgroundPixmap(*currentImage);
diff -ruN xglobe.orig/files/patch-desktopwidget.h xglobe/files/patch-desktopwidget.h
--- xglobe.orig/files/patch-desktopwidget.h 1969-12-31 16:00:00.000000000 -0800
+++ xglobe/files/patch-desktopwidget.h 2011-01-19 09:33:25.000000000 -0800
@@ -0,0 +1,11 @@
+--- desktopwidget.h.orig 1998-12-09 10:16:54.000000000 -0800
++++ desktopwidget.h 2011-01-18 14:22:52.000000000 -0800
+@@ -23,6 +23,8 @@
+ #include <qwidget.h>
+ #include <qpixmap.h>
+ #include <qpainter.h>
++//Added by qt3to4:
++#include <QPaintEvent>
+
+ class DesktopWidget : public QWidget
+ {
diff -ruN xglobe.orig/files/patch-earthapp.cpp xglobe/files/patch-earthapp.cpp
--- xglobe.orig/files/patch-earthapp.cpp 1969-12-31 16:00:00.000000000 -0800
+++ xglobe/files/patch-earthapp.cpp 2011-01-19 09:33:25.000000000 -0800
@@ -0,0 +1,77 @@
+--- earthapp.cpp.orig 1999-12-06 08:14:10.000000000 -0800
++++ earthapp.cpp 2011-01-19 09:28:15.000000000 -0800
+@@ -69,6 +69,12 @@
+ #include "config.h"
+ #include "earthapp.h"
+ #include "moonpos.h"
++//Added by qt3to4:
++#include <QPixmap>
++#include <QPalette>
++#include <QX11Info>
++
++#include <X11/Xlib.h>
+
+ /* ------------------------------------------------------------------------*/
+
+@@ -334,7 +340,7 @@
+ if(use_kde)
+ {
+ dwidget = new DesktopWidget();
+- ASSERT(dwidget != NULL);
++ Q_ASSERT(dwidget != NULL);
+ dwidget->update();
+ }
+ }
+@@ -343,9 +349,9 @@
+
+ EarthApplication::~EarthApplication(void)
+ {
+- ASSERT(r != NULL);
++ Q_ASSERT(r != NULL);
+ delete r;
+- ASSERT(timer != NULL);
++ Q_ASSERT(timer != NULL);
+ timer->stop();
+ delete timer;
+
+@@ -937,8 +943,8 @@
+
+ void EarthApplication::randomPosition()
+ {
+- view_lat = ((rand()%30001)/30000.)*180. - 90.;
+- view_long = ((rand()%30001)/30000.)*360. - 180.;
++ view_lat = ((random()%30001)/30000.)*180. - 90.;
++ view_long = ((random()%30001)/30000.)*360. - 180.;
+ }
+
+ /* ------------------------------------------------------------------------*/
+@@ -1233,7 +1239,7 @@
+ r->setRotation(rotation);
+
+ timer = new QTimer(this);
+- ASSERT(timer != NULL);
++ Q_ASSERT(timer != NULL);
+
+ connect(timer, SIGNAL(timeout()), this, SLOT(recalc()));
+ QTimer::singleShot(1, this, SLOT(recalc())); // this will start rendering
+@@ -1307,7 +1313,19 @@
+ {
+ QPixmap pm;
+ pm.convertFromImage(*(r->getImage()));
+- desktop()->setBackgroundPixmap(pm);
++
++
++ QPalette palette;
++ palette.setBrush(desktop()->backgroundRole(), QBrush(pm));
++ desktop()->setPalette(palette);
++
++ //
++ // With Qt4, this step seems to be necessary to make the
++ // changes appear immediately. Is there a way to do it via
++ // Qt4 methods?
++ //
++ XClearWindow(QX11Info::display(), QX11Info::appRootWindow());
++
+ if(once)
+ {
+ processEvents();
diff -ruN xglobe.orig/files/patch-earthapp.h xglobe/files/patch-earthapp.h
--- xglobe.orig/files/patch-earthapp.h 1969-12-31 16:00:00.000000000 -0800
+++ xglobe/files/patch-earthapp.h 2011-01-19 09:33:25.000000000 -0800
@@ -0,0 +1,11 @@
+--- earthapp.h.orig 1999-12-06 08:14:23.000000000 -0800
++++ earthapp.h 2011-01-18 14:22:52.000000000 -0800
+@@ -54,6 +54,8 @@
+ #define _EARTHAPP_H
+
+ #include <qapplication.h>
++#include <QApplication>
++#include <QDesktopWidget>
+ #include <qtimer.h>
+ #include <qsize.h>
+ #include <qstring.h>
diff -ruN xglobe.orig/files/patch-main.cpp xglobe/files/patch-main.cpp
--- xglobe.orig/files/patch-main.cpp 1969-12-31 16:00:00.000000000 -0800
+++ xglobe/files/patch-main.cpp 2011-01-19 09:33:25.000000000 -0800
@@ -0,0 +1,19 @@
+--- main.cpp.orig 1999-07-13 10:32:55.000000000 -0700
++++ main.cpp 2011-01-18 14:22:52.000000000 -0800
+@@ -24,6 +24,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <qstring.h>
+ #include "config.h"
+@@ -37,6 +38,8 @@
+ {
+ EarthApplication myApp(argc, argv);
+
++ srandomdev();
++
+ #ifdef WITH_QIMAGEIO
+ qInitImageIO();
+ #endif
diff -ruN xglobe.orig/files/patch-marker.xpm xglobe/files/patch-marker.xpm
--- xglobe.orig/files/patch-marker.xpm 1969-12-31 16:00:00.000000000 -0800
+++ xglobe/files/patch-marker.xpm 2011-01-19 09:33:25.000000000 -0800
@@ -0,0 +1,9 @@
+--- marker.xpm.orig 1998-11-20 09:16:30.000000000 -0800
++++ marker.xpm 2011-01-19 09:32:52.000000000 -0800
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * marker_xpm[] = {
++static const char * marker_xpm[] = {
+ "7 7 3 1",
+ " c None",
+ ". c #000000",
diff -ruN xglobe.orig/files/patch-markerlist.cpp xglobe/files/patch-markerlist.cpp
--- xglobe.orig/files/patch-markerlist.cpp 1969-12-31 16:00:00.000000000 -0800
+++ xglobe/files/patch-markerlist.cpp 2011-01-19 09:33:25.000000000 -0800
@@ -0,0 +1,25 @@
+--- markerlist.cpp.orig 1999-07-13 11:13:41.000000000 -0700
++++ markerlist.cpp 2011-01-18 14:22:52.000000000 -0800
+@@ -28,7 +28,7 @@
+
+ #include "markerlist.h"
+ #include <qfile.h>
+-#include <qtextstream.h>
++#include <q3textstream.h>
+
+ /* ------------------------------------------------------------------------ */
+
+@@ -94,11 +94,11 @@
+ int pos1;
+ int pos2;
+ QFile f(filename);
+- QTextStream t(&f);
++ Q3TextStream t(&f);
+ QString line;
+ QColor color;
+
+- if(!f.open(IO_ReadOnly))
++ if(!f.open(QIODevice::ReadOnly))
+ return FALSE;
+
+ while(!t.eof())
diff -ruN xglobe.orig/files/patch-markerlist.h xglobe/files/patch-markerlist.h
--- xglobe.orig/files/patch-markerlist.h 1969-12-31 16:00:00.000000000 -0800
+++ xglobe/files/patch-markerlist.h 2011-01-19 09:33:25.000000000 -0800
@@ -0,0 +1,36 @@
+--- markerlist.h.orig 1999-07-13 11:14:07.000000000 -0700
++++ markerlist.h 2011-01-18 14:22:52.000000000 -0800
+@@ -56,21 +56,23 @@
+ class MarkerList
+ {
+ public:
+- MarkerList() { list.setAutoDelete(TRUE); }
+- ~MarkerList() { list.clear(); }
+- inline void append(const Location *l) { list.append(l); }
+- inline Location *first() { return list.first(); }
+- inline Location *last() { return list.last(); }
+- inline Location *next() { return list.next(); }
+- inline Location *prev() { return list.prev(); }
+- inline Location *current() { return list.current(); }
++ MarkerList() { }
++ ~MarkerList() { qDeleteAll(list); list.clear(); }
++ inline void append(Location *l) { list.append(l); }
++// inline Location *first() { return list.first(); }
++// inline Location *last() { return list.last(); }
++// inline Location *next() { return list.next(); }
++// inline Location *prev() { return list.prev(); }
++// inline Location *current() { return list.current(); }
++ inline Location *atindex(int i) {return list[i]; } // Q&D
+ inline uint count() { return list.count(); }
+- inline void clear() { list.clear(); }
++ inline void clear() { qDeleteAll(list); list.clear(); }
++ inline int size() { return list.size(); }
+
+ bool loadMarkerFile(const char *filename);
+
+ protected:
+- QList<Location> list;
++ QList<Location *> list;
+ };
+
+ #endif
diff -ruN xglobe.orig/files/patch-random xglobe/files/patch-random
--- xglobe.orig/files/patch-random 2003-01-25 14:29:56.000000000 -0800
+++ xglobe/files/patch-random 1969-12-31 16:00:00.000000000 -0800
@@ -1,32 +0,0 @@
---- earthapp.cpp.orig Sat Feb 24 10:13:10 2001
-+++ earthapp.cpp Sat Feb 24 10:13:29 2001
-@@ -937,8 +937,8 @@
-
- void EarthApplication::randomPosition()
- {
-- view_lat = ((rand()%30001)/30000.)*180. - 90.;
-- view_long = ((rand()%30001)/30000.)*360. - 180.;
-+ view_lat = ((random()%30001)/30000.)*180. - 90.;
-+ view_long = ((random()%30001)/30000.)*360. - 180.;
- }
-
- /* ------------------------------------------------------------------------*/
---- main.cpp.orig Tue Jul 13 10:32:55 1999
-+++ main.cpp Sat Feb 24 10:14:56 2001
-@@ -24,6 +24,7 @@
- */
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
- #include <qstring.h>
- #include "config.h"
-@@ -36,6 +37,8 @@
- int main(int argc, char **argv)
- {
- EarthApplication myApp(argc, argv);
-+
-+ srandomdev();
-
- #ifdef WITH_QIMAGEIO
- qInitImageIO();
diff -ruN xglobe.orig/files/patch-renderer.cpp xglobe/files/patch-renderer.cpp
--- xglobe.orig/files/patch-renderer.cpp 2006-07-11 14:35:22.000000000 -0700
+++ xglobe/files/patch-renderer.cpp 2011-01-19 09:33:25.000000000 -0800
@@ -1,6 +1,87 @@
---- renderer.cpp.orig Tue Dec 7 03:13:35 1999
-+++ renderer.cpp Wed Jan 4 23:17:40 2006
-@@ -1434,7 +1434,7 @@
+--- renderer.cpp.orig 1999-12-06 08:13:35.000000000 -0800
++++ renderer.cpp 2011-01-18 14:22:52.000000000 -0800
+@@ -123,7 +123,7 @@
+ this->ambientGreen = 0.15;
+ this->ambientBlue = 0.15;
+ this->markerpixmap = new QPixmap((const char **)marker_xpm);
+- ASSERT(markerpixmap != NULL);
++ Q_ASSERT(markerpixmap != NULL);
+ this->show_label = TRUE;
+ this->gridtype = NO_GRID;
+ this->d_gridline = 15.0*PI/180.;
+@@ -448,7 +448,7 @@
+
+ void Renderer::setMarkerList(MarkerList *l)
+ {
+- ASSERT(l != NULL);
++ Q_ASSERT(l != NULL);
+ markerlist = l;
+ }
+
+@@ -1136,7 +1136,7 @@
+ Location **visible_locations;
+
+ visible_locations = new Location*[markerlist->count()];
+- ASSERT(visible_locations != NULL);
++ Q_ASSERT(visible_locations != NULL);
+
+ // Matrix M of renderFrame, but transposed
+ m11 = cos(rot)*cos(view_long)-sin(view_lat)*sin(view_long)*sin(rot);
+@@ -1151,8 +1151,9 @@
+
+ visible_angle = radius/center_dist;
+
+- for(i=0, l = markerlist->first(); l != NULL; l = markerlist->next())
++ for(i=0, num=0; i < markerlist->size(); ++i)
+ {
++ l = markerlist->atindex(i);
+ lon = l->getLongitude()*PI/180.;
+ lat = l->getLatitude()*PI/180.;
+
+@@ -1185,12 +1186,9 @@
+ l->x = screen_x + shift_x;
+ l->y = screen_y + shift_y;
+
+- visible_locations[i] = l;
+- i++;
++ visible_locations[num++] = l;
+ }
+
+- num = i;
+-
+ // sort the markers according to depth
+ qsort(visible_locations, num, sizeof(Location *),
+ Renderer::compareLocations);
+@@ -1208,8 +1206,8 @@
+ {
+ double c1, c2;
+
+- c1 = (*((Location **)l1))->cos_angle;
+- c2 = (*((Location **)l2))->cos_angle;
++ c1 = ((Location *)l1)->cos_angle;
++ c2 = ((Location *)l2)->cos_angle;
+
+ if(c1 > c2)
+ return 1;
+@@ -1364,7 +1362,7 @@
+ QImage *clonedImage = NULL;
+
+ clonedImage = new QImage(*renderedImage);
+- ASSERT(clonedImage != NULL);
++ Q_ASSERT(clonedImage != NULL);
+ return clonedImage;
+ }
+
+@@ -1391,7 +1389,7 @@
+ #if QT_VERSION >= 200
+ p.setPen(Qt::black);
+ #else
+- p.setPen(black);
++ p.setPen(Qt::black);
+ #endif
+ wx = -br.x()+markerpixmap->width()+2;
+ wy = -br.y();
+@@ -1434,7 +1432,7 @@
for(wx=0 ; wx<visiblerect.width(); wx++)
{
@@ -9,7 +90,7 @@
{
case 0x00000000:
*dest++ = 0;
-@@ -1483,8 +1483,8 @@
+@@ -1483,8 +1481,8 @@
labelstring.sprintf("%s, %s %d. %d, %d:%02d %s\n"
"View pos %2.2f° %c %2.2f° %c\n"
"Sun pos %2.2f° %c %2.2f° %c",
@@ -20,7 +101,27 @@
dt.date().day(), dt.date().year(),
dt.time().hour(), dt.time().minute(),
tzname[tm->tm_isdst],
-@@ -1562,9 +1562,9 @@
+@@ -1499,7 +1497,7 @@
+ QRect br = fm.boundingRect(0, 0, 0, 0, Qt::AlignLeft|Qt::AlignTop,
+ labelstring);
+ #else
+- QRect br = fm.boundingRect(0, 0, 0, 0, AlignLeft|AlignTop, labelstring);
++ QRect br = fm.boundingRect(0, 0, 0, 0, Qt::AlignLeft|Qt::AlignTop, labelstring);
+ #endif
+ QPixmap pm(br.width()+10, br.height()+10);
+
+@@ -1512,8 +1510,8 @@
+ p.drawText(5, 5, br.width(), br.height(), Qt::AlignLeft|Qt::AlignTop,
+ labelstring);
+ #else
+- p.setPen(white);
+- p.drawText(5, 5, br.width(), br.height(), AlignLeft|AlignTop, labelstring);
++ p.setPen(Qt::white);
++ p.drawText(5, 5, br.width(), br.height(), Qt::AlignLeft|Qt::AlignTop, labelstring);
+ #endif
+ p.end();
+
+@@ -1562,9 +1560,9 @@
for(int i=0; i<numstars; i++)
{
diff -ruN xglobe.orig/files/patch-sunpos.cpp xglobe/files/patch-sunpos.cpp
--- xglobe.orig/files/patch-sunpos.cpp 1969-12-31 16:00:00.000000000 -0800
+++ xglobe/files/patch-sunpos.cpp 2011-01-19 09:33:25.000000000 -0800
@@ -0,0 +1,11 @@
+--- sunpos.cpp.orig 1998-12-09 10:51:09.000000000 -0800
++++ sunpos.cpp 2011-01-18 14:22:52.000000000 -0800
+@@ -203,7 +203,7 @@
+ double JD;
+
+ /* lazy test to ensure gregorian calendar */
+- ASSERT(y >= 1583);
++ Q_ASSERT(y >= 1583);
+
+ if ((m == 1) || (m == 2))
+ {
--- patch-port ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list