From d07a7697cfb064f5129469018082f43a8a86d92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 16 Mar 2021 14:10:30 +0100 Subject: Fix T86124: Self-hosting external libraries packages Allow downloading of source packages of Blender's dependencies, so that it's easier to provide a "full source archive" that contains the blender source + all dependencies archives. A `make` command for this will be introduced soon. This changes the deps builder slightly to be more flexible with the origin of our source packages. To support this a new CMake variable has been added called `PACKAGE_DIR` where all sources archives will be stored. default: a directory called `packages` in the build folder. alternative-default: if a directory called `packages` exists in the blender source folder that will be used. This is to support the "full source archive" use case. The download phase have been moved from the build phase to the configure phase. Configure will download all sources validate the hashes while downloading. All `[depname].cmake` files have been changed to take a local `file://[path_to_local_tarball]` path rather than a remote URI. A second requirement was that there needed to be an option to grab the sources from the blender SVN mirror rather than upstream. For this an option has been added PACKAGE_USE_UPSTREAM_SOURCES (default ON). The exact location in SVN still needs to be worked out, I tested with my local webserver and codewise it checks out. The path that is in there currently will not work (given there is no mirror there yet). To build this mirror our local package caches can be used. Reviewed By: lazydodo Differential Revision: https://developer.blender.org/D10598 --- build_files/build_environment/cmake/sdl.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build_files/build_environment/cmake/sdl.cmake') diff --git a/build_files/build_environment/cmake/sdl.cmake b/build_files/build_environment/cmake/sdl.cmake index 5dfe78601ff..c5594988234 100644 --- a/build_files/build_environment/cmake/sdl.cmake +++ b/build_files/build_environment/cmake/sdl.cmake @@ -30,9 +30,9 @@ else() endif() ExternalProject_Add(external_sdl - URL ${SDL_URI} + URL file://${PACKAGE_DIR}/${SDL_FILE} DOWNLOAD_DIR ${DOWNLOAD_DIR} - URL_HASH MD5=${SDL_HASH} + URL_HASH ${SDL_HASH_TYPE}=${SDL_HASH} PREFIX ${BUILD_DIR}/sdl PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS} -- cgit v1.2.3