You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
google-cloud-sdk: use build phase for installation (#31622)
This commit is contained in:
@@ -50,26 +50,6 @@ worksrcdir ${name}
|
||||
# gsutil (https://docs.cloud.google.com/storage/docs/gsutil_install#specifications)
|
||||
python.default_version 313
|
||||
|
||||
post-patch {
|
||||
# Default to the MacPorts Python binary
|
||||
reinplace "s|CLOUDSDK_PYTHON=\$(order_python .*|CLOUDSDK_PYTHON=${python.bin}|" \
|
||||
${worksrcpath}/bin/bq \
|
||||
${worksrcpath}/bin/docker-credential-gcloud \
|
||||
${worksrcpath}/bin/git-credential-gcloud.sh \
|
||||
${worksrcpath}/bin/gcloud \
|
||||
${worksrcpath}/bin/gsutil \
|
||||
${worksrcpath}/bin/java_dev_appserver.sh
|
||||
|
||||
reinplace "s|^#!/usr/bin/env python$|#!${python.bin}|" \
|
||||
${worksrcpath}/bin/dev_appserver.py
|
||||
|
||||
# Disable updater
|
||||
reinplace "s|\"disable_updater\": false|\"disable_updater\": true|" ${worksrcpath}/lib/googlecloudsdk/core/config.json
|
||||
}
|
||||
|
||||
use_configure no
|
||||
build {}
|
||||
|
||||
# MacPorts variants are not allowed to contain '-' and gcloud component names use both '-' and '_',
|
||||
# so each variant adds an explicit mapping from variant name to gcloud component name.
|
||||
# See https://cloud.google.com/sdk/docs/components for more info about gcloud components.
|
||||
@@ -112,7 +92,8 @@ variant spanner_migration_tool description {Add Spanner migration tool} { dict s
|
||||
variant skaffold description {Add Skaffold} { dict set variant_to_component skaffold skaffold }
|
||||
variant terraform_tools description {Add Terraform Tools} { dict set variant_to_component terraform_tools terraform-tools }
|
||||
|
||||
patch {
|
||||
use_configure no
|
||||
build {
|
||||
# Define the basic installation command
|
||||
set install_command "CLOUDSDK_CONFIG=${worksrcpath}/.config CLOUDSDK_PYTHON=${python.bin} ./install.sh \
|
||||
--usage-reporting false \
|
||||
@@ -137,6 +118,21 @@ patch {
|
||||
|
||||
# Run installer script
|
||||
system -W ${worksrcpath} ${install_command}
|
||||
|
||||
# Default to the MacPorts Python binary
|
||||
reinplace "s|CLOUDSDK_PYTHON=\$(order_python .*|CLOUDSDK_PYTHON=${python.bin}|" \
|
||||
${worksrcpath}/bin/bq \
|
||||
${worksrcpath}/bin/docker-credential-gcloud \
|
||||
${worksrcpath}/bin/git-credential-gcloud.sh \
|
||||
${worksrcpath}/bin/gcloud \
|
||||
${worksrcpath}/bin/gsutil \
|
||||
${worksrcpath}/bin/java_dev_appserver.sh
|
||||
|
||||
reinplace "s|^#!/usr/bin/env python$|#!${python.bin}|" \
|
||||
${worksrcpath}/bin/dev_appserver.py
|
||||
|
||||
# Disable updater
|
||||
reinplace "s|\"disable_updater\": false|\"disable_updater\": true|" ${worksrcpath}/lib/googlecloudsdk/core/config.json
|
||||
}
|
||||
|
||||
test.run yes
|
||||
|
||||
Reference in New Issue
Block a user