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

Contents of /app-misc/gpsdrive/gpsdrive-2.10_pre7-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Jun 17 09:22:22 2011 UTC (2 years, 10 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Fix building with gpsd-2.96. Fixes bug #369005

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

  ViewVC Help
Powered by ViewVC 1.1.20