Index: devel/librest/Makefile
===================================================================
--- devel/librest/Makefile	(revision 378789)
+++ devel/librest/Makefile	(working copy)
@@ -29,6 +29,10 @@
 GNOME_CONFIGURE_OFF=	--without-gnome
 GNOME_LIB_DEPENDS_OFF=	libsoup-2.4.so:${PORTSDIR}/devel/libsoup
 
+.if defined(WITH_DEBUG)
+CONFIGURE_ARGS+=	--enable-debug
+.endif
+
 post-install:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	${INSTALL_DATA} ${WRKSRC}/examples/*.c ${STAGEDIR}${EXAMPLESDIR}
@@ -35,4 +39,8 @@
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/librest-0.7.so.0
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/librest-extras-0.7.so.0
 
+regression-test:
+	(cd ${WRKSRC}/tests &&	\
+		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} check)
+
 .include <bsd.port.mk>