Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2019 22:33:16 +0000 (UTC)
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r497997 - head/net/py-libdnet
Message-ID:  <201904052233.x35MXGTG088080@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bofh
Date: Fri Apr  5 22:33:16 2019
New Revision: 497997
URL: https://svnweb.freebsd.org/changeset/ports/497997

Log:
  net/py-libdnet: Fix build with both python 2 and 3
  
  I have reviewed the code of net/libdnet. And created a fork as the
  evelopment seems stalled by the original author.
  - Removed all the codes not related to FreeBSD
  - Fix configure script to find related header files and now it builds
    relevant source files instead of *-none.c files
  - Modernized all build tools configuration file and removed unnecessary
    files
  - Works at least with PF. Still not working with ipfw2/ipfilter.
  - Python package now supports both Python 2 and 3
  
  The repo location is:
  https://github.com/5u623l20/libdnet/
  
  PR:		236643
  Submitted by:	bofh
  Approved by:	maintainer-timeout

Modified:
  head/net/py-libdnet/Makefile
  head/net/py-libdnet/pkg-descr

Modified: head/net/py-libdnet/Makefile
==============================================================================
--- head/net/py-libdnet/Makefile	Fri Apr  5 22:22:15 2019	(r497996)
+++ head/net/py-libdnet/Makefile	Fri Apr  5 22:33:16 2019	(r497997)
@@ -8,22 +8,30 @@ COMMENT=	Python module for libdnet
 
 LIB_DEPENDS=	libdnet.so:net/libdnet
 
+USES=		autoreconf libtool python
+
 MASTERDIR=	${.CURDIR}/../libdnet
 INSTALL_WRKSRC=	${WRKSRC}/python
 DESCR=		${.CURDIR}/pkg-descr
 PLIST=		${NONEXISTENT}
-PLIST_FILES=	%%PYTHON_SITELIBDIR%%/dnet.so \
-		%%PYTHON_SITELIBDIR%%/dnet-${PORTVERSION}-py${PYTHON_VER}.egg-info
+PLIST_FILES=	${PYTHON_SITELIBDIR}/dnet.so \
+		${PYTHON_SITELIBDIR}/dnet-${PORTVERSION}-py${PYTHON_VER}.egg-info
 
 LIBDNET_SLAVE=	yes
 
-USES=		python:2.7
-USE_PYTHON=	flavors
+USE_PYTHON=	cython flavors
 CONFIGURE_ARGS=	--with-python=${PYTHON_CMD}
 
 .if defined(MAINTAINER_MODE)
 regression-test: install
 	${PYTHON_CMD} ${INSTALL_WRKSRC}/test.py
 .endif
+
+post-patch:
+	${REINPLACE_CMD} 's|%%CYTHON%%|cython-${PYTHON_VER}|g' \
+		${WRKSRC}/python/Makefile.am
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/dnet.so
 
 .include "${MASTERDIR}/Makefile"

Modified: head/net/py-libdnet/pkg-descr
==============================================================================
--- head/net/py-libdnet/pkg-descr	Fri Apr  5 22:22:15 2019	(r497996)
+++ head/net/py-libdnet/pkg-descr	Fri Apr  5 22:33:16 2019	(r497997)
@@ -5,4 +5,4 @@ manipulation, network firewalling, network interface l
 manipulation, and raw IP packet and Ethernet frame transmission. It is
 intended to complement the functionality provided by pcap(3).
 
-WWW: https://code.google.com/p/libdnet/
+WWW: https://github.com/5u623l20/libdnet/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904052233.x35MXGTG088080>