roadmap: 1st round of updating roadmap recipies after moving zroadmap over to roadmap
authorJunqian Gordon Xu <xjqian@gmail.com>
Thu, 13 Dec 2007 09:58:00 +0000 (09:58 +0000)
committerJunqian Gordon Xu <xjqian@gmail.com>
Thu, 13 Dec 2007 09:58:00 +0000 (09:58 +0000)
* refactor, unify. roadmap.inc (global), zroadmap.in (qt global)
* add common qt patches >= 1.1.0 to files/qt
* add zroadmap_1.1.0.bb, update zroadmap_cvs.bb (set temp local SRCDATE)
* config: remove popt (used for building maps) from DEPEND in *.bb
* config: s/OE_QMAKE_CXXFLAG/OE_QMAKE_CFLAG in zroadmap 1.1.0 and cvs
* install: add missing icons to *.bb
* many small changes
** next round of updates will make gtk2 version of roadmap kosher

13 files changed:
packages/roadmap/files/qt/.mtn2git_empty [new file with mode: 0644]
packages/roadmap/files/qt/qt2-fixes.patch [new file with mode: 0644]
packages/roadmap/files/qt/qt_canvas.patch [new file with mode: 0644]
packages/roadmap/files/qt/qt_main.patch [new file with mode: 0644]
packages/roadmap/files/qt/roadmap.desktop.patch [new file with mode: 0644]
packages/roadmap/files/qt/roadmap_main.patch [new file with mode: 0644]
packages/roadmap/files/zroadgps.png [moved from packages/roadmap/zroadmap-1.0.12/zroadgps.png with 100% similarity]
packages/roadmap/roadmap-gtk2_cvs.bb
packages/roadmap/roadmap.inc [new file with mode: 0644]
packages/roadmap/zroadmap.inc [new file with mode: 0644]
packages/roadmap/zroadmap_1.0.12.bb
packages/roadmap/zroadmap_1.1.0.bb [new file with mode: 0644]
packages/roadmap/zroadmap_cvs.bb

diff --git a/packages/roadmap/files/qt/.mtn2git_empty b/packages/roadmap/files/qt/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/roadmap/files/qt/qt2-fixes.patch b/packages/roadmap/files/qt/qt2-fixes.patch
new file mode 100644 (file)
index 0000000..63c1c96
--- /dev/null
@@ -0,0 +1,10 @@
+--- src/qt/Makefile~qt2-fixes.patch
++++ src/qt/Makefile
+@@ -19,7 +19,7 @@
+ ifeq ($(DESKTOP),QPE)
+    CFLAGS += -I$(QTDIR)/include -DQWS
+-   LIBS += -lqte -lqpe
++   LIBS += -lqpe
+    INSTALLDIR=$(QTDIR)
+ endif
diff --git a/packages/roadmap/files/qt/qt_canvas.patch b/packages/roadmap/files/qt/qt_canvas.patch
new file mode 100644 (file)
index 0000000..13c775c
--- /dev/null
@@ -0,0 +1,20 @@
+--- src/qt/qt_canvas.cc.old    2007-12-08 20:29:52.000000000 -0600
++++ src/qt/qt_canvas.cc        2007-12-13 02:34:22.000000000 -0600
+@@ -122,7 +122,7 @@ void RMapCanvas::getTextExtents(const ch
+    *w = r.width();
+    *ascent = fm.ascent();
+    *descent = fm.descent();
+-#ifdef QT_NO_ROTATE
++#ifdef QT_NO_TRANSFORMATIONS
+    if (can_tilt) *can_tilt = 0;
+ #else
+    if (can_tilt) *can_tilt = 1;
+@@ -169,7 +169,7 @@ void RMapCanvas::drawString(RoadMapGuiPo
+ void RMapCanvas::drawStringAngle(RoadMapGuiPoint* position,
+       int center, const char* text, int angle) {
+-#ifndef QT_NO_ROTATE
++#ifndef QT_NO_TRANSFORMATIONS
+    if (!pixmap) {
+       return;
+    }
diff --git a/packages/roadmap/files/qt/qt_main.patch b/packages/roadmap/files/qt/qt_main.patch
new file mode 100644 (file)
index 0000000..2f81128
--- /dev/null
@@ -0,0 +1,61 @@
+--- src/qt/qt_main.cc.old      2007-12-08 20:32:34.000000000 -0600
++++ src/qt/qt_main.cc  2007-12-08 20:34:38.000000000 -0600
+@@ -27,6 +27,7 @@
+ #include <signal.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <unistd.h>
+ #include "qt_main.h"
+ static int signalFd[2];
+@@ -168,12 +169,6 @@ void RMapMainWindow::addTool(const char*
+                              const char* tip,
+                              RoadMapCallback callback) {
+-#ifndef QWS
+-   // For some unknown reason, this toolbar crashes RoadMap
+-   // on the Sharp Zaurus.
+-   // This should be fixed and the ifndef removed.
+-   // Pascal: I believe this has been fixed now.
+-
+    if (toolBar == 0) {
+       addToolbar("");
+    }
+@@ -193,20 +188,13 @@ void RMapMainWindow::addTool(const char*
+       connect(b, SIGNAL(clicked()), cb, SLOT(fire()));
+    }
+-#endif
+ }  
+ void RMapMainWindow::addToolSpace(void) {
+-#ifndef QWS
+-   // For some unknown reason, this toolbar crashes RoadMap
+-   // on the Sharp Zaurus. This should be fixed and the ifndef
+-   // removed.
+-
+    addTool (NULL, NULL, NULL, NULL);
+    toolBar->addSeparator();
+-#endif
+ }
+@@ -299,14 +287,14 @@ void RMapMainWindow::closeEvent(QCloseEv
+ void RMapMainWindow::signalHandler(int sig)
+ {
+-  ::write(signalFd[0], &sig, sizeof(sig));
++  write(signalFd[0], &sig, sizeof(sig));
+ }
+ void RMapMainWindow::handleSignal()
+ {
+   snSignal->setEnabled(false);
+   int tmp;
+-  ::read(signalFd[1], &tmp, sizeof(tmp));
++  read(signalFd[1], &tmp, sizeof(tmp));
+   QString action;
+   switch (tmp) {
+     case SIGTERM: action="SIGTERM"; break;
diff --git a/packages/roadmap/files/qt/roadmap.desktop.patch b/packages/roadmap/files/qt/roadmap.desktop.patch
new file mode 100644 (file)
index 0000000..98d5b06
--- /dev/null
@@ -0,0 +1,16 @@
+--- src/roadmap.desktop.old    2007-12-08 23:15:45.000000000 -0600
++++ src/roadmap.desktop        2007-12-08 23:17:48.000000000 -0600
+@@ -1,11 +1,8 @@
+ [Desktop Entry]
+-Comment=RoadMap
+ Comment=Car Navigation System
+ Exec=roadmap
+-Icon=roadmap.png
++Icon=roadmap
+ Type=Application
+ Name=RoadMap
+ GenericName=Map Viewer
+-Categories=Application;Other;VectorGraphics;Graphics;Viewer;GTK;
+-FilePattern=*roadmap;*.rdm
+-
++Categories=VectorGraphics;Graphics;Viewer;GTK;
diff --git a/packages/roadmap/files/qt/roadmap_main.patch b/packages/roadmap/files/qt/roadmap_main.patch
new file mode 100644 (file)
index 0000000..7b16ce2
--- /dev/null
@@ -0,0 +1,16 @@
+--- src/qt/roadmap_main.cc.old 2007-12-08 15:47:05.000000000 -0600
++++ src/qt/roadmap_main.cc     2007-12-07 20:39:15.000000000 -0600
+@@ -195,11 +195,11 @@ void roadmap_main_set_cursor (int newcur
+          break;
+       case ROADMAP_CURSOR_WAIT:
+-         mainWindow->setCursor (QCursor(Qt::WaitCursor));
++         mainWindow->setCursor (QCursor(Qt::waitCursor));
+          break;
+       case ROADMAP_CURSOR_CROSS:
+-         mainWindow->setCursor (QCursor(Qt::CrossCursor));
++         mainWindow->setCursor (QCursor(Qt::crossCursor));
+          break;
+       }
+    }
index cb81a44..557c4a1 100644 (file)
@@ -1,13 +1,8 @@
-DESCRIPTION = "RoadMap is a program that provides a car navigation for Linux and UNIX. \
-It displays a map of the streets, tracks the position provided by a NMEA-compliant \
-GPS receiver, identifies the street matching this GPS position and announces the name \
-of the crossing street at the next intersection."
-AUTHOR = "Pascal Martin <pascal.martin@iname.com>"
-HOMEPAGE = "http://roadmap.digitalomaha.net/maps.html"
-DEPENDS = "popt expat gtk+"
-LICENSE = "GPL"
+require roadmap.inc
+
+DEPENDS = "expat gtk+"
 PV = "1.0.12+cvs${SRCDATE}"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "cvs://anonymous:@roadmap.cvs.sf.net/cvsroot/roadmap;module=roadmap \
            file://cross.patch;patch=1;pnum=2 \
@@ -16,7 +11,6 @@ SRC_URI = "cvs://anonymous:@roadmap.cvs.sf.net/cvsroot/roadmap;module=roadmap \
 
 S = "${WORKDIR}/roadmap/src"
 
-PARALLEL_MAKE = ""
 CFLAGS += " -I${S} "
 
 
@@ -39,6 +33,5 @@ do_install() {
        install -m 0644 ${WORKDIR}/usdir.rdm ${D}${datadir}/roadmap/
 }
 
-
 FILES_${PN} += "${datadir}/roadmap"
 
diff --git a/packages/roadmap/roadmap.inc b/packages/roadmap/roadmap.inc
new file mode 100644 (file)
index 0000000..43577ba
--- /dev/null
@@ -0,0 +1,7 @@
+DESCRIPTION = "RoadMap is a program that provides car navigation for Linux and UNIX." 
+PRIORITY = "optional"
+AUTHOR = "Pascal Martin <pascal.martin@iname.com>"
+HOMEPAGE = "http://roadmap.digitalomaha.net/maps.html"
+LICENSE = "GPL"
+
+PARALLEL_MAKE = ""
diff --git a/packages/roadmap/zroadmap.inc b/packages/roadmap/zroadmap.inc
new file mode 100644 (file)
index 0000000..acee708
--- /dev/null
@@ -0,0 +1,13 @@
+require roadmap.inc
+
+SECTION = "opie/applications"
+
+inherit palmtop
+
+QT_LIBRARY = '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte",d)}'
+QT_LIBRARY_append_c7x0 = " -laticore"
+
+do_configure() {
+       echo removing pregenerated stuff
+       find . -name "moc*"|xargs rm -f
+}
index 5b9161c..9a7b73d 100644 (file)
@@ -1,15 +1,6 @@
-DESCRIPTION = "RoadMap is a program that provides a car navigation for Linux and UNIX. \
-It displays a map of the streets, tracks the position provided by a NMEA-compliant \
-GPS receiver, identifies the street matching this GPS position and announces the name \
-of the crossing street at the next intersection. A rudimentary trip feature allows \
-RoadMap to display some basic navigation information (distance to the destination, \
-direction, speed, etc..). Voice messages are generated that duplicate some of the screen information."
-SECTION = "opie/applications"
-PRIORITY = "optional"
-AUTHOR = "Pascal Martin <pascal.martin@iname.com>"
-HOMEPAGE = "http://roadmap.digitalomaha.net/maps.html"
-LICENSE = "GPL"
-PR = "r0"
+require zroadmap.inc
+
+PR = "r1"
 
 SRC_URI = "http://www.roadmap.digitalomaha.net/roadmap/roadmap_1_0_12p2_src.tar.gz \
            file://qt2-fixes.patch;pnum=2;patch=1 \
@@ -17,20 +8,9 @@ SRC_URI = "http://www.roadmap.digitalomaha.net/roadmap/roadmap_1_0_12p2_src.tar.
            file://zroadgps.png"
 S = "${WORKDIR}/roadmap-${PV}/src"
 
-inherit palmtop
-
-QT_LIBRARY = '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte",d)}'
-QT_LIBRARY_append_c7x0 = " -laticore"
-
 EXTRA_OEMAKE = 'DESKTOP=QPE MOC=${OE_QMAKE_MOC} UIC=${OE_QMAKE_UIC} \
                 GUICFLAGS="-I${OE_QMAKE_INCDIR_QT} -I${S} -DQWS" \
                 GUILDFLAGS="-lz -lpng -ljpeg -lts -l${QT_LIBRARY} -lqpe -Wl,-rpath-link,${STAGING_LIBDIR} -L${STAGING_LIBDIR} -L${QTDIR}/lib"'
-PARALLEL_MAKE = ""
-
-do_configure() {
-       echo removing pregenerated stuff
-       find . -name "moc*"|xargs rm -f
-}
 
 do_compile() {
        oe_runmake libguiroadmap.a libguiroadgps.a libroadmap.a unix/libosroadmap.a
@@ -38,16 +18,16 @@ do_compile() {
 }
 
 do_install() {
-       cd qt
         install -d ${D}${palmtopdir}/bin
        install -d ${D}${palmtopdir}/apps/Applications
        install -d ${D}${palmtopdir}/pics
-        install -m 0755 qtroadmap ${D}${palmtopdir}/bin/roadmap
-       install -m 0755 qtroadgps ${D}${palmtopdir}/bin/roadgps
-       install -m 0644 ../roadmap.png ${D}${palmtopdir}/pics/zroadmap.png
+        install -m 0755 qt/qtroadmap ${D}${palmtopdir}/bin/roadmap
+       install -m 0755 qt/qtroadgps ${D}${palmtopdir}/bin/roadgps
+        install -m 0644 icons/*.png ${D}${palmtopdir}/pics/
+       install -m 0644 roadmap.png ${D}${palmtopdir}/pics/zroadmap.png
        install -m 0644 ${WORKDIR}/zroadgps.png ${D}${palmtopdir}/pics/zroadgps.png
-        install -m 0644 ipkg/*.desktop ${D}${palmtopdir}/apps/Applications/
+        install -m 0644 qt/ipkg/*.desktop ${D}${palmtopdir}/apps/Applications/
        install -d ${D}${palmtopdir}/share/roadmap/
-        install -m 0644 ../sprites ../schema ../preferences ${D}${palmtopdir}/share/roadmap/
+        install -m 0644 sprites schema preferences ${D}${palmtopdir}/share/roadmap/
        install -m 0644 ${WORKDIR}/usdir.rdm ${D}${palmtopdir}/share/roadmap/
 }
diff --git a/packages/roadmap/zroadmap_1.1.0.bb b/packages/roadmap/zroadmap_1.1.0.bb
new file mode 100644 (file)
index 0000000..42184ce
--- /dev/null
@@ -0,0 +1,40 @@
+require zroadmap.inc
+
+DEPENDS += "expat"
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/roadmap/roadmap-${PV}-src.tar.gz \
+           file://cross.patch;patch=1;pnum=2 \
+           file://qt/qt2-fixes.patch;patch=1 \
+           file://qt/qt_canvas.patch;patch=1 \
+           file://qt/qt_main.patch;patch=1 \
+           file://qt/roadmap_main.patch;patch=1 \
+           file://qt/roadmap.desktop.patch;patch=1 \
+           http://roadmap.digitalomaha.net/maps/usdir.rdm.tar.gz \
+           file://zroadgps.png"
+S = "${WORKDIR}/roadmap-${PV}/src"
+
+EXTRA_OEMAKE = 'DESKTOP=QPE MOC=${OE_QMAKE_MOC} UIC=${OE_QMAKE_UIC} QTDIR=${QTDIR} POPT=NO \
+                CFLAGS="-DQWS -I${S} ${OE_QMAKE_CFLAGS} -I${OE_QMAKE_INCDIR_QT}" \
+                LDFLAGS="${OE_QMAKE_LDFLAGS} -L${OE_QMAKE_LIBDIR_QT} -Wl,-rpath-link,${OE_QMAKE_LIBDIR_QT}" '
+
+do_compile() {
+       oe_runmake libguiroadmap.a libguiroadgps.a libroadmap.a
+       oe_runmake -C gpx libgpx.a
+       oe_runmake -C unix libosroadmap.a
+       oe_runmake -C qt qtroadmap qtroadgps
+}
+
+do_install() {
+        install -d ${D}${palmtopdir}/bin
+       install -d ${D}${palmtopdir}/apps/Applications
+       install -d ${D}${palmtopdir}/pics
+        install -m 0755 qt/qtroadmap ${D}${palmtopdir}/bin/roadmap
+       install -m 0755 qt/qtroadgps ${D}${palmtopdir}/bin/roadgps
+       install -m 0644 icons/*.png ${D}${palmtopdir}/pics/
+       install -m 0644 ${WORKDIR}/zroadgps.png ${D}${palmtopdir}/pics/zroadgps.png
+        install -m 0644 *.desktop ${D}${palmtopdir}/apps/Applications/
+       install -d ${D}${palmtopdir}/share/roadmap/
+        install -m 0644 sprites preferences ${D}${palmtopdir}/share/roadmap/
+       install -m 0644 ${WORKDIR}/usdir.rdm ${D}${palmtopdir}/share/roadmap/
+}
index fd9cc5e..5b39faf 100644 (file)
@@ -1,36 +1,24 @@
-DESCRIPTION = "RoadMap is a program that provides a car navigation for Linux and UNIX. \
-It displays a map of the streets, tracks the position provided by a NMEA-compliant \
-GPS receiver, identifies the street matching this GPS position and announces the name \
-of the crossing street at the next intersection."
-SECTION = "opie/applications"
-PRIORITY = "optional"
-AUTHOR = "Pascal Martin <pascal.martin@iname.com>"
-HOMEPAGE = "http://roadmap.digitalomaha.net/maps.html"
-DEPENDS = "popt expat"
-LICENSE = "GPL"
-PV = "1.0.12+cvs-${SRCDATE}"
+require zroadmap.inc
+
+DEPENDS += "expat"
+SRCDATE = "20071212"
+PV = "1.1.0+cvs-${SRCDATE}"
 PR = "r0"
 
 SRC_URI = "cvs://anonymous:@roadmap.cvs.sf.net/cvsroot/roadmap;module=roadmap \
-           file://qt2-fixes-r1.patch;pnum=1;patch=1 \
-           http://roadmap.digitalomaha.net/maps/usdir.rdm.tgz \
+           file://cross.patch;patch=1;pnum=2 \
+           file://qt/qt2-fixes.patch;patch=1 \
+           file://qt/qt_canvas.patch;patch=1 \
+#upstream  file://qt/qt_main.patch;patch=1 \
+           file://qt/roadmap_main.patch;patch=1 \
+#upstream  file://qt/roadmap.desktop.patch;patch=1 \
+           http://roadmap.digitalomaha.net/maps/usdir.rdm.tar.gz \
            file://zroadgps.png"
 S = "${WORKDIR}/roadmap/src"
 
-inherit palmtop
-
-QT_LIBRARY = '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte",d)}'
-QT_LIBRARY_append_c7x0 = " -laticore"
-
 EXTRA_OEMAKE = 'DESKTOP=QPE MOC=${OE_QMAKE_MOC} UIC=${OE_QMAKE_UIC} QTDIR=${QTDIR} \
-                CFLAGS="-DQWS -DQT_NO_ROTATE -I${S} ${OE_QMAKE_CXXFLAGS} -I${OE_QMAKE_INCDIR_QT}" \
+                CFLAGS="-DQWS -DQT_NO_ROTATE -I${S} ${OE_QMAKE_CFLAGS} -I${OE_QMAKE_INCDIR_QT}" \
                 LDFLAGS="${OE_QMAKE_LDFLAGS} -L${OE_QMAKE_LIBDIR_QT} -Wl,-rpath-link,${OE_QMAKE_LIBDIR_QT}" '
-PARALLEL_MAKE = ""
-
-do_configure() {
-       echo removing pregenerated stuff
-       find . -name "moc*"|xargs rm -f
-}
 
 do_compile() {
        oe_runmake libguiroadmap.a libguiroadgps.a libroadmap.a
@@ -45,10 +33,10 @@ do_install() {
        install -d ${D}${palmtopdir}/pics
         install -m 0755 qt/qtroadmap ${D}${palmtopdir}/bin/roadmap
        install -m 0755 qt/qtroadgps ${D}${palmtopdir}/bin/roadgps
-       install -m 0644 roadmap.png ${D}${palmtopdir}/pics/zroadmap.png
+       install -m 0644 icons/*.png ${D}${palmtopdir}/pics/
        install -m 0644 ${WORKDIR}/zroadgps.png ${D}${palmtopdir}/pics/zroadgps.png
-        install -m 0644 qt/ipkg/*.desktop ${D}${palmtopdir}/apps/Applications/
+        install -m 0644 *.desktop ${D}${palmtopdir}/apps/Applications/
        install -d ${D}${palmtopdir}/share/roadmap/
-        install -m 0644 sprites schema preferences ${D}${palmtopdir}/share/roadmap/
+        install -m 0644 sprites preferences ${D}${palmtopdir}/share/roadmap/
        install -m 0644 ${WORKDIR}/usdir.rdm ${D}${palmtopdir}/share/roadmap/
 }