summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml88
1 files changed, 47 insertions, 41 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b636c9e..76816ef 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,11 +30,15 @@ variables:
# The tag should be updated each time the list of packages is updated.
# Changing a tag forces the associated image to be rebuilt.
# Note: the tag has no meaning, we use a date format purely for readability
- FDO_DISTRIBUTION_TAG: '2023-02-06.0'
- BASE_PACKAGES: 'git meson ninja gcc autoconf automake libtool make xorg-util-macros pkgconf xorgproto libx11 libxext libxv'
- # extra packages we need for various tests
- EXTRA_PACKAGES: 'jq'
- FDO_DISTRIBUTION_PACKAGES: $BASE_PACKAGES $EXTRA_PACKAGES
+ FDO_DISTRIBUTION_TAG: '2025-02-09.0'
+ # minimal set of packages required to build and install either way
+ BASE_PACKAGES: 'git gcc pkgconf xorgproto libx11 libxext libxv'
+ # packages needed to build and install with each set of tools
+ AUTOTOOLS_PACKAGES: 'autoconf automake libtool make xorg-util-macros'
+ MESON_PACKAGES: 'meson ninja'
+ # extra packages we need for comparing autotools & meson builds
+ EXTRA_PACKAGES: 'diffoscope diffutils findutils jq'
+ FDO_DISTRIBUTION_PACKAGES: $BASE_PACKAGES $AUTOTOOLS_PACKAGES $MESON_PACKAGES $EXTRA_PACKAGES
#
# Verify that commit messages are as expected
@@ -91,10 +95,10 @@ meson:
stage: build
script:
- mkdir -p ../_inst
- - meson builddir --prefix="$PWD/../_inst" $MESON_OPTIONS
- - meson configure builddir
- - ninja -C builddir test
- - ninja -C builddir install
+ - meson setup builddir --prefix="$PWD/../_inst" $MESON_OPTIONS
+ - meson compile -C builddir
+ - meson test -C builddir
+ - meson install -C builddir
autotools:
extends:
@@ -122,42 +126,47 @@ meson from tarball:
- mkdir -p _tarball_build
- tar xf libXvMC-*.tar.gz -C _tarball_build
- pushd _tarball_build/libXvMC-*
- - meson builddir
- - meson configure builddir
- - ninja -C builddir test
+ - meson setup builddir
+ - meson compile -C builddir
+ - meson test -C builddir
needs:
- autotools
variables:
GIT_STRATEGY: none
-#
-# Unlike the xproto version this was copied from, this just compares
-# the ls output to make sure the same files were installed, since
-# comparing file contents lists mismatches with the ELF binaries and
-# in the generated pkg-config files that are not issues here.
-#
compare meson and autotools:
extends:
- .fdo.distribution-image@arch
stage: test
script:
- - mkdir -p $PWD/_meson_inst
- - mkdir -p $PWD/_autotools_inst
- # the prefix ends up in the pkgconfig files, so we use a symlink
- # to use the same --prefix for meson and autotools
- - ln -sf $PWD/_meson_inst $PWD/_inst
- - meson builddir
- - meson configure builddir --prefix=$PWD/_inst
- - ninja -C builddir install
- - ls -R _inst > _meson_inst.ls
- - rm $PWD/_inst
- - ln -sf $PWD/_autotools_inst $PWD/_inst
- - autoreconf -ivf
- - ./configure --prefix=$PWD/_inst
- - make && make install
- - rm -f $PWD/_inst/lib/lib*.la
- - ls -R _inst > _autotools_inst.ls
- - diff -u $PWD/_meson_inst.ls $PWD/_autotools_inst.ls
+ - mkdir -p $PWD/_meson_inst $PWD/_autotools_inst
+ - CFLAGS="-O2 -fno-strict-aliasing"
+ meson setup builddir --prefix=/usr --buildtype=plain
+ -Ddefault_library=shared
+ - meson compile -C builddir -v
+ - DESTDIR=$PWD/_meson_inst meson install -C builddir
+ - ./autogen.sh --prefix=/usr --sysconfdir=/etc
+ --enable-shared --disable-static
+ CFLAGS="-O2 -D_FILE_OFFSET_BITS=64"
+ # meson always adds -Wl,-as-needed, libtool won't let us add it, hack!
+ - sed -i -e 's/ -lXv//' src/Makefile
+ - sed -i -e 's/ -lXext -lXv//' wrapper/Makefile
+ - make V=1 && make install DESTDIR=$PWD/_autotools_inst
+ # get rid of expected differences between the two
+ - rm -f $PWD/_autotools_inst/usr/lib/lib*.la
+ - rm -f $PWD/_autotools_inst/usr/lib/libXvMC.so
+ - ln -s libXvMC.so.1 $PWD/_autotools_inst/usr/lib/libXvMC.so
+ - rm -f $PWD/_autotools_inst/usr/lib/libXvMCW.so
+ - ln -s libXvMCW.so.1 $PWD/_autotools_inst/usr/lib/libXvMCW.so
+ - sed -i -e 's/{exec_prefix}/{prefix}/' -e '/exec_prefix/d'
+ -e '/libdir=/{h;d}' -e '/includedir=/G'
+ -e '/Cflags:/{h;d}' -e '/Libs:/G'
+ _autotools_inst/usr/lib/pkgconfig/*.pc
+ - sed -i -e 's/,//g' -e 's/= /= /g' _meson_inst/usr/lib/pkgconfig/*.pc
+ - find $PWD/_meson_inst $PWD/_autotools_inst
+ -exec touch -h -r $PWD/_meson_inst/ {} \+
+ - diffoscope --text-color=always _autotools_inst _meson_inst
+
check versions are in sync:
extends:
@@ -166,9 +175,6 @@ check versions are in sync:
script:
- autoreconf -ivf
- ./configure --version | head -n 1 | sed -e 's/libXvMC configure //' > autotools.version
- - |
- meson builddir
- pushd builddir
- meson introspect --projectinfo | jq -r '.version' > ../meson.version
- popd
- - diff -u autotools.version meson.version || (echo "ERROR - autotools and meson versions not in sync" && false)
+ - meson introspect meson.build --projectinfo | jq -r '.version' > meson.version
+ - diff -u autotools.version meson.version ||
+ (echo "ERROR - autotools and meson versions not in sync" && false)