Date: Wed, 24 Dec 2008 00:55:36 +0300 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/129881: [patch] net/openospfd: update to 4.3 and fix some bugs Message-ID: <hp/KgLec1dp0MNHSxZwy/KNpYko@z/q0HsTVafmebyDVkAapHDApxq0> In-Reply-To: <200812231240.mBNCe1ST085294@freefall.freebsd.org> References: <20081223123535.663791AF425@void.codelabs.ru> <200812231240.mBNCe1ST085294@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I have another patch that just cleans up some things: * FreeBSD now has <sys/hash.h>, 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 <rea-fbsd@codelabs.ru> 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 <rea-fbsd@codelabs.ru> --- 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 <bsd.port.pre.mk> + +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|<net/if_media.h>|\"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 <bsd.port.mk> +.include <bsd.port.post.mk> --=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 {_.-``-' {_/ #
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?hp/KgLec1dp0MNHSxZwy/KNpYko>