From: Mike Frysinger Date: Fri, 13 Jan 2012 17:32:06 +0000 (+0000) Subject: Version bump. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9c58ee200bfe43482836d12c0e96c0fb9a71d66c;p=gentoo.git Version bump. Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64 --- diff --git a/sci-geosciences/gpsd/ChangeLog b/sci-geosciences/gpsd/ChangeLog index 6c71d1656e64..85762b2c644b 100644 --- a/sci-geosciences/gpsd/ChangeLog +++ b/sci-geosciences/gpsd/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-geosciences/gpsd -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/ChangeLog,v 1.81 2011/12/07 16:17:42 vapier Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/ChangeLog,v 1.82 2012/01/13 17:32:06 vapier Exp $ + +*gpsd-3.4 (13 Jan 2012) + + 13 Jan 2012; Mike Frysinger +gpsd-3.4.ebuild, + +files/gpsd-3.4-cfgetispeed.patch, +files/gpsd-3.4-chrpath.patch, + +files/gpsd-3.4-gpsmon-lm.patch, +files/gpsd-3.4-strptime.patch: + Version bump. 06 Dec 2011; Mike Frysinger gpsd-3.3-r1.ebuild: Fix typos in export options pointed out by Yufeng Shen. diff --git a/sci-geosciences/gpsd/Manifest b/sci-geosciences/gpsd/Manifest index 159ea1977131..53517415d8ac 100644 --- a/sci-geosciences/gpsd/Manifest +++ b/sci-geosciences/gpsd/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 +Hash: SHA1 AUX 2.95-disable-strip.patch 382 RMD160 e9e94c7593b60c12dde86dc4d769ff0ff7a60413 SHA1 4ae5f084998b1538bf5428fd37016f48d57da0ee SHA256 435a6fa9c1ea46befc24af760da9ef96f4a66b9bf98c2b9d5d3f9ba2c72b4080 AUX 2.95-fix-ldflags.patch 721 RMD160 4be1b2ea581d8aef35896acd9098bc298b3199ad SHA1 c8b03243da8d747429632eab871fa40e412be509 SHA256 3a93468ca101c876549bdda0a1d129ca5803706e4291f9fc8e7c74d2015ecf5a @@ -12,21 +12,37 @@ AUX gpsd-3.3-pkg-config.patch 1925 RMD160 eeae061c8e807ada8f736d89e3146847bc9a1d AUX gpsd-3.3-release-rev.patch 1206 RMD160 4db37f9d998cc56c32cb1deb0679dd9ba11c0f21 SHA1 e7e3e0a1fda9fd55ea5c0c86ecdcd33972840b79 SHA256 37688ad979c9915e25952f461fefa313682e3f62b8093a7b5205e1e9164df2e5 AUX gpsd-3.3-setup.py 448 RMD160 3b06265cde87612040ef2955f097fe2b87b433a7 SHA1 e8d1b510aed5b6c267b92c059ceaef255ce0756f SHA256 3a8f18f7f1e957c1b33ea25046dc4116422d087dd9f880f7bf2ad8fd0153f4c4 AUX gpsd-3.3-udev-install.patch 970 RMD160 1ed13da680ba245f7bb34b14754c27fcce99a479 SHA1 e274a7eda8690658a65305f133bc84f91055784d SHA256 d0e10f7655e010d33309251ddda6157957c3d05bfc22e24124920a8fbf51413a +AUX gpsd-3.4-cfgetispeed.patch 1975 RMD160 60f509b398b33f4e4437ba22fb42bd2fc2f4fcd4 SHA1 c263053e552f6b8a9303e503c4a7ad5515a30761 SHA256 e6eee311765eab99cfc682939a693ff30066dead6e17e1b60371de01360e9c01 +AUX gpsd-3.4-chrpath.patch 2838 RMD160 946ec7cca14ea87667cdd41092f767b4fe45ec44 SHA1 fd69c0ba2301e84b77f822a29fffea8acef984b0 SHA256 001944b926d9d328d78a0d971ed610e797b49a07d50bb1933b660b5af2a4f948 +AUX gpsd-3.4-gpsmon-lm.patch 980 RMD160 661751e70335bcb21f8e51091e18a115d9428328 SHA1 d411f29a494c20c5b43281cf1e35d4816950544c SHA256 18719b3557cada637ef2ff824d065ffedcc9598ddea0961925dc6fb9571a2eed +AUX gpsd-3.4-strptime.patch 688 RMD160 e1ca75c916072bdd5eea196a7925f87bc0fc982c SHA1 c99ec5ba7dcba81223058b64bb92a2d421f79237 SHA256 df6eadfa97cf120c76738f6742c5bec6abbc28fdfe6f25239369cbfdcf8783e6 AUX gpsd.conf-2 314 RMD160 e345c8504b020da4b4a0310b59112ba6eb178dce SHA1 d0499491a762e46e7d76854109266b36c1f22c0b SHA256 2d9ab242319f24dac14d53b57b222b288dfbac10cbdf31c9aecbb65cf03c72dc AUX gpsd.init-2 861 RMD160 c1d5a0fd107e3f4bc36a936cbae133c39b8828f7 SHA1 cf08caee2826e7b35d00762c475755bd0ae84d12 SHA256 6b6e3b23d95acd7326e3982509302dbef005e143bb46557c573aca1c0e2cb672 DIST gpsd-2.95.tar.gz 1385681 RMD160 c9e8d3b7ff73c655d65f0f6e329ca7ff241b10f6 SHA1 af1f575c8ec3a2db7a71c35f2296fd339a4a1ff3 SHA256 832343a53921a8371efa540ba57c91dadedda445e571c1beb97c06539ef450ae DIST gpsd-2.96bis.tar.gz 1554605 RMD160 ea09b73709627f95470dbd023e5ffc48209fde6a SHA1 cf123255f9ec54d018642cf230cd05826e507a9e SHA256 c6d72565bc06b802c749e69808eb7c6ee165962dc17383971c9001b5e1763690 DIST gpsd-3.3.tar.gz 1401206 RMD160 73442e2bccac87a7ba4349ec63c443edbf05a131 SHA1 82a2ffe825c30c2152f2696221dbeeb82a4e9dd5 SHA256 1dbc1813f94f7f05fbf3341bf0154bae26903d1fb90c33b63d5458373ea931b9 +DIST gpsd-3.4.tar.gz 1422890 RMD160 f7cddc018b5b6834a097bbefbddb2b0a3844b203 SHA1 b942902479238f8a3eaa1955299d97461e93081a SHA256 79f7de9ead63c7f5d2c9a92e85b5f82e53323c4d451ef8e27ea265ac3ef9a70f EBUILD gpsd-2.95-r1.ebuild 2674 RMD160 3cfe82ffac9f57d771b6728420d106debd49c22e SHA1 86ba4ecde7158a24c535675036f638c9f6683ecc SHA256 d8e81c1b8b9531fc59ea1c9da7710c76c23802faec8e6d404732ed557058ed7b EBUILD gpsd-2.96-r1.ebuild 2840 RMD160 75cc21a587c3ef12bb891f8a2dc7ee30fa7cfb1f SHA1 bdf8663fb324ca8ddbe81b58348d12b6a03174ca SHA256 04bab92bbe716753ff6bcd719fa958e32440e7bcc219c6d409936edda0fed695 EBUILD gpsd-3.3-r1.ebuild 4271 RMD160 1082fd6fda6c9ee12c5b9ae6c4f8508753906c6a SHA1 9f11ddb5d5d2828a36353421aa05c6e8dda0442a SHA256 faf8236ab66713d04d11a2f4d5cd6d8e62e303e922289ecbb915c9adf0d57108 EBUILD gpsd-3.3.ebuild 4145 RMD160 454a2da60f501ac74e252c7ea24c974b1fef01df SHA1 71da34e59fbb43815fed0653af9e3290ddef9da7 SHA256 2eea0510ce1e65d67cd65a41a7191bee6f0d0dfdc4eb5a6f218ed61a4bc47186 -MISC ChangeLog 14708 RMD160 4f13b7ab2c12cf1d855d7d86ec4c72d20aed4057 SHA1 f76a2e95d5e1a177a3145607e90daafe86699a37 SHA256 d1b978c30b7967bbbd961df41c1d78b1be2988b164ee503b8d7b0e62eebbf8c2 +EBUILD gpsd-3.4.ebuild 4244 RMD160 c5b41ac99ddd7cb970190a8839057b375ce69260 SHA1 15a14cfa33c1ac99cdc1b0c1d812268bc7ae67b3 SHA256 c648a5acd00e8b04115a538150b6733a9844bee095085f1d93837b5caa3a46e2 +MISC ChangeLog 14952 RMD160 d3405ef700b7658fe84e324681239e42ec0b456d SHA1 22a709777611cd046775b2900507de2155f9893a SHA256 3bb3d151a2a711728c56c76987339efe16d975738802d5b801d62ebf83cc3bb8 MISC metadata.xml 755 RMD160 5b1284e2e50fbcd3f84fa388c3980298d74bfbfd SHA1 de24f0892fb828f2cb8c64aae6a0f7a53cb5239e SHA256 62975e20eaea76bd26e07faaffc0409ff0474fb57b2556040538c4ca4e553d48 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iF4EAREIAAYFAk7fka8ACgkQaC/OocHi7JbiUQD+KS/WP0tBHXDecDE5OClqUjFz -ZZFPi/pjeL4I61TovZcA/Rambl0Dgfa+171W39mBbNLOERKEpqxH61wC1hoA9I5a -=rt+e +iQIcBAEBAgAGBQJPEGqdAAoJELEHsLL7fEFWq5YP+gJqnlcgq8wRWq65tW4seZSQ +6cZgSmAeE3KMy7DBmndoMVCl/hWQJZsC4SmcX6iwlUulEmXHlMG3zywOIXREMzvJ +1cKS5JFEJ9NQ3qeXE0eIE2oeIH8tszw61JhF8aD/nIvQJ3HYjzEeFX1sQH7YI0zx +ANeihbHvMKOSZ5maaOYQBZb/W1s+o0CKx0/x1qKV/obCtvGNVGfp8u5Y1ztc5o5T +s8Lh99HDcDKKcpj3LjP4NB4UuyfoFZ7XxA3ny/L6QAfBWUIS/2nlGXfHo+29oRe4 +gCTWqyC9AY7sftbkTA1idNVDAbJv4cCDAKlCSO0XNn5ez/POG42jUkbVlqYdLTy2 +JTH7pFuEgJoLQ1Lexv+B4kG00XZWgpDXfBalXbsaV1+apOVFXlrPcKU6/nHQx7J3 +eqiLhcCqIM81/fpKJxaJTcX2xugeMS9LMxvhtlUPdbVe02PDp0XMh0xj7KA4snVA +3qSXfn4HApUM7sCWab+Dz5jAOx8OV4sD7P6TTq3uoLUPhhD/At+zPontPp3yumV6 +Ekq/+WgHPU0jsiVcb37vULeLyQKbElFPJ0J4dWS2tuecmu8kHDXjPebHkcjXBGdO +sUDXEqXcVDFeASjy3EaM2zTrNWRpJ4oFV6g18xWwYXRQub6yhSEeLVxTaQzPS8C/ +eWdMpCqDeqHwD3kEYIg6 +=K3bD -----END PGP SIGNATURE----- diff --git a/sci-geosciences/gpsd/files/gpsd-3.4-cfgetispeed.patch b/sci-geosciences/gpsd/files/gpsd-3.4-cfgetispeed.patch new file mode 100644 index 000000000000..02abcb0e95d2 --- /dev/null +++ b/sci-geosciences/gpsd/files/gpsd-3.4-cfgetispeed.patch @@ -0,0 +1,47 @@ +From 38702bf0f4aaafdddde51393106eeaf720c1fc63 Mon Sep 17 00:00:00 2001 +From: Manuel Lauss +Date: Fri, 13 Jan 2012 11:59:55 -0500 +Subject: [PATCH] serial: use cfgetispeed helpers + +Rather than poking c_ispeed directly, use the cfgetispeed helper. This +is part of POSIX, and we already use cfsetispeed, so there shouldn't be +any portability issues here. + +Signed-off-by: Manuel Lauss +Signed-off-by: Mike Frysinger +--- + serial.c | 9 +-------- + 1 files changed, 1 insertions(+), 8 deletions(-) + +diff --git a/serial.c b/serial.c +index c1464dd..8eb03ce 100644 +--- a/serial.c ++++ b/serial.c +@@ -594,13 +594,8 @@ void gpsd_close(struct gps_device_t *session) + * them the first time. Economical, and avoids tripping over an + * obscure Linux 2.6 kernel bug that disables threaded + * ioctl(TIOCMWAIT) on a device after tcsetattr() is called. +- * +- * Unfortunately the termios struct doesn't have c_ispeed/c_ospeed +- * on all architectures. Its missing on sparc, mips/mispel and hurd-i386 at least. + */ +-#if defined(_HAVE_STRUCT_TERMIOS_C_ISPEED) +- if (session->ttyset_old.c_ispeed != session->ttyset.c_ispeed || (session->ttyset_old.c_cflag & CSTOPB) != (session->ttyset.c_cflag & CSTOPB)) { +-#endif ++ if (cfgetispeed(&session->ttyset_old) != cfgetispeed(&session->ttyset) || (session->ttyset_old.c_cflag & CSTOPB) != (session->ttyset.c_cflag & CSTOPB)) { + /*@ ignore @*/ + (void)cfsetispeed(&session->ttyset_old, + (speed_t) session->gpsdata.dev.baudrate); +@@ -609,9 +604,7 @@ void gpsd_close(struct gps_device_t *session) + /*@ end @*/ + (void)tcsetattr(session->gpsdata.gps_fd, TCSANOW, + &session->ttyset_old); +-#if defined(_HAVE_STRUCT_TERMIOS_C_ISPEED) + } +-#endif + gpsd_report(LOG_SPIN, "close(%d) in gpsd_close(%s)\n", + session->gpsdata.gps_fd, session->gpsdata.dev.path); + (void)close(session->gpsdata.gps_fd); +-- +1.7.8.3 + diff --git a/sci-geosciences/gpsd/files/gpsd-3.4-chrpath.patch b/sci-geosciences/gpsd/files/gpsd-3.4-chrpath.patch new file mode 100644 index 000000000000..c509e2d29968 --- /dev/null +++ b/sci-geosciences/gpsd/files/gpsd-3.4-chrpath.patch @@ -0,0 +1,69 @@ +From 63a44d0cb5494ed1078de411b55cb1c9a8307cec Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 18 Nov 2011 19:09:27 -0500 +Subject: [PATCH] make chrpath optional + +There's no reason to require chrpath for distributions who only want to +compile locally and then install elsewhere for packaging. So allow them +to specify CHRPATH='' via the env to disable this requirement. + +Signed-off-by: Mike Frysinger +--- + SConstruct | 27 ++++++++++++++------------- + 1 files changed, 14 insertions(+), 13 deletions(-) + +diff --git a/SConstruct b/SConstruct +index ccaca7d..68bf367 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -270,7 +270,7 @@ def installdir(dir, add_destdir=True): + + # Honor the specified installation prefix in link paths. + env.Prepend(LIBPATH=[installdir('libdir')]) +-if env["shared"]: ++if env["shared"] and env['CHRPATH']: + env.Prepend(RPATH=[installdir('libdir')]) + + # Give deheader a way to set compiler flags +@@ -390,17 +390,18 @@ config = Configure(env, custom_tests = { 'CheckPKG' : CheckPKG, + 'CheckXsltproc' : CheckXsltproc}) + + env.Prepend(LIBPATH=[os.path.realpath(os.curdir)]) +-if config.CheckExecutable('$CHRPATH -v', 'chrpath'): +- # Tell generated binaries to look in the current directory for +- # shared libraries so we can run tests without hassle. Should be +- # handled sanely by scons on all systems. Not good to use '.' or +- # a relative path here; it's a security risk. At install time we +- # use chrpath to edit this out of RPATH. +- if env["shared"]: +- env.Prepend(RPATH=[os.path.realpath(os.curdir)]) +-else: +- print "chrpath is not available, forcing static linking." +- env["shared"] = False ++if env['CHRPATH']: ++ if config.CheckExecutable('$CHRPATH -v', 'chrpath'): ++ # Tell generated binaries to look in the current directory for ++ # shared libraries so we can run tests without hassle. Should be ++ # handled sanely by scons on all systems. Not good to use '.' or ++ # a relative path here; it's a security risk. At install time we ++ # use chrpath to edit this out of RPATH. ++ if env["shared"]: ++ env.Prepend(RPATH=[os.path.realpath(os.curdir)]) ++ else: ++ print "chrpath is not available, forcing static linking." ++ env["shared"] = False + + confdefs = ["/* gpsd_config.h. Generated by scons, do not hand-hack. */\n"] + +@@ -1140,7 +1141,7 @@ if qt_env: + binaryinstall.append(LibraryInstall(qt_env, installdir('libdir'), compiled_qgpsmmlib)) + + # We don't use installdir here in order to avoid having DESTDIR affect the rpath +-if env["shared"]: ++if env['CHRPATH']: + env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \ + % (installdir('libdir', False), )) + +-- +1.7.8.3 + diff --git a/sci-geosciences/gpsd/files/gpsd-3.4-gpsmon-lm.patch b/sci-geosciences/gpsd/files/gpsd-3.4-gpsmon-lm.patch new file mode 100644 index 000000000000..a749fcf05100 --- /dev/null +++ b/sci-geosciences/gpsd/files/gpsd-3.4-gpsmon-lm.patch @@ -0,0 +1,29 @@ +From 55131187b6a0290f99d1dd70b5cce48040bba7bb Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 13 Jan 2012 11:53:39 -0500 +Subject: [PATCH] gpsmon: always link with -lm + +Since the gpsmon pkg uses math funcs itself (and not just via libgps), +we need to link in -lm for the app. + +Signed-off-by: Mike Frysinger +--- + SConstruct | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/SConstruct b/SConstruct +index 68bf367..a5249c1 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -851,7 +851,7 @@ gpsdctl = env.Program('gpsdctl', ['gpsdctl.c'], parse_flags=gpslibs) + env.Depends(gpsdctl, compiled_gpslib) + + gpsmon = env.Program('gpsmon', gpsmon_sources, +- parse_flags=gpsdlibs + ncurseslibs) ++ parse_flags=gpsdlibs + ncurseslibs + ['-lm']) + env.Depends(gpsmon, [compiled_gpsdlib, compiled_gpslib]) + + gpspipe = env.Program('gpspipe', ['gpspipe.c'], parse_flags=gpslibs) +-- +1.7.8.3 + diff --git a/sci-geosciences/gpsd/files/gpsd-3.4-strptime.patch b/sci-geosciences/gpsd/files/gpsd-3.4-strptime.patch new file mode 100644 index 000000000000..50a2b2755956 --- /dev/null +++ b/sci-geosciences/gpsd/files/gpsd-3.4-strptime.patch @@ -0,0 +1,26 @@ +From 083ee79e5b6acbd08008965cbca496eb61957fa4 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 13 Jan 2012 11:56:12 -0500 +Subject: [PATCH] fix missing strptime prototype + +Signed-off-by: Mike Frysinger +--- + gpsutils.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/gpsutils.c b/gpsutils.c +index a1530ec..cc47d52 100644 +--- a/gpsutils.c ++++ b/gpsutils.c +@@ -3,6 +3,8 @@ + * This file is Copyright (c) 2010 by the GPSD project + * BSD terms apply: see the file COPYING in the distribution root for details. + */ ++#define _XOPEN_SOURCE 700 ++ + #include + #include + #include +-- +1.7.8.3 + diff --git a/sci-geosciences/gpsd/gpsd-3.4.ebuild b/sci-geosciences/gpsd/gpsd-3.4.ebuild new file mode 100644 index 000000000000..2ca85199b7ea --- /dev/null +++ b/sci-geosciences/gpsd/gpsd-3.4.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/gpsd-3.4.ebuild,v 1.1 2012/01/13 17:32:06 vapier Exp $ + +EAPI="4" + +PYTHON_DEPEND="python? 2:2.6" +RESTRICT_PYTHON_ABIS="3.*" +SUPPORT_PYTHON_ABIS="1" +SCONS_MIN_VERSION="1.2.1" + +inherit eutils user multilib distutils scons-utils toolchain-funcs + +DESCRIPTION="GPS daemon and library to support USB/serial GPS devices and various GPS/mapping clients" +HOMEPAGE="http://catb.org/gpsd/" +SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" + +GPSD_PROTOCOLS=( + ashtech aivdm clientdebug earthmate evermore fv18 garmin + garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver + oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip + tripmate tnt ubx +) +IUSE_GPSD_PROTOCOLS=${GPSD_PROTOCOLS[@]/#/gpsd_protocols_} +IUSE="${IUSE_GPSD_PROTOCOLS} bluetooth cxx debug dbus ipv6 ncurses ntp python qt4 +shm +sockets test udev usb X" +REQUIRED_USE="X? ( python )" + +RDEPEND="X? ( dev-python/pygtk:2 ) + ncurses? ( sys-libs/ncurses ) + bluetooth? ( net-wireless/bluez ) + usb? ( virtual/libusb:1 ) + dbus? ( + sys-apps/dbus + dev-libs/dbus-glib + ) + ntp? ( net-misc/ntp ) + qt4? ( x11-libs/qt-gui )" +# xml packages are for man page generation +DEPEND="${RDEPEND} + app-text/xmlto + =app-text/docbook-xml-dtd-4.1* + test? ( sys-devel/bc )" + +pkg_setup() { + use python && python_pkg_setup +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.3-ldflags.patch + epatch "${FILESDIR}"/${PN}-3.4-cfgetispeed.patch #393515 + epatch "${FILESDIR}"/${PN}-3.4-gpsmon-lm.patch + epatch "${FILESDIR}"/${PN}-3.4-strptime.patch + epatch "${FILESDIR}"/${PN}-3.4-chrpath.patch + + # Avoid useless -L paths to the install dir + sed -i \ + -e '/^env.Prepend(LIBPATH=.installdir(.libdir.).)$/d' \ + -e 's:\:SYSROOT:g' \ + SConstruct || die + + # Extract python info out of SConstruct so we can use saner distribute + if use python ; then + pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; } + local pybins=$(pyvar python_progs) + local pysrcs=$(sed -n '/^ *python_extensions = {/,/}/{s:^ *::;s:os[.]sep:"/":g;p}' SConstruct) + local packet=$(python -c "${pysrcs}; print(python_extensions['gps/packet'])") + local client=$(python -c "${pysrcs}; print(python_extensions['gps/clienthelpers'])") + sed \ + -e "s|@VERSION@|$(pyvar gpsd_version)|" \ + -e "s|@URL@|$(pyvar website)|" \ + -e "s|@EMAIL@|$(pyvar devmail)|" \ + -e "s|@SCRIPTS@|${pybins}|" \ + -e "s|@GPS_PACKET_SOURCES@|${packet}|" \ + -e "s|@GPS_CLIENT_SOURCES@|${client}|" \ + -e "s|@SCRIPTS@|$(pyvar python_progs)|" \ + "${FILESDIR}"/${PN}-3.3-setup.py > setup.py || die + distutils_src_prepare + fi +} + +src_configure() { + myesconsargs=( + prefix=/usr + libdir="/$(get_libdir)" + gpsd_user=gpsd + gpsd_group=uucp + strip=False + python=False + $(use_scons bluetooth bluez) + $(use_scons cxx libgpsmm) + $(use_scons debug) + $(use_scons dbus dbus_export) + $(use_scons ipv6) + $(use_scons ncurses) + $(use_scons ntp ntpshm) + $(use_scons ntp pps) + $(use_scons shm shm_export) + $(use_scons sockets socket_export) + $(use_scons qt4 libQgpsmm) + $(use_scons usb) + ) + + # enable specified protocols + local protocol + for protocol in ${GPSD_PROTOCOLS[@]} ; do + myesconsargs+=( $(use_scons gpsd_protocols_${protocol} ${protocol}) ) + done +} + +src_compile() { + export CHRPATH= + tc-export CC CXX PKG_CONFIG + export SHLINKFLAGS=${LDFLAGS} LINKFLAGS=${LDFLAGS} + escons + + use python && distutils_src_compile +} + +src_install() { + DESTDIR="${D}" escons install $(usex udev udev-install "") + + newconfd "${FILESDIR}"/gpsd.conf-2 gpsd + newinitd "${FILESDIR}"/gpsd.init-2 gpsd + + if use python ; then + distutils_src_install + # Delete all X related packages if user doesn't want them + if ! use X ; then + local p + for p in $(grep -Il 'import .*pygtk' *) ; do + find "${D}"/usr/bin -name "${p}*" -delete + done + fi + fi +} + +pkg_preinst() { + # Run the gpsd daemon as gpsd and group uucp; create it here + # as it doesn't seem to be needed during compile/install ... + enewuser gpsd -1 -1 -1 "uucp" +} + +pkg_postinst() { + use python && distutils_pkg_postinst +} + +pkg_postrm() { + use python && distutils_pkg_postrm +}