summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-11-18 11:52:04 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-11-18 11:52:04 -0800
commitf11467df3c9e54469fb629762dc3bc35baa563aa (patch)
treef5bfffbee7427b28e32d7472ef5448cc1d92dcd6
parentaed8d7ced841f9c5af757bf24e5488828d5c77e6 (diff)
Add a meson build systemHEADmaster
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--.gitlab-ci.yml67
-rw-r--r--Makefile.am2
-rw-r--r--meson.build94
3 files changed, 158 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d2dd91a..310fd87 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:
@@ -16,6 +16,7 @@ include:
ref: *template_sha
file: '/templates/ci-fairy.yml'
+
stages:
- prep # prep work like rebuilding the container images if there is a change
- build # for actually building and testing things in a container
@@ -28,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'
+ FDO_DISTRIBUTION_TAG: '2023-11-18.0'
+ FDO_DISTRIBUTION_PACKAGES: 'git pkgconf autoconf automake make meson ninja jq xorg-util-macros'
#
@@ -81,7 +82,7 @@ container-prep:
#
# The default build, runs on the image built above.
#
-build:
+autotools:
stage: build
extends:
- .fdo.distribution-image@arch
@@ -92,5 +93,63 @@ build:
- ../configure --disable-silent-rules
- make
- make check
+ - make install
- make distcheck
+ - mv xbitmaps*.tar.gz ..
- popd > /dev/null
+ artifacts:
+ paths:
+ - xbitmaps*.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 xbitmaps-*.tar.gz -C _tarball_build
+ - pushd _tarball_build/xbitmaps-*
+ - 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/xbitmaps 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 93f83a5..0e68ddd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -89,4 +89,4 @@ ChangeLog:
dist-hook: ChangeLog INSTALL
-EXTRA_DIST = README.md
+EXTRA_DIST = README.md meson.build
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..3c60640
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,94 @@
+project('xbitmaps',
+ version: '1.1.3',
+ meson_version: '>= 0.49.0',
+ license: 'MIT'
+)
+
+pc_conf = configuration_data({
+ 'prefix': get_option('prefix'),
+ 'exec_prefix': '${prefix}',
+ 'includedir': '${prefix}' / get_option('includedir'),
+ 'PACKAGE_VERSION': meson.project_version()
+})
+configure_file(input: 'xbitmaps.pc.in',
+ output: 'xbitmaps.pc',
+ install_dir: get_option('datadir') / 'pkgconfig',
+ configuration : pc_conf)
+
+bitmap_files = [
+ '1x1',
+ '2x2',
+ 'black',
+ 'black6',
+ 'boxes',
+ 'box6',
+ 'calculator',
+ 'cntr_ptr',
+ 'cntr_ptrmsk',
+ 'cross_weave',
+ 'dimple1',
+ 'dimple3',
+ 'dot',
+ 'dropbar7',
+ 'dropbar8',
+ 'escherknot',
+ 'flagdown',
+ 'flagup',
+ 'flipped_gray',
+ 'gray',
+ 'gray1',
+ 'gray3',
+ 'grid16',
+ 'grid2',
+ 'grid4',
+ 'grid8',
+ 'hlines2',
+ 'hlines3',
+ 'icon',
+ 'keyboard16',
+ 'left_ptr',
+ 'left_ptrmsk',
+ 'letters',
+ 'light_gray',
+ 'mailempty',
+ 'mailemptymsk',
+ 'mailfull',
+ 'mailfullmsk',
+ 'mensetmanus',
+ 'menu10',
+ 'menu12',
+ 'menu16',
+ 'menu6',
+ 'menu8',
+ 'noletters',
+ 'opendot',
+ 'opendotMask',
+ 'plaid',
+ 'right_ptr',
+ 'right_ptrmsk',
+ 'root_weave',
+ 'scales',
+ 'sipb',
+ 'star',
+ 'starMask',
+ 'stipple',
+ 'target',
+ 'terminal',
+ 'tie_fighter',
+ 'vlines2',
+ 'vlines3',
+ 'weird_size',
+ 'wide_weave',
+ 'wingdogs',
+ 'woman',
+ 'xfd_icon',
+ 'xlogo11',
+ 'xlogo16',
+ 'xlogo32',
+ 'xlogo64',
+ 'xsnow'
+]
+
+install_headers(bitmap_files,
+ subdir: 'X11' / 'bitmaps')
+