Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Banky <martin.banky@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/9] pptp-linux: convert to gentargets and bump to 1.7.2
Date: Fri,  8 Oct 2010 01:43:01 -0700	[thread overview]
Message-ID: <1286527389-29983-2-git-send-email-Martin.Banky@gmail.com> (raw)
In-Reply-To: <1286527389-29983-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 .../pptp-linux-1.7.0-001-susv3-legacy.patch        |   24 ------
 ...tp-linux-1.7.2-000-remove-stropts-include.patch |   15 ++++
 .../pptp-linux-1.7.2-001-susv3-legacy.patch        |   24 ++++++
 package/pptp-linux/pptp-linux.mk                   |   86 +++++--------------
 4 files changed, 62 insertions(+), 87 deletions(-)
 delete mode 100644 package/pptp-linux/pptp-linux-1.7.0-001-susv3-legacy.patch
 create mode 100644 package/pptp-linux/pptp-linux-1.7.2-000-remove-stropts-include.patch
 create mode 100644 package/pptp-linux/pptp-linux-1.7.2-001-susv3-legacy.patch

diff --git a/package/pptp-linux/pptp-linux-1.7.0-001-susv3-legacy.patch b/package/pptp-linux/pptp-linux-1.7.0-001-susv3-legacy.patch
deleted file mode 100644
index f41b63f..0000000
--- a/package/pptp-linux/pptp-linux-1.7.0-001-susv3-legacy.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -rdup pptp-linux-1.7.0/pptp_callmgr.c pptp-linux-1.7.0.orig/pptp_callmgr.c
---- pptp-linux-1.7.0/pptp_callmgr.c	2005-07-28 03:15:11.000000000 +0200
-+++ pptp-linux-1.7.0.orig/pptp_callmgr.c	2007-08-24 09:20:39.000000000 +0200
-@@ -314,7 +314,7 @@ int open_inetsock(struct in_addr inetadd
-         return s;
-     }
-     if (localbind.s_addr != INADDR_NONE) {
--        bzero(&src, sizeof(src));
-+        memset(&src, 0, sizeof(src));
-         src.sin_family = AF_INET;
-         src.sin_addr   = localbind;
-         if (bind(s, (struct sockaddr *) &src, sizeof(src)) != 0) {
-diff -rdup pptp-linux-1.7.0/pptp_gre.c pptp-linux-1.7.0.orig/pptp_gre.c
---- pptp-linux-1.7.0/pptp_gre.c	2005-07-28 03:15:11.000000000 +0200
-+++ pptp-linux-1.7.0.orig/pptp_gre.c	2007-08-24 09:20:56.000000000 +0200
-@@ -81,7 +81,7 @@ int pptp_gre_bind(struct in_addr inetadd
-     int s = socket(AF_INET, SOCK_RAW, PPTP_PROTO);
-     if (s < 0) { warn("socket: %s", strerror(errno)); return -1; }
-     if (localbind.s_addr != INADDR_NONE) {
--        bzero(&loc_addr, sizeof(loc_addr));
-+        memset(&loc_addr, 0, sizeof(loc_addr));
-         loc_addr.sin_family = AF_INET;
-         loc_addr.sin_addr   = localbind;
-         if (bind(s, (struct sockaddr *) &loc_addr, sizeof(loc_addr)) != 0) {
diff --git a/package/pptp-linux/pptp-linux-1.7.2-000-remove-stropts-include.patch b/package/pptp-linux/pptp-linux-1.7.2-000-remove-stropts-include.patch
new file mode 100644
index 0000000..ec38fbe
--- /dev/null
+++ b/package/pptp-linux/pptp-linux-1.7.2-000-remove-stropts-include.patch
@@ -0,0 +1,15 @@
+Removed erronous inclusion of stropts.h. 
+
+uClibc does not provide support for streaming, and the inclusion of stropts.h
+is not needed anyway.
+
+--- a/pptp_compat.c	2008-05-13 23:33:55.000000000 -0700
++++ b/pptp_compat.c	2010-10-06 12:11:39.000000000 -0700
+@@ -7,7 +7,6 @@
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <stropts.h>
+ #include <stdlib.h>
+ #include <strings.h>
+ #include "pptp_compat.h"
diff --git a/package/pptp-linux/pptp-linux-1.7.2-001-susv3-legacy.patch b/package/pptp-linux/pptp-linux-1.7.2-001-susv3-legacy.patch
new file mode 100644
index 0000000..f41b63f
--- /dev/null
+++ b/package/pptp-linux/pptp-linux-1.7.2-001-susv3-legacy.patch
@@ -0,0 +1,24 @@
+diff -rdup pptp-linux-1.7.0/pptp_callmgr.c pptp-linux-1.7.0.orig/pptp_callmgr.c
+--- pptp-linux-1.7.0/pptp_callmgr.c	2005-07-28 03:15:11.000000000 +0200
++++ pptp-linux-1.7.0.orig/pptp_callmgr.c	2007-08-24 09:20:39.000000000 +0200
+@@ -314,7 +314,7 @@ int open_inetsock(struct in_addr inetadd
+         return s;
+     }
+     if (localbind.s_addr != INADDR_NONE) {
+-        bzero(&src, sizeof(src));
++        memset(&src, 0, sizeof(src));
+         src.sin_family = AF_INET;
+         src.sin_addr   = localbind;
+         if (bind(s, (struct sockaddr *) &src, sizeof(src)) != 0) {
+diff -rdup pptp-linux-1.7.0/pptp_gre.c pptp-linux-1.7.0.orig/pptp_gre.c
+--- pptp-linux-1.7.0/pptp_gre.c	2005-07-28 03:15:11.000000000 +0200
++++ pptp-linux-1.7.0.orig/pptp_gre.c	2007-08-24 09:20:56.000000000 +0200
+@@ -81,7 +81,7 @@ int pptp_gre_bind(struct in_addr inetadd
+     int s = socket(AF_INET, SOCK_RAW, PPTP_PROTO);
+     if (s < 0) { warn("socket: %s", strerror(errno)); return -1; }
+     if (localbind.s_addr != INADDR_NONE) {
+-        bzero(&loc_addr, sizeof(loc_addr));
++        memset(&loc_addr, 0, sizeof(loc_addr));
+         loc_addr.sin_family = AF_INET;
+         loc_addr.sin_addr   = localbind;
+         if (bind(s, (struct sockaddr *) &loc_addr, sizeof(loc_addr)) != 0) {
diff --git a/package/pptp-linux/pptp-linux.mk b/package/pptp-linux/pptp-linux.mk
index 8de0832..fd7d118 100644
--- a/package/pptp-linux/pptp-linux.mk
+++ b/package/pptp-linux/pptp-linux.mk
@@ -3,76 +3,36 @@
 # pptp-linux
 #
 #############################################################
-PPTP_LINUX_VERSION:=1.7.0
-PPTP_LINUX_SOURCE:=pptp-linux_$(PPTP_LINUX_VERSION).orig.tar.gz
-#PPTP_LINUX_PATCH:=pptp-linux_$(PPTP_LINUX_VERSION)-2.diff.gz
-PPTP_LINUX_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/p/pptp-linux
-PPTP_LINUX_DIR:=$(BUILD_DIR)/pptp-linux-$(PPTP_LINUX_VERSION).orig
-PPTP_LINUX_CAT:=$(ZCAT)
-PPTP_LINUX_BINARY:=pptp
-PPTP_LINUX_TARGET_BINARY:=usr/sbin/pptp
+PPTP_LINUX_VERSION = 1.7.2
+PPTP_LINUX_SOURCE = pptp-linux_$(PPTP_LINUX_VERSION).orig.tar.gz
+#PPTP_LINUX_PATCH = pptp-linux_$(PPTP_LINUX_VERSION)-6.diff.gz
+PPTP_LINUX_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/p/pptp-linux
 
-$(DL_DIR)/$(PPTP_LINUX_SOURCE):
-	$(call DOWNLOAD,$(PPTP_LINUX_SITE),$(PPTP_LINUX_SOURCE))
-
-ifneq ($(PPTP_LINUX_PATCH),)
-PPTP_LINUX_PATCH_FILE:=$(DL_DIR)/$(PPTP_LINUX_PATCH)
-$(PPTP_LINUX_PATCH_FILE):
-	$(call DOWNLOAD,$(PPTP_LINUX_SITE),$(PPTP_LINUX_PATCH))
-endif
-
-$(PPTP_LINUX_DIR)/.unpacked: $(DL_DIR)/$(PPTP_LINUX_SOURCE) $(PPTP_LINUX_PATCH_FILE)
-	$(PPTP_LINUX_CAT) $(DL_DIR)/$(PPTP_LINUX_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 ifneq ($(PPTP_LINUX_PATCH),)
-	(cd $(PPTP_LINUX_DIR) && $(PPTP_LINUX_CAT) $(DL_DIR)/$(PPTP_LINUX_PATCH) | patch -p1)
-	if [ -d $(PPTP_LINUX_DIR)/debian/patches ]; then \
-		toolchain/patch-kernel.sh $(PPTP_LINUX_DIR) $(PPTP_LINUX_DIR)/debian/patches \*.patch; \
+define PPTP_LINUX_DEBIAN_PATCHES
+	if [ -d $(@D)/debian/patches ]; then \
+		toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.diff; \
 	fi
+endef
 endif
-	toolchain/patch-kernel.sh $(PPTP_LINUX_DIR) package/pptp-linux/ pptp-linux\*.patch
-	touch $@
-
-$(PPTP_LINUX_DIR)/.configured: $(PPTP_LINUX_DIR)/.unpacked
-	(cd $(PPTP_LINUX_DIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		$(DISABLE_LARGEFILE) \
-	)
-	touch $@
 
-$(PPTP_LINUX_DIR)/$(PPTP_LINUX_BINARY): $(PPTP_LINUX_DIR)/.unpacked
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) OPTIMIZE="$(TARGET_CFLAGS)" \
-		-C $(PPTP_LINUX_DIR)
+PPTP_LINUX_POST_PATCH_HOOKS = PPTP_LINUX_DEBIAN_PATCHES
 
-$(TARGET_DIR)/$(PPTP_LINUX_TARGET_BINARY): $(PPTP_LINUX_DIR)/$(PPTP_LINUX_BINARY)
-	cp -dpf $(PPTP_LINUX_DIR)/$(PPTP_LINUX_BINARY) $@
-ifeq ($(BR2_HAVE_DOCUMENTATION),y)
-	mkdir -p $(TARGET_DIR)/usr/share/man/man8
-	$(INSTALL) -m 644 $(PPTP_LINUX_DIR)/pptp.8 $(TARGET_DIR)/usr/share/man/man8/pptp.8
-endif
-	$(STRIPCMD) $(STRIP_STRIP_ALL) $@
+define PPTP_LINUX_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) OPTIMIZE="$(TARGET_CFLAGS)" -C $(@D)
+endef
 
-pptp-linux: $(TARGET_DIR)/$(PPTP_LINUX_TARGET_BINARY)
+define PPTP_LINUX_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 $(@D)/pptp $(TARGET_DIR)/usr/sbin/pptp
+	$(INSTALL) -D -m 644 $(@D)/pptp.8 $(TARGET_DIR)/usr/share/man/man8/pptp.8
+endef
 
-pptp-linux-source: $(DL_DIR)/$(PPTP_LINUX_SOURCE) $(PPTP_LINUX_PATCH_FILE)
+define PPTP_LINUX_UNINSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
+endef
 
-pptp-linux-clean:
-	-$(MAKE) -C $(PPTP_LINUX_DIR) distclean
-	rm -f $(TARGET_DIR)/$(PPTP_LINUX_TARGET_BINARY) \
-		$(TARGET_DIR)/usr/share/man/man8/pptp.8*
+define PPTP_LINUX_CLEAN_CMDS
+	$(MAKE) -C $(@D) clean
+endef
 
-pptp-linux-dirclean:
-	rm -rf $(PPTP_LINUX_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_PPTP_LINUX),y)
-TARGETS+=pptp-linux
-endif
+$(eval $(call GENTARGETS,package,pptp-linux))
-- 
1.7.3.1

  reply	other threads:[~2010-10-08  8:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08  8:43 [Buildroot] [PATCH 1/9] portmap: convert to gentargets and bump to 6.0.0 Martin Banky
2010-10-08  8:43 ` Martin Banky [this message]
2010-12-11 13:49   ` [Buildroot] [PATCH 2/9] pptp-linux: convert to gentargets and bump to 1.7.2 Thomas Petazzoni
2010-10-08  8:43 ` [Buildroot] [PATCH 3/9] proftpd: convert to autotargets and bump to 1.3.3b Martin Banky
2010-11-05 12:56   ` Peter Korsgaard
2010-10-08  8:43 ` [Buildroot] [PATCH 4/9] sed: convert to autotargets Martin Banky
2010-11-05 13:00   ` Peter Korsgaard
2010-10-08  8:43 ` [Buildroot] [PATCH 5/9] sfdisk: convert to autotargets and change to util-linux-ng v2.18 version Martin Banky
2010-11-05 13:23   ` Peter Korsgaard
2010-10-08  8:43 ` [Buildroot] [PATCH 6/9] slang: convert to gentargets Martin Banky
2010-11-05 13:34   ` Peter Korsgaard
2010-10-08  8:43 ` [Buildroot] [PATCH 7/9] sysklogd: convert to gentargets and bump to 1.5 Martin Banky
2010-11-05 13:38   ` Peter Korsgaard
2010-12-11 15:23   ` Thomas Petazzoni
2010-10-08  8:43 ` [Buildroot] [PATCH 8/9] sysvint: convert to gentargets and bump to 2.88 Martin Banky
2010-11-05 13:59   ` Peter Korsgaard
2010-12-11 15:24   ` Thomas Petazzoni
2010-10-08  8:43 ` [Buildroot] [PATCH 9/9] thttpd: convert to autotargets Martin Banky
2010-11-05 13:58   ` Peter Korsgaard
2010-10-08  8:43 ` Martin Banky
2010-12-11 13:47 ` [Buildroot] [PATCH 1/9] portmap: convert to gentargets and bump to 6.0.0 Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286527389-29983-2-git-send-email-Martin.Banky@gmail.com \
    --to=martin.banky@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox