svn commit: r417110 - in head: Mk Mk/Scripts games/narcissu2 graphics/waifu2x-converter-cpp shells/ksh93 sysutils/geomWatch textproc/kmfl-sil-ezra textproc/kmfl-sil-ipa-unicode textproc/kmfl-sil-pa...
Mathieu Arnold
mat at FreeBSD.org
Sun Jun 19 11:25:31 UTC 2016
Author: mat
Date: Sun Jun 19 11:25:29 2016
New Revision: 417110
URL: https://svnweb.freebsd.org/changeset/ports/417110
Log:
Remove unnecessary evals that do-fetch was using.
Turns out that env(1) knows how to parse a properly quoted string
using -S "string", it makes the double eval used for the fetch
command to be unnecessary.
This is because running:
eval "foo $(escape $bar)"
is silly when this works:
foo $bar
So remove escaping and quoting, and sillyness.
PR: 210198
Submitted by: mat
Exp-run by: antoine
Sponsored by: The FreeBSD Foundation, Absolight
Differential Revision: https://reviews.freebsd.org/D6779
Modified:
head/Mk/Scripts/checksum.sh (contents, props changed)
head/Mk/Scripts/do-fetch.sh (contents, props changed)
head/Mk/bsd.port.mk (contents, props changed)
head/games/narcissu2/Makefile (contents, props changed)
head/graphics/waifu2x-converter-cpp/Makefile (contents, props changed)
head/shells/ksh93/Makefile (contents, props changed)
head/sysutils/geomWatch/Makefile (contents, props changed)
head/textproc/kmfl-sil-ezra/Makefile (contents, props changed)
head/textproc/kmfl-sil-ipa-unicode/Makefile (contents, props changed)
head/textproc/kmfl-sil-panafrican-latin/Makefile (contents, props changed)
head/www/xpi-splash/Makefile (contents, props changed)
Modified: head/Mk/Scripts/checksum.sh
==============================================================================
--- head/Mk/Scripts/checksum.sh Sun Jun 19 11:24:39 2016 (r417109)
+++ head/Mk/Scripts/checksum.sh Sun Jun 19 11:25:29 2016 (r417110)
@@ -28,7 +28,7 @@ if [ -f "${dp_DISTINFO_FILE}" ]; then
eval "alg_executable=\$dp_${alg}"
if [ "$alg_executable" != "NO" ]; then
- MKSUM=$(eval $alg_executable \< "${file}")
+ MKSUM=$($alg_executable < "${file}")
CKSUM=$(distinfo_data "${alg}" "${file}")
else
ignore="true"
Modified: head/Mk/Scripts/do-fetch.sh
==============================================================================
--- head/Mk/Scripts/do-fetch.sh Sun Jun 19 11:24:39 2016 (r417109)
+++ head/Mk/Scripts/do-fetch.sh Sun Jun 19 11:25:29 2016 (r417110)
@@ -22,7 +22,6 @@ cd "${dp_DISTDIR}"
for _file in "${@}"; do
file=${_file%%:*}
- unescaped_file=$(unescape "${file}")
# If this files has groups
if [ "$_file" = "$file" ]; then
@@ -43,7 +42,7 @@ for _file in "${@}"; do
fi
done
fi
- if [ ! -f "${unescaped_file}" -a ! -f "$filebasename" -o "$force_fetch" = "true" ]; then
+ if [ ! -f "${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."
@@ -71,7 +70,8 @@ for _file in "${@}"; do
esac
__MASTER_SITES_TMP=
for group in $select; do
- # Disable nounset for this, it may come up empty.
+ # 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
@@ -104,32 +104,33 @@ for _file in "${@}"; do
;;
esac
sites_remaining=0
- sites="$(eval "${SORTED_MASTER_SITES_CMD_TMP} ${dp_RANDOMIZE_SITES}")"
+ sites="$(${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="-o ${file} ${site}${file}"
;;
*)
- args="\\\"${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}")
+ _fetch_cmd="${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 -S "${dp_FETCH_ENV}" ${_fetch_cmd}; then
+ actual_size=$(stat -f %z "${file}")
if [ -n "${dp_DISABLE_SIZE}" ] || [ -z "${CKSIZE}" ] || [ "${actual_size}" -eq "${CKSIZE}" ]; then
continue 2
else
@@ -142,10 +143,10 @@ for _file in "${@}"; do
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
@@ -156,7 +157,7 @@ for _file in "${@}"; do
exit 1
;;
fetch-list)
- echo "echo ${file} not fetched; }" ; \
+ echo "echo \"${file}\" not fetched; }" ; \
;;
esac
fi
Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk Sun Jun 19 11:24:39 2016 (r417109)
+++ head/Mk/bsd.port.mk Sun Jun 19 11:25:29 2016 (r417110)
@@ -2057,9 +2057,6 @@ FETCH_ENV?= SSL_NO_VERIFY_PEER=1 SSL_NO
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)
@@ -2471,24 +2468,24 @@ MASTER_SORT_AWK+= { rest = rest " " $$0;
#
# 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
@@ -3029,7 +3026,7 @@ _DO_FETCH_ENV= \
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}' \
@@ -3792,7 +3789,7 @@ pre-distclean:
.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)
Modified: head/games/narcissu2/Makefile
==============================================================================
--- head/games/narcissu2/Makefile Sun Jun 19 11:24:39 2016 (r417109)
+++ head/games/narcissu2/Makefile Sun Jun 19 11:25:29 2016 (r417110)
@@ -5,7 +5,7 @@ PORTVERSION= 1.1
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
Modified: head/graphics/waifu2x-converter-cpp/Makefile
==============================================================================
--- head/graphics/waifu2x-converter-cpp/Makefile Sun Jun 19 11:24:39 2016 (r417109)
+++ head/graphics/waifu2x-converter-cpp/Makefile Sun Jun 19 11:25:29 2016 (r417110)
@@ -4,7 +4,7 @@ PORTNAME= waifu2x-converter-cpp
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/:.*//}
Modified: head/shells/ksh93/Makefile
==============================================================================
--- head/shells/ksh93/Makefile Sun Jun 19 11:24:39 2016 (r417109)
+++ head/shells/ksh93/Makefile Sun Jun 19 11:25:29 2016 (r417110)
@@ -26,7 +26,7 @@ LICENSE= EPL
OPTIONS_DEFINE= EXAMPLES STATIC
-FETCH_ENV= HTTP_AUTH='basic:*:I accept www.opensource.org/licenses/cpl:.'
+FETCH_ENV= HTTP_AUTH=basic:*:I\ accept\ www.opensource.org/licenses/cpl:.
LDFLAGS+= -lm
MAKE_ENV= CCFLAGS="${CFLAGS}"
NO_WRKSUBDIR= yes
Modified: head/sysutils/geomWatch/Makefile
==============================================================================
--- head/sysutils/geomWatch/Makefile Sun Jun 19 11:24:39 2016 (r417109)
+++ head/sysutils/geomWatch/Makefile Sun Jun 19 11:25:29 2016 (r417110)
@@ -9,7 +9,7 @@ MASTER_SITES= http://isis.poly.edu/~bk/$
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 at acm.poly.edu
Modified: head/textproc/kmfl-sil-ezra/Makefile
==============================================================================
--- head/textproc/kmfl-sil-ezra/Makefile Sun Jun 19 11:24:39 2016 (r417109)
+++ head/textproc/kmfl-sil-ezra/Makefile Sun Jun 19 11:25:29 2016 (r417110)
@@ -5,8 +5,8 @@ PORTNAME= kmfl-sil-ezra
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
Modified: head/textproc/kmfl-sil-ipa-unicode/Makefile
==============================================================================
--- head/textproc/kmfl-sil-ipa-unicode/Makefile Sun Jun 19 11:24:39 2016 (r417109)
+++ head/textproc/kmfl-sil-ipa-unicode/Makefile Sun Jun 19 11:25:29 2016 (r417110)
@@ -5,8 +5,8 @@ PORTNAME= kmfl-sil-ipa-unicode
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
Modified: head/textproc/kmfl-sil-panafrican-latin/Makefile
==============================================================================
--- head/textproc/kmfl-sil-panafrican-latin/Makefile Sun Jun 19 11:24:39 2016 (r417109)
+++ head/textproc/kmfl-sil-panafrican-latin/Makefile Sun Jun 19 11:25:29 2016 (r417110)
@@ -5,8 +5,8 @@ PORTNAME= kmfl-sil-panafrican-latin
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
Modified: head/www/xpi-splash/Makefile
==============================================================================
--- head/www/xpi-splash/Makefile Sun Jun 19 11:24:39 2016 (r417109)
+++ head/www/xpi-splash/Makefile Sun Jun 19 11:25:29 2016 (r417110)
@@ -9,7 +9,7 @@ CATEGORIES= www
MAINTAINER= ports at FreeBSD.org
COMMENT= Splash screen for most Mozilla and Mozilla Based products
-XPI_DISTNAME= splash\!
+XPI_DISTNAME= splash!
XPI_ID= splash at aldreneo.com
XPI_NUM= 2995
XPI_FILES= chrome/splash.jar components/.autoreg components/splash.js \
More information about the svn-ports-head
mailing list