#
-# Copyright (C) 2006-2008 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
-PKG_VERSION:=4.2.4p6
-PKG_RELEASE:=3
+PKG_VERSION:=4.2.4p7
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/
-PKG_MD5SUM:=1961c2c12b66b9046d5df37d0a41b181
+PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
+PKG_MD5SUM:=8c19ff62ed4f7d64f8e2aa59cb11f364
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=libelf
-diff -Naurp ntp-4.2.2p4.orig/ntpd/refclock_nmea.c ntp-4.2.2p4.mash/ntpd/refclock_nmea.c
---- ntp-4.2.2p4.orig/ntpd/refclock_nmea.c 2006-06-06 22:16:53.000000000 +0200
-+++ ntp-4.2.2p4.mash/ntpd/refclock_nmea.c 2006-12-13 16:22:26.000000000 +0100
-@@ -16,6 +16,7 @@
+--- a/ntpd/refclock_nmea.c
++++ b/ntpd/refclock_nmea.c
+@@ -11,6 +11,7 @@
#include <stdio.h>
#include <ctype.h>
#include "ntpd.h"
#include "ntp_io.h"
-@@ -72,6 +72,7 @@
+@@ -72,6 +73,7 @@ extern int async_write(int, const void *
#define RANGEGATE 500000 /* range gate (ns) */
#define LENNMEA 75 /* min timecode length */
/*
* Tables to compute the ddd of year form icky dd/mm timecode. Viva la
-@@ -92,6 +93,7 @@ struct nmeaunit {
+@@ -92,6 +94,7 @@ struct nmeaunit {
pps_params_t pps_params; /* pps parameters */
pps_info_t pps_info; /* last pps data */
pps_handle_t handle; /* pps handlebars */
#endif /* HAVE_PPSAPI */
};
-@@ -140,7 +142,12 @@ nmea_start(
+@@ -140,7 +143,12 @@ nmea_start(
register struct nmeaunit *up;
struct refclockproc *pp;
int fd;
/*
* Open serial port. Use CLK line discipline, if available.
-@@ -225,18 +232,42 @@ nmea_start(
+@@ -225,18 +233,42 @@ nmea_start(
memcpy((char *)&pp->refid, REFID, 4);
up->pollcnt = 2;
gps_send(pp->io.fd,"$PMOTG,RMC,0000*1D\r\n", peer);
return(nmea_ppsapi(peer, 0, 0));
#else
return (1);
-@@ -258,8 +289,10 @@ nmea_shutdown(
+@@ -258,8 +290,10 @@ nmea_shutdown(
pp = peer->procptr;
up = (struct nmeaunit *)pp->unitptr;
#ifdef HAVE_PPSAPI
#endif /* HAVE_PPSAPI */
io_closeclock(&pp->io);
free(up);
-@@ -367,7 +400,7 @@ nmea_pps(
+@@ -367,7 +401,7 @@ nmea_pps(
/*
* Convert the timespec nanoseconds field to ntp l_fp units.
*/