[cmake] CPMUtil: formatting, git_host, new repos, more system deps, libusb (#392)
I promise I'm a UI developer - mbedtls can now be used as a system package - zycore can now be used as a system package - cleaned up dynarmic externals - fixed libusb incorrectly showing as bundled - add version/tag formatting to JSON - add custom GIT_HOST option for packages - moved some of my repos to my new git - slightly better version identification - combined VUL/VH since they are codependent (using my combo vendor) - fix cpmfile inclusion - remove libusb submodule This PR succeeds #383 since it includes it Co-authored-by: SDK Chan <sdkchan@eden-emu.dev> Reviewed-on: #392 Co-authored-by: crueter <crueter@crueter.xyz> Co-committed-by: crueter <crueter@crueter.xyz>
This commit is contained in:
parent
ecc99ce9ab
commit
428f136a75
39 changed files with 921 additions and 904 deletions
|
@ -84,7 +84,7 @@ ci_package() {
|
|||
|
||||
for platform in windows-amd64 windows-arm64 android solaris freebsd linux linux-aarch64; do
|
||||
FILENAME="${NAME}-${platform}-${VERSION}.${EXT}"
|
||||
DOWNLOAD="https://github.com/${REPO}/releases/download/v${VERSION}/${FILENAME}"
|
||||
DOWNLOAD="https://$GIT_HOST/${REPO}/releases/download/v${VERSION}/${FILENAME}"
|
||||
PACKAGE_NAME="$PACKAGE"
|
||||
KEY=$platform
|
||||
|
||||
|
@ -122,14 +122,32 @@ do
|
|||
URL=$(jq -r ".url" <<< "$JSON")
|
||||
REPO=$(jq -r ".repo" <<< "$JSON")
|
||||
SHA=$(jq -r ".sha" <<< "$JSON")
|
||||
GIT_HOST=$(jq -r ".git_host" <<< "$JSON")
|
||||
|
||||
[ "$GIT_HOST" == null ] && GIT_HOST=github.com
|
||||
|
||||
VERSION=$(jq -r ".version" <<< "$JSON")
|
||||
GIT_VERSION=$(jq -r ".git_version" <<< "$JSON")
|
||||
|
||||
if [ "$GIT_VERSION" != null ]; then
|
||||
VERSION_REPLACE="$GIT_VERSION"
|
||||
else
|
||||
VERSION_REPLACE="$VERSION"
|
||||
fi
|
||||
|
||||
TAG=$(jq -r ".tag" <<< "$JSON")
|
||||
|
||||
TAG=$(sed "s/%VERSION%/$VERSION_REPLACE/" <<< $TAG)
|
||||
|
||||
ARTIFACT=$(jq -r ".artifact" <<< "$JSON")
|
||||
ARTIFACT=$(sed "s/%VERSION%/$VERSION_REPLACE/" <<< $ARTIFACT)
|
||||
ARTIFACT=$(sed "s/%TAG%/$TAG/" <<< $ARTIFACT)
|
||||
|
||||
if [ "$URL" != "null" ]; then
|
||||
DOWNLOAD="$URL"
|
||||
elif [ "$REPO" != "null" ]; then
|
||||
GIT_URL="https://github.com/$REPO"
|
||||
GIT_URL="https://$GIT_HOST/$REPO"
|
||||
|
||||
TAG=$(jq -r ".tag" <<< "$JSON")
|
||||
ARTIFACT=$(jq -r ".artifact" <<< "$JSON")
|
||||
BRANCH=$(jq -r ".branch" <<< "$JSON")
|
||||
|
||||
if [ "$TAG" != "null" ]; then
|
||||
|
@ -155,24 +173,21 @@ do
|
|||
# key parsing
|
||||
KEY=$(jq -r ".key" <<< "$JSON")
|
||||
|
||||
if [ "$KEY" == null ]; then
|
||||
VERSION=$(jq -r ".version" <<< "$JSON")
|
||||
GIT_VERSION=$(jq -r ".git_version" <<< "$JSON")
|
||||
|
||||
if [ "$KEY" == null ]; then
|
||||
if [ "$SHA" != null ]; then
|
||||
KEY=$(cut -c1-4 - <<< "$SHA")
|
||||
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. Must define one of: key, sha, version, git_version"
|
||||
echo "No valid key could be determined for $package. Must define one of: key, sha, tag, version, git_version"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $KEY
|
||||
|
||||
echo "Downloading regular package $package, with key $KEY, from $DOWNLOAD"
|
||||
|
||||
# hash parsing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue