From d221d0f049cd89d72338c5e55470bb1fec43f439 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 11 Feb 2021 14:28:52 -0500 Subject: [PATCH] Switch from autotools to meson; enable the tests, since the meson build system permits us to use a shared boost library --- cairomm.spec | 69 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/cairomm.spec b/cairomm.spec index dbbd516..2c0bfaa 100644 --- a/cairomm.spec +++ b/cairomm.spec @@ -1,12 +1,15 @@ %global so_version 1 %global apiver 1.0 -%bcond_without autoreconf +# “Let mm-common-get copy some files to untracked/”, i.e., replace scripts from +# the tarball with those from mm-common. This is (potentially) required if +# building an autotools-generated tarball with meson, or vice versa. +%bcond_without maintainer_mode Name: cairomm Summary: C++ API for the cairo graphics library Version: 1.14.2 -Release: 2%{?dist} +Release: 3%{?dist} URL: https://www.cairographics.org License: LGPLv2+ @@ -28,21 +31,32 @@ BuildRequires: gcc-c++ BuildRequires: make BuildRequires: pkgconfig -%if %{with autoreconf} -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: autoconf-archive -%endif +BuildRequires: meson + +# mm-common-get BuildRequires: mm-common - -BuildRequires: cairo-devel -BuildRequires: libsigc++20-devel - BuildRequires: perl-interpreter BuildRequires: perl(Getopt::Long) - BuildRequires: doxygen +# dot +BuildRequires: graphviz +# xsltproc +BuildRequires: libxslt + +# For tests: +BuildRequires: boost-devel +BuildRequires: fontconfig +BuildRequires: pkgconfig(cairo-ft) +BuildRequires: pkgconfig(cairo-pdf) +BuildRequires: pkgconfig(cairo-png) +BuildRequires: pkgconfig(cairo-ps) + +BuildRequires: pkgconfig(cairo-svg) +BuildRequires: pkgconfig(cairo-xlib) +BuildRequires: pkgconfig(cairo-xlib-xrender) +BuildRequires: pkgconfig(mm-common-libstdc++) +BuildRequires: pkgconfig(sigc++-2.0) + %description This library provides a C++ interface to cairo. @@ -89,29 +103,26 @@ rm untracked/docs/reference/%{name}-%{apiver}.tag \ %build -%if %{with autoreconf} -# Update obsolete Boost m4 macros -cp -vp %{_datadir}/aclocal/ax_boost_base.m4 \ - %{_datadir}/aclocal/ax_boost_unit_test_framework.m4 \ - build/ -NOCONFIGURE=1 ./autogen.sh -%endif -%configure \ - --enable-maintainer-mode \ - --disable-static -%make_build +%meson \ + -Dmaintainer-mode=%{?with_maintainer_mode:true}%{?!with_maintainer_mode:false} \ + -Dbuild-documentation=true \ + -Dbuild-examples=false \ + -Dbuild-tests=true \ + -Dboost-shared=true \ + -Dwarnings=max +%meson_build %install -%make_install +%meson_install find %{buildroot} -type f -name '*.la' -print -delete install -t %{buildroot}%{_datadir}/doc/%{name}-%{apiver} -m 0644 -p \ AUTHORS ChangeLog MAINTAINERS NEWS README -# Currently, we cannot run the tests because they require a static boost-test -# library. +%check +%meson_test %files @@ -135,6 +146,10 @@ install -t %{buildroot}%{_datadir}/doc/%{name}-%{apiver} -m 0644 -p \ %changelog +* Thu Feb 11 2021 Benjamin A. Beasley - 1.14.2-3 +- Switch from autotools to meson; enable the tests, since the meson build system + permits us to use a shared boost library + * Thu Feb 11 2021 Benjamin A. Beasley - 1.14.2-2 - Restore removal of pre-built documentation with its minified JS bundle