From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Dec 23 21:55:38 2008 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA3F01065670; Tue, 23 Dec 2008 21:55:38 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 78A7B8FC1A; Tue, 23 Dec 2008 21:55:38 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:Content-Transfer-Encoding:In-Reply-To:Sender; b=i6Vpo86jzeCyFxWoJDj6tVUI8Sh/WHj+k3U5CXCeK8W92ykcI9BwN7f6BjD2PE71ILheDS0HXziCn2emddUg3zFT5uS9WWyDohAXOgfTqCC/jZKvqsIt47TGB6RWatNfzEXwfd3cWOCb8gwZicWEJL7MKeKP+E34kiWEGNYUBrU=; Received: from phoenix.codelabs.ru (ppp85-141-161-218.pppoe.mtu-net.ru [85.141.161.218]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1LFFE0-00035z-V5; Wed, 24 Dec 2008 00:55:37 +0300 Date: Wed, 24 Dec 2008 00:55:36 +0300 From: Eygene Ryabinkin To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org Message-ID: References: <20081223123535.663791AF425@void.codelabs.ru> <200812231240.mBNCe1ST085294@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <200812231240.mBNCe1ST085294@freefall.freebsd.org> Sender: rea-fbsd@codelabs.ru Cc: Subject: Re: ports/129881: [patch] net/openospfd: update to 4.3 and fix some bugs X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 21:55:38 -0000 I have another patch that just cleans up some things: * FreeBSD now has , so it is better to use the native one; * __dead2 macro is here and does the same thing as __dead for OpenBSD; * kroute.c needs no substitutions -- we have them in the patch. These fixes are mostly cosmetic ones, but I feel that is right to include them to the port. --- update-to-4.3-pack4.diff begins here --- =46rom a4365e162d129f7111895ce75b50fe41e949752d Mon Sep 17 00:00:00 2001 =46rom: Eygene Ryabinkin Date: Wed, 24 Dec 2008 00:14:37 +0300 Subject: [PATCH 4/4] net/openospfd: clean up some FreeBSD-specific stuff - FreeBSD has __dead2 macro instead of __dead one, so there is no point in wiping '__dead' completely. __dead2 is here at least since RELENG_4, so we seem to be safe here. - FreeBSD has sys/hash.h since FreeBSD 6.x, so it will be better to use local version. Just now it coincides with one that was exported by flz@. - Remove sed construct for kroute.c -- we have a patch for this. Signed-off-by: Eygene Ryabinkin --- net/openospfd/Makefile | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/net/openospfd/Makefile b/net/openospfd/Makefile index 56b919d..695c095 100644 --- a/net/openospfd/Makefile +++ b/net/openospfd/Makefile @@ -12,7 +12,7 @@ MASTER_SITES=3D ${MASTER_SITE_OPENBSD:S/$/:openbsd/g} \ ${MASTER_SITE_LOCAL:S/$/:freebsd/g} MASTER_SITE_SUBDIR=3D flz/openospfd/:freebsd OpenBGPD/:openbsd DISTFILES=3D ${PORTNAME}-${PORTVERSION}.tgz:openbsd \ - if_media.h:freebsd hash.h:freebsd + if_media.h:freebsd DIST_SUBDIR=3D ${PORTNAME} EXTRACT_ONLY=3D ${PORTNAME}-${PORTVERSION}.tgz =20 @@ -23,6 +23,13 @@ LIB_DEPENDS=3D event-1.4:${PORTSDIR}/devel/libevent =20 CONFLICTS=3D zebra-0* quagga-0* =20 +.include + +HASH_H!=3D ${TEST} -f /usr/include/sys/hash.h > /dev/null 2>&1 && ${ECHO} = yes || ${TRUE} +.if ${HASH_H} !=3D yes +DISTFILES+=3D hash.h:freebsd +.endif + WRKSRC=3D ${WRKDIR} MANCOMPRESSED=3D yes USE_RC_SUBR=3D openospfd.sh @@ -43,19 +50,22 @@ SUBDIRS=3D ospfd \ =20 post-extract: @${CP} ${DISTDIR}/${DIST_SUBDIR}/if_media.h ${WRKSRC}/ospfctl/ +.if ${HASH_H} !=3D yes @${CP} ${DISTDIR}/${DIST_SUBDIR}/hash.h ${WRKSRC}/ospfd/ +.endif =20 post-patch: +.if ${HASH_H} !=3D yes @${REINPLACE_CMD} -e "s|sys/hash.h|hash.h|" ${WRKSRC}/ospfd/lsupdate.c +.endif @${REINPLACE_CMD} -e "s||\"if_media.h\"|" ${WRKSRC}/ospfc= tl/ospfctl.c - @${REINPLACE_CMD} -e "s|rtm_fmask|rtm_use|" ${WRKSRC}/ospfd/kroute.c @${REINPLACE_CMD} -e "/rc.conf.local/d" ${WRKSRC}/ospfd/ospfd.conf.5 @${REINPLACE_CMD} -e "s|SIMPLEQ|STAILQ|" ${WRKSRC}/ospfd/*.[chy] @${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|g" \ ${WRKSRC}/ospfd/ospfd.h \ ${WRKSRC}/ospfd/ospfd.8 \ ${WRKSRC}/ospfd/ospfd.conf.5 - @${REINPLACE_CMD} -e "s|__dead||" \ + @${REINPLACE_CMD} -e "s|__dead|__dead2|" \ ${WRKSRC}/ospfd/log.h \ ${WRKSRC}/ospfd/ospfd.c \ ${WRKSRC}/ospfctl/ospfctl.c @@ -73,4 +83,4 @@ do-install: post-install: @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL =20 -.include +.include --=20 1.6.0.5 --- update-to-4.3-pack4.diff ends here --- --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #