[cmake] Update CPMUtil (#4123)

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
- Added patch creation functionality

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4123
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
crueter 2026-06-26 02:22:04 +02:00
parent 6bdb03d8ac
commit c993bc01a4
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
35 changed files with 1500 additions and 1294 deletions

View file

@ -59,8 +59,33 @@ done
export UPDATE
for pkg in $packages; do
unset JSON
echo "-- Package $pkg"
"$SCRIPTS"/util/fix-hash.sh "$pkg" || RETURN=1
export PACKAGE="$pkg"
# shellcheck disable=SC1091
. "$SCRIPTS"/vars.sh
[ "$CI" = null ] || continue
ACTUAL=$("$SCRIPTS"/util/url-hash.sh "$DOWNLOAD")
if [ "$ACTUAL" != "$HASH" ] && [ "$QUIET" != true ]; then
echo "-- * Expected $HASH"
echo "-- * Got $ACTUAL"
if [ "$UPDATE" != "true" ]; then
RETURN=1
continue
fi
fi
if [ "$UPDATE" = "true" ] && [ "$ACTUAL" != "$HASH" ]; then
NEW_JSON=$(echo "$JSON" | jq ".hash = \"$ACTUAL\"")
"$SCRIPTS"/util/replace.sh "$PACKAGE" "$NEW_JSON"
fi
done
exit $RETURN