gpsd: Fix crosscompile and libtool issues
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25149 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
aa6ae09137
commit
ca87588d52
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2006-2010 OpenWrt.org
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -9,13 +9,15 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=gpsd
|
PKG_NAME:=gpsd
|
||||||
PKG_VERSION:=2.94
|
PKG_VERSION:=2.94
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
|
PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
|
||||||
PKG_MD5SUM:=ce70bcd707ac1df861d4c72f503c09d1
|
PKG_MD5SUM:=ce70bcd707ac1df861d4c72f503c09d1
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
PKG_FIXUP:=libtool
|
||||||
|
PKG_REMOVE_FILES:=aclocal.m4 ltmain.sh
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=libncurses
|
PKG_BUILD_DEPENDS:=libncurses
|
||||||
|
|
||||||
@ -24,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
|
|||||||
define Package/gpsd
|
define Package/gpsd
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
DEPENDS:=+libpthread
|
DEPENDS:=+libpthread +libusb-1.0
|
||||||
TITLE:=An interface daemon for GPS receivers
|
TITLE:=An interface daemon for GPS receivers
|
||||||
URL:=http://gpsd.berlios.de/
|
URL:=http://gpsd.berlios.de/
|
||||||
endef
|
endef
|
||||||
@ -43,6 +45,10 @@ CONFIGURE_ARGS += \
|
|||||||
--disable-libgpsmm \
|
--disable-libgpsmm \
|
||||||
--without-x \
|
--without-x \
|
||||||
|
|
||||||
|
EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/libusb-1.0
|
||||||
|
|
||||||
|
EXTRA_LDFLAGS:=-lusb-1.0
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(1)/usr/include
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
|
||||||
|
53
net/gpsd/patches/100-cross-compile.patch
Normal file
53
net/gpsd/patches/100-cross-compile.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
Index: gpsd-2.94/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- gpsd-2.94.orig/configure.ac 2010-04-20 19:55:08.000000000 +0200
|
||||||
|
+++ gpsd-2.94/configure.ac 2011-01-27 15:22:04.720000026 +0100
|
||||||
|
@@ -233,30 +233,9 @@
|
||||||
|
AC_DEFINE([HAVE_LIBPTHREAD], [], [pthread libraries are present])])
|
||||||
|
AC_SUBST(LIBPTHREAD)
|
||||||
|
|
||||||
|
-#
|
||||||
|
-# We want libusb-1.x or later. Checking for this is messy in 2010
|
||||||
|
-# since many Linux systems ship with .0,1.x versions and that's
|
||||||
|
-# what you get if you check naively for -lusb.
|
||||||
|
-#
|
||||||
|
-# We use the fact that the obsolete versions put their include file in
|
||||||
|
-# /usr/include/usb.h, while the newer ones have it in
|
||||||
|
-# /usr/include/libusb-*/libusb.h
|
||||||
|
-#
|
||||||
|
AC_MSG_CHECKING([for libusb version >= 1.0.0])
|
||||||
|
-if test -f /usr/include/libusb-*/libusb.h ;
|
||||||
|
-then
|
||||||
|
- usb=$(basename /usr/lib/libusb-*.so | sed -e s/\.so// -e s/^lib//)
|
||||||
|
- AC_DEFINE([HAVE_LIBUSB], [], [will link with -l$usb; ])
|
||||||
|
- LIBUSB=-l${usb}
|
||||||
|
- INCUSB=-I/usr/include/lib${usb}
|
||||||
|
- ac_libusb=yes
|
||||||
|
- AC_MSG_RESULT([found.])
|
||||||
|
-else
|
||||||
|
- ac_libusb=yes
|
||||||
|
- AC_MSG_RESULT([not found.])
|
||||||
|
-fi
|
||||||
|
-AC_SUBST(LIBUSB)
|
||||||
|
-AC_SUBST(INCUSB)
|
||||||
|
+ac_libusb=yes
|
||||||
|
+AC_MSG_RESULT([OpenWRT: Crosscompile])
|
||||||
|
|
||||||
|
AH_VERBATIM([_GNU_SOURCE],
|
||||||
|
[/* Some libc's don't have strlcat/strlcpy. Local copies are provided */
|
||||||
|
Index: gpsd-2.94/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- gpsd-2.94.orig/Makefile.am 2010-04-20 11:37:21.000000000 +0200
|
||||||
|
+++ gpsd-2.94/Makefile.am 2011-01-27 15:22:28.557999857 +0100
|
||||||
|
@@ -245,9 +245,9 @@
|
||||||
|
# Warning: This overrides autoconf's normal link-line generation process
|
||||||
|
if LIBGPSMM_ENABLE
|
||||||
|
libgps_la_SOURCES += libgpsmm.cpp
|
||||||
|
-libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link g++ $(libgps_la_LDFLAGS) -o $@
|
||||||
|
+libgps_la_LINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(libgps_la_LDFLAGS) -o $@
|
||||||
|
else
|
||||||
|
-libgps_la_LINK = /bin/sh ./libtool --tag=CC --mode=link gcc $(libgps_la_LDFLAGS) -o $@
|
||||||
|
+libgps_la_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC) $(libgps_la_LDFLAGS) -o $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
nodist_libgpsd_la_SOURCES = packet_names.h ais_json.i
|
Loading…
x
Reference in New Issue
Block a user