Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Appveyor CI builds #2776

Merged
merged 5 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ install:
- cmd: |
REM Do not give pacman cause for complaints:
C:\msys64\usr\bin\bash -lc "mkdir -p /var/cache/pacman/pkg; ls -la /"
REM FIXME: Since Jan 2025, normal update below fails with the message:
REM installing mingw-w64-i686-gdb (16.1-1) breaks dependency
REM 'mingw-w64-i686-gdb=15.2' required by mingw-w64-i686-gdb-multiarch
REM Currently we sweep it away by removing the conflicting package:
C:\msys64\usr\bin\bash -lc "date -u; pacman --noconfirm -R mingw-w64-i686-gdb-multiarch || true"
- cmd: |
REM Core update (in case any core packages are outdated):
C:\msys64\usr\bin\bash -lc "date -u; pacman --noconfirm -Syuu"
Expand Down
21 changes: 16 additions & 5 deletions scripts/Windows/build-mingw-prereqs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# Copyright (C) 2022-2023 by Jim Klimov <jimklimov+nut@gmail.com>
# Licensed same as NUT
# Copyright (C) 2022-2025 by Jim Klimov <jimklimov+nut@gmail.com>
# Licensed GPLv2+, same as NUT
#
# Helper automating the nuances from NUT::scripts/Windows/README.adoc
# to provide prerequisites needed in semi-native or cross-builds.
Expand All @@ -12,9 +12,18 @@
# TODO: Support `make uninstall` attempts for older versions?..

prepareEnv() {
[ -n "${MAKE-}" ] || MAKE="make -j 8"
[ -n "${MAKE-}" ] || {
(command -v gmake) 2>/dev/null >/dev/null \
&& MAKE="gmake" \
|| MAKE="make"
}
export MAKE

[ -n "${MAKEFLAGS-}" ] || {
MAKEFLAGS="-j 8"
export MAKEFLAGS
}

if [ -z "${SUDO-}" ] ; then
SUDO=" " # avoid reeval
if (command -v sudo) ; then SUDO="sudo" ; fi
Expand Down Expand Up @@ -47,7 +56,7 @@ prepareEnv() {

# Assumes Ubuntu/Debian with mingw prepared, per README
HOST_FLAG="--host=$ARCH"
PREFIX="/usr/$ARCH"
PREFIX="/usr/$ARCH"

export ARCH PREFIX

Expand Down Expand Up @@ -86,14 +95,16 @@ provide_netsnmp() (
# Quickly install if prebuilt
if [ -d "${WSDIR}/${DEP_DIRNAME}/.inst" ]; then (
cd "${WSDIR}/${DEP_DIRNAME}/.inst" || exit
(command -v rsync) && $SUDO rsync -avPHK ./ / && exit
(command -v rsync) && $SUDO rsync -cavPHK ./ / && exit
$SUDO cp -pr ./ / && exit
exit 1
) && return 0
fi

# no stashed .inst; any Makefile at least?
if [ -s "${WSDIR}/${DEP_DIRNAME}/Makefile" ]; then ( cd "${WSDIR}/${DEP_DIRNAME}" && $SUDO $MAKE install ) && return ; fi

# Not pre-built, fall through
fi

# (Re-)make and install from scratch
Expand Down
Loading