Browse Source
[cmake] Update CPMUtil
[cmake] Update CPMUtil
Notable changes - Single cpmfile - version/min_version/git_version have been fixed and replaced with version and min_version - Docs rewrite - Legacy options are gone - Fixed update/version commands Interactive adder is nonfunctional right now, will rewrite later Signed-off-by: crueter <crueter@eden-emu.dev>update-cpmutil
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
27 changed files with 911 additions and 1074 deletions
-
286CMakeModules/CPMUtil.cmake
-
453cpmfile.json
-
332docs/CPMUtil.md
-
21docs/CPMUtil/AddCIPackage.md
-
41docs/CPMUtil/AddDependentPackage.md
-
105docs/CPMUtil/AddJsonPackage.md
-
118docs/CPMUtil/AddPackage.md
-
28docs/CPMUtil/AddQt.md
-
70docs/CPMUtil/README.md
-
3externals/CMakeLists.txt
-
249externals/cpmfile.json
-
21tools/cpm/common.sh
-
10tools/cpm/format.sh
-
2tools/cpm/migrate.sh
-
2tools/cpm/package.sh
-
1tools/cpm/package/fetch.sh
-
10tools/cpm/package/rm.sh
-
46tools/cpm/package/update.sh
-
7tools/cpm/package/util/fix-hash.sh
-
3tools/cpm/package/util/interactive.sh
-
10tools/cpm/package/util/replace.sh
-
19tools/cpm/package/util/url.sh
-
76tools/cpm/package/vars.sh
-
21tools/cpm/package/vars/key.sh
-
34tools/cpm/package/version.sh
-
8tools/cpm/package/which.sh
-
9tools/cpmutil.sh
@ -1,147 +1,404 @@ |
|||
{ |
|||
"openssl-ci": { |
|||
"biscuit": { |
|||
"hash": "1229f345b014f7ca544dedb4edb3311e41ba736f9aa9a67f88b5f26f3c983288c6bb6cdedcfb0b8a02c63088a37e6a0d7ba97d9c2a4d721b213916327cffe28a", |
|||
"min_version": "0.9.1", |
|||
"repo": "lioncash/biscuit", |
|||
"tag": "v%VERSION%", |
|||
"version": "0.19.0" |
|||
}, |
|||
"boost": { |
|||
"artifact": "%TAG%-cmake.tar.xz", |
|||
"find_args": "CONFIG OPTIONAL_COMPONENTS headers context system fiber filesystem", |
|||
"hash": "6ae6e94664fe7f2fb01976b59b276ac5df8085c7503fa829d810fbfe495960cfec44fa2c36e2cb23480bc19c956ed199d4952b02639a00a6c07625d4e7130c2d", |
|||
"min_version": "1.57", |
|||
"package": "Boost", |
|||
"patches": [ |
|||
"0001-clang-cl.patch" |
|||
], |
|||
"repo": "boostorg/boost", |
|||
"tag": "boost-%VERSION%", |
|||
"version": "1.90.0" |
|||
}, |
|||
"boost_headers": { |
|||
"bundled": true, |
|||
"hash": "8a07d7a6f0065587d3005a83481a794704ae22e773b9f336fbd89ed230aaa7b4c86c03edcbae30bba8b3e20839c3131eaa2dceac037ef811533ef4eadc53b15b", |
|||
"repo": "boostorg/headers", |
|||
"tag": "boost-%VERSION%", |
|||
"version": "1.90.0" |
|||
}, |
|||
"catch2": { |
|||
"hash": "7eea385d79d88a5690cde131fe7ccda97d5c54ea09d6f515000d7bf07c828809d61c1ac99912c1ee507cf933f61c1c47ecdcc45df7850ffa82714034b0fccf35", |
|||
"min_version": "3.0.1", |
|||
"package": "Catch2", |
|||
"patches": [ |
|||
"0001-solaris-isnan-fix.patch" |
|||
], |
|||
"repo": "catchorg/Catch2", |
|||
"tag": "v%VERSION%", |
|||
"version": "3.13.0" |
|||
}, |
|||
"cpp-jwt": { |
|||
"find_args": "CONFIG", |
|||
"hash": "d11cbd5ddb3197b4c5ca15679bcd76a49963e7b530b7dd132db91e042925efa20dfb2c24ccfbe7ef82a7012af80deff0f72ee25851312ae80381a462df8534b8", |
|||
"min_version": "1.4", |
|||
"options": [ |
|||
"CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF" |
|||
], |
|||
"patches": [ |
|||
"0001-fix-missing-decl.patch" |
|||
], |
|||
"repo": "arun11299/cpp-jwt", |
|||
"sha": "7f24eb4c32", |
|||
"version": "1.5.1" |
|||
}, |
|||
"cubeb": { |
|||
"find_args": "CONFIG", |
|||
"hash": "8a4bcb2f83ba590f52c66626e895304a73eb61928dbc57777e1822e55378e3568366f17f9da4b80036cc2ef4ea9723c32abf6e7d9bbe00fb03654f0991596ab0", |
|||
"options": [ |
|||
"USE_SANITIZERS OFF", |
|||
"BUILD_TESTS OFF", |
|||
"BUILD_TOOLS OFF", |
|||
"BUNDLE_SPEEX ON" |
|||
], |
|||
"repo": "mozilla/cubeb", |
|||
"sha": "fa02160712", |
|||
"version": "0.0.0" |
|||
}, |
|||
"discord-rpc": { |
|||
"find_args": "MODULE", |
|||
"hash": "8213c43dcb0f7d479f5861091d111ed12fbdec1e62e6d729d65a4bc181d82f48a35d5fd3cd5c291f2393ac7c9681eabc6b76609755f55376284c8a8d67e148f3", |
|||
"package": "DiscordRPC", |
|||
"repo": "eden-emulator/discord-rpc", |
|||
"sha": "0d8b2d6a37", |
|||
"version": "3.4.1" |
|||
}, |
|||
"enet": { |
|||
"find_args": "MODULE", |
|||
"hash": "a0d2fa8c957704dd49e00a726284ac5ca034b50b00d2b20a94fa1bbfbb80841467834bfdc84aa0ed0d6aab894608fd6c86c3b94eee46343f0e6d9c22e391dbf9", |
|||
"min_version": "1.3", |
|||
"repo": "lsalzman/enet", |
|||
"tag": "v%VERSION%", |
|||
"version": "1.3.18" |
|||
}, |
|||
"ffmpeg": { |
|||
"bundled": true, |
|||
"hash": "ed177621176b3961bdcaa339187d3a7688c1c8b060b79c4bb0257cbc67ad7021ae5d5adca5303b45625abbbe3d9aafdd87ce777b8690ac295290d744c875489a", |
|||
"repo": "FFmpeg/FFmpeg", |
|||
"sha": "c7b5f1537d", |
|||
"version": "8.0.1" |
|||
}, |
|||
"ffmpeg-ci": { |
|||
"ci": true, |
|||
"package": "OpenSSL", |
|||
"name": "openssl", |
|||
"repo": "crueter-ci/OpenSSL", |
|||
"version": "4.0.0-11b7b6ea3b", |
|||
"min_version": "3" |
|||
"min_version": "4.1", |
|||
"name": "ffmpeg", |
|||
"package": "FFmpeg", |
|||
"repo": "crueter-ci/FFmpeg", |
|||
"version": "8.0.1-c7b5f1537d" |
|||
}, |
|||
"openssl-cmake": { |
|||
"repo": "jimmy-park/openssl-cmake", |
|||
"hash": "2cc185c924fd70e7d886257ca0caa42b3b8f7f712f2052b4f94dde74759e27022de76178460e18c9bdfc57c366583999e198fbb6052d4e7d91c099d15a0ca63e", |
|||
"git_version": "3.6.2", |
|||
"fmt": { |
|||
"hash": "f0da82c545b01692e9fd30fdfb613dbb8dd9716983dcd0ff19ac2a8d36f74beb5540ef38072fdecc1e34191b3682a8542ecbf3a61ef287dbba0a2679d4e023f2", |
|||
"min_version": "8", |
|||
"repo": "fmtlib/fmt", |
|||
"tag": "%VERSION%", |
|||
"bundled": true, |
|||
"version": "12.1.0" |
|||
}, |
|||
"frozen": { |
|||
"hash": "b8dfe741c82bc178dfc9749d4ab5a130cee718d9ee7b71d9b547cf5f7f23027ed0152ad250012a8546399fcc1e12187efc68d89d6731256c4d2df7d04eef8d5c", |
|||
"package": "frozen", |
|||
"repo": "serge-sans-paille/frozen", |
|||
"sha": "61dce5ae18", |
|||
"version": "1.2.0" |
|||
}, |
|||
"gamemode": { |
|||
"find_args": "MODULE", |
|||
"hash": "e87ec14ed3e826d578ebf095c41580069dda603792ba91efa84f45f4571a28f4d91889675055fd6f042d7dc25b0b9443daf70963ae463e38b11bcba95f4c65a9", |
|||
"min_version": "1.7", |
|||
"repo": "FeralInteractive/gamemode", |
|||
"sha": "ce6fe122f3", |
|||
"version": "1.8.2" |
|||
}, |
|||
"httplib": { |
|||
"find_args": "MODULE GLOBAL", |
|||
"hash": "159ed94965018f2a371d45a3bfc1961e5fb1549e501ded70a6b4532d7fe99d0579c18b5195aff6e35f96f399b426cea2650ec9fb75ef80d4c9edeccb51f2e6c9", |
|||
"options": [ |
|||
"OPENSSL_CONFIGURE_OPTIONS threads" |
|||
"HTTPLIB_REQUIRE_OPENSSL ON", |
|||
"HTTPLIB_DISABLE_MACOSX_AUTOMATIC_ROOT_CERTIFICATES ON" |
|||
], |
|||
"patches": [ |
|||
"0001-cpmutil-compat.patch", |
|||
"0002-use-ccache.patch", |
|||
"0003-use-cmake-compiler-flags.patch", |
|||
"0004-use-shell-wrapper.patch" |
|||
] |
|||
"0001-mingw.patch" |
|||
], |
|||
"repo": "yhirose/cpp-httplib", |
|||
"tag": "v%VERSION%", |
|||
"version": "0.46.0" |
|||
}, |
|||
"openssl": { |
|||
"repo": "openssl/openssl", |
|||
"package": "OpenSSL", |
|||
"min_version": "3", |
|||
"version": "3", |
|||
"hash": "29002ce50cb95a4f4f1d0e9d3f684401fbd4eac34203dc2eef3b6334af5d44aa46bf788b63a6f5c139c383eafb7269ae87a58a9a3ad5912903b9773e545ccc0a", |
|||
"git_version": "3.6.2", |
|||
"tag": "openssl-%VERSION%", |
|||
"lagoon": { |
|||
"hash": "b9380f99c6effaeccc6d8f81d4942e852c11ad28613df637e155451556ae5826f93765bee57a5c87a9740d2bd1db463ad0f55a947772fe9d57eeabae3efa373e", |
|||
"repo": "loongson-community/lagoon", |
|||
"tag": "%VERSION%", |
|||
"version": "1.0.0" |
|||
}, |
|||
"libadrenotools": { |
|||
"hash": "f6526620cb752876edc5ed4c0925d57b873a8218ee09ad10859ee476e9333259784f61c1dcc55a2bcba597352d18aff22cd2e4c1925ec2ae94074e09d7da2265", |
|||
"patches": [ |
|||
"0001-add-bundled-cert.patch" |
|||
] |
|||
"0001-linkerns-cpm.patch" |
|||
], |
|||
"repo": "eden-emulator/libadrenotools", |
|||
"sha": "8ba23b42d7", |
|||
"version": "1.0.0" |
|||
}, |
|||
"boost": { |
|||
"package": "Boost", |
|||
"repo": "boostorg/boost", |
|||
"tag": "boost-%VERSION%", |
|||
"artifact": "%TAG%-cmake.tar.xz", |
|||
"hash": "6ae6e94664fe7f2fb01976b59b276ac5df8085c7503fa829d810fbfe495960cfec44fa2c36e2cb23480bc19c956ed199d4952b02639a00a6c07625d4e7130c2d", |
|||
"git_version": "1.90.0", |
|||
"version": "1.57", |
|||
"find_args": "CONFIG OPTIONAL_COMPONENTS headers context system fiber filesystem", |
|||
"libusb": { |
|||
"find_args": "MODULE", |
|||
"hash": "98c5f7940ff06b25c9aa65aa98e23de4c79a4c1067595f4c73cc145af23a1c286639e1ba11185cd91bab702081f307b973f08a4c9746576dc8d01b3620a3aeb5", |
|||
"patches": [ |
|||
"0001-clang-cl.patch" |
|||
] |
|||
"0001-netbsd-gettime.patch" |
|||
], |
|||
"repo": "libusb/libusb", |
|||
"tag": "v%VERSION%", |
|||
"version": "1.0.29" |
|||
}, |
|||
"fmt": { |
|||
"repo": "fmtlib/fmt", |
|||
"llvm-mingw": { |
|||
"artifact": "clang-rt-builtins.tar.zst", |
|||
"git_host": "git.eden-emu.dev", |
|||
"hash": "d902392caf94e84f223766e2cc51ca5fab6cae36ab8dc6ef9ef6a683ab1c483bfcfe291ef0bd38ab16a4ecc4078344fa8af72da2f225ab4c378dee23f6186181", |
|||
"repo": "eden-emu/llvm-mingw", |
|||
"tag": "%VERSION%", |
|||
"hash": "f0da82c545b01692e9fd30fdfb613dbb8dd9716983dcd0ff19ac2a8d36f74beb5540ef38072fdecc1e34191b3682a8542ecbf3a61ef287dbba0a2679d4e023f2", |
|||
"version": "8", |
|||
"git_version": "12.1.0" |
|||
"version": "20250828" |
|||
}, |
|||
"lz4": { |
|||
"hash": "35c21a5d9cfb5bbf314a5321d02b36819491d2ee3cf8007030ca09d13ca4dae672247b7aeab553e973093604fc48221cb03dc92197c6efe8fc3746891363fdab", |
|||
"name": "lz4", |
|||
"repo": "lz4/lz4", |
|||
"sha": "ebb370ca83", |
|||
"hash": "35c21a5d9cfb5bbf314a5321d02b36819491d2ee3cf8007030ca09d13ca4dae672247b7aeab553e973093604fc48221cb03dc92197c6efe8fc3746891363fdab", |
|||
"source_subdir": "build/cmake" |
|||
"source_subdir": "build/cmake", |
|||
"version": "1.10.0" |
|||
}, |
|||
"moltenvk": { |
|||
"artifact": "MoltenVK-macOS.tar", |
|||
"bundled": true, |
|||
"hash": "5695b36ca5775819a71791557fcb40a4a5ee4495be6b8442e0b666d0c436bec02aae68cc6210183f7a5c986bdbec0e117aecfad5396e496e9c2fd5c89133a347", |
|||
"repo": "V380-Ori/Ryujinx.MoltenVK", |
|||
"tag": "v%VERSION%-ryujinx", |
|||
"version": "1.4.1" |
|||
}, |
|||
"nlohmann": { |
|||
"hash": "6cc1e86261f8fac21cc17a33da3b6b3c3cd5c116755651642af3c9e99bb3538fd42c1bd50397a77c8fb6821bc62d90e6b91bcdde77a78f58f2416c62fc53b97d", |
|||
"min_version": "3.8", |
|||
"package": "nlohmann_json", |
|||
"repo": "nlohmann/json", |
|||
"tag": "v%VERSION%", |
|||
"hash": "6cc1e86261f8fac21cc17a33da3b6b3c3cd5c116755651642af3c9e99bb3538fd42c1bd50397a77c8fb6821bc62d90e6b91bcdde77a78f58f2416c62fc53b97d", |
|||
"version": "3.8", |
|||
"git_version": "3.12.0" |
|||
"version": "3.12.0" |
|||
}, |
|||
"zlib": { |
|||
"package": "ZLIB", |
|||
"repo": "madler/zlib", |
|||
"oaknut": { |
|||
"hash": "9697e80a7d5d9bcb3ce51051a9a24962fb90ca79d215f1f03ae6b58da8ba13a63b5dda1b4dde3d26ac6445029696b8ef2883f4e5a777b342bba01283ed293856", |
|||
"min_version": "2.0.1", |
|||
"repo": "eden-emulator/oaknut", |
|||
"tag": "v%VERSION%", |
|||
"hash": "16fea4df307a68cf0035858abe2fd550250618a97590e202037acd18a666f57afc10f8836cbbd472d54a0e76539d0e558cb26f059d53de52ff90634bbf4f47d4", |
|||
"version": "1.2", |
|||
"git_version": "1.3.2", |
|||
"options": [ |
|||
"ZLIB_BUILD_SHARED OFF", |
|||
"ZLIB_INSTALL OFF" |
|||
] |
|||
"version": "2.0.3" |
|||
}, |
|||
"zstd": { |
|||
"repo": "facebook/zstd", |
|||
"sha": "b8d6101fba", |
|||
"hash": "cc5ad4b119a9c2ea57f0b71eeff01113bb506e0d17000159c5409cb8236d22e38c52d5e9e97e7947a4bf1b2dfc44b6c503ab2d9aedbd59458435c6a2849cb029", |
|||
"version": "1.5", |
|||
"source_subdir": "build/cmake", |
|||
"find_args": "MODULE", |
|||
"oboe": { |
|||
"bundled": true, |
|||
"hash": "ce4011afe7345370d4ead3b891cd69a5ef224b129535783586c0ca75051d303ed446e6c7f10bde8da31fff58d6e307f1732a3ffd03b249f9ef1fd48fd4132715", |
|||
"repo": "google/oboe", |
|||
"tag": "%VERSION%", |
|||
"version": "1.10.0" |
|||
}, |
|||
"openssl": { |
|||
"hash": "29002ce50cb95a4f4f1d0e9d3f684401fbd4eac34203dc2eef3b6334af5d44aa46bf788b63a6f5c139c383eafb7269ae87a58a9a3ad5912903b9773e545ccc0a", |
|||
"min_version": "3", |
|||
"package": "OpenSSL", |
|||
"patches": [ |
|||
"0001-add-bundled-cert.patch" |
|||
], |
|||
"repo": "openssl/openssl", |
|||
"tag": "openssl-%VERSION%", |
|||
"version": "3.6.2" |
|||
}, |
|||
"openssl-ci": { |
|||
"ci": true, |
|||
"min_version": "3", |
|||
"name": "openssl", |
|||
"package": "OpenSSL", |
|||
"repo": "crueter-ci/OpenSSL", |
|||
"version": "4.0.0-11b7b6ea3b" |
|||
}, |
|||
"openssl-cmake": { |
|||
"bundled": true, |
|||
"hash": "2cc185c924fd70e7d886257ca0caa42b3b8f7f712f2052b4f94dde74759e27022de76178460e18c9bdfc57c366583999e198fbb6052d4e7d91c099d15a0ca63e", |
|||
"options": [ |
|||
"ZSTD_BUILD_SHARED OFF" |
|||
] |
|||
"OPENSSL_CONFIGURE_OPTIONS threads" |
|||
], |
|||
"patches": [ |
|||
"0001-cpmutil-compat.patch", |
|||
"0002-use-ccache.patch", |
|||
"0003-use-cmake-compiler-flags.patch", |
|||
"0004-use-shell-wrapper.patch" |
|||
], |
|||
"repo": "jimmy-park/openssl-cmake", |
|||
"tag": "%VERSION%", |
|||
"version": "3.6.2" |
|||
}, |
|||
"opus": { |
|||
"package": "Opus", |
|||
"repo": "xiph/opus", |
|||
"sha": "a3f0ec02b3", |
|||
"hash": "9506147b0de35befda8633ff272981cc2575c860874791bd455b752f797fd7dbd1079f0ba42ccdd7bb1fe6773fa5e84b3d75667c2883dd1fb2d0e4a5fa4f8387", |
|||
"version": "1.3", |
|||
"find_args": "MODULE", |
|||
"hash": "9506147b0de35befda8633ff272981cc2575c860874791bd455b752f797fd7dbd1079f0ba42ccdd7bb1fe6773fa5e84b3d75667c2883dd1fb2d0e4a5fa4f8387", |
|||
"min_version": "1.3", |
|||
"options": [ |
|||
"OPUS_PRESUME_NEON ON" |
|||
], |
|||
"package": "Opus", |
|||
"patches": [ |
|||
"0001-disable-clang-runtime-neon.patch", |
|||
"0002-no-install.patch" |
|||
] |
|||
], |
|||
"repo": "xiph/opus", |
|||
"sha": "a3f0ec02b3", |
|||
"version": "1.5.2" |
|||
}, |
|||
"boost_headers": { |
|||
"repo": "boostorg/headers", |
|||
"sha": "95930ca8f5", |
|||
"hash": "8a07d7a6f0065587d3005a83481a794704ae22e773b9f336fbd89ed230aaa7b4c86c03edcbae30bba8b3e20839c3131eaa2dceac037ef811533ef4eadc53b15b", |
|||
"bundled": true |
|||
"quazip": { |
|||
"hash": "609c240c7f029ac26a37d8fbab51bc16284e05e128b78b9b9c0e95d083538c36047a67d682759ac990e4adb0eeb90f04f1ea7fe2253bbda7e7e3bcce32e53dd8", |
|||
"min_version": "1.3", |
|||
"options": [ |
|||
"QUAZIP_QT_MAJOR_VERSION 6", |
|||
"QUAZIP_INSTALL OFF", |
|||
"QUAZIP_ENABLE_QTEXTCODEC OFF", |
|||
"QUAZIP_BZIP2 OFF" |
|||
], |
|||
"package": "QuaZip-Qt6", |
|||
"repo": "stachenov/quazip", |
|||
"sha": "2e95c9001b", |
|||
"version": "1.5" |
|||
}, |
|||
"llvm-mingw": { |
|||
"repo": "eden-emu/llvm-mingw", |
|||
"sdl3": { |
|||
"hash": "df5a323af7ac366661a3c0e887969c72584d232f3cc211419d59b0487b620b6b2859d4549c9e8df002ee489290062e466fcfddf7edc0872a37b1f2845e81c0f3", |
|||
"min_version": "3.2.10", |
|||
"package": "SDL3", |
|||
"repo": "libsdl-org/SDL", |
|||
"tag": "release-%VERSION%", |
|||
"version": "3.4.8" |
|||
}, |
|||
"sdl3-ci": { |
|||
"ci": true, |
|||
"min_version": "3.2.10", |
|||
"name": "SDL3", |
|||
"package": "SDL3", |
|||
"repo": "crueter-ci/SDL3", |
|||
"version": "3.4.8-d57c3b685c" |
|||
}, |
|||
"simpleini": { |
|||
"find_args": "MODULE", |
|||
"hash": "b937c18a7b6277d77ca7ebfb216af4984810f77af4c32d101b7685369a4bd5eb61406223f82698e167e6311a728d07415ab59639fdf19eff71ad6dc2abfda989", |
|||
"package": "SimpleIni", |
|||
"repo": "brofield/simpleini", |
|||
"tag": "v%VERSION%", |
|||
"version": "4.25" |
|||
}, |
|||
"sirit": { |
|||
"artifact": "sirit-source-%VERSION%.tar.zst", |
|||
"find_args": "CONFIG", |
|||
"options": [ |
|||
"SIRIT_USE_SYSTEM_SPIRV_HEADERS ON" |
|||
], |
|||
"repo": "eden-emulator/sirit", |
|||
"tag": "v%VERSION%", |
|||
"version": "1.0.5", |
|||
"hash": "10b3ff60bdcad428bb4f54360ff749212333a1d24c0b3ed99e466b1bfcf99d2db6cf596c0f965854a2095dfef9b7ce4e045edb070fa9f76eb3b295ab03a4a293" |
|||
}, |
|||
"sirit-ci": { |
|||
"ci": true, |
|||
"name": "sirit", |
|||
"package": "sirit", |
|||
"repo": "eden-emulator/sirit", |
|||
"version": "1.0.5" |
|||
}, |
|||
"spirv-headers": { |
|||
"hash": "cae8cd179c9013068876908fecc1d158168310ad6ac250398a41f0f5206ceff6469e2aaeab9c820bce9d1b08950c725c89c46e94b89a692be9805432cf749396", |
|||
"options": [ |
|||
"SPIRV_WERROR OFF" |
|||
], |
|||
"package": "SPIRV-Headers", |
|||
"repo": "KhronosGroup/SPIRV-Headers", |
|||
"sha": "04f10f650d" |
|||
}, |
|||
"tzdb": { |
|||
"artifact": "%VERSION%.tar.gz", |
|||
"git_host": "git.eden-emu.dev", |
|||
"hash": "cce65a12bf90f4ead43b24a0b95dfad77ac3d9bfbaaf66c55e6701346e7a1e44ca5d2f23f47ee35ee02271eb1082bf1762af207aad9fb236f1c8476812d008ed", |
|||
"package": "nx_tzdb", |
|||
"repo": "eden-emu/tzdb_to_nx", |
|||
"tag": "%VERSION%", |
|||
"version": "20250828", |
|||
"artifact": "clang-rt-builtins.tar.zst", |
|||
"hash": "d902392caf94e84f223766e2cc51ca5fab6cae36ab8dc6ef9ef6a683ab1c483bfcfe291ef0bd38ab16a4ecc4078344fa8af72da2f225ab4c378dee23f6186181" |
|||
"version": "230326" |
|||
}, |
|||
"unordered-dense": { |
|||
"bundled": true, |
|||
"find_args": "CONFIG", |
|||
"hash": "d2106f6640f6bfb81755e4b8bfb64982e46ec4a507cacdb38f940123212ccf35a20b43c70c6f01d7bfb8c246d1a16f7845d8052971949cea9def1475e3fa02c8", |
|||
"package": "unordered_dense", |
|||
"patches": [ |
|||
"0001-avoid-memset-when-clearing-an-empty-table.patch" |
|||
], |
|||
"repo": "martinus/unordered_dense", |
|||
"sha": "7b55cab841", |
|||
"version": "4.8.1" |
|||
}, |
|||
"vulkan-headers": { |
|||
"hash": "d2846ea228415772645eea4b52a9efd33e6a563043dd3de059e798be6391a8f0ca089f455ae420ff22574939ed0f48ed7c6ff3d5a9987d5231dbf3b3f89b484b", |
|||
"min_version": "1.4.317", |
|||
"package": "VulkanHeaders", |
|||
"repo": "KhronosGroup/Vulkan-Headers", |
|||
"tag": "v%VERSION%", |
|||
"version": "1.4.345" |
|||
}, |
|||
"vulkan-memory-allocator": { |
|||
"find_args": "CONFIG", |
|||
"hash": "deb5902ef8db0e329fbd5f3f4385eb0e26bdd9f14f3a2334823fb3fe18f36bc5d235d620d6e5f6fe3551ec3ea7038638899db8778c09f6d5c278f5ff95c3344b", |
|||
"package": "VulkanMemoryAllocator", |
|||
"repo": "GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator", |
|||
"tag": "v%VERSION%", |
|||
"version": "3.3.0" |
|||
}, |
|||
"vulkan-utility-libraries": { |
|||
"hash": "114f6b237a6dcba923ccc576befb5dea3f1c9b3a30de7dc741f234a831d1c2d52d8a224afb37dd57dffca67ac0df461eaaab6a5ab5e503b393f91c166680c3e1", |
|||
"package": "VulkanUtilityLibraries", |
|||
"repo": "KhronosGroup/Vulkan-Utility-Libraries", |
|||
"tag": "v%VERSION%", |
|||
"version": "1.4.345" |
|||
}, |
|||
"vulkan-validation-layers": { |
|||
"artifact": "android-binaries-%VERSION%.zip", |
|||
"hash": "8812ae84cbe49e6a3418ade9c458d3be6d74a3dffd319d4502007b564d580998056e8190414368ec11b27bc83993c7a0dad713c31bcc3d9553b51243efee3753", |
|||
"package": "VVL", |
|||
"repo": "KhronosGroup/Vulkan-ValidationLayers", |
|||
"tag": "vulkan-sdk-%VERSION%", |
|||
"git_version": "1.4.341.0", |
|||
"artifact": "android-binaries-%VERSION%.zip", |
|||
"hash": "8812ae84cbe49e6a3418ade9c458d3be6d74a3dffd319d4502007b564d580998056e8190414368ec11b27bc83993c7a0dad713c31bcc3d9553b51243efee3753" |
|||
"version": "1.4.341.0" |
|||
}, |
|||
"quazip": { |
|||
"package": "QuaZip-Qt6", |
|||
"repo": "stachenov/quazip", |
|||
"sha": "2e95c9001b", |
|||
"hash": "609c240c7f029ac26a37d8fbab51bc16284e05e128b78b9b9c0e95d083538c36047a67d682759ac990e4adb0eeb90f04f1ea7fe2253bbda7e7e3bcce32e53dd8", |
|||
"version": "1.3", |
|||
"git_version": "1.5", |
|||
"xbyak": { |
|||
"hash": "b6475276b2faaeb315734ea8f4f8bd87ededcee768961b39679bee547e7f3e98884d8b7851e176d861dab30a80a76e6ea302f8c111483607dde969b4797ea95a", |
|||
"package": "xbyak", |
|||
"repo": "herumi/xbyak", |
|||
"tag": "v%VERSION%", |
|||
"version": "7.35.2" |
|||
}, |
|||
"zlib": { |
|||
"hash": "16fea4df307a68cf0035858abe2fd550250618a97590e202037acd18a666f57afc10f8836cbbd472d54a0e76539d0e558cb26f059d53de52ff90634bbf4f47d4", |
|||
"min_version": "1.2", |
|||
"options": [ |
|||
"QUAZIP_QT_MAJOR_VERSION 6", |
|||
"QUAZIP_INSTALL OFF", |
|||
"QUAZIP_ENABLE_QTEXTCODEC OFF", |
|||
"QUAZIP_BZIP2 OFF" |
|||
] |
|||
"ZLIB_BUILD_SHARED OFF", |
|||
"ZLIB_INSTALL OFF" |
|||
], |
|||
"package": "ZLIB", |
|||
"repo": "madler/zlib", |
|||
"tag": "v%VERSION%", |
|||
"version": "1.3.2" |
|||
}, |
|||
"zstd": { |
|||
"find_args": "MODULE", |
|||
"hash": "cc5ad4b119a9c2ea57f0b71eeff01113bb506e0d17000159c5409cb8236d22e38c52d5e9e97e7947a4bf1b2dfc44b6c503ab2d9aedbd59458435c6a2849cb029", |
|||
"min_version": "1.5", |
|||
"options": [ |
|||
"ZSTD_BUILD_SHARED OFF" |
|||
], |
|||
"repo": "facebook/zstd", |
|||
"sha": "b8d6101fba", |
|||
"source_subdir": "build/cmake", |
|||
"version": "1.5.7" |
|||
} |
|||
} |
|||
@ -0,0 +1,332 @@ |
|||
# CPMUtil |
|||
|
|||
CPMUtil is a wrapper around CPM that aims to reduce boilerplate and add useful utility functions to make dependency management a piece of cake. |
|||
|
|||
- [CPMUtil](#cpmutil) |
|||
- [Global Options](#global-options) |
|||
- [About](#about) |
|||
- [Common Properties](#common-properties) |
|||
- [Standard Packages](#standard-packages) |
|||
- [Versioning](#versioning) |
|||
- [Patches](#patches) |
|||
- [Pre-built CI Packages](#pre-built-ci-packages) |
|||
- [Usage](#usage) |
|||
- [Addendum: Cache Storage](#addendum-cache-storage) |
|||
- [Addendum: Making Patches](#addendum-making-patches) |
|||
- [Addendum: Package Identification Lists](#addendum-package-identification-lists) |
|||
- [Addendum: Notes for Packagers](#addendum-notes-for-packagers) |
|||
- [Network Sandbox](#network-sandbox) |
|||
- [Unsandboxed](#unsandboxed) |
|||
- [Addendum: Dependent Packages](#addendum-dependent-packages) |
|||
- [Example: Vulkan](#example-vulkan) |
|||
- [Addendum: Module Path Packages](#addendum-module-path-packages) |
|||
- [Example: OpenSSL](#example-openssl) |
|||
- [Addendum: Adding Qt](#addendum-adding-qt) |
|||
|
|||
## Global Options |
|||
|
|||
- `CPMUTIL_FORCE_SYSTEM` (default `OFF`): Require all CPM dependencies to use system packages. NOT RECOMMENDED! |
|||
- You may optionally override this (section) |
|||
- `CPMUTIL_FORCE_BUNDLED` (default `ON` on MSVC and Android, `OFF` elsewhere): Require all CPM dependencies to use bundled packages. |
|||
- `CPMUTIL_PATCH_DIR` (default `${PROJECT_SOURCE_DIR}/.patch`): Path to patches used in packages. Stored as `<PATCH DIR>/json-package-name/0001-patch-name.patch`, etc. |
|||
- `CPM_SOURCE_CACHE` (default `${PROJECT_SOURCE_DIR}/.cache/cpm`): Where downloaded dependencies get stored. |
|||
|
|||
## About |
|||
|
|||
CPMUtil works by defining dependencies in a JSON file, `cpmfile.json`, and calling `AddJsonPackage`. These dependencies generally must define, at minimum: |
|||
|
|||
- The repository and Git host |
|||
- A release artifact, commit, or tag archive to download |
|||
- A SHA512 sum for the downloaded artifact |
|||
|
|||
And may optionally define other properties like: |
|||
|
|||
- The minimum version for system packages |
|||
- The package name used for system packages (this defaults to the json key if undefined) |
|||
- In-tree source patches |
|||
- Options passed to CMake |
|||
- Options passed to find_package |
|||
|
|||
For instance: |
|||
|
|||
```json |
|||
"fmt": { |
|||
"repo": "fmtlib/fmt", |
|||
"tag": "12.1.0", |
|||
"hash": "f0da82c545b01692e9fd30fdfb613dbb8dd9716983dcd0ff19ac2a8d36f74beb5540ef38072fdecc1e34191b3682a8542ecbf3a61ef287dbba0a2679d4e023f2", |
|||
"min_version": "8", |
|||
"options": [ |
|||
"FMT_TEST ON" |
|||
], |
|||
"patches": [ |
|||
"0001-disable-reference-copy.patch" |
|||
] |
|||
} |
|||
``` |
|||
|
|||
Calling `AddJsonPackage(fmt)`: |
|||
|
|||
- Searches for a system package named `fmt` of version 8 or higher |
|||
- If found, uses the system package and caches it for future use |
|||
- If not found: |
|||
- Downloads fmt 12.1.0 from the GitHub Archive into `.cache/cpm/fmt/12.1.0` |
|||
- Verifies the hash |
|||
- Applies the `0001-disable-reference-copy.patch` patch to the source tree |
|||
- Sets `FMT_TEST` to `ON` |
|||
- Adds the downloaded directory to CMake |
|||
- Now, future `find_package(fmt)` calls will use the downloaded package |
|||
|
|||
There are two types of packages CPMUtil can define: standard and prebuilt CI packages. Some properties are common to both types, however. |
|||
|
|||
## Common Properties |
|||
|
|||
These JSON properties are used by standard and CI packages alike. |
|||
|
|||
- `package`: The package name used by `find_package` to check for the existence of a system package. |
|||
- If unset, defaults to the JSON key |
|||
- `repo`: The Git repository the package is stored in, if applicable. |
|||
- `version`: The version of the package to download. This is required. |
|||
- `min_version`: The minimum required version of the package, if a system package is desired. |
|||
- `git_host`: The Git host the package is stored in, if applicable. Defaults to `github.com`. |
|||
|
|||
## Standard Packages |
|||
|
|||
Normal packages, like the prior `fmt` example, *must* also define: |
|||
|
|||
- `hash`: The SHA512 hash of the downloaded artifact. CPMUtil generally computes this for you. |
|||
- A valid version/URL identifier: |
|||
- `url`: Download from a raw URL. |
|||
- `sha`: A short or fully-qualified Git commit sha. CPMUtil recommends using 10-character wide shas. |
|||
- `tag`: A Git tag. See [Versioning](#versioning) for its relation to `version`. |
|||
- `artifact`: A GitHub/Forgejo/Gitea release artifact (requires `tag`). See [Versioning](#versioning) for its relation to `tag` and `version`. |
|||
|
|||
The following are optional to define: |
|||
|
|||
- `source_subdir`: A subdirectory containing the `CMakeLists.txt` to configure a project. Useful for projects like `zstd`. |
|||
- `bundled`: Force the usage of a bundled package. Useful for packages where the system package is broken or nonexistent; e.g. including external fragment shaders. |
|||
- `find_args`: Additional arguments passed to `find_package`, e.g. `MODULE` |
|||
- `patches`: Array of in-tree patches to apply to the downloaded source code. See [#Patches](TODO). |
|||
- `options`: Array of CMake options to apply before configuring the package, e.g. `"FMT_TEST ON"`. |
|||
|
|||
### Versioning |
|||
|
|||
When using tags or artifacts, it may be cumbersome to repeat the version multiple times; especially if it's constantly changing. For this purpose, `tag` and `artifact` both support basic version text replacement. |
|||
|
|||
`tag` can use `%VERSION%` to have its version replaced with the `version` defined for the package, e.g. for OpenSSL; when downloading, `tag` will evaluate to `openssl-3.6.2`: |
|||
|
|||
```json |
|||
"openssl": { |
|||
"repo": "openssl/openssl", |
|||
"version": "3.6.2", |
|||
"tag": "openssl-%VERSION%" |
|||
} |
|||
``` |
|||
|
|||
`artifact` also supports `%VERSION%` replacement, and can also use `%TAG%` to be replaced by the computed tag. Take this Boost definition: |
|||
|
|||
```json |
|||
"boost": { |
|||
"repo": "boostorg/boost", |
|||
"tag": "boost-%VERSION%", |
|||
"version": "1.90.0" |
|||
} |
|||
``` |
|||
|
|||
Boost's artifact for this version is stored in `boost-1.90.0-cmake.tar.xz`. Notice that the computed tag,`boost-1.90.0`, is in the name of the artifact! Thus, `artifact` can be either: |
|||
|
|||
- `boost-%VERSION%-cmake.tar.xz` |
|||
- Or, even simpler: `%TAG%-cmake.tar.xz` |
|||
|
|||
Future updates need only change the `version` identifier, and the artifact and tag will automatically be updated! |
|||
|
|||
### Patches |
|||
|
|||
CPMUtil is able to apply in-place source tree patches to downloaded packages. These are defined in JSON as an array of names, preferably using `git-format-patch`'s scheme of `<4 digit number>-patch-name.patch`. These are stored in `<CPMUTIL_PATCH_DIR>/<json-key>` (remember that `CPMUTIL_PATCH_DIR` defaults to `$ROOT/.patch`); e.g. `boost` patches would be in `.patch/boost`. Let's say we've made three patches and want to add them; in the Boost JSON definition, we would add: |
|||
|
|||
```json |
|||
"patches": [ |
|||
"0001-fix-clang-cl-compilation.patch", |
|||
"0002-fix-msvc-arm64-compilation.patch", |
|||
"0003-fix-bsd-linking.patch" |
|||
] |
|||
``` |
|||
|
|||
Then, when Boost is downloaded, it will apply these patches in order to the source tree. |
|||
|
|||
To learn how to make patches, see [Addendum: Making Patches](#addendum-making-patches). |
|||
|
|||
## Pre-built CI Packages |
|||
|
|||
The definition and usage of CI packages is subject to change in the very near future. |
|||
|
|||
CI packages are, in essence, prebuilt binary distributions for libraries. They exist for a few reasons: |
|||
|
|||
- Creating static libraries for system packages that normally lack them, e.g. Qt/SDL |
|||
- Reducing duplicated compilation effort on rarely-changing externals, e.g. SDL |
|||
- Creating debloated prebuilt packages specifically for your project to reduce binary size, e.g. FFmpeg |
|||
|
|||
CPMUtil is specifically designed to work with a small subset of prebuilt CI packages; namely, those that follow the format of the [crueter-ci spec](https://github.com/crueter-ci/spec/blob/master/README.md). |
|||
|
|||
To use them, you must add `ci: true` to your package definition. Alongside the common properties, CI packages define the following: |
|||
|
|||
- `name`: The artifacts' name prefix (required), e.g. `openssl` |
|||
- `extension`: The artifacts' extension (default `tar.zst`) |
|||
- `disabled_platforms`: CPMUtil-supported platforms that are not built into this repository. |
|||
- This is subject to change. |
|||
|
|||
**Note that `package` is subject to removal here.** |
|||
|
|||
Example: |
|||
|
|||
```json |
|||
"sdl2": { |
|||
"repo": "crueter-ci/SDL2", |
|||
"package": "SDL2", |
|||
"min_version": "2.26.4", |
|||
"ci": true, |
|||
"version": "2.32.10-a65111bd2d", |
|||
"artifact": "SDL2" |
|||
}, |
|||
``` |
|||
|
|||
## Usage |
|||
|
|||
Once you've defined your package in `cpmfile.json`, simply call `AddJsonPackage(<JSON key>)` and go from there! Specific instructions differ between individual packages, so you're on your own from here. |
|||
|
|||
If you're only concerned with basic usage, you can stop reading. For more advanced use cases and package management, read these addenda. |
|||
|
|||
## Addendum: Cache Storage |
|||
|
|||
CPMUtil stores downloaded packages within `.cache/cpm` by default (see `CPM_SOURCE_CACHE`). Subdirectories stored within are lowercase representations of the `find_package` name for the package; for instance, a `vulkan-headers` definition with `package: "VulkanHeaders"` would be stored in `.cache/cpm/vulkanheaders`. |
|||
|
|||
Within these subdirectories, additional directories are created for each individual version: |
|||
|
|||
- A four-character shorthand of `sha`, if defined |
|||
- If `sha` is not defined, the fully qualified `version` is used |
|||
|
|||
CI packages use `<platform>-<architecture>-<version>` unconditionally. |
|||
|
|||
## Addendum: Making Patches |
|||
|
|||
CPMUtil currently lacks functionality to make patches; these will be added in the future. For now, here's how to go about it; you should familiarize yourself with CPMUtil's shell tooling, and Git, first. |
|||
|
|||
- Clean-fetch your package: |
|||
- `rm -rf .cache/cpm/<lowercase package name>` |
|||
- `tools/cpmutil.sh package fetch <package JSON key>` |
|||
- `cd .cache/cpm/<lowercase package name>/<version>` |
|||
- Now, initialize a Git repository and commit: |
|||
- `git init` |
|||
- `git add .` |
|||
- `git commit -m "Initial Commit"` |
|||
- Now, make any changes you need within the source directory. |
|||
- Then, create your patch: |
|||
- `git commit -am "short summary of patch"` |
|||
- You may optionally choose to use `-av` instead to use your configured command-line editor. This also allows you to add a lengthy description. |
|||
- `git format-patch -1 HEAD` |
|||
- Your patch is now stored in `0001-short-summary-of-patch.patch` or similar. |
|||
- Copy this patch to the root of your repository. |
|||
- Rename the patch if needed, taking special note to ensure the starting number is correct |
|||
- For instance, if you already have 2 other patches, it should be renamed to `0003-...` |
|||
- Move the patch to `.patch/<package-json-key>`, creating the directory if it doesn't exist. |
|||
- Add your patch filename to the corresponding JSON definition. |
|||
|
|||
## Addendum: Package Identification Lists |
|||
|
|||
CPMUtil will create three lists of dependencies where `AddPackage` or similar was used. Each is in order of addition. |
|||
|
|||
- `CPM_PACKAGE_NAMES`: The names of packages included by CPMUtil |
|||
- `CPM_PACKAGE_URLS`: The URLs to project/repo pages of packages |
|||
- `CPM_PACKAGE_SHAS`: Short version identifiers for each package |
|||
- If the package was included as a system package, `(system)` is appended thereafter |
|||
- Packages whose versions can't be deduced will be left as `unknown`. |
|||
|
|||
For an example of how this might be implemented in an application, see Eden's implementation: |
|||
|
|||
- [`dep_hashes.h.in`](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/src/dep_hashes.h.in) |
|||
- [`GenerateDepHashes.cmake`](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CMakeModules/GenerateDepHashes.cmake) |
|||
- [`deps_dialog.cpp`](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/src/yuzu/deps_dialog.cpp) |
|||
|
|||
## Addendum: Notes for Packagers |
|||
|
|||
If you are packaging a project that uses CPMUtil, read this! |
|||
|
|||
### Network Sandbox |
|||
|
|||
For sandboxed environments (e.g. Gentoo, nixOS) you must install all dependencies to the system beforehand and set `-DCPMUTIL_FORCE_SYSTEM=ON`. If a dependency is missing, get creating! |
|||
|
|||
Alternatively, if CPMUtil pulls in a package that has no suitable way to install or use a system version, download it separately and pass `-DPackageName_DIR=/path/to/downloaded/dir` (e.g. shaders) |
|||
|
|||
### Unsandboxed |
|||
|
|||
For others (AUR, MPR, etc). CPMUtil will handle everything for you, including if some of the project's dependencies are missing from your distribution's repositories. See [`eden-git`](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=eden-git) for an example. |
|||
|
|||
## Addendum: Dependent Packages |
|||
|
|||
Consider the following scenario: the Vulkan Headers and Vulkan Utility libraries are both pulled in by my project. In order for both to compile cleanly, their versions *must* match. However, a user may have the Vulkan Headers installed, but *not* the Vulkan Utility Libraries! This can cause a version mismatch where the Utility Libraries expect a much newer version of the Vulkan Headers than the user has installed. |
|||
|
|||
To solve this, CPMUtil has an `AddDependentPackages` command. This takes a list of JSON package keys that *must* either ALL be installed to the system, or ALL be bundled. |
|||
|
|||
### Example: Vulkan |
|||
|
|||
Using the prior Vulkan example: |
|||
|
|||
```json |
|||
"vulkan-headers": { |
|||
"repo": "KhronosGroup/Vulkan-Headers", |
|||
"package": "VulkanHeaders", |
|||
"min_version": "1.4.317", |
|||
"version": "1.4.342", |
|||
"tag": "v%VERSION%" |
|||
}, |
|||
"vulkan-utility-libraries": { |
|||
"repo": "KhronosGroup/Vulkan-Utility-Libraries", |
|||
"package": "VulkanUtilityLibraries", |
|||
"version": "1.4.342", |
|||
"tag": "v%VERSION%" |
|||
} |
|||
``` |
|||
|
|||
In CMake: |
|||
|
|||
```cmake |
|||
AddDependentPackages(vulkan-headers vulkan-utility-libraries) |
|||
``` |
|||
|
|||
Possible scenarios: |
|||
|
|||
- The user has both Vulkan Headers and Vulkan Utility Libraries installed to the system, and both are new enough. |
|||
- Configuration proceeds without issue. |
|||
- The user has neither installed, or has a too-old version of Vulkan Headers installed |
|||
- Configuration proceeds without issue. |
|||
- The user has a valid Vulkan Headers installed, but not Vulkan Utility Libraries. |
|||
- CPMUtil instructs the user to either force bundled Vulkan Headers, or install Vulkan Utility Libraries. |
|||
- The user has both installed, but Vulkan Headers are too old. |
|||
- CPMUtil instructs the user to install a valid version of Vulkan Headers, or force bundled Vulkan Utility Libraries. |
|||
|
|||
## Addendum: Module Path Packages |
|||
|
|||
Sometimes, a prebuilt CI package may be packed in such a way that it's meant to be used in the context of a system install (e.g. pkgconfig or CMakeConfig files). In this case, CPMUtil normally will be unable to configure the downloaded subdirectory. To solve this, you can use `AddJsonPackage`'s `MODULE_PATH` mode, which adds the downloaded source directory to the `CMAKE_MODULE_PATH`. |
|||
|
|||
### Example: OpenSSL |
|||
|
|||
Say an OpenSSL CI package is packed to contain its CMake config files rather than a root `CMakeLists.txt`; in this case, you would call: |
|||
|
|||
```cmake |
|||
AddJsonPackage(NAME openssl MODULE_PATH) |
|||
``` |
|||
|
|||
The `NAME` argument is also required, as the parsing is different from the standard single-argument function signature. |
|||
|
|||
From here, calling `find_package(OpenSSL)` will use the bundled OpenSSL. |
|||
|
|||
## Addendum: Adding Qt |
|||
|
|||
If you'd like to use customized Qt builds, CPMUtil provides a convenience function that allows you to add Qt builds. This usage and setup is subject to change. |
|||
|
|||
See [crueter-ci/Qt](https://github.com/crueter-ci/Qt) for an example of how one might build customized Qt. To add a Qt build to your project, use `AddQt(<repository> <version>)`, e.g.: |
|||
|
|||
```cmake |
|||
AddQt(QDash-CI/Qt 6.11.1) |
|||
``` |
|||
|
|||
Then, call `find_package(Qt6 ...)` and it will pull Qt from your downloaded source. |
|||
@ -1,21 +0,0 @@ |
|||
# AddPackage |
|||
|
|||
- `VERSION` (required): The version to get (the tag will be `v${VERSION}`) |
|||
- `NAME` (required): Name used within the artifacts |
|||
- `REPO` (required): CI repository, e.g. `crueter-ci/OpenSSL` |
|||
- `PACKAGE` (required): `find_package` package name |
|||
- `EXTENSION`: Artifact extension (default `tar.zst`) |
|||
- `MIN_VERSION`: Minimum version for `find_package`. Only used if platform does not support this package as a bundled artifact |
|||
- `DISABLED_PLATFORMS`: List of platforms that lack artifacts for this package. Options: |
|||
- `windows-amd64` |
|||
- `windows-arm64` |
|||
- `mingw-amd64` |
|||
- `mingw-arm64` |
|||
- `android-x86_64` |
|||
- `android-aarch64` |
|||
- `solaris-amd64` |
|||
- `freebsd-amd64` |
|||
- `linux-amd64` |
|||
- `linux-aarch64` |
|||
- `macos-universal` |
|||
- `ios-aarch64` |
|||
@ -1,41 +0,0 @@ |
|||
# AddDependentPackage |
|||
|
|||
Use `AddDependentPackage` when you have multiple packages that are required to all be from the system, OR bundled. This is useful in cases where e.g. versions must absolutely match. |
|||
|
|||
## Versioning |
|||
|
|||
Versioning must be handled by the package itself. |
|||
|
|||
## Examples |
|||
|
|||
### Vulkan |
|||
|
|||
`cpmfile.json` |
|||
|
|||
```json |
|||
{ |
|||
"vulkan-headers": { |
|||
"repo": "KhronosGroup/Vulkan-Headers", |
|||
"package": "VulkanHeaders", |
|||
"version": "1.4.317", |
|||
"hash": "26e0ad8fa34ab65a91ca62ddc54cc4410d209a94f64f2817dcdb8061dc621539a4262eab6387e9b9aa421db3dbf2cf8e2a4b041b696d0d03746bae1f25191272", |
|||
"git_version": "1.4.342", |
|||
"tag": "v%VERSION%" |
|||
}, |
|||
"vulkan-utility-libraries": { |
|||
"repo": "KhronosGroup/Vulkan-Utility-Libraries", |
|||
"package": "VulkanUtilityLibraries", |
|||
"hash": "8147370f964fd82c315d6bb89adeda30186098427bf3efaa641d36282d42a263f31e96e4586bfd7ae0410ff015379c19aa4512ba160630444d3d8553afd1ec14", |
|||
"git_version": "1.4.342", |
|||
"tag": "v%VERSION%" |
|||
} |
|||
} |
|||
``` |
|||
|
|||
`CMakeLists.txt`: |
|||
|
|||
```cmake |
|||
AddDependentPackages(vulkan-headers vulkan-utility-libraries) |
|||
``` |
|||
|
|||
If Vulkan Headers are installed, but NOT Vulkan Utility Libraries, then CPMUtil will throw an error. |
|||
@ -1,105 +0,0 @@ |
|||
# AddJsonPackage |
|||
|
|||
In each directory that utilizes `CPMUtil`, there must be a `cpmfile.json` that defines dependencies in a similar manner to the individual calls. |
|||
|
|||
The cpmfile is an object of objects, with each sub-object being named according to the package's identifier, e.g. `openssl`, which can then be fetched with `AddJsonPackage(<identifier>)`. Options are designed to map closely to the argument names, and are always strings unless otherwise specified. |
|||
<!-- TOC --> |
|||
- [Options](#options) |
|||
- [Examples](#examples) |
|||
<!-- /TOC --> |
|||
|
|||
## Options |
|||
|
|||
- `package` -> `NAME` (`PACKAGE` for CI), defaults to the object key |
|||
- `repo` -> `REPO` |
|||
- `version` -> `VERSION` |
|||
- `ci` (bool) |
|||
|
|||
If `ci` is `false`: |
|||
|
|||
- `hash` -> `HASH` |
|||
- `hash_suffix` -> `HASH_SUFFIX` |
|||
- `sha` -> `SHA` |
|||
- `key` -> `KEY` |
|||
- `tag` -> `TAG` |
|||
- If the tag contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified |
|||
- `url` -> `URL` |
|||
- `artifact` -> `ARTIFACT` |
|||
- If the artifact contains `%VERSION%`, that part will be replaced by the `git_version`, OR `version` if `git_version` is not specified |
|||
- If the artifact contains `%TAG%`, that part will be replaced by the `tag` (with its replacement already done) |
|||
- `git_version` -> `GIT_VERSION` |
|||
- `git_host` -> `GIT_HOST` |
|||
- `source_subdir` -> `SOURCE_SUBDIR` |
|||
- `bundled` -> `BUNDLED_PACKAGE` |
|||
- `find_args` -> `FIND_PACKAGE_ARGUMENTS` |
|||
- `download_only` -> `DOWNLOAD_ONLY` |
|||
- `patches` -> `PATCHES` (array) |
|||
- `options` -> `OPTIONS` (array) |
|||
- `skip_updates`: Tells `check-updates.sh` to not check for new updates on this package. |
|||
|
|||
Other arguments aren't currently supported. If you wish to add them, see the `AddJsonPackage` function in `CMakeModules/CPMUtil.cmake`. |
|||
|
|||
If `ci` is `true`: |
|||
|
|||
- `name` -> `NAME`, defaults to the object key |
|||
- `extension` -> `EXTENSION`, defaults to `tar.zst` |
|||
- `min_version` -> `MIN_VERSION` |
|||
- `extension` -> `EXTENSION` |
|||
- `disabled_platforms` -> `DISABLED_PLATFORMS` (array) |
|||
|
|||
## Examples |
|||
|
|||
In order: OpenSSL CI, Boost (tag + artifact), Opus (options + find_args), discord-rpc (sha + options + patches). |
|||
|
|||
```json |
|||
{ |
|||
"openssl": { |
|||
"ci": true, |
|||
"package": "OpenSSL", |
|||
"name": "openssl", |
|||
"repo": "crueter-ci/OpenSSL", |
|||
"version": "3.6.0", |
|||
"min_version": "1.1.1", |
|||
"disabled_platforms": [ |
|||
"macos-universal", |
|||
"ios-aarch64" |
|||
] |
|||
}, |
|||
"boost": { |
|||
"package": "Boost", |
|||
"repo": "boostorg/boost", |
|||
"tag": "boost-%VERSION%", |
|||
"artifact": "%TAG%-cmake.7z", |
|||
"hash": "e5b049e5b61964480ca816395f63f95621e66cb9bcf616a8b10e441e0e69f129e22443acb11e77bc1e8170f8e4171b9b7719891efc43699782bfcd4b3a365f01", |
|||
"git_version": "1.88.0", |
|||
"version": "1.57" |
|||
}, |
|||
"opus": { |
|||
"package": "Opus", |
|||
"repo": "xiph/opus", |
|||
"sha": "5ded705cf4", |
|||
"hash": "0dc89e58ddda1f3bc6a7037963994770c5806c10e66f5cc55c59286fc76d0544fe4eca7626772b888fd719f434bc8a92f792bdb350c807968b2ac14cfc04b203", |
|||
"version": "1.3", |
|||
"find_args": "MODULE", |
|||
"options": [ |
|||
"OPUS_BUILD_TESTING OFF", |
|||
"OPUS_BUILD_PROGRAMS OFF", |
|||
"OPUS_INSTALL_PKG_CONFIG_MODULE OFF", |
|||
"OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF" |
|||
] |
|||
}, |
|||
"discord-rpc": { |
|||
"repo": "discord/discord-rpc", |
|||
"sha": "963aa9f3e5", |
|||
"hash": "386e1344e9a666d730f2d335ee3aef1fd05b1039febefd51aa751b705009cc764411397f3ca08dffd46205c72f75b235c870c737b2091a4ed0c3b061f5919bde", |
|||
"options": [ |
|||
"BUILD_EXAMPLES OFF" |
|||
], |
|||
"patches": [ |
|||
"0001-cmake-version.patch", |
|||
"0002-no-clang-format.patch", |
|||
"0003-fix-cpp17.patch" |
|||
] |
|||
} |
|||
} |
|||
``` |
|||
@ -1,118 +0,0 @@ |
|||
# `AddPackage` |
|||
|
|||
<!-- TOC --> |
|||
- [Identification/Fetching](#identificationfetching) |
|||
- [Hashing](#hashing) |
|||
- [Other Options](#other-options) |
|||
- [Extra Variables](#extra-variables) |
|||
- [System/Bundled Packages](#systembundled-packages) |
|||
- [Identification](#identification) |
|||
<!-- /TOC --> |
|||
|
|||
## Identification/Fetching |
|||
|
|||
- `NAME` (required): The package name (must be the same as the `find_package` name if applicable) |
|||
- `VERSION`: The minimum version of this package that can be used on the system |
|||
- `GIT_VERSION`: The "version" found within git |
|||
- `URL`: The URL to fetch. |
|||
- `REPO`: The repo to use (`owner/repo`). |
|||
- `GIT_HOST`: The Git host to use |
|||
- Defaults to `github.com`. Do not include the protocol, as HTTPS is enforced. |
|||
- `TAG`: The tag to fetch, if applicable. |
|||
- `ARTIFACT`: The name of the artifact, if applicable. |
|||
- `SHA`: Commit sha to fetch, if applicable. |
|||
- `BRANCH`: Branch to fetch, if applicable. |
|||
|
|||
The following configurations are supported, in descending order of precedence: |
|||
|
|||
- `URL`: Bare URL download, useful for custom artifacts |
|||
- If this is set, `GIT_URL` or `REPO` should be set to allow the dependency viewer to link to the project's Git repository. |
|||
- If this is NOT set, `REPO` must be defined. |
|||
- `REPO + TAG + ARTIFACT`: GitHub release artifact |
|||
- The final download URL will be `https://github.com/${REPO}/releases/download/${TAG}/${ARTIFACT}` |
|||
- Useful for prebuilt libraries and prefetched archives |
|||
- `REPO + TAG`: GitHub tag archive |
|||
- The final download URL will be `https://github.com/${REPO}/archive/refs/tags/${TAG}.tar.gz` |
|||
- Useful for pinning to a specific tag, better for build identification |
|||
- `REPO + SHA`: GitHub commit archive |
|||
- The final download URL will be `https://github.com/${REPO}/archive/${SHA}.zip` |
|||
- Useful for pinning to a specific commit |
|||
- `REPO + BRANCH`: GitHub branch archive |
|||
- The final download URL will be `https://github.com/${REPO}/archive/refs/heads/${BRANCH}.zip` |
|||
- Generally not recommended unless the branch is frozen |
|||
- `REPO`: GitHub master archive |
|||
- The final download URL will be `https://github.com/${REPO}/archive/refs/heads/master.zip` |
|||
- Generally not recommended unless the project is dead |
|||
|
|||
## Hashing |
|||
|
|||
Hashing is used for verifying downloads. It's highly recommended to use these. |
|||
|
|||
- `HASH_ALGO` (default `SHA512`): Hash algorithm to use |
|||
|
|||
Hashing strategies, descending order of precedence: |
|||
|
|||
- `HASH`: Bare hash verification, useful for static downloads e.g. commit archives |
|||
- `HASH_SUFFIX`: Download the hash as `${DOWNLOAD_URL}.${HASH_SUFFIX}` |
|||
- The downloaded hash *must* match the hash algorithm and contain nothing but the hash; no filenames or extra content. |
|||
- `HASH_URL`: Download the hash from a separate URL |
|||
|
|||
## Other Options |
|||
|
|||
- `KEY`: Custom cache key to use (stored as `.cache/cpm/${packagename_lower}/${key}`) |
|||
- Default is based on, in descending order of precedence: |
|||
- First 4 characters of the sha |
|||
- `GIT_VERSION` |
|||
- Tag |
|||
- `VERSION` |
|||
- Otherwise, CPM defaults will be used. This is not recommended as it doesn't produce reproducible caches |
|||
- `DOWNLOAD_ONLY`: Whether or not to configure the downloaded package via CMake |
|||
- Useful to turn `OFF` if the project doesn't use CMake |
|||
- `SOURCE_SUBDIR`: Subdirectory of the project containing a CMakeLists.txt file |
|||
- `FIND_PACKAGE_ARGUMENTS`: Arguments to pass to the `find_package` call |
|||
- `BUNDLED_PACKAGE`: Set to `ON` to default to the bundled package |
|||
- `FORCE_BUNDLED_PACKAGE`: Set to `ON` to force the usage of the bundled package, regardless of CPMUTIL_FORCE_SYSTEM or `<package>_FORCE_SYSTEM` |
|||
- `OPTIONS`: Options to pass to the configuration of the package |
|||
- `PATCHES`: Patches to apply to the package, stored in `.patch/${packagename_lower}/0001-patch-name.patch` and so on |
|||
- Other arguments can be passed to CPM as well |
|||
|
|||
## Extra Variables |
|||
|
|||
For each added package, users may additionally force usage of the system/bundled package. |
|||
|
|||
- `${package}_DIR`: Path to a separately-downloaded copy of the package. Note that versioning is not checked! |
|||
- `${package}_FORCE_SYSTEM`: Require the package to be installed on the system |
|||
- `${package}_FORCE_BUNDLED`: Force the package to be fetched and use the bundled version |
|||
|
|||
## System/Bundled Packages |
|||
|
|||
Descending order of precedence: |
|||
|
|||
- If `${package}_FORCE_SYSTEM` is true, requires the package to be on the system |
|||
- If `${package}_FORCE_BUNDLED` is true, forcefully uses the bundled package |
|||
- If `CPMUTIL_FORCE_SYSTEM` is true, requires the package to be on the system |
|||
- If `CPMUTIL_FORCE_BUNDLED` is true, forcefully uses the bundled package |
|||
- If the `BUNDLED_PACKAGE` argument is true, forcefully uses the bundled package |
|||
- Otherwise, CPM will search for the package first, and if not found, will use the bundled package |
|||
|
|||
## Identification |
|||
|
|||
All dependencies must be identifiable in some way for usage in the dependency viewer. Lists are provided in descending order of precedence. |
|||
|
|||
URLs: |
|||
|
|||
- `GIT_URL` |
|||
- `REPO` as a Git repository |
|||
- You may optionally specify `GIT_HOST` to use a custom host, e.g. `GIT_HOST git.crueter.xyz`. Note that the git host MUST be GitHub-like in its artifact/archive downloads, e.g. Forgejo |
|||
- If `GIT_HOST` is unspecified, defaults to `github.com` |
|||
- `URL` |
|||
|
|||
Versions (bundled): |
|||
|
|||
- `SHA` |
|||
- `GIT_VERSION` |
|||
- `VERSION` |
|||
- `TAG` |
|||
- "unknown" |
|||
|
|||
If the package is a system package, AddPackage will attempt to determine the package version and append `(system)` to the identifier. Otherwise, it will be marked as `unknown (system)` |
|||
@ -1,28 +0,0 @@ |
|||
# AddQt |
|||
|
|||
Simply call `AddQt(<Qt Version>)` before any Qt `find_package` calls and everything will be set up for you. On Linux, the bundled Qt library is built as a shared library, and provided you have OpenSSL and X11, everything should just work. |
|||
|
|||
On Windows, MinGW, and MacOS, Qt is bundled as a static library. No further action is needed, as the provided libraries automatically integrate the Windows/Cocoa plugins, alongside the corresponding Multimedia and Network plugins. |
|||
|
|||
## Modules |
|||
|
|||
The following modules are bundled into these Qt builds: |
|||
|
|||
- Base (Gui, Core, Widgets, Network) |
|||
- Multimedia |
|||
- Declarative (Quick, QML) |
|||
- Linux: Wayland client |
|||
|
|||
Each platform has the corresponding QPA built in and set as the default as well. This means you don't need to add `Q_IMPORT_PLUGIN`! |
|||
|
|||
## Example |
|||
|
|||
See an example in the [`tests/qt`](https://git.crueter.xyz/CMake/CPMUtil/src/branch/master/tests/qt/CMakeLists.txt) directory. |
|||
|
|||
## Versions |
|||
|
|||
The following versions have available builds: |
|||
|
|||
- 6.9.3 |
|||
|
|||
See [`crueter-ci/Qt`](https://github.com/crueter-ci/Qt) for an updated list at any time. |
|||
@ -1,70 +0,0 @@ |
|||
# CPMUtil |
|||
|
|||
CPMUtil is a wrapper around CPM that aims to reduce boilerplate and add useful utility functions to make dependency management a piece of cake. |
|||
|
|||
Global Options: |
|||
|
|||
- `CPMUTIL_FORCE_SYSTEM` (default `OFF`): Require all CPM dependencies to use system packages. NOT RECOMMENDED! |
|||
- You may optionally override this (section) |
|||
- `CPMUTIL_FORCE_BUNDLED` (default `ON` on MSVC and Android, `OFF` elsewhere): Require all CPM dependencies to use bundled packages. |
|||
|
|||
You are highly encouraged to read AddPackage first, even if you plan to only interact with CPMUtil via `AddJsonPackage`. |
|||
|
|||
- [AddPackage](#addpackage) |
|||
- [AddCIPackage](#addcipackage) |
|||
- [AddJsonPackage](#addjsonpackage) |
|||
- [AddQt](#addqt) |
|||
- [Lists](#lists) |
|||
- [For Packagers](#for-packagers) |
|||
- [Network Sandbox](#network-sandbox) |
|||
- [Unsandboxed](#unsandboxed) |
|||
|
|||
## AddPackage |
|||
|
|||
The core of CPMUtil is the [`AddPackage`](./AddPackage.md) function. [`AddPackage`](./AddPackage.md) itself is fully CMake-based, and largely serves as an interface between CPM and the rest of CPMUtil. |
|||
|
|||
## AddCIPackage |
|||
|
|||
[`AddCIPackage`](./AddCIPackage.md) adds a package that follows [crueter's CI repository spec](https://github.com/crueter-ci). |
|||
|
|||
## AddJsonPackage |
|||
|
|||
[`AddJsonPackage`](./AddJsonPackage.md) is the recommended method of usage for CPMUtil. |
|||
|
|||
## AddDependentPackage |
|||
|
|||
[`AddDependentPackage`](./AddDependentPackage.md) allows you to add multiple packages such that all of them must be from the system OR bundled. |
|||
|
|||
## AddQt |
|||
|
|||
[`AddQt`](./AddQt.md) adds a specific version of Qt to your project. |
|||
|
|||
## Lists |
|||
|
|||
CPMUtil will create three lists of dependencies where `AddPackage` or similar was used. Each is in order of addition. |
|||
|
|||
- `CPM_PACKAGE_NAMES`: The names of packages included by CPMUtil |
|||
- `CPM_PACKAGE_URLS`: The URLs to project/repo pages of packages |
|||
- `CPM_PACKAGE_SHAS`: Short version identifiers for each package |
|||
- If the package was included as a system package, `(system)` is appended thereafter |
|||
- Packages whose versions can't be deduced will be left as `unknown`. |
|||
|
|||
For an example of how this might be implemented in an application, see Eden's implementation: |
|||
|
|||
- [`dep_hashes.h.in`](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/src/dep_hashes.h.in) |
|||
- [`GenerateDepHashes.cmake`](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CMakeModules/GenerateDepHashes.cmake) |
|||
- [`deps_dialog.cpp`](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/src/yuzu/deps_dialog.cpp) |
|||
|
|||
## For Packagers |
|||
|
|||
If you are packaging a project that uses CPMUtil, read this! |
|||
|
|||
### Network Sandbox |
|||
|
|||
For sandboxed environments (e.g. Gentoo, nixOS) you must install all dependencies to the system beforehand and set `-DCPMUTIL_FORCE_SYSTEM=ON`. If a dependency is missing, get creating! |
|||
|
|||
Alternatively, if CPMUtil pulls in a package that has no suitable way to install or use a system version, download it separately and pass `-DPackageName_DIR=/path/to/downloaded/dir` (e.g. shaders) |
|||
|
|||
### Unsandboxed |
|||
|
|||
For others (AUR, MPR, etc). CPMUtil will handle everything for you, including if some of the project's dependencies are missing from your distribution's repositories. That is pretty much half the reason I created this behemoth, after all. |
|||
@ -1,249 +0,0 @@ |
|||
{ |
|||
"vulkan-memory-allocator": { |
|||
"package": "VulkanMemoryAllocator", |
|||
"repo": "GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator", |
|||
"tag": "v%VERSION%", |
|||
"hash": "deb5902ef8db0e329fbd5f3f4385eb0e26bdd9f14f3a2334823fb3fe18f36bc5d235d620d6e5f6fe3551ec3ea7038638899db8778c09f6d5c278f5ff95c3344b", |
|||
"find_args": "CONFIG", |
|||
"git_version": "3.3.0" |
|||
}, |
|||
"sirit": { |
|||
"repo": "eden-emulator/sirit", |
|||
"git_version": "1.0.5", |
|||
"tag": "v%VERSION%", |
|||
"artifact": "sirit-source-%VERSION%.tar.zst", |
|||
"hash_suffix": "sha512sum", |
|||
"find_args": "CONFIG", |
|||
"options": [ |
|||
"SIRIT_USE_SYSTEM_SPIRV_HEADERS ON" |
|||
] |
|||
}, |
|||
"sirit-ci": { |
|||
"ci": true, |
|||
"package": "sirit", |
|||
"name": "sirit", |
|||
"repo": "eden-emulator/sirit", |
|||
"version": "1.0.5" |
|||
}, |
|||
"httplib": { |
|||
"repo": "yhirose/cpp-httplib", |
|||
"tag": "v%VERSION%", |
|||
"hash": "159ed94965018f2a371d45a3bfc1961e5fb1549e501ded70a6b4532d7fe99d0579c18b5195aff6e35f96f399b426cea2650ec9fb75ef80d4c9edeccb51f2e6c9", |
|||
"git_version": "0.46.0", |
|||
"find_args": "MODULE GLOBAL", |
|||
"patches": [ |
|||
"0001-mingw.patch" |
|||
], |
|||
"options": [ |
|||
"HTTPLIB_REQUIRE_OPENSSL ON", |
|||
"HTTPLIB_DISABLE_MACOSX_AUTOMATIC_ROOT_CERTIFICATES ON" |
|||
] |
|||
}, |
|||
"cpp-jwt": { |
|||
"version": "1.4", |
|||
"repo": "arun11299/cpp-jwt", |
|||
"sha": "7f24eb4c32", |
|||
"hash": "d11cbd5ddb3197b4c5ca15679bcd76a49963e7b530b7dd132db91e042925efa20dfb2c24ccfbe7ef82a7012af80deff0f72ee25851312ae80381a462df8534b8", |
|||
"find_args": "CONFIG", |
|||
"options": [ |
|||
"CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF" |
|||
], |
|||
"patches": [ |
|||
"0001-fix-missing-decl.patch" |
|||
] |
|||
}, |
|||
"xbyak": { |
|||
"package": "xbyak", |
|||
"repo": "herumi/xbyak", |
|||
"tag": "v%VERSION%", |
|||
"hash": "b6475276b2faaeb315734ea8f4f8bd87ededcee768961b39679bee547e7f3e98884d8b7851e176d861dab30a80a76e6ea302f8c111483607dde969b4797ea95a", |
|||
"git_version": "7.35.2" |
|||
}, |
|||
"oaknut": { |
|||
"repo": "eden-emulator/oaknut", |
|||
"version": "2.0.1", |
|||
"git_version": "2.0.3", |
|||
"tag": "v%VERSION%", |
|||
"hash": "9697e80a7d5d9bcb3ce51051a9a24962fb90ca79d215f1f03ae6b58da8ba13a63b5dda1b4dde3d26ac6445029696b8ef2883f4e5a777b342bba01283ed293856" |
|||
}, |
|||
"lagoon": { |
|||
"repo": "loongson-community/lagoon", |
|||
"tag": "%VERSION%", |
|||
"version": "1.0.0", |
|||
"hash": "b9380f99c6effaeccc6d8f81d4942e852c11ad28613df637e155451556ae5826f93765bee57a5c87a9740d2bd1db463ad0f55a947772fe9d57eeabae3efa373e" |
|||
}, |
|||
"libadrenotools": { |
|||
"repo": "eden-emulator/libadrenotools", |
|||
"sha": "8ba23b42d7", |
|||
"hash": "f6526620cb752876edc5ed4c0925d57b873a8218ee09ad10859ee476e9333259784f61c1dcc55a2bcba597352d18aff22cd2e4c1925ec2ae94074e09d7da2265", |
|||
"patches": [ |
|||
"0001-linkerns-cpm.patch" |
|||
] |
|||
}, |
|||
"oboe": { |
|||
"repo": "google/oboe", |
|||
"tag": "%VERSION%", |
|||
"hash": "ce4011afe7345370d4ead3b891cd69a5ef224b129535783586c0ca75051d303ed446e6c7f10bde8da31fff58d6e307f1732a3ffd03b249f9ef1fd48fd4132715", |
|||
"git_version": "1.10.0", |
|||
"bundled": true |
|||
}, |
|||
"unordered-dense": { |
|||
"package": "unordered_dense", |
|||
"repo": "martinus/unordered_dense", |
|||
"sha": "7b55cab841", |
|||
"hash": "d2106f6640f6bfb81755e4b8bfb64982e46ec4a507cacdb38f940123212ccf35a20b43c70c6f01d7bfb8c246d1a16f7845d8052971949cea9def1475e3fa02c8", |
|||
"find_args": "CONFIG", |
|||
"bundled": true, |
|||
"patches": [ |
|||
"0001-avoid-memset-when-clearing-an-empty-table.patch" |
|||
] |
|||
}, |
|||
"enet": { |
|||
"repo": "lsalzman/enet", |
|||
"tag": "v%VERSION%", |
|||
"hash": "a0d2fa8c957704dd49e00a726284ac5ca034b50b00d2b20a94fa1bbfbb80841467834bfdc84aa0ed0d6aab894608fd6c86c3b94eee46343f0e6d9c22e391dbf9", |
|||
"version": "1.3", |
|||
"git_version": "1.3.18", |
|||
"find_args": "MODULE" |
|||
}, |
|||
"spirv-headers": { |
|||
"package": "SPIRV-Headers", |
|||
"repo": "KhronosGroup/SPIRV-Headers", |
|||
"sha": "04f10f650d", |
|||
"hash": "cae8cd179c9013068876908fecc1d158168310ad6ac250398a41f0f5206ceff6469e2aaeab9c820bce9d1b08950c725c89c46e94b89a692be9805432cf749396", |
|||
"options": [ |
|||
"SPIRV_WERROR OFF" |
|||
] |
|||
}, |
|||
"cubeb": { |
|||
"repo": "mozilla/cubeb", |
|||
"sha": "fa02160712", |
|||
"hash": "8a4bcb2f83ba590f52c66626e895304a73eb61928dbc57777e1822e55378e3568366f17f9da4b80036cc2ef4ea9723c32abf6e7d9bbe00fb03654f0991596ab0", |
|||
"find_args": "CONFIG", |
|||
"options": [ |
|||
"USE_SANITIZERS OFF", |
|||
"BUILD_TESTS OFF", |
|||
"BUILD_TOOLS OFF", |
|||
"BUNDLE_SPEEX ON" |
|||
] |
|||
}, |
|||
"sdl3-ci": { |
|||
"ci": true, |
|||
"package": "SDL3", |
|||
"name": "SDL3", |
|||
"repo": "crueter-ci/SDL3", |
|||
"version": "3.4.8-d57c3b685c", |
|||
"min_version": "3.2.10" |
|||
}, |
|||
"catch2": { |
|||
"package": "Catch2", |
|||
"repo": "catchorg/Catch2", |
|||
"tag": "v%VERSION%", |
|||
"hash": "7eea385d79d88a5690cde131fe7ccda97d5c54ea09d6f515000d7bf07c828809d61c1ac99912c1ee507cf933f61c1c47ecdcc45df7850ffa82714034b0fccf35", |
|||
"version": "3.0.1", |
|||
"git_version": "3.13.0", |
|||
"patches": [ |
|||
"0001-solaris-isnan-fix.patch" |
|||
] |
|||
}, |
|||
"discord-rpc": { |
|||
"package": "DiscordRPC", |
|||
"repo": "eden-emulator/discord-rpc", |
|||
"sha": "0d8b2d6a37", |
|||
"hash": "8213c43dcb0f7d479f5861091d111ed12fbdec1e62e6d729d65a4bc181d82f48a35d5fd3cd5c291f2393ac7c9681eabc6b76609755f55376284c8a8d67e148f3", |
|||
"find_args": "MODULE" |
|||
}, |
|||
"simpleini": { |
|||
"package": "SimpleIni", |
|||
"repo": "brofield/simpleini", |
|||
"tag": "v%VERSION%", |
|||
"hash": "b937c18a7b6277d77ca7ebfb216af4984810f77af4c32d101b7685369a4bd5eb61406223f82698e167e6311a728d07415ab59639fdf19eff71ad6dc2abfda989", |
|||
"find_args": "MODULE", |
|||
"git_version": "4.25" |
|||
}, |
|||
"sdl3": { |
|||
"package": "SDL3", |
|||
"repo": "libsdl-org/SDL", |
|||
"tag": "release-%VERSION%", |
|||
"hash": "df5a323af7ac366661a3c0e887969c72584d232f3cc211419d59b0487b620b6b2859d4549c9e8df002ee489290062e466fcfddf7edc0872a37b1f2845e81c0f3", |
|||
"git_version": "3.4.8", |
|||
"version": "3.2.10" |
|||
}, |
|||
"moltenvk": { |
|||
"repo": "V380-Ori/Ryujinx.MoltenVK", |
|||
"tag": "v%VERSION%-ryujinx", |
|||
"git_version": "1.4.1", |
|||
"artifact": "MoltenVK-macOS.tar", |
|||
"hash": "5695b36ca5775819a71791557fcb40a4a5ee4495be6b8442e0b666d0c436bec02aae68cc6210183f7a5c986bdbec0e117aecfad5396e496e9c2fd5c89133a347", |
|||
"bundled": true |
|||
}, |
|||
"gamemode": { |
|||
"repo": "FeralInteractive/gamemode", |
|||
"sha": "ce6fe122f3", |
|||
"hash": "e87ec14ed3e826d578ebf095c41580069dda603792ba91efa84f45f4571a28f4d91889675055fd6f042d7dc25b0b9443daf70963ae463e38b11bcba95f4c65a9", |
|||
"version": "1.7", |
|||
"find_args": "MODULE" |
|||
}, |
|||
"biscuit": { |
|||
"repo": "lioncash/biscuit", |
|||
"tag": "v%VERSION%", |
|||
"hash": "1229f345b014f7ca544dedb4edb3311e41ba736f9aa9a67f88b5f26f3c983288c6bb6cdedcfb0b8a02c63088a37e6a0d7ba97d9c2a4d721b213916327cffe28a", |
|||
"version": "0.9.1", |
|||
"git_version": "0.19.0" |
|||
}, |
|||
"libusb": { |
|||
"repo": "libusb/libusb", |
|||
"tag": "v%VERSION%", |
|||
"hash": "98c5f7940ff06b25c9aa65aa98e23de4c79a4c1067595f4c73cc145af23a1c286639e1ba11185cd91bab702081f307b973f08a4c9746576dc8d01b3620a3aeb5", |
|||
"find_args": "MODULE", |
|||
"git_version": "1.0.29", |
|||
"patches": [ |
|||
"0001-netbsd-gettime.patch" |
|||
] |
|||
}, |
|||
"ffmpeg": { |
|||
"repo": "FFmpeg/FFmpeg", |
|||
"sha": "c7b5f1537d", |
|||
"hash": "ed177621176b3961bdcaa339187d3a7688c1c8b060b79c4bb0257cbc67ad7021ae5d5adca5303b45625abbbe3d9aafdd87ce777b8690ac295290d744c875489a", |
|||
"bundled": true |
|||
}, |
|||
"ffmpeg-ci": { |
|||
"ci": true, |
|||
"package": "FFmpeg", |
|||
"name": "ffmpeg", |
|||
"repo": "crueter-ci/FFmpeg", |
|||
"version": "8.0.1-c7b5f1537d", |
|||
"min_version": "4.1" |
|||
}, |
|||
"tzdb": { |
|||
"package": "nx_tzdb", |
|||
"repo": "eden-emu/tzdb_to_nx", |
|||
"git_host": "git.eden-emu.dev", |
|||
"artifact": "%VERSION%.tar.gz", |
|||
"tag": "%VERSION%", |
|||
"hash": "cce65a12bf90f4ead43b24a0b95dfad77ac3d9bfbaaf66c55e6701346e7a1e44ca5d2f23f47ee35ee02271eb1082bf1762af207aad9fb236f1c8476812d008ed", |
|||
"version": "121125", |
|||
"git_version": "230326" |
|||
}, |
|||
"vulkan-headers": { |
|||
"repo": "KhronosGroup/Vulkan-Headers", |
|||
"package": "VulkanHeaders", |
|||
"version": "1.4.317", |
|||
"hash": "d2846ea228415772645eea4b52a9efd33e6a563043dd3de059e798be6391a8f0ca089f455ae420ff22574939ed0f48ed7c6ff3d5a9987d5231dbf3b3f89b484b", |
|||
"git_version": "1.4.345", |
|||
"tag": "v%VERSION%" |
|||
}, |
|||
"vulkan-utility-libraries": { |
|||
"repo": "KhronosGroup/Vulkan-Utility-Libraries", |
|||
"package": "VulkanUtilityLibraries", |
|||
"hash": "114f6b237a6dcba923ccc576befb5dea3f1c9b3a30de7dc741f234a831d1c2d52d8a224afb37dd57dffca67ac0df461eaaab6a5ab5e503b393f91c166680c3e1", |
|||
"git_version": "1.4.345", |
|||
"tag": "v%VERSION%" |
|||
}, |
|||
"frozen": { |
|||
"package": "frozen", |
|||
"repo": "serge-sans-paille/frozen", |
|||
"sha": "61dce5ae18", |
|||
"hash": "b8dfe741c82bc178dfc9749d4ab5a130cee718d9ee7b71d9b547cf5f7f23027ed0152ad250012a8546399fcc1e12187efc68d89d6731256c4d2df7d04eef8d5c" |
|||
} |
|||
} |
|||
@ -1,9 +1,9 @@ |
|||
#!/bin/sh -e |
|||
|
|||
# SPDX-FileCopyrightText: Copyright 2025 crueter |
|||
# SPDX-FileCopyrightText: Copyright 2026 crueter |
|||
# SPDX-License-Identifier: LGPL-3.0-or-later |
|||
|
|||
for file in $CPMFILES; do |
|||
jq --indent 4 <"$file" >"$file".new |
|||
mv "$file".new "$file" |
|||
done |
|||
file=cpmfile.json |
|||
|
|||
jq --indent 4 -S <"$file" >"$file".new |
|||
mv "$file".new "$file" |
|||
@ -1,13 +1,11 @@ |
|||
#!/bin/sh -e |
|||
|
|||
# SPDX-FileCopyrightText: Copyright 2025 crueter |
|||
# SPDX-FileCopyrightText: Copyright 2026 crueter |
|||
# SPDX-License-Identifier: LGPL-3.0-or-later |
|||
|
|||
# Replace a specified package with a modified json. |
|||
|
|||
FILE=$(echo "$CPMFILES" | xargs grep -l "\"$1\"") |
|||
jq --indent 4 --argjson repl "$2" ".\"$1\" *= \$repl" cpmfile.json >cpmfile.json.new |
|||
mv cpmfile.json.new cpmfile.json |
|||
|
|||
jq --indent 4 --argjson repl "$2" ".\"$1\" *= \$repl" "$FILE" >"$FILE".new |
|||
mv "$FILE".new "$FILE" |
|||
|
|||
echo "-- * -- Updated $FILE" |
|||
echo "-- * -- Updated cpmfile.json" |
|||
@ -1,28 +1,23 @@ |
|||
#!/bin/sh |
|||
#!/bin/sh -e |
|||
|
|||
# SPDX-FileCopyrightText: Copyright 2025 crueter |
|||
# SPDX-FileCopyrightText: Copyright 2026 crueter |
|||
# SPDX-License-Identifier: LGPL-3.0-or-later |
|||
|
|||
# Required vars: URL, GIT_HOST, REPO, TAG, ARTIFACT, BRANCH, SHA |
|||
# Get the download URL for a package |
|||
|
|||
if [ "$URL" != "null" ]; then |
|||
DOWNLOAD="$URL" |
|||
elif [ "$REPO" != "null" ]; then |
|||
GIT_URL="https://$GIT_HOST/$REPO" |
|||
|
|||
if [ "$TAG" != "null" ]; then |
|||
if [ "$SHA" != "null" ]; then |
|||
DOWNLOAD="${GIT_URL}/archive/${SHA}.tar.gz" |
|||
elif [ "$TAG" != "null" ]; then |
|||
if [ "$ARTIFACT" != "null" ]; then |
|||
DOWNLOAD="${GIT_URL}/releases/download/${TAG}/${ARTIFACT}" |
|||
else |
|||
DOWNLOAD="${GIT_URL}/archive/refs/tags/${TAG}.tar.gz" |
|||
fi |
|||
elif [ "$SHA" != "null" ]; then |
|||
DOWNLOAD="${GIT_URL}/archive/${SHA}.tar.gz" |
|||
else |
|||
if [ "$BRANCH" = null ]; then |
|||
BRANCH=master |
|||
fi |
|||
|
|||
DOWNLOAD="${GIT_URL}/archive/refs/heads/${BRANCH}.tar.gz" |
|||
fi |
|||
else |
|||
echo "!! No repo or URL defined for $PACKAGE_NAME" |
|||
@ -1,21 +0,0 @@ |
|||
#!/bin/sh -e |
|||
|
|||
# SPDX-FileCopyrightText: Copyright 2025 crueter |
|||
# SPDX-License-Identifier: LGPL-3.0-or-later |
|||
|
|||
if [ "$KEY" = null ]; then |
|||
if [ "$SHA" != null ]; then |
|||
KEY=$(echo "$SHA" | cut -c1-4) |
|||
elif [ "$GIT_VERSION" != null ]; then |
|||
KEY="$GIT_VERSION" |
|||
elif [ "$TAG" != null ]; then |
|||
KEY="$TAG" |
|||
elif [ "$VERSION" != null ]; then |
|||
KEY="$VERSION" |
|||
else |
|||
echo "!! No valid key could be determined for $PACKAGE_NAME. Must define one of: key, sha, tag, version, git_version" |
|||
exit 1 |
|||
fi |
|||
fi |
|||
|
|||
export KEY |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue