aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysutils/apachetop/Makefile35
1 files changed, 29 insertions, 6 deletions
diff --git a/sysutils/apachetop/Makefile b/sysutils/apachetop/Makefile
index 35827c60ec36..4938086a4e42 100644
--- a/sysutils/apachetop/Makefile
+++ b/sysutils/apachetop/Makefile
@@ -21,10 +21,33 @@ USE_REINPLACE= yes
MAN1= apachetop.1
PLIST_FILES= sbin/apachetop
-post-configure:
- ${REINPLACE_CMD} \
- -e 's/--run autoconf$$/--run $${AUTOCONF}/' \
- -e 's/--run autoheader$$/--run $${AUTOHEADER}/' \
- ${WRKSRC}/Makefile
+OPTIONS= ADNS "Asynchronous-capable DNS support" off \
+ FAM "File Alteration Monitor support" off \
+ PCRE "Perl Compatible Regular Expressions support" off
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_ADNS)
+LIB_DEPENDS+= adns.1:${PORTSDIR}/dns/adns
+CONFIGURE_ARGS+=--with-adns=${LOCALBASE}
+.endif
+
+.if defined(WITH_FAM)
+LIB_DEPENDS+= fam.0:${PORTSDIR}/devel/fam
+CONFIGURE_ARGS+=--with-fam=${LOCALBASE}
+.endif
+
+.if defined(WITH_PCRE)
+LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
+CONFIGURE_ARGS+=--with-pcre=${LOCALBASE}
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -E -e 's,struct (circle_struct),\1,g' \
+ ${WRKSRC}/src/hits_circle.*
+ @${REINPLACE_CMD} -E -e 's,enum (adns_queryflags),\1,g' \
+ ${WRKSRC}/src/log.*
+ @${REINPLACE_CMD} -e 's,@AUTOCONF@,${AUTOCONF},' \
+ -e 's,@AUTOHEADER@,${AUTOHEADER},' ${WRKSRC}/Makefile.in
+
+.include <bsd.port.post.mk>