Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 1999-2010 Gentoo Foundation | 1 # Copyright 1999-2010 Gentoo Foundation |
| 2 # Distributed under the terms of the GNU General Public License v2 | 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 $ | 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 | 4 |
| 5 PYTHON_DEPEND="python? *" | 5 PYTHON_DEPEND="python? *" |
| 6 inherit autotools eutils distutils flag-o-matic | 6 inherit autotools eutils distutils flag-o-matic |
| 7 | 7 |
| 8 DESCRIPTION="GPS daemon and library to support USB/serial GPS devices and variou s GPS/mapping clients." | 8 DESCRIPTION="GPS daemon and library to support USB/serial GPS devices and variou s GPS/mapping clients." |
| 9 HOMEPAGE="http://gpsd.berlios.de/" | 9 HOMEPAGE="http://gpsd.berlios.de/" |
| 10 SRC_URI="mirror://berlios/gpsd/${P}.tar.gz" | 10 SRC_URI="mirror://berlios/gpsd/${P}.tar.gz" |
| 11 | 11 |
| 12 LICENSE="BSD" | 12 LICENSE="BSD" |
| 13 SLOT="0" | 13 SLOT="0" |
| 14 KEYWORDS="~amd64 ~arm hppa ~ppc ~ppc64 ~sparc ~x86" | 14 KEYWORDS="~amd64 ~arm x86" |
|
rochberg
2011/01/07 18:45:24
It seems like we should somehow differentiate ours
vb
2011/01/07 21:39:11
Done.
| |
| 15 | 15 |
| 16 IUSE="dbus garmin minimal ntp ocean python tntc usb X" | 16 IUSE="dbus ntp usb" |
| 17 | 17 |
| 18 RDEPEND="X? ( | 18 RDEPEND="dbus? ( >=sys-apps/dbus-0.94 |
| 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 | 19 >=dev-libs/glib-2.6 |
| 33 dev-libs/dbus-glib ) | 20 dev-libs/dbus-glib ) |
| 34 » ntp? ( net-misc/ntp ) | 21 » ntp? ( net-misc/ntp ) |
| 35 » usb? ( virtual/dev-manager )" | 22 » usb? ( virtual/dev-manager )" |
| 36 | 23 |
| 37 DEPEND="${RDEPEND} | 24 DEPEND="${RDEPEND} |
| 38 » X? ( | 25 » python? ( dev-lang/python )" |
| 39 » » x11-proto/xproto | |
| 40 » » x11-proto/xextproto | |
| 41 » ) | |
| 42 » !minimal? ( | |
| 43 » » dev-libs/libxslt | |
| 44 » » sys-libs/ncurses | |
| 45 » )" | |
| 46 | 26 |
| 47 src_unpack() { | 27 src_unpack() { |
| 48 unpack ${A} | 28 unpack ${A} |
| 49 cd "${S}" | 29 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 " \ | |
|
rochberg
2011/01/07 18:45:24
Why don't we need to do this? Did upstream gpsd f
vb
2011/01/07 21:39:11
I guess so - there is no compilation/linking error
| |
| 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 | 30 |
| 31 # Drop extensions requiring Python. | |
| 32 sed -i -e 's:^\s\+Extension("gps\.\(packet\|clienthelpers\)",.*$:#:' \ | |
| 33 setup.py || die "sed failed" | |
| 62 eautoreconf | 34 eautoreconf |
| 63 } | 35 } |
| 64 | 36 |
| 65 src_compile() { | 37 src_compile() { |
| 66 | 38 » local max_clients="5" |
| 67 » local my_conf="--enable-shared --with-pic --enable-static \ | 39 » local max_devices="2" |
| 68 » » --disable-fast-install" | 40 » local my_conf="--enable-shared --with-pic --enable-static" |
| 69 » » # --enable-superstar2 is missing a header file | |
| 70 | 41 |
| 71 use python && distutils_python_version | 42 use python && distutils_python_version |
| 72 | 43 |
| 73 if use ntp; then | 44 if use ntp; then |
| 74 my_conf="${my_conf} --enable-ntpshm --enable-pps" | 45 my_conf="${my_conf} --enable-ntpshm --enable-pps" |
| 75 else | 46 else |
| 76 my_conf="${my_conf} --disable-ntpshm --disable-pps" | 47 my_conf="${my_conf} --disable-ntpshm --disable-pps" |
| 77 fi | 48 fi |
| 78 | 49 |
| 79 » if use minimal; then | 50 » my_conf+=" --enable-max-devices=${max_devices}\ |
| 80 » » local max_clients="5" | 51 » » --enable-max-clients=${max_clients}" |
| 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 | 52 |
| 89 » » WITH_XSLTPROC=no WITH_XMLTO=no econf ${my_conf} \ | 53 » WITH_XSLTPROC=no WITH_XMLTO=no econf ${my_conf} \ |
| 90 $(use_enable dbus) $(use_enable ocean oceanserver) \ | 54 $(use_enable dbus) $(use_enable ocean oceanserver) \ |
| 91 » » $(use_enable tntc tnt) $(use_enable python) \ | 55 » » $(use_enable tntc tnt) \ |
| 92 $(use_enable garmin garmintxt) || die "econf failed" | 56 $(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 | 57 |
| 103 emake -j1 || die "emake failed" | 58 emake -j1 || die "emake failed" |
| 104 } | 59 } |
| 105 | 60 |
| 106 src_install() { | 61 src_install() { |
| 107 | |
| 108 make DESTDIR="${D}" install || die "make install failed" | 62 make DESTDIR="${D}" install || die "make install failed" |
| 109 | 63 insinto /etc/init || die "insinto failed" |
| 110 » if ! test -x "${D}"usr/sbin/gpsd; then | 64 doins "${FILESDIR}/gpsd.conf" || die "doins failed" |
| 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 | |
|
rochberg
2011/01/07 18:45:24
Comment that we've taken out all the hotplug/udev
vb
2011/01/07 21:39:11
Done.
| |
| 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 } | 65 } |
| 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 } | |
| OLD | NEW |