diff -ruN unbound.orig/Makefile unbound/Makefile --- unbound.orig/Makefile 2014-12-09 21:11:47.000000000 +0400 +++ unbound/Makefile 2014-12-10 12:25:32.000000000 +0400 @@ -19,6 +19,9 @@ CONFIGURE_ARGS+=--with-ssl=${OPENSSLBASE} --with-libexpat=${LOCALBASE} USE_LDCONFIG= yes +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + USERS= ${PORTNAME} GROUPS= ${PORTNAME} @@ -47,9 +50,8 @@ .if ${PORT_OPTIONS:MPYTHON} USES+= python:2 -CONFIGURE_ARGS+=--with-pyunbound=yes --with-pythonmodule=yes LDFLAGS="-L${LOCALBASE}/lib" +CONFIGURE_ARGS+=--with-pyunbound=yes --with-pythonmodule=yes BUILD_DEPENDS+= swig:${PORTSDIR}/devel/swig13 -STRIP_FILES+= .libs/_unbound.so PYTHON= .else PYTHON= "@comment " @@ -81,10 +83,7 @@ .if ${PORT_OPTIONS:MLIBEVENT} LIB_DEPENDS+= libevent.so:${PORTSDIR}/devel/libevent2 -USES+= pkgconfig CONFIGURE_ARGS+=--with-libevent -CPPFLAGS+= $$(pkg-config libevent --cflags-only-I) -LDFLAGS+= $$(pkg-config libevent --libs-only-L) .else CONFIGURE_ARGS+=--with-libevent=no .endif @@ -104,10 +103,13 @@ @for s in ${STRIP_FILES}; do ${STRIP_CMD} ${WRKSRC}/$$s; done post-install: +.if ${PORT_OPTIONS:MPYTHON} + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_unbound.so +.endif .if ${PORT_OPTIONS:MMUNIN} @${MKDIR} ${STAGEDIR}${PREFIX}/share/munin/plugins @${MKDIR} ${STAGEDIR}${PREFIX}/etc/munin/plugins - @${INSTALL_SCRIPT} ${WRKDIR}/unbound-${PORTVERSION}/contrib/unbound_munin_\ + ${INSTALL_SCRIPT} ${WRKDIR}/unbound-${PORTVERSION}/contrib/unbound_munin_\ ${STAGEDIR}${PREFIX}/share/munin/plugins/ @for i in ${MUNIN_ALL}; do\ ${LN} -fs ${PREFIX}/share/munin/plugins/unbound_munin_\