Date: Fri, 12 May 2006 20:27:48 +0300 From: Vasil Dimov <vd@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: roam@FreeBSD.org Subject: ports/97183: Update port: net/libnids to 1.21 Message-ID: <20060512172748.GA79662@qlovarnika.bg.datamax> Resent-Message-ID: <200605121730.k4CHUPJW062348@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 97183 >Category: ports >Synopsis: Update port: net/libnids to 1.21 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri May 12 17:30:24 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Vasil Dimov >Release: FreeBSD 6.1-STABLE amd64 >Organization: N/A >Environment: >Description: * Update net/libnids from 1.20 to 1.21 * Get rid of libnet -devel or not -devel selection and fallback to net/libnet which is now stable * Make libnet and glib2 optional via OPTIONS * Fix innocent configure warning by defining CONFIGURE_TARGET * Add ${PTHREAD_LIBS} to LDFLAGS because glib is not recognised otherwise (undefined reference to pthread...) * Add support for building and installing shared library. Unfortunately this fails on amd64 because lib/libnet.a is not ready (PIC) to be included in shared libraries and libnet.so is not installed. See the comment in Makefile for the exact error message. >How-To-Repeat: >Fix: --- libnids_1.20-1.21.diff begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net/libnids/Makefile,v retrieving revision 1.16 diff -u -r1.16 Makefile --- Makefile 14 Nov 2005 17:07:03 -0000 1.16 +++ Makefile 12 May 2006 17:16:48 -0000 @@ -6,8 +6,7 @@ # PORTNAME= libnids -PORTVERSION= 1.20 -PORTREVISION= 1 +PORTVERSION= 1.21 CATEGORIES= net security MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -15,21 +14,62 @@ MAINTAINER= roam@FreeBSD.org COMMENT= Network monitoring library with TCP/IP reassembly -.if defined(WITH_LIBNET_DEVEL) -BUILD_DEPENDS= libnet*>=1.1.2,1:${PORTSDIR}/net/libnet +OPTIONS= LIBNET "Include code requiring libnet" On \ + GLIB2 "Use GLIB2 for multiprocessing support" On + +GNU_CONFIGURE= yes +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" + +MAKE_ENV= LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" + +.include <bsd.port.pre.mk> + +LIBNAMEORIG= ${PORTNAME}.so.${PORTVERSION} +LIBNAME= ${LIBNAMEORIG:R} + +# /usr/bin/ld: /usr/local/lib/libnet.a(libnet_build_ip.o): \ +# relocation R_X86_64_32 can not be used when making a shared object; \ +# recompile with -fPIC +.if ${ARCH} == "i386" +CONFIGURE_ARGS+= --enable-shared +INSTALLS_SHLIB= yes +PLIST_SUB= SHARED="" .else -BUILD_DEPENDS= libnet*<=1.1.0,1:${PORTSDIR}/net/libnet10 +PLIST_SUB= SHARED="@comment " .endif -GNU_CONFIGURE= yes -CONFIGURE_ENV+= CFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" +.if !defined(WITHOUT_LIBNET) +BUILD_DEPENDS+= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet +RUN_DEPENDS+= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet +.else +CONFIGURE_ARGS+= --disable-libnet +.endif -MAN3= libnids.3 +.if !defined(WITHOUT_GLIB2) +LIB_DEPENDS+= glib-2.0:${PORTSDIR}/devel/glib20 +.else +CONFIGURE_ARGS+= --disable-libglib +.endif + +MAN3= libnids.3 + +# linking without LDFLAGS - this should be reported upstream +post-patch: + ${REINPLACE_CMD} -e 's/$$(CC) -shared/$$(CC) -shared $$(LDFLAGS)/' \ + ${WRKSRC}/src/Makefile.in + ${REINPLACE_CMD} -e 's/${LIBNAMEORIG}/${LIBNAME}/' \ + ${WRKSRC}/src/Makefile.in do-install: - ${INSTALL_DATA} ${WRKSRC}/src/nids.h ${PREFIX}/include - ${INSTALL_DATA} ${WRKSRC}/src/libnids.a ${PREFIX}/lib - ${INSTALL_MAN} ${WRKSRC}/src/libnids.3 ${PREFIX}/man/man3 +.if defined(INSTALLS_SHLIB) + ${INSTALL_DATA} ${WRKSRC}/src/${LIBNAME} ${PREFIX}/lib + ${LN} -s ${PREFIX}/lib/${LIBNAME} ${PREFIX}/lib/${LIBNAME:R} +.endif + ${INSTALL_DATA} ${WRKSRC}/src/nids.h ${PREFIX}/include + ${INSTALL_DATA} ${WRKSRC}/src/libnids.a ${PREFIX}/lib + ${INSTALL_MAN} ${WRKSRC}/src/libnids.3 ${PREFIX}/man/man3 post-install: .if !defined(NOPORTDOCS) @@ -39,4 +79,4 @@ .endfor .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> Index: distinfo =================================================================== RCS file: /home/pcvs/ports/net/libnids/distinfo,v retrieving revision 1.11 diff -u -r1.11 distinfo --- distinfo 22 Jan 2006 21:23:12 -0000 1.11 +++ distinfo 12 May 2006 17:16:48 -0000 @@ -1,3 +1,3 @@ -MD5 (libnids-1.20.tar.gz) = a36cbd45cbada12420ecc8f82a7e0852 -SHA256 (libnids-1.20.tar.gz) = c5a7553f64bed2384ecc9535e67cf7d80ccf7f7f34ab8b132703b60d0eaec604 -SIZE (libnids-1.20.tar.gz) = 119226 +MD5 (libnids-1.21.tar.gz) = 8c43dd7d66350eed99a29be50bc5615f +SHA256 (libnids-1.21.tar.gz) = 91ec08b9aeb2f869009b5b099f318c476f75942db64804eb50acde94696f4bf5 +SIZE (libnids-1.21.tar.gz) = 140138 Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/net/libnids/pkg-plist,v retrieving revision 1.3 diff -u -r1.3 pkg-plist --- pkg-plist 29 Oct 2003 14:13:08 -0000 1.3 +++ pkg-plist 12 May 2006 17:16:48 -0000 @@ -1,5 +1,7 @@ include/nids.h lib/libnids.a +%%SHARED%%lib/libnids.so +%%SHARED%%lib/libnids.so.1 %%PORTDOCS%%%%DOCSDIR%%/API.html %%PORTDOCS%%%%DOCSDIR%%/API.txt %%PORTDOCS%%%%DOCSDIR%%/LINUX --- libnids_1.20-1.21.diff ends here --- -- Vasil Dimov gro.DSBeerF@dv Testing can show the presence of bugs, but not their absence. -- Edsger W. Dijkstra >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060512172748.GA79662>