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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Jul 14 17:25:04 2011 UTC (2 years, 9 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Drop gda3 support as it's going to be removed, bug #252540.

(Portage version: 2.1.10.5/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20