Upgrade gpsd and reduce memory footprint
authorFlorian Fainelli <florian@openwrt.org>
Sun, 16 Dec 2007 13:12:11 +0000 (13:12 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 16 Dec 2007 13:12:11 +0000 (13:12 +0000)
Signed-off-by: Russell Senior <seniorr@aracnet.com>
SVN-Revision: 9774

net/gpsd/Makefile
net/gpsd/patches/100-reduce-size.patch [new file with mode: 0644]

index b99c2d7..82b43e1 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpsd
-PKG_VERSION:=2.29
+PKG_VERSION:=2.35
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
-PKG_MD5SUM:=3ff80db0e7d906457e5a7a1b04fcb4ec
+PKG_MD5SUM:=fdd16502f68b997858edd5a9f2fcf9dc
 
 PKG_BUILD_DEPENDS=libncurses libnotimpl
 
@@ -29,26 +29,42 @@ define Package/gpsd
 endef
 
 CONFIGURE_ARGS += \
-       --without-x \
+       --disable-python \
+       --disable-sirf \
+       --disable-tsip \
+       --disable-fv18 \
+       --disable-tripmate \
+       --disable-earthmate \
+       --disable-itrax \
+       --disable-navcom \
+       --disable-garmin \
+       --disable-ubx \
+       --disable-evermore \
+       --disable-rtcm104 \
+       --disable-ntrip \
+       --disable-ntpshm \
+       --disable-pps \
+       --disable-reconfigure \
+       --without-x 
 
 CONFIGURE_VARS += \
        CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClic++" \
        CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
        LIBS="-nodefaultlibs -luClibc++ -lnotimpl" \
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               CXXLINK="\$$$$(LINK)" \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
+define Build/Configure
+       (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
+               ./autogen.sh \
+       );
+       $(call Build/Configure/Default)
 endef
 
 define Build/InstallDev
        mkdir -p $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/gps{,d}.h $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/libgpsmm.h $(1)/usr/include/
+       $(CP) $(PKG_BUILD_DIR)/gps{,d}.h $(1)/usr/include/
+       $(CP) $(PKG_BUILD_DIR)/libgpsmm.h $(1)/usr/include/
        mkdir -p $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/.libs/libgps.{a,so*} $(1)/usr/lib/
 endef
 
 define Build/UninstallDev
@@ -59,9 +75,9 @@ endef
 
 define Package/gpsd/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/libgps.so.* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/gpsd $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,gpsd))
diff --git a/net/gpsd/patches/100-reduce-size.patch b/net/gpsd/patches/100-reduce-size.patch
new file mode 100644 (file)
index 0000000..15b0fa2
--- /dev/null
@@ -0,0 +1,27 @@
+diff -ru gpsd-2.35-orig/gpsd.c gpsd-2.35/gpsd.c
+--- gpsd-2.35-orig/gpsd.c      2007-10-14 20:05:38.000000000 -0700
++++ gpsd-2.35/gpsd.c   2007-10-15 00:08:36.000000000 -0700
+@@ -42,6 +42,7 @@
+ #include <locale.h>
+ #endif
++#undef DBUS_ENABLE
+ #ifdef DBUS_ENABLE
+ #include <gpsd_dbus.h>
+ #endif
+@@ -290,6 +291,7 @@
+  * This array fills from the bottom, so as an extreme case you could
+  * reduce LIMITED_MAX_DEVICES to 1.
+  */
++#define LIMITED_MAX_DEVICES 1
+ #ifdef LIMITED_MAX_DEVICES
+ #define MAXDEVICES    LIMITED_MAX_DEVICES
+ #else
+@@ -302,6 +304,7 @@
+  * file descriptors, so don't set this too low. 16 should probably be
+  * the minimum.
+  */
++#define LIMITED_MAX_CLIENTS 16
+ #ifdef LIMITED_MAX_CLIENTS
+ #define MAXSUBSCRIBERS LIMITED_MAX_CLIENTS
+ #else