diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-11-19 09:45:41 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-11-19 09:45:41 -0800 |
commit | 184c43dd059f785537c8a48a4a7972c488ac1215 (patch) | |
tree | 76ba2e81fd091247a92e468758e30b202faa6c77 | |
parent | 05282e1160350c2340d51ac991704f7e390f8420 (diff) |
Includes CI checks comparing installed files based on those from xorgproto
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | .gitlab-ci.yml | 66 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | meson.build | 26 | ||||
-rw-r--r-- | meson_options.txt | 3 |
4 files changed, 92 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 192ce4b..d7b567d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ # Please see the ci-templates documentation for details: # https://freedesktop.pages.freedesktop.org/ci-templates/ -.templates_sha: &template_sha 34f4ade99434043f88e164933f570301fd18b125 # see https://docs.gitlab.com/ee/ci/yaml/#includefile +.templates_sha: &template_sha 185ede0e9b9b1924b92306ab8b882a6294e92613 # see https://docs.gitlab.com/ee/ci/yaml/#includefile include: @@ -29,8 +29,8 @@ 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-15.0' - FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake make xorg-util-macros xorg-font-util' + FDO_DISTRIBUTION_TAG: '2023-11-19.0' + FDO_DISTRIBUTION_PACKAGES: 'git pkgconf autoconf automake make xorg-util-macros xorg-font-util meson ninja jq' # @@ -82,7 +82,7 @@ container-prep: # # The default build, runs on the image built above. # -build: +autotools: stage: build extends: - .fdo.distribution-image@arch @@ -93,5 +93,63 @@ build: - ../configure --disable-silent-rules - make - make check + - make install - make distcheck + - mv font-alias*.tar.gz .. - popd > /dev/null + artifacts: + paths: + - font-alias*.tar.gz + +meson: + extends: + - .fdo.distribution-image@arch + stage: build + script: + - mkdir -p ../_inst + - meson setup builddir --prefix="$PWD/../_inst" + - meson install -C builddir + +meson from tarball: + extends: + - .fdo.distribution-image@arch + stage: test + script: + - mkdir -p _tarball_build + - tar xf font-alias-*.tar.gz -C _tarball_build + - pushd _tarball_build/font-alias-* + - meson setup builddir + - meson install -C builddir + needs: + - autotools + variables: + GIT_STRATEGY: none + +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 setup builddir --prefix=$PWD/_inst + - meson install -C builddir + - rm $PWD/_inst + - ln -sf $PWD/_autotools_inst $PWD/_inst + - autoreconf -ivf + - ./configure --prefix=$PWD/_inst + - make && make install + - diff --brief --recursive $PWD/_meson_inst $PWD/_autotools_inst + +check versions are in sync: + extends: + - .fdo.distribution-image@arch + stage: test + script: + - autoreconf -ivf + - ./configure --version | head -n 1 | sed -e 's/font-alias configure //' > autotools.version + - 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) diff --git a/Makefile.am b/Makefile.am index a477827..ef0eb81 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,4 +33,4 @@ ChangeLog: dist-hook: ChangeLog INSTALL -EXTRA_DIST = README.md +EXTRA_DIST = README.md meson.build meson_options.txt diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..5b371a4 --- /dev/null +++ b/meson.build @@ -0,0 +1,26 @@ +project('font-alias', + version: '1.0.5', + meson_version: '>= 0.64.0', + license: 'MIT' +) + +fontrootdir = get_option('fontrootdir') +if fontrootdir == '' + fontutil = dependency('fontutil', required: false, version: '>= 1.1.0') + if fontutil.found() + fontrootdir = fontutil.get_variable('fontrootdir') + endif + if fontrootdir == '' + fontrootdir = get_option('datadir') / 'fonts' / 'X11' + endif +endif + +alias_files = [ + '100dpi/fonts.alias', + '75dpi/fonts.alias', + 'cyrillic/fonts.alias', + 'misc/fonts.alias' +] +install_data(alias_files, install_dir: fontrootdir, preserve_path: true) + +summary({'fontrootdir': fontrootdir}) diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..07eb9ac --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,3 @@ +# option for setting the installation path +option('fontrootdir', type: 'string', + description: 'Path to root directory for font files') |