/[gentoo-x86]/app-misc/gpsdrive/gpsdrive-2.11.ebuild
Gentoo

Contents of /app-misc/gpsdrive/gpsdrive-2.11.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Oct 30 01:12:00 2010 UTC (3 years, 10 months ago) by nerdboy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Updated with new cmake directive to address bug 341693.

(Portage version: 2.2_rc99/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-misc/gpsdrive/gpsdrive-2.11.ebuild,v 1.1 2010/10/18 09:09:30 nerdboy Exp $
4
5 EAPI=2
6
7 inherit cmake-utils eutils fdo-mime versionator
8
9 DESCRIPTION="GPS navigation system with NMEA and Garmin support, zoomable map display, waypoints, etc."
10 HOMEPAGE="http://www.gpsdrive.de/"
11 SRC_URI="${HOMEPAGE}/packages/${P/_/}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15
16 S=${WORKDIR}/${P/_/}
17
18 KEYWORDS="~amd64 ~ppc ~x86"
19 # submit bug for ppc64
20
21 IUSE="dbus -debug -kismet libgda gdal mapnik scripts -speech"
22
23 COMMON_DEP=">=sci-geosciences/gpsd-2.94
24 net-misc/curl
25 dev-libs/libxml2
26 dev-db/sqlite:3
27 x11-libs/gtk+:2
28 dbus? ( dev-libs/dbus-glib )
29 gdal? ( sci-libs/gdal )
30 kismet? ( net-wireless/kismet )
31 mapnik? ( >=sci-geosciences/mapnik-0.7.0 )
32 libgda? ( =gnome-extra/libgda-3.0*[postgres] )
33 speech? ( >=app-accessibility/speech-dispatcher-0.6.7 )"
34
35 DEPEND="${COMMON_DEP}
36 >=dev-util/cmake-2.8.0
37 dev-util/pkgconfig"
38
39 RDEPEND="${COMMON_DEP}
40 sci-geosciences/openstreetmap-icons
41 sci-geosciences/mapnik-world-boundaries
42 media-fonts/dejavu"
43
44 src_prepare() {
45 # Get rid of the package's FindBoost.
46 rm "${S}"/cmake/Modules/FindBoost.cmake
47
48 # Update mapnik font path...
49 sed -i \
50 -e "s:truetype/ttf-dejavu:dejavu:g" \
51 -e "s:mapnik/0.5:mapnik:g" \
52 tests/gpsdriverc-in \
53 src/gpsdrive_config.c || die "sed failed"
54
55 # update OSM icon paths
56 sed -i \
57 -e "s|icons/map-icons|osm|g" \
58 cmake/Modules/DefineInstallationPaths.cmake \
59 scripts/osm/perl_lib/Geo/Gpsdrive/DB_Defaults.pm \
60 scripts/osm/perl_lib/Geo/Gpsdrive/OSM.pm \
61 src/icons.c \
62 || die "sed failed"
63
64 # Fix desktop file...
65 sed -i -e "s:gpsicon:/usr/share/icons/gpsdrive.png:g" \
66 -e "s:Graphics;Network;Geography:Education;Science;Geography;GPS:g" \
67 data/gpsdrive.desktop || die "sed failed"
68
69 epatch "${FILESDIR}"/gpsdrive-2.11_DefineOptions_gpsd.patch
70 }
71
72 src_configure() {
73 cat >> cmake/Modules/DefineProjectDefaults.cmake <<- _EOF_
74
75 # set policy for new linker paths
76 cmake_policy(SET CMP0003 NEW) # or cmake_policy(VERSION 2.6)
77 _EOF_
78
79 local mycmakeargs="${mycmakeargs}
80 $(cmake-utils_use_with scripts SCRIPTS)
81 $(cmake-utils_use_with mapnik MAPNIK)
82 $(cmake-utils_use_with kismet KISMET)
83 $(cmake-utils_use_with dbus DBUS)
84 $(cmake-utils_use_with libgda GDA3)
85 $(cmake-utils_use_with speech SPEECH)
86 $(cmake-utils_use_with gdal GDAL)"
87 cmake-utils_src_configure
88 }
89
90 src_install() {
91 cmake-utils_src_install
92 dodoc AUTHORS ChangeLog README \
93 Documentation/{CREDITS.i18n,FAQ.gpsdrive,FAQ.gpsdrive.fr,LEEME} \
94 Documentation/{LISEZMOI,NMEA.txt,LISEZMOI.kismet,TODO} \
95 Documentation/README.{Bluetooth,lib_map,nasamaps,tracks,kismet}
96 if use mapnik ; then
97 dodoc Documentation/install-mapnik-osm.txt
98 else
99 rm -f "${D}"usr/bin/gpsdrive_mapnik_gentiles.py
100 rm -f "${D}"usr/share/gpsdrive/osm-template.xml
101 fi
102 if use scripts ; then
103 dodoc Documentation/README.gpspoint2gspdrive
104 if ! use gdal ; then
105 rm -f "${D}"usr/bin/{gdal_slice,nasaconv}.sh
106 fi
107 else
108 rm -f "${D}"usr/share/man/man1/gpsd_nmea.sh.1
109 fi
110 }
111
112 pkg_postinst() {
113 fdo-mime_desktop_database_update
114 elog
115 elog "Be sure to see the README files in /usr/share/doc/${PF}"
116 elog "for information on using Kismet with gpsdrive."
117 elog
118 if use mapnik ; then
119 elog "Using mapnik to render online maps requires you to load"
120 elog "data into the postgis database. Follow the instructions"
121 elog "on http://wiki.openstreetmap.org/index.php/Mapnik"
122 fi
123 elog
124 elog "This version also now depends on the gpsd package, and"
125 elog "specific devices are supported there. Start gpsd first,"
126 elog "otherwise gpsdrive will only run in simulation mode (which"
127 elog "is handy for downloading maps for another location, but"
128 elog "not much else)."
129 elog
130 elog "openstreetmap-icons now installs to a more appropriate"
131 elog "location, so if you have trouble starting gpsdrive, you"
132 elog "should probably update your ~/.gpsdrive/gpsdriverc file"
133 elog "and change the path to the geoinfofile to reflect this:"
134 elog " geoinfofile = /usr/share/osm/geoinfo.db"
135 elog
136 }
137
138 pkg_postrm() {
139 fdo-mime_desktop_database_update
140 }

  ViewVC Help
Powered by ViewVC 1.1.20