mirror of
https://github.com/X11Libre/xf86-video-fbdev.git
synced 2026-03-24 01:24:49 +00:00
Adding a bunch of common scripts for building xorg drivers on different platforms (for now Debian and FreeBSD) against different server versions. Also designed to be executed locally (eg. within a VM), so one doesn't always have to employ f.d.o gitlab. For now, these are synced manually across various driver repos, until we've found a viable solution for a central place. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
59 lines
1.3 KiB
Bash
Executable File
59 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
PLATFORM="$1"
|
|
XSERVER_REF="$2"
|
|
|
|
if [ ! "$PLATFORM" ]; then
|
|
echo "missing PLATFORM" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! "$XSERVER_REF" ]; then
|
|
echo "missing XSERVER_REF" >&2
|
|
exit 1
|
|
fi
|
|
|
|
.gitlab-ci/common/build-xserver.sh "$PLATFORM" "$XSERVER_REF"
|
|
|
|
case "$PLATFORM" in
|
|
freebsd)
|
|
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/libdata/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/libdata/pkgconfig"
|
|
export ACLOCAL_PATH="/usr/share/aclocal:/usr/local/share/aclocal"
|
|
export CFLAGS="$CFLAGS -I/usr/local/include"
|
|
export UDEV_CFLAGS=" "
|
|
export UDEV_LIBS=" "
|
|
;;
|
|
debian)
|
|
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig"
|
|
;;
|
|
*)
|
|
echo "unknown platform $PLATFORM" >&2
|
|
;;
|
|
esac
|
|
|
|
if [ -f autogen.sh ]; then
|
|
(
|
|
echo "building driver via autotools"
|
|
rm -Rf _builddir
|
|
mkdir -p _builddir
|
|
cd _builddir
|
|
../autogen.sh --disable-silent-rules
|
|
make
|
|
make check
|
|
make distcheck
|
|
)
|
|
elif [ -f meson.build ]; then
|
|
(
|
|
echo "building driver via meson"
|
|
meson setup _build
|
|
cd _build
|
|
meson compile
|
|
meson install
|
|
)
|
|
else
|
|
echo "failed detecting build system"
|
|
exit 1
|
|
fi
|