Skip to content
Snippets Groups Projects
Commit bc17fdc2 authored by Brian Tarricone's avatar Brian Tarricone
Browse files

Allow the container build to build dependencies using meson

parent 194f6b6d
No related branches found
No related tags found
1 merge request!98Meson support
......@@ -18,6 +18,15 @@ AUTOGEN_OPTIONS="
--enable-gtk-doc
"
MESON_SETUP_OPTIONS="
--buildtype=release
--prefix=/usr
--libdir=$libdir
--libexecdir=$libexecdir
--sysconfdir=/etc
--localstatedir=/var
"
# list of git repos in build order
REPOS="${XFCE_BASE}/xfce/xfce4-dev-tools.git
${XFCE_BASE}/xfce/libxfce4util.git
......@@ -40,24 +49,43 @@ for URL in ${REPOS}; do
TAG=$(git tag --sort=version:refname | grep "$NAME-" | tail -1)
echo "--- Building $NAME ($TAG) ---"
git checkout -b build-$TAG $TAG
./autogen.sh $AUTOGEN_OPTIONS
make -j${NPROC:-$(nproc)}
make install
if [ -x autogen.sh ]; then
BUILDDIR_PREFIX=.
./autogen.sh $AUTOGEN_OPTIONS
make -j${NPROC:-$(nproc)}
make install
elif [ -f meson.build ]; then
BUILDDIR_PREFIX=build
# Passing unknown options to 'meson setup' is a fatal error
if ( [ -f meson_options.txt ] && grep -q "'gtk-doc'" meson_options.txt ) || \
( [ -f meson.options ] && grep -q "'gtk-doc'" meson.options );
then
GTK_DOC_OPT='-Dgtk-doc=true'
else
GTK_DOC_OPT=''
fi
meson setup $MESON_SETUP_OPTIONS $GTK_DOC_OPT "$BUILDDIR_PREFIX"
meson compile -C"$BUILDDIR_PREFIX"
meson install -C"$BUILDDIR_PREFIX" --skip-subprojects
else
echo "No supported build system found for $NAME" >&2
exit 1
fi
echo "$(pwd): $(git describe)" >> /tmp/xfce_build_version_info.txt
# Retain HTML docs in /docs
if [[ -d "$(pwd)/docs" ]]; then
# Special case for thunar because it has docs for thunar and thunarx
if [[ "$NAME" == "thunar" ]]; then
mkdir -p "/docs/$NAME"{,x}
cp -a docs/reference/thunar/html/. "/docs/$NAME"
cp -a docs/reference/thunarx/html/. "/docs/$NAME"x
cp -a "$BUILDDIR_PREFIX/docs/reference/thunar/html/." "/docs/$NAME"
cp -a "$BUILDDIR_PREFIX/docs/reference/thunarx/html/." "/docs/$NAME"x
# Ditto for libxfce4windowing
elif [[ "$NAME" == "libxfce4windowing" ]]; then
mkdir -p "/docs/$NAME"{,ui}
cp -a docs/reference/libxfce4windowing/html/. "/docs/$NAME"
cp -a docs/reference/libxfce4windowingui/html/. "/docs/$NAME"ui
cp -a "$BUILDDIR_PREFIX/docs/reference/libxfce4windowing/html/." "/docs/$NAME"
cp -a "$BUILDDIR_PREFIX/docs/reference/libxfce4windowingui/html/." "/docs/$NAME"ui
else
HTMLPATH=$(find "$(pwd)/docs" -name html)
HTMLPATH=$(find "$(pwd)/$BUILDDIR_PREFIX/docs" -name html)
if [[ ! -z "$HTMLPATH" ]]; then
mkdir -p "/docs/$NAME"
cp -a "$HTMLPATH/." "/docs/$NAME"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment