From 2243afdc5e2d297a0f309a9f20bc20eb596dc40a Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 2 Oct 2008 17:01:16 +0000 Subject: nested function -> macro DESTDIR support --- net/mouse-pppoe/Makefile | 11 ++++++----- net/mouse-pppoe/distinfo | 4 ++-- net/mouse-pppoe/patches/patch-aa | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/net/mouse-pppoe/Makefile b/net/mouse-pppoe/Makefile index 7eb54786ead..7b2b4cb0b4d 100644 --- a/net/mouse-pppoe/Makefile +++ b/net/mouse-pppoe/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2005/11/07 21:39:28 tv Exp $ +# $NetBSD: Makefile,v 1.15 2008/10/02 17:01:16 joerg Exp $ DISTNAME= pppoe.20000912 PKGNAME= mouse-${DISTNAME:S/./-/} @@ -6,20 +6,21 @@ PKGREVISION= 1 CATEGORIES= net MASTER_SITES= ftp://ftp.NetBSD.org/pub/NetBSD/misc/mouse/pppoe/ +PKG_DESTDIR_SUPPORT= user-destdir + MAINTAINER= mouse@NetBSD.org COMMENT= derMouse's PPP over Ethernet program NOT_FOR_PLATFORM= Interix-*-* # no userland protocol stack support WRKSRC= ${WRKDIR} -INSTALLATION_DIRS= sbin +INSTALLATION_DIRS= sbin share/doc/mouse_pppoe do-build: (cd ${WRKSRC} ; ${CC} ${CFLAGS} -o pppoe pppoe.c) do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/pppoe ${PREFIX}/sbin/mouse-pppoe - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mouse_pppoe - ${INSTALL_DATA} ${WRKSRC}/pppoe.readme ${PREFIX}/share/doc/mouse_pppoe + ${INSTALL_PROGRAM} ${WRKSRC}/pppoe ${DESTDIR}${PREFIX}/sbin/mouse-pppoe + ${INSTALL_DATA} ${WRKSRC}/pppoe.readme ${DESTDIR}${PREFIX}/share/doc/mouse_pppoe .include "../../mk/bsd.pkg.mk" diff --git a/net/mouse-pppoe/distinfo b/net/mouse-pppoe/distinfo index 45c5a3c8405..d734ebf7dd6 100644 --- a/net/mouse-pppoe/distinfo +++ b/net/mouse-pppoe/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.4 2006/01/25 17:45:32 joerg Exp $ +$NetBSD: distinfo,v 1.5 2008/10/02 17:01:16 joerg Exp $ SHA1 (pppoe.20000912.tar.gz) = e077e02e42cad1266316cdfa87c31bde191e530e RMD160 (pppoe.20000912.tar.gz) = c0034484f2dbc54a3e1ea9648dfb37f6f25f0a2e Size (pppoe.20000912.tar.gz) = 9621 bytes -SHA1 (patch-aa) = 7478d6d155cdec4c9b6d11ccdde467a9fddff0c4 +SHA1 (patch-aa) = 89d7ca556a0572d8ee3034607021e2edb058b4d2 diff --git a/net/mouse-pppoe/patches/patch-aa b/net/mouse-pppoe/patches/patch-aa index ebf87195c63..34f04cf7905 100644 --- a/net/mouse-pppoe/patches/patch-aa +++ b/net/mouse-pppoe/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.3 2006/01/25 17:45:32 joerg Exp $ +$NetBSD: patch-aa,v 1.4 2008/10/02 17:01:16 joerg Exp $ ---- pppoe.c.orig 2000-04-21 03:58:32.000000000 +0000 +--- pppoe.c.orig 2000-04-21 05:58:32.000000000 +0200 +++ pppoe.c @@ -5,6 +5,7 @@ #include @@ -32,3 +32,32 @@ $NetBSD: patch-aa,v 1.3 2006/01/25 17:45:32 joerg Exp $ *ap++ = "nopcomp"; *ap++ = "nopersist"; *ap++ = "nopredictor1"; +@@ -701,17 +706,17 @@ static void send_frame_to_pppd(const voi + const unsigned char *dp; + unsigned short int fcs; + +- static void addchar(unsigned char ch) +- { switch (ch) +- { case PPP_FLAG: case PPP_ESC: case 0x00 ... 0x1f: case 0x7f ... 0x9f: +- *sp++ = PPP_ESC; +- *sp++ = ch ^ PPP_MOD; +- break; +- default: +- *sp++ = ch; +- break; +- } +- fcs = PPP_FCSCHAR(fcs,ch); ++#define addchar(ch) \ ++ { switch (ch) \ ++ { case PPP_FLAG: case PPP_ESC: case 0x00 ... 0x1f: case 0x7f ... 0x9f: \ ++ *sp++ = PPP_ESC; \ ++ *sp++ = ch ^ PPP_MOD; \ ++ break; \ ++ default: \ ++ *sp++ = ch; \ ++ break; \ ++ } \ ++ fcs = PPP_FCSCHAR(fcs,ch); \ + } + + sp = &stuffup[0]; -- cgit v1.2.3