scripts/build/internals.sh: compile wrapper with portable options.
static linking is not possible on MacOS, and unnessecary on other systems.
The old optimization and warning flags crash the gcc on MacOS
and (imho) are a bit overdone for this software.
5 if [ -z "${repos}" -o ! -d "${repos}" -o -z "${pdir}" -o ! -d "${pdir}" ];then
6 printf "Usage: ${0##*/} <repos_dir> <patch_dir>\n"
10 pdir="$( cd "${pdir}"; pwd)"
11 version="$( echo "${pdir}" |sed -r -e 's,.*/([^/]+)/*$,\1,' )"
12 branch="${version%.*}"
13 n=$( ls -1 "${pdir}" 2>/dev/null |wc -l )
15 r1="$( hg -R "${repos}" log -b "${branch}" \
22 $0~/^summary:[[:space:]]+'"${branch}: (bump|update) version to ${version}\+hg"'$/ {
23 printf( "%d\n", prev );
29 hg -R "${repos}" log -b "${branch}" -r "${r1}:tip" --template '{rev}\n' \
31 p="$( printf "%03d" ${i} )"
33 if [ $( ls -1 "${pdir}/${p}-"*.patch 2>/dev/null |wc -l ) -ne 0 ]; then
36 plog=$( hg -R "${repos}" log -r ${rev} --template '{desc|firstline}\n' \
37 |sed -r -e 's,[/ :]+,_,g;' \
39 pname="${p}-${plog}.patch"
40 printf "Revision '%d' --> '%s'\n" ${rev} "${pname}"
41 hg -R "${repos}" diff -c ${rev} --color=never >"${pdir}/${pname}"
42 pdate="$( hg -R "${repos}" log -r ${rev} --template '{date|isodate}\n' )"
43 touch -d "${pdate}" "${pdir}/${pname}"