freebsd-ports/net/py-libdnet/Makefile
Muhammad Moinur Rahman d6072e7333 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
2019-04-05 22:33:16 +00:00

37 lines
851 B
Makefile

# Created by: thierry@pompo.net
# $FreeBSD$
CATEGORIES= net python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
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
LIBDNET_SLAVE= yes
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"