diff --git a/Mk/Scripts/create-manifest.sh b/Mk/Scripts/create-manifest.sh --- a/Mk/Scripts/create-manifest.sh +++ b/Mk/Scripts/create-manifest.sh @@ -52,7 +52,7 @@ EOT # Then, the optional bits -[ -z "${dp_WWW}" ] || echo "www: \"${dp_WWW}\"" +[ -z "${dp_WWW}" ] || echo "www: \"${dp_WWW%% *}\"" [ -z "${dp_LICENSE}" ] || echo "licenses: [ ${dp_LICENSE} ]" [ -z "${dp_USERS}" ] || echo "users: [ ${dp_USERS} ]" [ -z "${dp_GROUPS}" ] || echo "groups: [ ${dp_GROUPS} ]" @@ -89,7 +89,9 @@ cp ${dp_DESCR} ${dp_METADIR}/+DESC if [ -n "${dp_WWW}" ] && ! grep -q '^WWW: ' ${dp_DESCR}; then echo >> ${dp_METADIR}/+DESC - echo "WWW: ${dp_WWW}" >> ${dp_METADIR}/+DESC + for www in ${dp_WWW}; do + echo "WWW: ${www}" >> ${dp_METADIR}/+DESC + done fi # Concatenate all the scripts diff --git a/Mk/Uses/pear.mk b/Mk/Uses/pear.mk --- a/Mk/Uses/pear.mk +++ b/Mk/Uses/pear.mk @@ -40,6 +40,8 @@ EXTRACT_SUFX?= .tgz DIST_SUBDIR?= PEAR +WWW?= https://pear.php.net/package/${PORTNAME}/ + . if empty(php_ARGS:Mphpize) NO_BUILD= yes . endif diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -532,6 +532,9 @@ # Used for recording the installed files. _PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp +# Default documentation URL if not set in the port +WWW?= https://pypi.org/project/${PORTNAME}/ + # Ports bound to a certain python version SHOULD # - use the PYTHON_PKGNAMEPREFIX # - use directories using the PYTHON_PKGNAMEPREFIX diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -3567,6 +3567,8 @@ . endif . endif +_WWW= ${WWW:[1]} + . if !defined(DISABLE_SECURITY_CHECK) . if !target(security-check) security-check: ${TMPPLIST} @@ -4287,7 +4289,7 @@ dp_PORT_OPTIONS='${PORT_OPTIONS}' \ dp_PREFIX='${PREFIX}' \ dp_USERS='${USERS:u:S/$/,/}' \ - dp_WWW='${_WWW}' \ + dp_WWW='${WWW}' \ ${PKG_NOTES_ENV} \ ${SH} ${SCRIPTSDIR}/create-manifest.sh @@ -4351,7 +4353,6 @@ _LIB_DEPENDS=${LIB_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _BUILD_DEPENDS=${BUILD_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} _RUN_DEPENDS=${RUN_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} -_WWW=${WWW} . if exists(${DESCR}) _DESCR=${DESCR} . else diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk --- a/Mk/bsd.sites.mk +++ b/Mk/bsd.sites.mk @@ -449,6 +449,9 @@ . endif convert-to-gh-tuple: @${ECHO_MSG} ${GH_ACCOUNT}:${GH_PROJECT}:${GH_TAGNAME} ${_GH_TUPLE_OUT:S/\/$//} +. if !defined(WWW) +WWW= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/ +. endif . endif # defined(USE_GITHUB) .endif # !defined(IGNORE_MASTER_SITE_GITHUB) @@ -579,6 +582,9 @@ @${ECHO_MSG} "Cloned the ${_group} GitLab repository into ${_GITLAB_CLONE_DIR}/${GL_PROJECT_${_group}}" | ${FMT_80} . endfor . endif +. if !defined(WWW) +WWW= https://gitlab.com/${GL_ACCOUNT}/${GL_PROJECT}/ +. endif . endif # defined(USE_GITLAB) .endif # !defined(IGNORE_MASTER_SITE_GITLAB) @@ -862,6 +868,9 @@ . else MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY:S/%CPANSORT%/${_PERL_CPAN_SORT}/:S/%SUBDIRPLUS%\///} . endif +. if !defined(WWW) +WWW= https://search.cpan.org/dist/${PORTNAME}/ +. endif .endif