From 3383bb52d470fd2f7f4fa21657b2f7f5b2418057 Mon Sep 17 00:00:00 2001 From: Tim Schendekehl Date: Sat, 13 Jan 2024 12:31:59 +0100 Subject: [PATCH 1/3] Bump FreeBSD to 13.2 The DMD nightly build for FreeBSD fails since two weeks, because the old version is not available anymore. As a result the nightly builds for other platforms are also not uploaded. This increases the versions for FreeBSD the same as in https://github.com/dlang/dmd/pull/15979, but I have not tested it. --- .github/workflows/build_release_template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_release_template.yml b/.github/workflows/build_release_template.yml index b1f8a66c..4a673439 100644 --- a/.github/workflows/build_release_template.yml +++ b/.github/workflows/build_release_template.yml @@ -266,12 +266,12 @@ jobs: # - name: Run build_all.d for FreeBSD in a dedicated VM if: matrix.target == 'freebsd' - uses: cross-platform-actions/action@v0.21.1 + uses: cross-platform-actions/action@v0.22.0 with: operating_system: freebsd hypervisor: qemu memory: 8G - version: '12.2' + version: '13.2' shell: bash run: | set -eux From 624af72acb2c8ef7d82c9f141317ca669a7f86fe Mon Sep 17 00:00:00 2001 From: Johan Engelen Date: Mon, 22 Jan 2024 18:51:18 +0100 Subject: [PATCH 2/3] Only use an absolute path in the activate script. This fixes the activate script when install.sh is called with a relative path (e.g. `install.sh -p .`). --- script/install.sh | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/script/install.sh b/script/install.sh index 97673b30..7a439696 100755 --- a/script/install.sh +++ b/script/install.sh @@ -168,6 +168,22 @@ display_path() { echo "$1" fi } +abspath() { + if [[ -d "$1" ]] + then + pushd "$1" >/dev/null + pwd + popd >/dev/null + elif [[ -e "$1" ]] + then + pushd "$(dirname "$1")" >/dev/null + echo "$(pwd)/$(basename "$1")" + popd >/dev/null + else + echo "$1" does not exist! >&2 + return 127 + fi +} COMMAND= COMPILER=dmd @@ -1062,6 +1078,8 @@ binexec_for_dub_compiler() { } write_env_vars() { + ROOT_ABS="$(abspath "$ROOT")" + local -r binpath=$(binpath_for_compiler "$1") case $1 in dmd*) @@ -1124,14 +1142,14 @@ write_env_vars() { if [ -n "$libpath" ] ; then echo "_OLD_D_LIBRARY_PATH=\"\${LIBRARY_PATH:-}\"" echo "_OLD_D_LD_LIBRARY_PATH=\"\${LD_LIBRARY_PATH:-}\"" - echo "export LIBRARY_PATH=\"$ROOT/$1/$libpath\${LIBRARY_PATH:+:}\${LIBRARY_PATH:-}\"" - echo "export LD_LIBRARY_PATH=\"$ROOT/$1/$libpath\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH:-}\"" + echo "export LIBRARY_PATH=\"$ROOT_ABS/$1/$libpath\${LIBRARY_PATH:+:}\${LIBRARY_PATH:-}\"" + echo "export LD_LIBRARY_PATH=\"$ROOT_ABS/$1/$libpath\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH:-}\"" fi echo "_OLD_D_PATH=\"\${PATH:-}\"" echo "_OLD_D_PS1=\"\${PS1:-}\"" echo "export PS1=\"($1)\${PS1:-}\"" - echo "export PATH=\"${DUB_BIN_PATH}${DUB_BIN_PATH:+:}$ROOT/$1/$binpath\${PATH:+:}\${PATH:-}\"" + echo "export PATH=\"${DUB_BIN_PATH}${DUB_BIN_PATH:+:}$ROOT_ABS/$1/$binpath\${PATH:+:}\${PATH:-}\"" if [ -n "$dmd" ] ; then echo "export DMD=$dmd" @@ -1168,13 +1186,13 @@ write_env_vars() { echo "set -g _OLD_D_PATH \$PATH" echo "set -g _OLD_D_PS1 \$PS1" echo - echo "set -gx PATH ${DUB_BIN_PATH:+\'}${DUB_BIN_PATH}${DUB_BIN_PATH:+\' }'$ROOT/$1/$binpath' \$PATH" + echo "set -gx PATH ${DUB_BIN_PATH:+\'}${DUB_BIN_PATH}${DUB_BIN_PATH:+\' }'$ROOT_ABS/$1/$binpath' \$PATH" if [ -n "$libpath" ] ; then echo "set -g _OLD_D_LIBRARY_PATH \$LIBRARY_PATH" echo "set -g _OLD_D_LD_LIBRARY_PATH \$LD_LIBRARY_PATH" - echo "set -gx LIBRARY_PATH '$ROOT/$1/$libpath' \$LIBRARY_PATH" - echo "set -gx LD_LIBRARY_PATH '$ROOT/$1/$libpath' \$LD_LIBRARY_PATH" + echo "set -gx LIBRARY_PATH '$ROOT_ABS/$1/$libpath' \$LIBRARY_PATH" + echo "set -gx LD_LIBRARY_PATH '$ROOT_ABS/$1/$libpath' \$LD_LIBRARY_PATH" fi if [ -n "$dmd" ] ; then From 50f5825e9d9bf44afb9108f0c1a01a8038d2f156 Mon Sep 17 00:00:00 2001 From: Johan Engelen Date: Fri, 23 Feb 2024 21:48:15 +0100 Subject: [PATCH 3/3] Add extra help for LDC universal on macOS --- script/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script/install.sh b/script/install.sh index 7a439696..53a81592 100755 --- a/script/install.sh +++ b/script/install.sh @@ -1334,6 +1334,7 @@ Switching to x86_64 architecture (requires Rosetta). LDC has builds for macOS on aarch64/arm64 architecture since ldc-1.25.0. If you are installing an earlier version and get a download error, try '--arch x86_64' to install the x86_64 version instead (requires Rosetta). +Use '--arch universal' to install the universal LDC package that can target arm64 (native) and x86_64 (Rosetta). " ARCH=arm64 fi