Gentoo Archives: gentoo-commits

From: Dennis Schridde <devurandom@×××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: sci-geosciences/monav/files/, sci-geosciences/monav/
Date: Wed, 06 Jun 2012 11:02:33
Message-Id: 1338980563.53afd4d8f27aac9d434102d73171afc64adbd5cc.devurandom@gentoo
1 commit: 53afd4d8f27aac9d434102d73171afc64adbd5cc
2 Author: Dennis Schridde <devurandom <AT> gmx <DOT> net>
3 AuthorDate: Wed Jun 6 11:02:43 2012 +0000
4 Commit: Dennis Schridde <devurandom <AT> gmx <DOT> net>
5 CommitDate: Wed Jun 6 11:02:43 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=53afd4d8
7
8 [sci-geosciences/monav-0.3] New ebuild (bug #376803)
9
10 Committed here, because it is useful to kde-base/marble (maybe add iuse/rdep there?).
11
12 (Portage version: 2.2.0_alpha110/git/Linux x86_64, unsigned Manifest commit)
13
14 ---
15 .../monav/files/monav-0.3-mapnik2.patch | 45 +++++++++++
16 sci-geosciences/monav/files/monav-0.3-qmake.patch | 11 +++
17 sci-geosciences/monav/metadata.xml | 13 +++
18 sci-geosciences/monav/monav-0.3-r1.ebuild | 81 ++++++++++++++++++++
19 4 files changed, 150 insertions(+), 0 deletions(-)
20
21 diff --git a/sci-geosciences/monav/files/monav-0.3-mapnik2.patch b/sci-geosciences/monav/files/monav-0.3-mapnik2.patch
22 new file mode 100644
23 index 0000000..448a0cb
24 --- /dev/null
25 +++ b/sci-geosciences/monav/files/monav-0.3-mapnik2.patch
26 @@ -0,0 +1,45 @@
27 +From: David Paleino <dapal@××××××.org>
28 +Subject: port code to Mapnik2
29 +Origin: vendor
30 +Forwarded: no
31 +
32 +---
33 + plugins/osmrenderer/mapnikrenderer.cpp | 10 +++++-----
34 + plugins/osmrenderer/mapnikrenderer.pro | 2 +-
35 + preprocessor/preprocessor-gui.pro | 2 +-
36 + preprocessor/preprocessor.pro | 2 +-
37 + 4 files changed, 8 insertions(+), 8 deletions(-)
38 +
39 +--- monav.orig/plugins/osmrenderer/mapnikrenderer.cpp
40 ++++ monav/plugins/osmrenderer/mapnikrenderer.cpp
41 +@@ -264,7 +264,7 @@ bool MapnikRenderer::Preprocess( IImport
42 + const int metaTileSize = m_settings.metaTileSize * m_settings.tileSize + 2 * m_settings.margin;
43 +
44 + mapnik::Map map;
45 +- mapnik::Image32 image( metaTileSize, metaTileSize );
46 ++ mapnik::image_32 image( metaTileSize, metaTileSize );
47 + QTemporaryFile tempOut;
48 + QTemporaryFile tempIn;
49 + mapnik::load_map( map, m_settings.theme.toLocal8Bit().constData() );
50 +@@ -288,9 +288,9 @@ bool MapnikRenderer::Preprocess( IImport
51 + GPSCoordinate drawBottomRightGPS = drawBottomRight.ToGPSCoordinate();
52 + projection.forward( drawTopLeftGPS.longitude, drawBottomRightGPS.latitude );
53 + projection.forward( drawBottomRightGPS.longitude, drawTopLeftGPS.latitude );
54 +- mapnik::Envelope<double> boundingBox( drawTopLeftGPS.longitude, drawTopLeftGPS.latitude, drawBottomRightGPS.longitude, drawBottomRightGPS.latitude );
55 +- map.zoomToBox( boundingBox );
56 +- mapnik::agg_renderer<mapnik::Image32> renderer( map, image );
57 ++ mapnik::box2d<double> boundingBox( drawTopLeftGPS.longitude, drawTopLeftGPS.latitude, drawBottomRightGPS.longitude, drawBottomRightGPS.latitude );
58 ++ map.zoom_to_box( boundingBox );
59 ++ mapnik::agg_renderer<mapnik::image_32> renderer( map, image );
60 + renderer.apply();
61 +
62 + std::string data;
63 +@@ -299,7 +299,7 @@ bool MapnikRenderer::Preprocess( IImport
64 + for ( int subX = 0; subX < metaTileSizeX; ++subX ) {
65 + for ( int subY = 0; subY < metaTileSizeY; ++subY ) {
66 + int indexNumber = ( y + subY - info.minY ) * ( info.maxX - info.minX ) + x + subX - info.minX;
67 +- mapnik::image_view<mapnik::ImageData32> view = image.get_view( subX * m_settings.tileSize + m_settings.margin, subY * m_settings.tileSize + m_settings.margin, m_settings.tileSize, m_settings.tileSize );
68 ++ mapnik::image_view<mapnik::image_data_32> view = image.get_view( subX * m_settings.tileSize + m_settings.margin, subY * m_settings.tileSize + m_settings.margin, m_settings.tileSize, m_settings.tileSize );
69 + std::string result;
70 + if ( !m_settings.deleteTiles || info.index[( x + subX - info.minX ) + ( y + subY - info.minY ) * ( info.maxX - info.minX )].size == 1 ) {
71 + if ( m_settings.reduceColors )
72
73 diff --git a/sci-geosciences/monav/files/monav-0.3-qmake.patch b/sci-geosciences/monav/files/monav-0.3-qmake.patch
74 new file mode 100644
75 index 0000000..5822da1
76 --- /dev/null
77 +++ b/sci-geosciences/monav/files/monav-0.3-qmake.patch
78 @@ -0,0 +1,11 @@
79 +--- a/client/client.pro 2011-07-28 21:18:24.330394388 +0200
80 ++++ b/client/client.pro 2011-07-28 21:06:19.223851824 +0200
81 +@@ -91,7 +91,7 @@
82 + LIBS += -L../bin/plugins_client -lmapnikrendererclient -lcontractionhierarchiesclient -lgpsgridclient -losmrendererclient -lunicodetournamenttrieclient -lqtilerendererclient
83 +
84 + #required by osmrendererclient
85 +-QT += network
86 ++QT += network mobility
87 + CONFIG += mobility
88 + MOBILITY += location
89 +
90
91 diff --git a/sci-geosciences/monav/metadata.xml b/sci-geosciences/monav/metadata.xml
92 new file mode 100644
93 index 0000000..5c1c54d
94 --- /dev/null
95 +++ b/sci-geosciences/monav/metadata.xml
96 @@ -0,0 +1,13 @@
97 +<?xml version="1.0" encoding="UTF-8"?>
98 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
99 +<pkgmetadata>
100 + <herd>kde</herd>
101 +<maintainer>
102 + <email>devurandom@×××.net</email>
103 +</maintainer>
104 +<use>
105 + <flag name='client'>Build the monav client</flag>
106 + <flag name='preprocessor'>Build the monav preprocessor to turn OSM maps into monav maps</flag>
107 + <flag name='preprocessor-gui'>Build the GUI for the monav preprocessor</flag>
108 +</use>
109 +</pkgmetadata>
110
111 diff --git a/sci-geosciences/monav/monav-0.3-r1.ebuild b/sci-geosciences/monav/monav-0.3-r1.ebuild
112 new file mode 100644
113 index 0000000..bfcb1e1
114 --- /dev/null
115 +++ b/sci-geosciences/monav/monav-0.3-r1.ebuild
116 @@ -0,0 +1,81 @@
117 +# Copyright 1999-2012 Gentoo Foundation
118 +# Distributed under the terms of the GNU General Public License v2
119 +# $Header: $
120 +EAPI=4
121 +
122 +inherit qt4-r2
123 +
124 +DESCRIPTION="State-of-the-art fast and exact routing with OpenStreetMap Data"
125 +HOMEPAGE="http://code.google.com/p/monav/"
126 +SRC_URI="http://monav.googlecode.com/files/monav-${PV}.tar.gz"
127 +
128 +LICENSE="GPL-3"
129 +SLOT="0"
130 +KEYWORDS="~amd64"
131 +IUSE="client +preprocessor preprocessor-gui"
132 +
133 +REQUIRED_USE="preprocessor? ( preprocessor-gui )"
134 +
135 +DEPEND="x11-libs/qt-core:4
136 + preprocessor-gui? ( client? ( x11-libs/qt-gui:4 )
137 + x11-libs/qt-mobility[location] )
138 + preprocessor? ( dev-libs/libxml2
139 + app-arch/bzip2
140 + sci-geosciences/mapnik
141 + dev-libs/protobuf )"
142 +RDEPEND="${DEPEND}"
143 +
144 +src_prepare() {
145 + epatch \
146 + "${FILESDIR}"/${P}-qmake.patch \
147 + "${FILESDIR}"/${P}-mapnik2.patch
148 +}
149 +
150 +src_configure() {
151 + eqmake4 "${S}"/monavroutingdaemon.pro CONFIG+=nogui -o "${S}"/Makefile.routingdaemon
152 +
153 + if use preprocessor ; then
154 + eqmake4 "${S}"/monavpreprocessor.pro CONFIG+=nogui -o "${S}"/Makefile.preprocessor
155 + fi
156 +
157 + if use preprocessor-gui ; then
158 + eqmake4 "${S}"/monavpreprocessor-gui.pro -o "${S}"/Makefile.preprocessor-gui
159 + fi
160 +
161 + if use client ; then
162 + eqmake4 "${S}"/monavclient.pro -o "${S}"/Makefile.client
163 + fi
164 +}
165 +
166 +src_compile() {
167 + emake -f "${S}"/Makefile.routingdaemon
168 +
169 + if use preprocessor ; then
170 + emake -f "${S}"/Makefile.preprocessor
171 + fi
172 +
173 + if use preprocessor-gui ; then
174 + emake -f "${S}"/Makefile.preprocessor-gui
175 + fi
176 +
177 + if use client ; then
178 + emake -f "${S}"/Makefile.client
179 + fi
180 +}
181 +
182 +src_install() {
183 + dobin bin/daemon-test
184 + dobin bin/monav-daemon
185 +
186 + if use preprocessor ; then
187 + dobin bin/monav-preprocessor
188 + fi
189 +
190 + if use preprocessor-gui ; then
191 + dobin bin/monav-preprocessor-gui
192 + fi
193 +
194 + if use client ; then
195 + dobin bin/monav
196 + fi
197 +}