diff -ruN --exclude=CVS /usr/ports/comms/gnokii/Makefile gnokii/Makefile --- /usr/ports/comms/gnokii/Makefile 2007-07-27 07:49:20.000000000 -0300 +++ gnokii/Makefile 2007-11-14 17:50:27.000000000 -0200 @@ -46,10 +46,22 @@ WITH_ICAL= yes .endif +.if exists(${LOCALBASE}/lib/libusb.so) +WITH_LIBUSB= yes +.endif + .if defined(WITH_ICAL) LIB_DEPENDS+= ical.0:${PORTSDIR}/devel/libical .endif +.if defined(WITH_LIBUSB) +LIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb + +CONFIGURE_ARGS+= --enable-libusb +.else +CONFIGURE_ARGS+= --disable-libusb +.endif + # If smsd is enabled check if MySQL or PostgreSQL are installed and # build the modules, no switches to make this port build those, if # you want them, just install them before this port. The port will @@ -133,6 +145,10 @@ .if defined(SMSD_WITH_GLIB1) @cd ${WRKSRC} && ${PATCH} -s <${PATCHDIR}/smsd-Makefile-WITH_GLIB.diff .endif +# fix test conditions on configure + @${REINPLACE_CMD} -E \ + -e 's|([[:space:]]+test[[:space:]]+.+)==([[:space:]]+"yes")|\1=\2|' \ + ${WRKSRC}/${CONFIGURE_SCRIPT} post-build: .if defined(WITH_SMSD)