aboutsummaryrefslogtreecommitdiff
path: root/net/py-libnet/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'net/py-libnet/Makefile')
-rw-r--r--net/py-libnet/Makefile19
1 files changed, 10 insertions, 9 deletions
diff --git a/net/py-libnet/Makefile b/net/py-libnet/Makefile
index 217171940ac8..f296e22cf611 100644
--- a/net/py-libnet/Makefile
+++ b/net/py-libnet/Makefile
@@ -21,24 +21,25 @@ COMMENT= Python module for the libnet packet construction library
BUILD_DEPENDS= ${LOCALBASE}/bin/swig1.1:${PORTSDIR}/devel/swig11 \
${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
-BROKEN= Does not compile after python 2.4 update
-
-USE_REINPLACE= yes
USE_PYTHON= yes
-USE_GMAKE= yes
WRKSRC= ${WRKDIR}/${DISTNAME}/src
+MAKE_ARGS= SWIG=${LOCALBASE}/bin/swig1.1 \
+ LIBNET_INCLUDES=-I${LOCALBASE}/include \
+ PYTHON_INCLUDES=-I${PYTHON_INCLUDEDIR} \
+ CFLAGS="${CFLAGS} `libnet-config --defines` -fPIC" \
+ LIBNET_LIB=${LOCALBASE}/lib/libnet.a \
+ CC=${CC}
+
+PLIST_FILES= lib/%%PYTHON_VERSION%%/site-packages/libnet.py \
+ lib/%%PYTHON_VERSION%%/site-packages/libnetcmodule.so
+
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"
BROKEN= "Does not compile on amd64 (tries to link non-PIC libnet.a into PIC shared library)"
.endif
-post-patch:
- @${REINPLACE_CMD} -e "s,^CC,#CC,g ; \
- s,%%PYTHON_INCLUDEDIR%%,${PYTHON_INCLUDEDIR},g ; \
- s,%%LOCALBASE%%,${LOCALBASE},g" ${WRKSRC}/Makefile
-
do-install:
.for file in libnet.py libnetcmodule.so
${INSTALL_DATA} ${WRKSRC}/${file} ${PYTHON_SITELIBDIR}