xserver/.github/scripts/util.sh
Enrico Weigelt, metux IT consult 5e0430ef2f
Some checks are pending
Build X servers / xserver-build-ubuntu (push) Waiting to run
Build X servers / drivers-build-ubuntu (push) Waiting to run
Build X servers / xserver-build-macos (push) Waiting to run
Build X servers / Release pushed tag (push) Blocked by required conditions
.github: fix XTS build on MacOS
For strange reasons, our MacOS build breaks old XTS code, due their
compiler suddenly not accepting old K&R style function declarations.
(weird: that happens only on the 25.0 release, not newer ones, even
they're using the same build hosts and XTS revisions).

Fixing this by adding a special hotfix branch on our XTS mirror,
where all old K&S style function declations have been converted
to modern ones.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-04-17 18:50:03 +02:00

108 lines
2.5 KiB
Shell

. .github/scripts/conf.sh
[ "$X11_INSTALL_PREFIX" ] || X11_INSTALL_PREFIX="$X11_PREFIX"
SOURCE_DIR=`pwd`
clone_source() {
local pkgname="$1"
local url="$2"
local ref="$3"
$SOURCE_DIR/.github/scripts/git-smart-checkout.sh \
--name "$pkgname" \
--url "$url" \
--ref "$ref"
}
build_meson() {
local pkgname="$1"
local url="$2"
local ref="$3"
shift
shift
shift || true
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
echo "package $pkgname already built"
else
clone_source "$pkgname" "$url" "$ref"
(
cd $pkgname
meson "$@" build -Dprefix=$X11_PREFIX
ninja -j${FDO_CI_CONCURRENT:-4} -C build install
)
touch $X11_PREFIX/$pkgname.DONE
fi
}
build_ac() {
local pkgname="$1"
local url="$2"
local ref="$3"
shift
shift
shift || true
mkdir -p $X11_PREFIX
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
echo "package $pkgname already built"
else
clone_source "$pkgname" "$url" "$ref"
(
cd $pkgname
./autogen.sh --prefix=$X11_INSTALL_PREFIX
make -j${FDO_CI_CONCURRENT:-4} install
)
touch $X11_PREFIX/$pkgname.DONE
fi
}
build_drv_ac() {
local pkgname="$1"
local url="$2"
local ref="$3"
shift
shift
shift || true
clone_source "$pkgname" "$url" "$ref"
(
cd $pkgname
./autogen.sh # --prefix=$X11_PREFIX
make -j${FDO_CI_CONCURRENT:-4} # install
)
}
build_ac_xts() {
local pkgname="$1"
local url="$2"
local ref="$3"
shift
shift
shift || true
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
echo "package $pkgname already built"
else
echo "::group::Build XTS"
clone_source "$pkgname" "$url" "$ref"
(
cd $pkgname
CFLAGS='-fcommon'
if [ "$X11_OS" = "Darwin" ]; then
CFLAGS="$CFLAGS -Wno-error=incompatible-function-pointer-types"
fi
./autogen.sh --prefix=$X11_PREFIX CFLAGS="$CFLAGS"
if [ "$X11_OS" = "Darwin" ]; then
make -j${FDO_CI_CONCURRENT:-4} install tetexec.cfg
else
xvfb-run make -j${FDO_CI_CONCURRENT:-4} install tetexec.cfg
fi
)
touch $X11_PREFIX/$pkgname.DONE
echo "::endgroup::"
fi
}
fdo_mirror() {
local repo="$1"
echo -n "https://github.com/X11Libre/mirror.fdo.$1"
}