Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: sci-geosciences/gpsd/gpsd-2.38.ebuild

Issue 6025011: Simplify gpsd ebuild and use the latest available version. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/chromiumos-overlay.git@master
Patch Set: Address review comments Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sci-geosciences/gpsd/files/gpsd.conf ('k') | sci-geosciences/gpsd/gpsd-2.38-r1.ebuild » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/gpsd-2.38.ebuild,v 1.4 2 010/01/19 00:50:35 jer Exp $
4
5 PYTHON_DEPEND="python? *"
6 inherit autotools eutils distutils flag-o-matic
7
8 DESCRIPTION="GPS daemon and library to support USB/serial GPS devices and variou s GPS/mapping clients."
9 HOMEPAGE="http://gpsd.berlios.de/"
10 SRC_URI="mirror://berlios/gpsd/${P}.tar.gz"
11
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="~amd64 ~arm hppa ~ppc ~ppc64 ~sparc ~x86"
15
16 IUSE="dbus garmin minimal ntp ocean python tntc usb X"
17
18 RDEPEND="X? (
19 x11-libs/libXmu
20 x11-libs/libXext
21 x11-libs/libXp
22 x11-libs/libX11
23 x11-libs/libXt
24 x11-libs/libSM
25 x11-libs/libICE
26 x11-libs/libXpm
27 x11-libs/libXaw
28 )
29 python? ( dev-lang/python )
30
31 dbus? ( >=sys-apps/dbus-0.94
32 >=dev-libs/glib-2.6
33 dev-libs/dbus-glib )
34 ntp? ( net-misc/ntp )
35 usb? ( virtual/dev-manager )"
36
37 DEPEND="${RDEPEND}
38 X? (
39 x11-proto/xproto
40 x11-proto/xextproto
41 )
42 !minimal? (
43 dev-libs/libxslt
44 sys-libs/ncurses
45 )"
46
47 src_unpack() {
48 unpack ${A}
49 cd "${S}"
50 # add -lm to setup.py again (see bug #250757)
51 sed -i \
52 -e "s:, gpspacket_sources:, gpspacket_sources, libraries=['m']:g " \
53 -e "s:geoid.c\"]:geoid.c\"], libraries=['m']:g" \
54 setup.py || die "sed 1 failed"
55 # fix Garmin text struct
56 sed -i -e "s:RTCM2_PACKET;:RTCM2_PACKET,:g" \
57 drivers.c || die "sed 2 failed"
58 # add missing include file (see bug #162361)
59 sed -i -e "s:gps.h libgpsmm.h:gps.h libgpsmm.h gpsd_config.h:g" \
60 Makefile.am || die "sed 3 failed"
61
62 eautoreconf
63 }
64
65 src_compile() {
66
67 local my_conf="--enable-shared --with-pic --enable-static \
68 --disable-fast-install"
69 # --enable-superstar2 is missing a header file
70
71 use python && distutils_python_version
72
73 if use ntp; then
74 my_conf="${my_conf} --enable-ntpshm --enable-pps"
75 else
76 my_conf="${my_conf} --disable-ntpshm --disable-pps"
77 fi
78
79 if use minimal; then
80 local max_clients="5"
81 local max_devices="2"
82 if ! use ntp; then
83 my_conf="${my_conf} --disable-pps --disable-ntpshm"
84 fi
85 my_conf="${my_conf} --enable-squelch --without-x \
86 --enable-max-devices=${max_devices} \
87 --enable-max-clients=${max_clients}"
88
89 WITH_XSLTPROC=no WITH_XMLTO=no econf ${my_conf} \
90 $(use_enable dbus) $(use_enable ocean oceanserver) \
91 $(use_enable tntc tnt) $(use_enable python) \
92 $(use_enable garmin garmintxt) || die "econf failed"
93 else
94 econf ${my_conf} $(use_enable dbus) $(use_enable tntc tnt) \
95 $(use_enable ocean oceanserver) $(use_enable python) \
96 $(use_enable garmin garmintxt) $(use_with X x) \
97 || die "econf failed"
98 fi
99
100 # still needs an explicit linkage with the math lib (bug #250757)
101 append-ldflags -Wl,-z,-defs -Wl,--no-undefined
102
103 emake -j1 || die "emake failed"
104 }
105
106 src_install() {
107
108 make DESTDIR="${D}" install || die "make install failed"
109
110 if ! test -x "${D}"usr/sbin/gpsd; then
111 ewarn "gpsd link error detected; please re-emerge gpsd."
112 fi
113
114 if use usb ; then
115 insinto /etc/hotplug/usb
116 doins gpsd.usermap
117 exeinto /etc/hotplug/usb
118 doexe gpsd.hotplug
119 insinto /etc/udev/rules.d
120 doins "${FILESDIR}"/99-gpsd-usb.rules
121 keepdir /var/run/usb # needed for REMOVER
122 else
123 newconfd "${FILESDIR}"/gpsd.conf gpsd
124 newinitd "${FILESDIR}"/gpsd.init gpsd
125 fi
126
127 if use X && ! use minimal ; then
128 insinto /etc/X11/app-defaults
129 newins xgps.ad Xgps
130 newins xgpsspeed.ad Xgpsspeed
131 else
132 rm "${D}usr/share/man/man1/xgpsspeed.1.bz2" \
133 "${D}usr/share/man/man1/xgps.1.bz2"
134 fi
135
136 use python && distutils_src_install
137
138 dodoc INSTALL README TODO
139
140 # add missing dgpsip-servers and capabilities files
141 insinto /usr/share/${PN}
142 doins dgpsip-servers gpscap.ini
143
144 if use minimal; then
145 doman gpsctl.1 sirfmon.1 gpsd.8 gps.1 cgps.1 cgpxlogger.1 gpspip e.1
146 use python && doman gpsprof.1
147 else
148 diropts "-m0644"
149 dobin logextract
150 use python && dobin striplog
151 fi
152 }
153
154 pkg_postinst() {
155 elog ""
156 elog "This version of gpsd has broken support for the SuperStarII"
157 elog "chipset which is currently disabled."
158 elog ""
159 elog "Other than the above, all default devices are enabled, and all"
160 elog "optional devices and formats are controlled via USE flags."
161 elog ""
162 elog "Recent versions of udev (>=udev-115 or so) should have correct"
163 elog "usb device detection and startup of gpsd (ie, without hotplug)."
164 elog ""
165 elog "Certain GPS devices also require the corresponding kernel options"
166 elog "to be enabled, such as USB_SERIAL_GARMIN, or a USB serial driver"
167 elog "for an adapter such as those that come with Deluo GPS units (eg,"
168 elog "USB_SERIAL_PL2303). Straight serial devices should always work,"
169 elog "even without udev/hotplug support."
170 elog ""
171 elog "Note: the supplied gpsd udev rules are now device-specific, so"
172 elog "if your device isn't detected correctly, please use lsusb or"
173 elog "another suitable tool to determine the proper device IDs and"
174 elog "use the commented rules to fill in the blanks for your device."
175 elog ""
176 elog "Please see this post about the new capabilities database:"
177 elog ""
178 elog "http://lists.berlios.de/pipermail/gpsd-dev/2009-January/006333.htm l"
179 elog ""
180 elog "on current hardware, adding new hardware, etc. Read the above"
181 elog "and the INSTALL doc for more information on supported hardware,"
182 elog "and make sure udev has the right group permissions set on the"
183 elog "devices if using USB (it should Do The Right Thing (TM))..."
184 elog ""
185 }
OLDNEW
« no previous file with comments | « sci-geosciences/gpsd/files/gpsd.conf ('k') | sci-geosciences/gpsd/gpsd-2.38-r1.ebuild » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698