Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions external_deps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1275,20 +1275,45 @@ build_install() {
# Create a redistributable package for the dependencies
build_package() {
cd "${WORK_DIR}"
rm -f "${PKG_BASEDIR}.tar.xz"
rm -f "${PKG_TARBALL}"
local XZ_OPT='-9'
case "${PLATFORM}" in
windows-*-*)
tar --dereference -cvJf "${PKG_BASEDIR}.tar.xz" "${PKG_BASEDIR}"
tar --dereference -cvJf "${PKG_TARBALL}" "${PKG_BASEDIR}"
;;
*)
tar -cvJf "${PKG_BASEDIR}.tar.xz" "${PKG_BASEDIR}"
tar -cvJf "${PKG_TARBALL}" "${PKG_BASEDIR}"
;;
esac
}

build_wipe() {
rm -rf "${BUILD_BASEDIR}/" "${PKG_BASEDIR}/" "${PKG_BASEDIR}.tar.xz"
rm -rf "${BUILD_BASEDIR}/" "${PKG_BASEDIR}/" "${PKG_TARBALL}"
}

build_download() {
local upstreams=(
'https://dl.unvanquished.net/deps'
'https://dl.unvanquished.net/test/deps'
)

local mirrors=()
for upstream in "${upstreams[@]}"
do
mirrors+=("${upstream}/${PKG_TARBALL}")
done

download "${PKG_TARBALL}" "${mirrors[@]}"

"${download_only}" && return

rm -rf "${PKG_BASEDIR}"

extract "${PKG_TARBALL}" 'download_deps'
mv "${PKG_BASEDIR}" ..

cd ..
rmdir 'download_deps'
}

# Common setup code
Expand All @@ -1300,6 +1325,7 @@ common_setup() {

DOWNLOAD_DIR="${WORK_DIR}/download_cache"
PKG_BASEDIR="${PLATFORM}_${DEPS_VERSION}"
PKG_TARBALL="${PKG_BASEDIR}.tar.xz"
BUILD_BASEDIR="build-${PKG_BASEDIR}"
BUILD_DIR="${WORK_DIR}/${BUILD_BASEDIR}"
PREFIX="${BUILD_DIR}/prefix"
Expand Down Expand Up @@ -1506,6 +1532,8 @@ printHelp() {
install create a stripped down version of the built packages that CMake can use
package create a tarball of the dependencies so they can be distributed
wipe remove products of build process, excepting download cache but INCLUDING installed files. Must be last
download
download and extract the prebuilt tarball like CMake does

Packages required for each platform:

Expand Down
Loading