diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-01-13 17:32:06 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-01-13 17:32:06 +0000 |
commit | 3ec12d6f2bcf0861f9d621efa31b1691708594a1 (patch) | |
tree | b697a2122ba4c5a8975254bae1c67b022d8a829b /sci-geosciences | |
parent | Use common tc-getPKG_CONFIG helper. (diff) | |
download | gentoo-2-3ec12d6f2bcf0861f9d621efa31b1691708594a1.tar.gz gentoo-2-3ec12d6f2bcf0861f9d621efa31b1691708594a1.tar.bz2 gentoo-2-3ec12d6f2bcf0861f9d621efa31b1691708594a1.zip |
Version bump.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'sci-geosciences')
-rw-r--r-- | sci-geosciences/gpsd/ChangeLog | 11 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/gpsd-3.4-cfgetispeed.patch | 47 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/gpsd-3.4-chrpath.patch | 69 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/gpsd-3.4-gpsmon-lm.patch | 29 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/gpsd-3.4-strptime.patch | 26 | ||||
-rw-r--r-- | sci-geosciences/gpsd/gpsd-3.4.ebuild | 153 |
6 files changed, 333 insertions, 2 deletions
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 <vapier@gentoo.org> +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 <vapier@gentoo.org> gpsd-3.3-r1.ebuild: Fix typos in export options pointed out by Yufeng Shen. 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 <manuel.lauss@googlemail.com> +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 <manuel.lauss@googlemail.com> +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + 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 <vapier@gentoo.org> +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 <vapier@gentoo.org> +--- + 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 <vapier@gentoo.org> +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 <vapier@gentoo.org> +--- + 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 <vapier@gentoo.org> +Date: Fri, 13 Jan 2012 11:56:12 -0500 +Subject: [PATCH] fix missing strptime prototype + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + 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 <stdio.h> + #include <time.h> + #include <sys/time.h> +-- +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:\<STAGING_PREFIX\>: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 +} |