Use checksums to speed up rsync transfers.
(cherry picked from commit 8d2620aa7086c81fbbdee6d8703f982d34955d0a)
Redmine #6766: Avoid error when detecting POSIX shell.

The 'sh -e' disturbs the POSIX test, which is included because we use
build-scripts/functions. The latter enables '-e' after the test
anyway, so just remove it from initialization.
(cherry picked from commit 141b306d994ac4de922563bc61a5ea7c48cca2cc)
Remove local mirror for build files.

It is irrelevant in an open source context anyway, and since all
distfiles are cached, the load on the servers is really not that high.

At the same time make sure we don't pass too few parameters to
pkg-get-src in case there are no distfiles (libgcc).
(cherry picked from commit 4db7819ac6a7c83c72d9ef6a27781867b33c56d2)
Redmine #6766: Don't rely on "which" exit code.

On HPUX it always returns 0. What we should look at is the output.
(cherry picked from commit b65bd3bb21ad8bc1825cd417e33b2866589cbcd5)
Redmine #6766: Add /usr/contrib/bin to PATH, for HPUX.

Some tools, like gzcat, reside there.
(cherry picked from commit 99713338fe852bf3b3e3c946aaaead449af304cb)
Redmine #6766: Reuse Solaris INT_MAX fix for HPUX as well.
(cherry picked from commit f51d0ced897c711dad6f1b4d9b1fc7b4c5133380)
Redmine #6766: Switch the last platform, HPUX, to LMDB as well.
(cherry picked from commit ac4439e917fda4311f9504037cca36477c49baae)
Merge branch '3.6.2.x-hpux' into 3.6.x