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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Oct 12 12:02:26 2013 UTC (14 months, 2 weeks ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Drop hardmasked package

1 # Copyright 1999-2012 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-r3.ebuild,v 1.5 2012/11/04 17:30:58 ottxor Exp $
4
5 EAPI=4
6
7 inherit cmake-utils eutils fdo-mime flag-o-matic 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 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 mapnik? (
31 >=sci-geosciences/mapnik-0.7.0[postgres]
32 >=dev-db/postgis-1.5.2
33 )
34 speech? ( >=app-accessibility/speech-dispatcher-0.6.7 )
35 "
36
37 DEPEND="${COMMON_DEP}
38 virtual/pkgconfig
39 "
40
41 RDEPEND="${COMMON_DEP}
42 media-fonts/dejavu
43 sci-geosciences/openstreetmap-icons
44 sci-geosciences/mapnik-world-boundaries
45 "
46
47 S=${WORKDIR}/${P/_/}
48
49 src_prepare() {
50 # Get rid of the package's FindBoost.
51 rm "${S}"/cmake/Modules/FindBoost.cmake
52
53 # Update mapnik font path...
54 sed -i \
55 -e "s:truetype/ttf-dejavu:dejavu:g" \
56 -e "s:mapnik/0.5:mapnik:g" \
57 tests/gpsdriverc-in \
58 src/gpsdrive_config.c || die "sed failed"
59
60 # update OSM icon paths
61 sed -i \
62 -e "s:icons/map-icons:osm:g" \
63 cmake/Modules/DefineInstallationPaths.cmake \
64 scripts/osm/perl_lib/Geo/Gpsdrive/DB_Defaults.pm \
65 scripts/osm/perl_lib/Geo/Gpsdrive/OSM.pm \
66 src/gpsdrive_config.c \
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 "${FILESDIR}"/${P}-mapnik-2.0api.patch \
80 "${FILESDIR}"/${P}-as-needed.patch
81 }
82
83 src_configure() {
84 cat >> cmake/Modules/DefineProjectDefaults.cmake <<- _EOF_
85
86 # set policy for new linker paths
87 cmake_policy(SET CMP0003 NEW) # or cmake_policy(VERSION 2.6)
88 _EOF_
89
90 if use mapnik ; then
91 local PGINC="-DPOSTGRESQL_INCLUDE_DIR=$(pg_config --includedir)"
92 elog "using PG include dir: ${PGINC}"
93 append-flags -DBOOST_FILESYSTEM_VERSION=2
94 fi
95
96 local mycmakeargs=(
97 $(cmake-utils_use_with scripts SCRIPTS)
98 $(cmake-utils_use_with mapnik MAPNIK)
99 $(cmake-utils_use_with mapnik POSTGIS)
100 $(cmake-utils_use_with kismet KISMET)
101 $(cmake-utils_use_with dbus DBUS)
102 $(cmake-utils_use_with speech SPEECH)
103 $(cmake-utils_use_with gdal GDAL)
104 -DWITH_GDA3=OFF ${PGINC}
105 )
106 cmake-utils_src_configure
107 }
108
109 src_install() {
110 cmake-utils_src_install
111 dodoc AUTHORS ChangeLog README \
112 Documentation/{CREDITS.i18n,FAQ.gpsdrive,FAQ.gpsdrive.fr,LEEME} \
113 Documentation/{LISEZMOI,NMEA.txt,LISEZMOI.kismet,TODO} \
114 Documentation/README.{Bluetooth,lib_map,nasamaps,tracks,kismet}
115 if use mapnik ; then
116 dodoc Documentation/install-mapnik-osm.txt
117 else
118 rm -f "${ED}"usr/bin/gpsdrive_mapnik_gentiles.py
119 rm -f "${ED}"usr/share/gpsdrive/osm-template.xml
120 fi
121 if use scripts ; then
122 dodoc Documentation/README.gpspoint2gspdrive
123 use gdal || rm -f "${ED}"usr/bin/{gdal_slice,nasaconv}.sh
124 else
125 rm -f "${ED}"usr/share/man/man1/gpsd_nmea.sh.1
126 fi
127 }
128
129 pkg_postinst() {
130 fdo-mime_desktop_database_update
131 elog
132 elog "Be sure to see the README files in /usr/share/doc/${PF}"
133 elog "for information on using Kismet with gpsdrive."
134 elog
135 if use mapnik ; then
136 elog "Using mapnik to render online maps requires you to load"
137 elog "data into the postgis database. Follow the instructions"
138 elog "on http://wiki.openstreetmap.org/index.php/Mapnik"
139 fi
140 elog
141 elog "This version also now depends on the gpsd package, and"
142 elog "specific devices are supported there. Start gpsd first,"
143 elog "otherwise gpsdrive will only run in simulation mode (which"
144 elog "is handy for downloading maps for another location, but"
145 elog "not much else)."
146 elog
147 elog "openstreetmap-icons now installs to a more appropriate"
148 elog "location, so if you have trouble starting gpsdrive, you"
149 elog "should probably update your ~/.gpsdrive/gpsdriverc file"
150 elog "and change the path to the geoinfofile to reflect this:"
151 elog " geoinfofile = /usr/share/osm/geoinfo.db"
152 elog
153 }
154
155 pkg_postrm() {
156 fdo-mime_desktop_database_update
157 }

  ViewVC Help
Powered by ViewVC 1.1.20