Index: Mk/Uses/curl.mk =================================================================== --- Mk/Uses/curl.mk +++ Mk/Uses/curl.mk @@ -0,0 +1,32 @@ +# $FreeBSD$ +# +# Handle dependency on curl +# +# Feature: curl +# Usage: USES=curl or USES=curl:ARGS +# Valid ARGS: lib (default, implicit), build, run, both +# +# MAINTAINER: portmgr@FreeBSD.org + +.if !defined(_INCLUDE_USES_CURL_MK) +_INCLUDE_USES_CURL_MK= yes +CURL_PORT=ftp/curl + +.if empty(curl_ARGS) +curl_ARGS= lib +.endif + +.if ${curl_ARGS} == lib +LIB_DEPENDS+= libcurl.so:${CURL_PORT} +.elif ${curl_ARGS} == build +BUILD_DEPENDS+= curl:${CURL_PORT} +.elif ${curl_ARGS} == run +RUN_DEPENDS+= curl:${CURL_PORT} +.elif ${curl_ARGS} == both +BUILD_DEPENDS+= curl:${CURL_PORT} +RUN_DEPENDS+= curl:${CURL_PORT} +.else +IGNORE= USES=curl - invalid args: [${curl_ARGS}] specified +.endif + +.endif Index: ports-mgmt/portlint/src/portlint.pl =================================================================== --- ports-mgmt/portlint/src/portlint.pl +++ ports-mgmt/portlint/src/portlint.pl @@ -1253,6 +1253,13 @@ "USES[+]=iconv."); } + # check USES=curl + if ($m{'dep'} =~ /^(curl\.\d+)$/) { + &perror("WARN", $file, -1, "dependency to $1 ". + "listed in $j. consider using ". + "USES[+]=curl."); + } + # check USES=gettext if ($m{'dep'} =~ /^(intl\.\d+)$/) { &perror("WARN", $file, -1, "dependency to $1 ".