Index: Mk/Scripts/check-vulnerable.sh =================================================================== --- Mk/Scripts/check-vulnerable.sh +++ Mk/Scripts/check-vulnerable.sh @@ -20,16 +20,17 @@ exit 0 fi -if [ -x "${dp_PKG_BIN}" ]; then - vlist=$(${dp_PKG_BIN} audit "${dp_PKGNAME}" || :) - if [ "${vlist}" = "0 problem(s) in the installed packages found." ]; then - vlist="" - else - ${dp_ECHO_MSG} "===> ${dp_PKGNAME} has known vulnerabilities:" - ${dp_ECHO_MSG} "$vlist" - ${dp_ECHO_MSG} "=> Please update your ports tree and try again." - ${dp_ECHO_MSG} "=> Note: Vulnerable ports are marked as such even if there is no update available." - ${dp_ECHO_MSG} "=> If you wish to ignore this vulnerability rebuild with 'make DISABLE_VULNERABILITIES=yes'" - exit 1 - fi +if [ ! -x "${dp_PKG_BIN}" ]; then + exit 0 +fi + +vlist=$(${dp_PKG_BIN} audit "${dp_PKGNAME}" || :) + +if [ "${vlist}" != "0 problem(s) in the installed packages found." ]; then + ${dp_ECHO_MSG} "===> ${dp_PKGNAME} has known vulnerabilities:" + ${dp_ECHO_MSG} "$vlist" + ${dp_ECHO_MSG} "=> Please update your ports tree and try again." + ${dp_ECHO_MSG} "=> Note: Vulnerable ports are marked as such even if there is no update available." + ${dp_ECHO_MSG} "=> If you wish to ignore this vulnerability rebuild with 'make DISABLE_VULNERABILITIES=yes'" + exit 1 fi Index: Mk/Scripts/checksum.sh =================================================================== --- Mk/Scripts/checksum.sh +++ Mk/Scripts/checksum.sh @@ -39,24 +39,26 @@ ignore="true" fi - if [ $ignore = "false" ]; then - match="false" - for chksum in $CKSUM; do - if [ "$chksum" = "$MKSUM" ]; then - match="true" - break - fi - done - if [ $match = "true" ]; then - ${dp_ECHO_MSG} "=> $alg Checksum OK for $file." - ignored="false" - else - ${dp_ECHO_MSG} "=> $alg Checksum mismatch for $file." - refetchlist="$refetchlist $file " - OK="${OK:-retry}" - [ "${OK}" = "retry" -a "${dp_FETCH_REGET}" -gt 0 ] && rm -f "${file}" - ignored="false" + if [ $ignore != "false" ]; then + continue + fi + + match="false" + for chksum in $CKSUM; do + if [ "$chksum" = "$MKSUM" ]; then + match="true" + break fi + done + if [ $match = "true" ]; then + ${dp_ECHO_MSG} "=> $alg Checksum OK for $file." + ignored="false" + else + ${dp_ECHO_MSG} "=> $alg Checksum mismatch for $file." + refetchlist="$refetchlist $file " + OK="${OK:-retry}" + [ "${OK}" = "retry" -a "${dp_FETCH_REGET}" -gt 0 ] && rm -f "${file}" + ignored="false" fi done Index: Mk/Scripts/create-manifest.sh =================================================================== --- /dev/null +++ Mk/Scripts/create-manifest.sh @@ -0,0 +1,137 @@ +#!/bin/sh +# $FreeBSD$ +# +# MAINTAINER: portmgr@FreeBSD.org + +set -e + +. "${dp_SCRIPTSDIR}/functions.sh" + +#validate_env + +[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CREATE_MANIFEST}" ] && set -x + +set -u + +listcontains() { + local str lst elt + str=$1 + lst=$2 + + for elt in ${lst} ; do + if [ ${elt} = ${str} ]; then + return 0 + fi + done + return 1 +} + +mkdir -p ${dp_METADIR} + +# Save stdout and redirect it to the manifest file. +exec 3>&1 >${dp_MANIFESTF} + +# First, all the required bits +cat <> ${output} + done + done +done + +# *** STARTING NOW, STDOUT is +DISPLAY *** + +exec >${dp_METADIR}/+DISPLAY + +[ -f ${dp_PKGMESSAGE} ] && cat ${dp_PKGMESSAGE} + +# Try and keep these messages in sync with check-deprecated +if [ ${dp_MAINTAINER} = "ports@FreeBSD.org" ]; then + if [ -f "${dp_METADIR}/+DISPLAY" ]; then echo; fi + cat <<-EOT + ===> NOTICE: + + The ${dp_PORTNAME} port currently does not have a maintainer. As a result, it is + more likely to have unresolved issues, not be up-to-date, or even be removed in + the future. To volunteer to maintain this port, please create an issue at: + + https://bugs.freebsd.org/bugzilla + + More information about port maintainership is available at: + + https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port + EOT +fi + +if [ -n "${dp_DEPRECATED}" ]; then + if [ -f "${dp_METADIR}/+DISPLAY" ]; then echo; fi + cat <<-EOT + ===> NOTICE: + + This port is deprecated; you may wish to reconsider installing it: + + ${dp_DEPRECATED}. + + EOT + + if [ -n "${dp_EXPIRATION_DATE}" ]; then + cat <<-EOT + It is scheduled to be removed on or after ${dp_EXPIRATION_DATE}. + + EOT + fi +fi Index: Mk/Scripts/do-fetch.sh =================================================================== --- Mk/Scripts/do-fetch.sh +++ Mk/Scripts/do-fetch.sh @@ -11,9 +11,7 @@ dp_DIST_SUBDIR dp_ECHO_MSG dp_FETCH_AFTER_ARGS dp_FETCH_BEFORE_ARGS \ dp_FETCH_CMD dp_FETCH_ENV dp_FORCE_FETCH_ALL dp_FORCE_FETCH_LIST \ dp_MASTER_SITE_BACKUP dp_MASTER_SITE_OVERRIDE dp_MASTER_SORT_AWK \ - dp_NO_CHECKSUM dp_RANDOMIZE_SITES dp_SITE_FLAVOR dp_SCRIPTSDIR \ - dp_SORTED_MASTER_SITES_DEFAULT_CMD dp_SORTED_PATCH_SITES_DEFAULT_CMD \ - dp_TARGET + dp_NO_CHECKSUM dp_RANDOMIZE_SITES dp_SITE_FLAVOR dp_TARGET [ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_FETCH}" ] && set -x @@ -24,11 +22,10 @@ for _file in "${@}"; do file=${_file%%:*} - unescaped_file=$(unescape "${file}") # If this files has groups if [ "$_file" = "$file" ]; then - select='' + select=DEFAULT else select=$(echo "${_file##*:}" | sed -e 's/,/ /g') fi @@ -45,24 +42,26 @@ fi done fi - if [ ! -f "${unescaped_file}" -a ! -f "$filebasename" -o "$force_fetch" = "true" ]; then - full_file="${dp_DIST_SUBDIR:+${dp_DIST_SUBDIR}/}${file}" - if [ -L "$file" -o -L "$filebasename" ]; then - ${dp_ECHO_MSG} "=> ${dp_DISTDIR}/$file is a broken symlink." - ${dp_ECHO_MSG} "=> Perhaps a filesystem (most likely a CD) isn't mounted?" - ${dp_ECHO_MSG} "=> Please correct this problem and try again." + if [ '(' -f "${file}" -o -f "$filebasename" ')' -a "$force_fetch" != "true" ]; then + continue + fi + full_file="${dp_DIST_SUBDIR:+${dp_DIST_SUBDIR}/}${file}" + if [ -L "$file" -o -L "$filebasename" ]; then + ${dp_ECHO_MSG} "=> ${dp_DISTDIR}/$file is a broken symlink." + ${dp_ECHO_MSG} "=> Perhaps a filesystem (most likely a CD) isn't mounted?" + ${dp_ECHO_MSG} "=> Please correct this problem and try again." + exit 1 + fi + if [ -f "${dp_DISTINFO_FILE}" -a -z "${dp_NO_CHECKSUM}" ]; then + _sha256sum=$(distinfo_data SHA256 "${full_file}") + if [ -z "$_sha256sum" ]; then + ${dp_ECHO_MSG} "=> ${dp_DIST_SUBDIR:+$dp_DIST_SUBDIR/}$file is not in ${dp_DISTINFO_FILE}." + ${dp_ECHO_MSG} "=> Either ${dp_DISTINFO_FILE} is out of date, or" + ${dp_ECHO_MSG} "=> ${dp_DIST_SUBDIR:+$dp_DIST_SUBDIR/}$file is spelled incorrectly." exit 1 fi - if [ -f "${dp_DISTINFO_FILE}" -a -z "${dp_NO_CHECKSUM}" ]; then - _sha256sum=$(distinfo_data SHA256 "${full_file}") - if [ -z "$_sha256sum" ]; then - ${dp_ECHO_MSG} "=> ${dp_DIST_SUBDIR:+$dp_DIST_SUBDIR/}$file is not in ${dp_DISTINFO_FILE}." - ${dp_ECHO_MSG} "=> Either ${dp_DISTINFO_FILE} is out of date, or" - ${dp_ECHO_MSG} "=> ${dp_DIST_SUBDIR:+$dp_DIST_SUBDIR/}$file is spelled incorrectly." - exit 1 - fi - fi - case ${dp_TARGET} in + fi + case ${dp_TARGET} in do-fetch|makesum) ${dp_ECHO_MSG} "=> $file doesn't seem to exist in ${dp_DISTDIR}." if [ ! -w "${dp_DISTDIR}" ]; then @@ -70,78 +69,70 @@ exit 1 fi ;; - esac - if [ -n "$select" ] ; then - __MASTER_SITES_TMP= - for group in $select; do - # Disable nounset for this, it may come up empty. - set +u - eval ___MASTER_SITES_TMP="\${_${dp_SITE_FLAVOR}_SITES_${group}}" - set -u - if [ -n "${___MASTER_SITES_TMP}" ] ; then - __MASTER_SITES_TMP="${__MASTER_SITES_TMP} ${___MASTER_SITES_TMP}" - else - case ${dp_TARGET} in - do-fetch|makesum) - if [ -n "${dp_DEVELOPER}" ]; then - ${dp_ECHO_MSG} "===> /!\\ Error /!\\" - else - ${dp_ECHO_MSG} "===> /!\\ Warning /!\\" - fi - ${dp_ECHO_MSG} " The :${group} group used for $file is missing" - ${dp_ECHO_MSG} " from ${dp_SITE_FLAVOR}_SITES. Check for typos, or errors." - if [ -n "${dp_DEVELOPER}" ]; then - exit 1 - fi - ;; - esac - - fi - done - ___MASTER_SITES_TMP= - SORTED_MASTER_SITES_CMD_TMP="echo ${dp_MASTER_SITE_OVERRIDE} $(echo -n "${__MASTER_SITES_TMP}" | awk "${dp_MASTER_SORT_AWK}") ${dp_MASTER_SITE_BACKUP}" + esac + __MASTER_SITES_TMP= + for group in $select; do + # Disable nounset for this, it may come up empty, but + # we don't want to fail with a strange error here. + set +u + eval ___MASTER_SITES_TMP="\${_${dp_SITE_FLAVOR}_SITES_${group}}" + set -u + if [ -n "${___MASTER_SITES_TMP}" ] ; then + __MASTER_SITES_TMP="${__MASTER_SITES_TMP} ${___MASTER_SITES_TMP}" else - if [ ${dp_SITE_FLAVOR} = "MASTER" ]; then - SORTED_MASTER_SITES_CMD_TMP="${dp_SORTED_MASTER_SITES_DEFAULT_CMD}" - else - SORTED_MASTER_SITES_CMD_TMP="${dp_SORTED_PATCH_SITES_DEFAULT_CMD}" - fi - # Having this set when the next eval runs creates double entries. - unset _${dp_SITE_FLAVOR}_SITES_DEFAULT + case ${dp_TARGET} in + do-fetch|makesum) + if [ -n "${dp_DEVELOPER}" ]; then + ${dp_ECHO_MSG} "===> /!\\ Error /!\\" + else + ${dp_ECHO_MSG} "===> /!\\ Warning /!\\" + fi + ${dp_ECHO_MSG} " The :${group} group used for $file is missing" + ${dp_ECHO_MSG} " from ${dp_SITE_FLAVOR}_SITES. Check for typos, or errors." + if [ -n "${dp_DEVELOPER}" ]; then + exit 1 + fi + ;; + esac + fi - case ${dp_TARGET} in - fetch-list) - echo -n "mkdir -p ${dp_DISTDIR} && " - echo -n "cd ${dp_DISTDIR} && { " + done + ___MASTER_SITES_TMP= + SORTED_MASTER_SITES_CMD_TMP="echo ${dp_MASTER_SITE_OVERRIDE} $(echo -n "${__MASTER_SITES_TMP}" | awk "${dp_MASTER_SORT_AWK}") ${dp_MASTER_SITE_BACKUP}" + case ${dp_TARGET} in + fetch-list) + echo -n "mkdir -p ${dp_DISTDIR} && " + echo -n "cd ${dp_DISTDIR} && { " + ;; + esac + sites_remaining=0 + sites="$(eval "${SORTED_MASTER_SITES_CMD_TMP} ${dp_RANDOMIZE_SITES}")" + for site in ${sites}; do + sites_remaining=$((sites_remaining + 1)) + done + for site in ${sites}; do + sites_remaining=$((sites_remaining - 1)) + CKSIZE=$(distinfo_data SIZE "${full_file}") + # There is a lot of escaping, but the " needs to survive echo/eval. + case ${file} in + */*) + mkdir -p "${file%/*}" + args="-o ${file} ${site}${file}" + ;; + *) + args="${site}${file}" ;; esac - sites_remaining=0 - sites="$(eval "${SORTED_MASTER_SITES_CMD_TMP} ${dp_RANDOMIZE_SITES}")" - for site in ${sites}; do - sites_remaining=$((sites_remaining + 1)) - done - for site in ${sites}; do - sites_remaining=$((sites_remaining - 1)) - CKSIZE=$(distinfo_data SIZE "${full_file}") - # The site may contain special shell characters, they - # need to be escaped. - site=$(escape "${site}") - # There is a lot of escaping, but the " needs to survive echo/eval. - case ${file} in - */*) - mkdir -p "${file%/*}" - args="-o \\\"${file}\\\" \\\"${site}${file}\\\"" - ;; - *) - args="\\\"${site}${file}\\\"" - ;; - esac - _fetch_cmd=$(eval "echo ${dp_FETCH_ENV} ${dp_FETCH_CMD} ${dp_FETCH_BEFORE_ARGS} ${args} ${dp_FETCH_AFTER_ARGS}") - case ${dp_TARGET} in + _fetch_cmd="${dp_FETCH_ENV} ${dp_FETCH_CMD} ${dp_FETCH_BEFORE_ARGS}" + if [ -z "${dp_DISABLE_SIZE}" -a -n "${CKSIZE}" ]; then + _fetch_cmd="${_fetch_cmd} -S ${CKSIZE}" + fi + _fetch_cmd="${_fetch_cmd} ${args} ${dp_FETCH_AFTER_ARGS}" + case ${dp_TARGET} in do-fetch|makesum) ${dp_ECHO_MSG} "=> Attempting to fetch ${site}${file}" - if eval "env ${_fetch_cmd}"; then - actual_size=$(eval stat -f %z "${file}") + if env ${_fetch_cmd}; then + actual_size=$(eval stat -f %z "$(escape ${file})") if [ -n "${dp_DISABLE_SIZE}" ] || [ -z "${CKSIZE}" ] || [ "${actual_size}" -eq "${CKSIZE}" ]; then continue 2 else @@ -154,23 +145,22 @@ fi ;; fetch-list) - echo -n "env ${_fetch_cmd} || " + echo -n "env $(escape "${_fetch_cmd}") || " ;; fetch-url-list-int) - eval "echo $(eval "echo ${args}")" + echo ${args} ;; - esac - done - case ${dp_TARGET} in + esac + done + case ${dp_TARGET} in do-fetch|makesum) ${dp_ECHO_MSG} "=> Couldn't fetch it - please try to retrieve this" ${dp_ECHO_MSG} "=> port manually into ${dp_DISTDIR} and try again." exit 1 ;; fetch-list) - echo "echo ${file} not fetched; }" ; \ + echo "echo \"${file}\" not fetched; }" ;; - esac - fi + esac done Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -2057,9 +2057,6 @@ FETCH_BINARY?= /usr/bin/fetch FETCH_ARGS?= -Fpr FETCH_REGET?= 1 -.if !defined(DISABLE_SIZE) -FETCH_BEFORE_ARGS+= $${CKSIZE:+-S $$CKSIZE} -.endif FETCH_CMD?= ${FETCH_BINARY} ${FETCH_ARGS} .if defined(RANDOMIZE_MASTER_SITES) @@ -2468,88 +2465,32 @@ .endfor MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; } -SORTED_MASTER_SITES_DEFAULT_CMD= cd ${.CURDIR} && ${MAKE} master-sites-DEFAULT -SORTED_PATCH_SITES_DEFAULT_CMD= cd ${.CURDIR} && ${MAKE} patch-sites-DEFAULT -SORTED_MASTER_SITES_ALL_CMD= cd ${.CURDIR} && ${MAKE} master-sites-ALL -SORTED_PATCH_SITES_ALL_CMD= cd ${.CURDIR} && ${MAKE} patch-sites-ALL - -# has similar effect to old targets, i.e., access only {MASTER,PATCH}_SITES, not working with the new _n variables -master-sites-DEFAULT: - @${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_MASTER_SITES_DEFAULT}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP} -patch-sites-DEFAULT: - @${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_PATCH_SITES_DEFAULT}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP} - -# -# Sort the master site list according to the patterns in MASTER_SORT -# according to grouping rules (:something) -# -# for use in the fetch targets -.for _S in ${MASTER_SITES} -_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/^://:S/,/ /g} -. if !target(master-sites-${_group}) -SORTED_MASTER_SITES_${_group}_CMD= cd ${.CURDIR} && ${MAKE} master-sites-${_group} -master-sites-${_group}: - @${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_MASTER_SITES_${_group}}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP} -. endif -. endfor -. endif -.endfor -.for _S in ${PATCH_SITES} -_S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/^://:S/,/ /g} -. if !target(patch-sites-${_group}) -SORTED_PATCH_SITES_${_group}_CMD= cd ${.CURDIR} && ${MAKE} patch-sites-${_group} -patch-sites-${_group}: - @${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_PATCH_SITES_${_group}}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP} -. endif -. endfor -. endif -.endfor - # # Hackery to enable simple fetch targets with several dynamic MASTER_SITES # -_MASTER_SITES_ENV= _MASTER_SITES_DEFAULT="${_MASTER_SITES_DEFAULT}" +_MASTER_SITES_ENV= _MASTER_SITES_DEFAULT="${_MASTER_SITES_DEFAULT:Q}" .for _F in ${DISTFILES} _F_TEMP= ${_F:S/^${_F:C/:[^:]+$//}//:S/^://} . if !empty(_F_TEMP) . for _group in ${_F_TEMP:S/,/ /g} . if defined(_MASTER_SITES_${_group}) -_MASTER_SITES_ENV+= _MASTER_SITES_${_group}="${_MASTER_SITES_${_group}}" +_MASTER_SITES_ENV+= _MASTER_SITES_${_group}="${_MASTER_SITES_${_group}:Q}" . endif . endfor . endif .endfor -_PATCH_SITES_ENV= _PATCH_SITES_DEFAULT="${_PATCH_SITES_DEFAULT}" +_PATCH_SITES_ENV= _PATCH_SITES_DEFAULT="${_PATCH_SITES_DEFAULT:Q}" .for _F in ${PATCHFILES} _F_TEMP= ${_F:S/^${_F:C/:[^-:][^:]*$//}//:S/^://} . if !empty(_F_TEMP) . for _group in ${_F_TEMP:S/,/ /g} . if defined(_PATCH_SITES_${_group}) -_PATCH_SITES_ENV+= _PATCH_SITES_${_group}="${_PATCH_SITES_${_group}}" +_PATCH_SITES_ENV+= _PATCH_SITES_${_group}="${_PATCH_SITES_${_group}:Q}" . endif . endfor . endif .endfor -master-sites-ALL: - @${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_MASTER_SITES_ALL}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP} -patch-sites-ALL: - @${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_PATCH_SITES_ALL}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP} - -# synonyms, mnemonics -master-sites-all: master-sites-ALL -patch-sites-all: patch-sites-ALL -master-sites-default: master-sites-DEFAULT -patch-sites-default: patch-sites-DEFAULT - -# compatibility with old behavior -master-sites: master-sites-DEFAULT -patch-sites: patch-sites-DEFAULT - CKSUMFILES= ${ALLFILES} # List of all files, with ${DIST_SUBDIR} in front. Used for checksum. @@ -3085,7 +3026,7 @@ dp_FETCH_AFTER_ARGS='${FETCH_AFTER_ARGS}' \ dp_FETCH_BEFORE_ARGS='${FETCH_BEFORE_ARGS}' \ dp_FETCH_CMD='${FETCH_CMD}' \ - dp_FETCH_ENV=${FETCH_ENV:Q:Q} \ + dp_FETCH_ENV=${FETCH_ENV:Q} \ dp_FORCE_FETCH_ALL='${FORCE_FETCH_ALL}' \ dp_FORCE_FETCH_LIST='${FORCE_FETCH_LIST}' \ dp_MASTER_SITE_BACKUP='${_MASTER_SITE_BACKUP}' \ @@ -3094,8 +3035,6 @@ dp_NO_CHECKSUM='${NO_CHECKSUM}' \ dp_RANDOMIZE_SITES='${_RANDOMIZE_SITES}' \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ - dp_SORTED_MASTER_SITES_DEFAULT_CMD='${SORTED_MASTER_SITES_DEFAULT_CMD}' \ - dp_SORTED_PATCH_SITES_DEFAULT_CMD='${SORTED_PATCH_SITES_DEFAULT_CMD}' \ dp_TARGET='${.TARGET}' .if defined(DEVELOPER) _DO_FETCH_ENV+= dp_DEVELOPER=yes @@ -3850,7 +3789,7 @@ .if !target(distclean) distclean: pre-distclean clean - @cd ${.CURDIR} && ${MAKE} delete-distfiles RESTRICTED_FILES="${_DISTFILES} ${_PATCHFILES}" + @cd ${.CURDIR} && ${MAKE} delete-distfiles RESTRICTED_FILES="${_DISTFILES:Q} ${_PATCHFILES:Q}" .endif .if !target(delete-distfiles) @@ -4272,99 +4211,50 @@ done ; \ ${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS:C/(.*)\:.*/"\1"/} -create-manifest: - @${MKDIR} ${METADIR}; \ - (\ - echo "name: \"${PKGBASE}\"" ; \ - echo "version: \"${PKGVERSION}\"" ; \ - echo "origin: ${PKGORIGIN}" ; \ - echo "comment: < ${MANIFESTF} - @${ECHO_CMD} -n "options: {" >> ${MANIFESTF} -.for opt in ${COMPLETE_OPTIONS_LIST} - @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}: $${match:-off}," >> ${MANIFESTF} -.endfor - @${ECHO_CMD} "}" >> ${MANIFESTF} -.if defined(PKG_NOTES) - @${ECHO_CMD} -n "annotations: {" >> ${MANIFESTF} +PKG_NOTES_ENV?= .for note in ${PKG_NOTES} - @${ECHO_CMD} -n ' ${note}: "${PKG_NOTE_${note}:S/"/\"/g}",' >> ${MANIFESTF} +PKG_NOTES_ENV+= dp_PKG_NOTE_${note}=${PKG_NOTE_${note}:Q} .endfor - @${ECHO_CMD} " }" >> ${MANIFESTF} -.endif - @[ -f ${PKGINSTALL} ] && ${CP} ${PKGINSTALL} ${METADIR}/+INSTALL; \ - ${RM} -f ${METADIR}/+PRE_INSTALL ; \ - for a in ${PKGPREINSTALL}; do \ - [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+PRE_INSTALL ; \ - done ; \ - ${RM} -f ${METADIR}/+POST_INSTALL ; \ - for a in ${PKGPOSTINSTALL}; do \ - [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+POST_INSTALL ; \ - done ; \ - [ -f ${PKGDEINSTALL} ] && ${CP} ${PKGDEINSTALL} ${METADIR}/+DEINSTALL; \ - ${RM} -f ${METADIR}/+PRE_DEINSTALL ; \ - for a in ${PKGPREDEINSTALL}; do \ - [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+PRE_DEINSTALL ; \ - done ; \ - ${RM} -f ${METADIR}/+POST_DEINSTALL ; \ - for a in ${PKGPOSTDEINSTALL}; do \ - [ -f $$a ] && ${CAT} $$a >> ${METADIR}/+POST_DEINSTALL ; \ - done ; \ - [ -f ${PKGUPGRADE} ] && ${CP} ${PKGUPGRADE} ${METADIR}/+UPGRADE; \ - [ -f ${PKGPREUPGRADE} ] && ${CP} ${PKGPREUPGRADE} ${METADIR}/+PRE_UPGRADE; \ - [ -f ${PKGPOSTUPGRADE} ] && ${CP} ${PKGPOSTUPGRADE} ${METADIR}/+POST_UPGRADE; \ - ${CP} ${DESCR} ${METADIR}/+DESC; \ - [ -f ${PKGMESSAGE} ] && ${CP} ${PKGMESSAGE} ${METADIR}/+DISPLAY || return 0 -# Try and keep these messages in sync with check-deprecated -.if ${MAINTAINER} == "ports@FreeBSD.org" - @( \ - if [ -f "${METADIR}/+DISPLAY" ]; then ${ECHO_CMD}; fi; \ - ${ECHO_CMD} "===> NOTICE:"; \ - ${ECHO_CMD}; \ - ${ECHO_CMD} "The ${PORTNAME} port currently does not have a maintainer. As a result, it is"; \ - ${ECHO_CMD} "more likely to have unresolved issues, not be up-to-date, or even be removed in"; \ - ${ECHO_CMD} "the future. To volunteer to maintain this port, please create an issue at:"; \ - ${ECHO_CMD}; \ - ${ECHO_CMD} "https://bugs.freebsd.org/bugzilla"; \ - ${ECHO_CMD}; \ - ${ECHO_CMD} "More information about port maintainership is available at:"; \ - ${ECHO_CMD}; \ - ${ECHO_CMD} "https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port"; \ - ) >> ${METADIR}/+DISPLAY -.endif -.if defined(DEPRECATED) - @( \ - if [ -f "${METADIR}/+DISPLAY" ]; then ${ECHO_CMD}; fi; \ - ${ECHO_CMD} "===> NOTICE:"; \ - ${ECHO_CMD}; \ - ${ECHO_CMD} "This port is deprecated; you may wish to reconsider installing it:"; \ - ${ECHO_CMD}; \ - ${ECHO_CMD} ${DEPRECATED:Q}.; \ - ${ECHO_CMD}; \ - ) >> ${METADIR}/+DISPLAY -.if defined(EXPIRATION_DATE) - @( \ - ${ECHO_CMD} "It is scheduled to be removed on or after ${EXPIRATION_DATE}."; \ - ${ECHO_CMD}; \ - ) >> ${METADIR}/+DISPLAY -.endif -.endif + +create-manifest: + @${SETENV} \ + dp_SCRIPTSDIR='${SCRIPTSDIR}' \ + dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS}' \ + dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \ + dp_COMMENT=${COMMENT:Q} \ + dp_COMPLETE_OPTIONS_LIST='${COMPLETE_OPTIONS_LIST}' \ + dp_DEPRECATED='${DEPRECATED:Q}' \ + dp_DESCR='${DESCR}' \ + dp_EXPIRATION_DATE='${EXPIRATION_DATE}' \ + dp_GROUPS='${GROUPS:u:S/$/,/}' \ + dp_LICENSE='${LICENSE:u:S/$/,/}' \ + dp_LICENSE_COMB='${LICENSE_COMB}' \ + dp_MAINTAINER='${MAINTAINER}' \ + dp_MANIFESTF='${MANIFESTF}' \ + dp_METADIR='${METADIR}' \ + dp_NO_ARCH='${NO_ARCH}' \ + dp_PKGBASE='${PKGBASE}' \ + dp_PKGDEINSTALL='${PKGDEINSTALL}' \ + dp_PKGINSTALL='${PKGINSTALL}' \ + dp_PKGMESSAGE='${PKGMESSAGE}' \ + dp_PKGORIGIN='${PKGORIGIN}' \ + dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL}' \ + dp_PKGPOSTINSTALL='${PKGPOSTINSTALL}' \ + dp_PKGPOSTUPGRADE='${PKGPOSTUPGRADE}' \ + dp_PKGPREDEINSTALL='${PKGPREDEINSTALL}' \ + dp_PKGPREINSTALL='${PKGPREINSTALL}' \ + dp_PKGPREUPGRADE='${PKGPREUPGRADE}' \ + dp_PKGUPGRADE='${PKGUPGRADE}' \ + dp_PKGVERSION='${PKGVERSION}' \ + dp_PKG_BIN='${PKG_BIN}' \ + dp_PKG_IGNORE_DEPENDS='${PKG_IGNORE_DEPENDS}' \ + dp_PKG_NOTES='${PKG_NOTES}' \ + dp_PORT_OPTIONS='${PORT_OPTIONS}' \ + dp_PREFIX='${PREFIX}' \ + dp_USERS='${USERS:u:S/$/,/}' \ + dp_WWW='${WWW}' \ + ${PKG_NOTES_ENV} \ + ${SH} ${SCRIPTSDIR}/create-manifest.sh # Print out package names. Index: games/narcissu2/Makefile =================================================================== --- games/narcissu2/Makefile +++ games/narcissu2/Makefile @@ -5,7 +5,7 @@ CATEGORIES= games MASTER_SITES= http://www.neechin.net/file_download/22/:game \ http://www.neechin.net/file_download/27/:script \ - https://aur.archlinux.org/cgit/aur.git/plain/${PORTNAME}-en.png?h=${PORTNAME}-en\&id=9768eea\&foo=/:icon + https://aur.archlinux.org/cgit/aur.git/plain/${PORTNAME}-en.png?h=${PORTNAME}-en&id=9768eea&foo=/:icon DISTFILES= [Denpa]_Narcissu_2_Eng_[unix].tar.bz2.link:game \ Narcissu_2_Eng_v${PORTVERSION}_script_[All_platforms].zip:script \ ${PORTNAME}-en.png:icon Index: graphics/waifu2x-converter-cpp/Makefile =================================================================== --- graphics/waifu2x-converter-cpp/Makefile +++ graphics/waifu2x-converter-cpp/Makefile @@ -4,7 +4,7 @@ DISTVERSION= 1.0.0-410 DISTVERSIONSUFFIX= -g5e5ac35 CATEGORIES= graphics -MASTER_SITES= https://aur.archlinux.org/cgit/aur.git/plain/${PORTNAME:C/-.*//}.1.gz?h=${PORTNAME:C/-.*//}-git\&id=5c150a5\&/:manpage +MASTER_SITES= https://aur.archlinux.org/cgit/aur.git/plain/${PORTNAME:C/-.*//}.1.gz?h=${PORTNAME:C/-.*//}-git&id=5c150a5&/:manpage DISTFILES= ${PORTNAME:C/-.*//}.1.gz:manpage EXTRACT_ONLY= ${DISTFILES:N*\:manpage:C/:.*//} Index: sysutils/geomWatch/Makefile =================================================================== --- sysutils/geomWatch/Makefile +++ sysutils/geomWatch/Makefile @@ -9,7 +9,7 @@ http://bk.macroblock.net/${PORTNAME}/ \ http://svnweb.freebsd.org/base/head/sys/cddl/compat/opensolaris/sys/:nvpair DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ - nvpair.h\?revision=279437\&view=co:nvpair + nvpair.h?revision=279437&view=co:nvpair EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= spawk@acm.poly.edu Index: textproc/kmfl-sil-ezra/Makefile =================================================================== --- textproc/kmfl-sil-ezra/Makefile +++ textproc/kmfl-sil-ezra/Makefile @@ -5,8 +5,8 @@ PORTVERSION= 2.4 PORTREVISION= 5 CATEGORIES= textproc -MASTER_SITES= http://scripts.sil.org/cms/scripts/render_download.php\?site_id=nrsi\&format=file\&media_id=EzraSIL251_Src.zip\&filename=/:1 \ - http://scripts.sil.org/cms/scripts/render_download.php\?site_id=nrsi\&format=file\&media_id=EzraSIL2.5Keying\&filename=/:2 \ +MASTER_SITES= http://scripts.sil.org/cms/scripts/render_download.php?site_id=nrsi&format=file&media_id=EzraSIL251_Src.zip&filename=/:1 \ + http://scripts.sil.org/cms/scripts/render_download.php?site_id=nrsi&format=file&media_id=EzraSIL2.5Keying&filename=/:2 \ http://anthesphoria.net/FreeBSD/ports/distfiles/${DIST_SUBDIR}/:1,2 DISTFILES= EzraSIL251_Src.zip:1 \ Keying+in+Hebrew.pdf:2 Index: textproc/kmfl-sil-ipa-unicode/Makefile =================================================================== --- textproc/kmfl-sil-ipa-unicode/Makefile +++ textproc/kmfl-sil-ipa-unicode/Makefile @@ -5,8 +5,8 @@ PORTVERSION= 1.2 PORTREVISION= 4 CATEGORIES= textproc -MASTER_SITES= http://scripts.sil.org/cms/scripts/render_download.php\?site_id=nrsi\&format=file\&media_id=IPAUni_12_Src\&filename=/:1 \ - http://scripts.sil.org/cms/scripts/render_download.php\?site_id=nrsi\&format=file\&media_id=IPAUni_12.pdf\&filename=/:2 +MASTER_SITES= http://scripts.sil.org/cms/scripts/render_download.php?site_id=nrsi&format=file&media_id=IPAUni_12_Src&filename=/:1 \ + http://scripts.sil.org/cms/scripts/render_download.php?site_id=nrsi&format=file&media_id=IPAUni_12.pdf&filename=/:2 DISTFILES= IPAUni_Src12.zip:1 \ IPA+Unicode+5.1_ver+1.2_KMN.pdf:2 DIST_SUBDIR= kmfl Index: textproc/kmfl-sil-panafrican-latin/Makefile =================================================================== --- textproc/kmfl-sil-panafrican-latin/Makefile +++ textproc/kmfl-sil-panafrican-latin/Makefile @@ -5,8 +5,8 @@ PORTVERSION= 20090831 PORTREVISION= 4 CATEGORIES= textproc -MASTER_SITES= http://scripts.sil.org/cms/scripts/render_download.php\?site_id=nrsi\&format=file\&media_id=AfricaKeyboardDead2009\&filename=/:1 \ - http://scripts.sil.org/cms/scripts/render_download.php\?site_id=nrsi\&format=file\&media_id=AfricaKeyboardUS2009\&filename=/:2 \ +MASTER_SITES= http://scripts.sil.org/cms/scripts/render_download.php?site_id=nrsi&format=file&media_id=AfricaKeyboardDead2009&filename=/:1 \ + http://scripts.sil.org/cms/scripts/render_download.php?site_id=nrsi&format=file&media_id=AfricaKeyboardUS2009&filename=/:2 \ http://anthesphoria.net/FreeBSD/ports/distfiles/${DIST_SUBDIR}/:1,2 DISTFILES= AfricaKeyboardDead.zip:1 AfricaKeyboardUS.zip:2 DIST_SUBDIR= kmfl Index: www/xpi-splash/Makefile =================================================================== --- www/xpi-splash/Makefile +++ www/xpi-splash/Makefile @@ -9,7 +9,7 @@ MAINTAINER= ports@FreeBSD.org COMMENT= Splash screen for most Mozilla and Mozilla Based products -XPI_DISTNAME= splash\! +XPI_DISTNAME= splash! XPI_ID= splash@aldreneo.com XPI_NUM= 2995 XPI_FILES= chrome/splash.jar components/.autoreg components/splash.js \