pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / games / doom-ports / zandronum / alpha / zan_configure_impurity.patch
blob4a85de520ac1b7e079aad6696cf763df6bccbe49
1 diff -r 89bccf7127ba sqlite/CMakeLists.txt
2 --- a/sqlite/CMakeLists.txt Sun Jul 09 15:14:38 2023 -0400
3 +++ b/sqlite/CMakeLists.txt Fri Dec 01 10:10:35 2023 -0300
4 @@ -1,65 +1,5 @@
5 cmake_minimum_required( VERSION 2.4 )
7 -# [BB/EP] Download SQLite archive and extract the sources if necessary.
8 -set( ZAN_SQLITE_VERSION 3360000 ) # SQL version 3.36.0
9 -set( ZAN_SQLITE_YEAR 2021 )
10 -set( ZAN_SQLITE_SHA1 "a4bcf9e951bfb9745214241ba08476299fc2dc1e" )
11 -set( ZAN_SQLITE_DOWNLOAD_NAME "sqlite-autoconf-${ZAN_SQLITE_VERSION}" )
12 -set( ZAN_SQLITE_TEMP_ARCHIVE "${CMAKE_CURRENT_SOURCE_DIR}/${ZAN_SQLITE_DOWNLOAD_NAME}.tar.gz" )
13 -set( ZAN_SQLITE_HASHED_ARCHIVE "${CMAKE_CURRENT_SOURCE_DIR}/sqlite-${ZAN_SQLITE_SHA1}.tar.gz" )
15 -if( IS_DIRECTORY ${ZAN_SQLITE_HASHED_ARCHIVE} OR IS_SYMLINK ${ZAN_SQLITE_HASHED_ARCHIVE} )
16 - message( FATAL_ERROR "SQLite: ${ZAN_SQLITE_HASHED_ARCHIVE} must be a valid file.\n"
17 - "SQLite: Please remove it and try again." )
18 -elseif( ( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sqlite3.c ) OR ( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sqlite3.h ) OR ( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/sqlite3ext.h ) )
20 - if( NOT EXISTS ${ZAN_SQLITE_HASHED_ARCHIVE} )
21 - if( IS_DIRECTORY ${ZAN_SQLITE_TEMP_ARCHIVE} OR IS_SYMLINK ${ZAN_SQLITE_TEMP_ARCHIVE} )
22 - message( FATAL_ERROR "SQLite: ${ZAN_SQLITE_TEMP_ARCHIVE} must be a valid file.\n"
23 - "SQLite: Please remove it and try again." )
24 - endif()
26 - message( STATUS "SQLite: downloading the archive..." )
28 - file( DOWNLOAD https://www.sqlite.org/${ZAN_SQLITE_YEAR}/${ZAN_SQLITE_DOWNLOAD_NAME}.tar.gz ${ZAN_SQLITE_TEMP_ARCHIVE}
29 - SHOW_PROGRESS
30 - STATUS ZAN_SQLITE_DOWNLOAD_STATUS )
32 - # Report any problem if present and abort immediately.
33 - list( GET ZAN_SQLITE_DOWNLOAD_STATUS 0 ZAN_SQLITE_DOWNLOAD_ERROR_CODE )
34 - if( ZAN_SQLITE_DOWNLOAD_ERROR_CODE )
35 - list( GET ZAN_SQLITE_DOWNLOAD_STATUS 1 ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE )
36 - message( FATAL_ERROR "SQLite: download failed. Reason: ${ZAN_SQLITE_DOWNLOAD_ERROR_MESSAGE}" )
37 - endif()
39 - # Check the hash. Abort immediately if it's not valid (something is wrong with the download)
40 - file( SHA1 ${ZAN_SQLITE_TEMP_ARCHIVE} ZAN_SQLITE_CURRENT_SHA1 )
41 - if( NOT ZAN_SQLITE_CURRENT_SHA1 STREQUAL ZAN_SQLITE_SHA1 )
42 - message( FATAL_ERROR "SQLite: download failed. The downloaded file has a different hash:\n"
43 - "SQLite: valid: ${ZAN_SQLITE_SHA1}\n"
44 - "SQLite: downloaded: ${ZAN_SQLITE_CURRENT_SHA1}" )
45 - endif()
47 - # Rename the archive.
48 - execute_process( COMMAND ${CMAKE_COMMAND} -E rename ${ZAN_SQLITE_TEMP_ARCHIVE} ${ZAN_SQLITE_HASHED_ARCHIVE} )
49 - endif()
51 - message( STATUS "SQLite: saving the source files into the 'sqlite' directory." )
53 - # Extract the archive.
54 - execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf ${ZAN_SQLITE_HASHED_ARCHIVE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
56 - # Copy the required files.
57 - execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${ZAN_SQLITE_DOWNLOAD_NAME}/sqlite3.c ${CMAKE_CURRENT_SOURCE_DIR} )
58 - execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${ZAN_SQLITE_DOWNLOAD_NAME}/sqlite3.h ${CMAKE_CURRENT_SOURCE_DIR} )
59 - execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${ZAN_SQLITE_DOWNLOAD_NAME}/sqlite3ext.h ${CMAKE_CURRENT_SOURCE_DIR} )
61 - # Remove the extracted folder.
62 - execute_process( COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_SOURCE_DIR}/${ZAN_SQLITE_DOWNLOAD_NAME} )
64 - message( STATUS "SQLite: done." )
65 -endif()
67 # [BB] Silence all GCC warnings
68 IF ( CMAKE_COMPILER_IS_GNUCXX )
69 ADD_DEFINITIONS ( -w )