From: nico Date: Fri, 27 Oct 2006 16:51:10 +0000 (+0000) Subject: rename pptpd patches, add a patch to use target optimization flags, tidy up Makefile X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=1256219045214a49be6d2a8360487940cedf0246;p=packages.git rename pptpd patches, add a patch to use target optimization flags, tidy up Makefile git-svn-id: svn://svn.openwrt.org/openwrt/packages@5313 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/net/pptpd/Makefile b/net/pptpd/Makefile index 497202406..148a2be4f 100644 --- a/net/pptpd/Makefile +++ b/net/pptpd/Makefile @@ -4,7 +4,7 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -# $Id:$ +# $Id$ include $(TOPDIR)/rules.mk @@ -17,7 +17,6 @@ PKG_SOURCE_URL:=@SF/poptop PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat - PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install @@ -28,37 +27,33 @@ define Package/pptpd CATEGORY:=Network DEPENDS:=+kmod-ppp +kmod-gre TITLE:=PopTop pptp server - DESCRIPTION:=PopTop pptp server endef - define Build/Configure -$(call Build/Configure/Default, --with-bcrelay) + $(call Build/Configure/Default, --with-bcrelay) endef define Build/Compile - $(call Build/Compile/Default, \ - CFLAGS="$(TARGET_CFLAGS) -DSBINDIR=\\\"/usr/sbin\\\"" \ + $(call Build/Compile/Default, \ + COPTS="\$$$$(EXTRA_CFLAGS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ INSTALL="install" \ all install \ - ) + ) endef define Package/pptpd/install + install -d -m0755 $(1)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpd $(1)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpctrl $(1)/usr/sbin/ + install -d -m0755 $(1)/usr/lib/pptpd + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pptpd/* $(1)/usr/lib/pptpd install -d -m0755 $(1)/etc install -m0644 ./files/pptpd.conf $(1)/etc/ install -d -m0755 $(1)/etc/init.d install -m0755 ./files/pptpd.init $(1)/etc/init.d/pptpd install -d -m0755 $(1)/etc/ppp install -m0644 ./files/options.pptpd $(1)/etc/ppp/ - install -d -m0755 $(1)/usr/sbin - install -d -m0755 $(1)/usr/lib/pptpd - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpd $(1)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpctrl $(1)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pptpd/* $(1)/usr/lib/pptpd - $(STRIP) $1/usr/sbin/* - $(STRIP) $1/usr/lib/pptpd/* endef $(eval $(call BuildPackage,pptpd)) diff --git a/net/pptpd/patches/01-bad_pqueue_debug.patch b/net/pptpd/patches/01-bad_pqueue_debug.patch new file mode 100644 index 000000000..87e76648a --- /dev/null +++ b/net/pptpd/patches/01-bad_pqueue_debug.patch @@ -0,0 +1,20 @@ +diff -urN pptpd-1.3.0/pqueue.c.orig pptpd-1.3.0/pqueue.c +--- pptpd-1.3.0/pqueue.c.orig 2006-04-17 20:44:28.000000000 -0400 ++++ pptpd-1.3.0/pqueue.c 2006-04-17 20:44:58.000000000 -0400 +@@ -6,14 +6,11 @@ + #include "pqueue.h" + + #ifdef DEBUG_PQUEUE +-#define DEBUG_ON 1 ++#define DEBUG_CMD(_a) { _a } + #else +-#define DEBUG_ON 0 ++#define DEBUG_CMD(_a) + #endif + +-#define DEBUG_CMD(_a) if (DEBUG_ON) { _a } +- +- + #define MIN_CAPACITY 128 /* min allocated buffer for a packet */ + + static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new); diff --git a/net/pptpd/patches/02-pptpgre_use_debug_option.patch b/net/pptpd/patches/02-pptpgre_use_debug_option.patch new file mode 100644 index 000000000..d4ffe5c2e --- /dev/null +++ b/net/pptpd/patches/02-pptpgre_use_debug_option.patch @@ -0,0 +1,35 @@ +diff -Nur pptpd-1.3.0/pptpgre.c.orig pptpd-1.3.0/pptpgre.c +--- pptpd-1.3.0/pptpgre.c.orig 2006-04-18 02:13:10.000000000 -0400 ++++ pptpd-1.3.0/pptpgre.c 2006-04-18 02:14:19.000000000 -0400 +@@ -46,6 +46,9 @@ + + #define PACKET_MAX 8196 + ++/* Command Line Variable Args */ ++extern int pptpctrl_debug; ++ + typedef int (*callback_t)(int cl, void *pack, unsigned int len); + + /* test for a 32 bit counter overflow */ +@@ -319,7 +322,9 @@ + stats.rx_lost += head->seq - gre.seq_recv - 1; + syslog(LOG_DEBUG, "GRE: timeout waiting for %d packets", head->seq - gre.seq_recv - 1); + } +- syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq); ++ if (pptpctrl_debug) { ++ syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq); ++ } + gre.seq_recv = head->seq; + status = callback(cl, head->packet, head->packlen); + pqueue_del(head); +@@ -399,7 +404,9 @@ + } + /* check for out-of-order sequence number */ + if (seq_greater(seq, gre.seq_recv)) { +- syslog(LOG_DEBUG, "GRE: accepting packet #%d", seq); ++ if (pptpctrl_debug) { ++ syslog(LOG_DEBUG, "GRE: accepting packet #%d", seq); ++ } + stats.rx_accepted++; + gre.seq_recv = seq; + return cb(cl, buffer + ip_len + headersize, payload_len); diff --git a/net/pptpd/patches/03-opt_flags.patch b/net/pptpd/patches/03-opt_flags.patch new file mode 100644 index 000000000..213fb0374 --- /dev/null +++ b/net/pptpd/patches/03-opt_flags.patch @@ -0,0 +1,12 @@ +diff -ruN pptpd-1.3.0-old/Makefile.in pptpd-1.3.0-new/Makefile.in +--- pptpd-1.3.0-old/Makefile.in 2005-08-03 09:47:42.000000000 +0200 ++++ pptpd-1.3.0-new/Makefile.in 2006-10-27 18:22:00.000000000 +0200 +@@ -106,7 +106,7 @@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' ++CFLAGS = $(COPTS) -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ diff --git a/net/pptpd/patches/bad-pqueue-debug.patch b/net/pptpd/patches/bad-pqueue-debug.patch deleted file mode 100644 index 87e76648a..000000000 --- a/net/pptpd/patches/bad-pqueue-debug.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -urN pptpd-1.3.0/pqueue.c.orig pptpd-1.3.0/pqueue.c ---- pptpd-1.3.0/pqueue.c.orig 2006-04-17 20:44:28.000000000 -0400 -+++ pptpd-1.3.0/pqueue.c 2006-04-17 20:44:58.000000000 -0400 -@@ -6,14 +6,11 @@ - #include "pqueue.h" - - #ifdef DEBUG_PQUEUE --#define DEBUG_ON 1 -+#define DEBUG_CMD(_a) { _a } - #else --#define DEBUG_ON 0 -+#define DEBUG_CMD(_a) - #endif - --#define DEBUG_CMD(_a) if (DEBUG_ON) { _a } -- -- - #define MIN_CAPACITY 128 /* min allocated buffer for a packet */ - - static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new); diff --git a/net/pptpd/patches/pptpgre-use-debug-option.patch b/net/pptpd/patches/pptpgre-use-debug-option.patch deleted file mode 100644 index d4ffe5c2e..000000000 --- a/net/pptpd/patches/pptpgre-use-debug-option.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -Nur pptpd-1.3.0/pptpgre.c.orig pptpd-1.3.0/pptpgre.c ---- pptpd-1.3.0/pptpgre.c.orig 2006-04-18 02:13:10.000000000 -0400 -+++ pptpd-1.3.0/pptpgre.c 2006-04-18 02:14:19.000000000 -0400 -@@ -46,6 +46,9 @@ - - #define PACKET_MAX 8196 - -+/* Command Line Variable Args */ -+extern int pptpctrl_debug; -+ - typedef int (*callback_t)(int cl, void *pack, unsigned int len); - - /* test for a 32 bit counter overflow */ -@@ -319,7 +322,9 @@ - stats.rx_lost += head->seq - gre.seq_recv - 1; - syslog(LOG_DEBUG, "GRE: timeout waiting for %d packets", head->seq - gre.seq_recv - 1); - } -- syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq); -+ if (pptpctrl_debug) { -+ syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq); -+ } - gre.seq_recv = head->seq; - status = callback(cl, head->packet, head->packlen); - pqueue_del(head); -@@ -399,7 +404,9 @@ - } - /* check for out-of-order sequence number */ - if (seq_greater(seq, gre.seq_recv)) { -- syslog(LOG_DEBUG, "GRE: accepting packet #%d", seq); -+ if (pptpctrl_debug) { -+ syslog(LOG_DEBUG, "GRE: accepting packet #%d", seq); -+ } - stats.rx_accepted++; - gre.seq_recv = seq; - return cb(cl, buffer + ip_len + headersize, payload_len);