2021-02-17 16:24:00 +00:00
|
|
|
%global so_version 1
|
|
|
|
%global apiver 1.16
|
|
|
|
|
|
|
|
# “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.
|
2023-06-17 16:28:42 +00:00
|
|
|
%bcond maintainer_mode 1
|
2021-02-17 16:24:00 +00:00
|
|
|
|
2021-09-27 13:53:29 +00:00
|
|
|
# Doxygen HTML help is not suitable for packaging due to a minified JavaScript
|
|
|
|
# bundle inserted by Doxygen itself. See discussion at
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2006555.
|
|
|
|
#
|
2021-11-27 02:37:00 +00:00
|
|
|
# We can enable the Doxygen PDF documentation as a substitute.
|
2021-10-01 22:10:33 +00:00
|
|
|
#
|
|
|
|
# We still generate the HTML documentation, but strip out all the JavaScript
|
|
|
|
# that causes policy issues. This degrades it in the browser, but is sufficient
|
|
|
|
# to keep the Devhelp documentation working.
|
2023-06-17 16:28:42 +00:00
|
|
|
%bcond doc_pdf 1
|
2021-09-27 13:53:29 +00:00
|
|
|
|
2021-02-17 16:24:00 +00:00
|
|
|
Name: cairomm%{apiver}
|
|
|
|
Summary: C++ API for the cairo graphics library
|
2023-09-28 09:27:04 +00:00
|
|
|
Version: 1.18.0
|
2021-07-20 19:03:05 +00:00
|
|
|
Release: %autorelease
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
URL: https://www.cairographics.org
|
2022-07-31 13:12:49 +00:00
|
|
|
License: LGPL-2.0-or-later
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
%global src_base https://www.cairographics.org/releases
|
|
|
|
Source0: %{src_base}/cairomm-%{version}.tar.xz
|
2021-02-20 13:47:25 +00:00
|
|
|
# No keyring with authorized GPG signing keys is published
|
|
|
|
# (https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/331), but we
|
|
|
|
# are able to verify the signature using the key for Kjell Ahlstedt from
|
2021-02-17 19:42:28 +00:00
|
|
|
# https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/290.
|
2021-02-20 13:47:25 +00:00
|
|
|
Source1: %{src_base}/cairomm-%{version}.tar.xz.asc
|
2021-02-17 19:42:28 +00:00
|
|
|
Source2: https://gitlab.freedesktop.org/freedesktop/freedesktop/uploads/0ac64e9582659f70a719d59fb02cd037/gpg_key.pub
|
|
|
|
|
|
|
|
BuildRequires: gnupg2
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: meson
|
|
|
|
|
|
|
|
BuildRequires: pkgconfig(cairo)
|
|
|
|
BuildRequires: pkgconfig(sigc++-3.0)
|
|
|
|
BuildRequires: pkgconfig(fontconfig)
|
|
|
|
|
2021-02-17 19:42:28 +00:00
|
|
|
# Everything mentioned in data/cairomm*.pc.in, except the Quartz and Win32
|
|
|
|
# libraries that do not apply to this platform:
|
|
|
|
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)
|
|
|
|
|
2021-02-17 16:24:00 +00:00
|
|
|
%if %{with maintainer_mode}
|
|
|
|
# mm-common-get
|
2022-09-22 12:32:36 +00:00
|
|
|
BuildRequires: mm-common >= 1.0.4
|
2021-02-17 16:24:00 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
BuildRequires: doxygen
|
|
|
|
# dot
|
|
|
|
BuildRequires: graphviz
|
|
|
|
# xsltproc
|
|
|
|
BuildRequires: libxslt
|
2021-02-17 19:42:28 +00:00
|
|
|
BuildRequires: pkgconfig(mm-common-libstdc++)
|
2021-09-27 13:53:29 +00:00
|
|
|
%if %{with doc_pdf}
|
|
|
|
BuildRequires: doxygen-latex
|
|
|
|
BuildRequires: make
|
|
|
|
%endif
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
# For tests:
|
|
|
|
BuildRequires: boost-devel
|
|
|
|
|
|
|
|
%description
|
|
|
|
This library provides a C++ interface to cairo.
|
|
|
|
|
|
|
|
The API/ABI version series is %{apiver}.
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
2021-09-26 16:26:02 +00:00
|
|
|
Summary: Development files for cairomm%{apiver}
|
|
|
|
Requires: cairomm%{apiver}%{?_isa} = %{version}-%{release}
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
%description devel
|
2021-09-26 16:26:02 +00:00
|
|
|
The cairomm%{apiver}-devel package contains libraries and header files for
|
|
|
|
developing applications that use cairomm%{apiver}.
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
The API/ABI version series is %{apiver}.
|
|
|
|
|
|
|
|
|
|
|
|
%package doc
|
2021-09-26 16:26:02 +00:00
|
|
|
Summary: Documentation for cairomm%{apiver}
|
2021-09-26 16:30:15 +00:00
|
|
|
|
2021-02-17 16:24:00 +00:00
|
|
|
BuildArch: noarch
|
2021-09-26 16:30:15 +00:00
|
|
|
|
2021-02-17 16:24:00 +00:00
|
|
|
%description doc
|
2021-09-27 13:53:29 +00:00
|
|
|
Documentation for cairomm%{apiver} can be viewed through the devhelp
|
|
|
|
documentation browser.
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
The API/ABI version series is %{apiver}.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2021-02-20 13:47:25 +00:00
|
|
|
%{gpgverify} \
|
2023-06-15 09:01:10 +00:00
|
|
|
--keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
2021-02-20 13:47:25 +00:00
|
|
|
|
2021-02-17 16:24:00 +00:00
|
|
|
%autosetup -n cairomm-%{version}
|
|
|
|
# We must remove the jQuery/jQueryUI bundle with precompiled/minified/bundled
|
|
|
|
# JavaScript that is in untracked/docs/reference/html/jquery.js, since such
|
|
|
|
# sources are banned in Fedora. (Note also that the bundled JavaScript had a
|
|
|
|
# different license.) We also remove the tag file, which triggers a rebuild of
|
|
|
|
# the documentation. While we are at it, we might as well rebuild the devhelp
|
2021-10-01 22:10:33 +00:00
|
|
|
# XML too. Note that we will still install the HTML documentation, since the
|
|
|
|
# devhelp XML requires it, but we will strip out the JavaScript, which will
|
|
|
|
# degrade the documentation in a web browser.
|
2021-02-17 16:24:00 +00:00
|
|
|
rm -rf untracked/docs/reference/html
|
|
|
|
rm untracked/docs/reference/cairomm-%{apiver}.tag \
|
|
|
|
untracked/docs/reference/cairomm-%{apiver}.devhelp2
|
2021-09-27 13:53:29 +00:00
|
|
|
%if %{with doc_pdf}
|
2021-11-27 02:37:00 +00:00
|
|
|
# We enable the Doxygen PDF documentation as a substitute. We must enable
|
|
|
|
# GENERATE_LATEX and LATEX_BATCHMODE; the rest are precautionary and should
|
|
|
|
# already be set as we like them.
|
2021-09-27 13:53:29 +00:00
|
|
|
sed -r -i \
|
|
|
|
-e "s/^([[:blank:]]*(GENERATE_LATEX|LATEX_BATCHMODE|USE_PDFLATEX|\
|
|
|
|
PDF_HYPERLINKS)[[:blank:]]*=[[:blank:]]*)NO[[:blank:]]*/\1YES/" \
|
|
|
|
-e "s/^([[:blank:]]*(LATEX_TIMESTAMP)\
|
|
|
|
[[:blank:]]*=[[:blank:]]*)YES[[:blank:]]*/\1NO/" \
|
|
|
|
docs/reference/Doxyfile.in
|
|
|
|
%endif
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
2021-09-27 13:53:29 +00:00
|
|
|
%if %{with doc_pdf}
|
|
|
|
%make_build -C '%{_vpath_builddir}/docs/reference/latex'
|
|
|
|
%endif
|
|
|
|
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%meson_install
|
|
|
|
|
2021-09-26 16:26:56 +00:00
|
|
|
install -t %{buildroot}%{_docdir}/cairomm-%{apiver} -m 0644 -p \
|
2023-09-28 09:27:04 +00:00
|
|
|
ChangeLog NEWS README.md
|
2021-09-26 16:26:56 +00:00
|
|
|
cp -rp examples %{buildroot}%{_docdir}/cairomm-%{apiver}/
|
2021-02-17 16:24:00 +00:00
|
|
|
|
2021-10-01 22:10:33 +00:00
|
|
|
# Strip out bundled and/or pre-minified JavaScript; this degrades the browser
|
|
|
|
# experience, but the HTML is still usable for devhelp.
|
|
|
|
find '%{buildroot}%{_docdir}/cairomm-%{apiver}/reference/html' \
|
|
|
|
-type f \( -name '*.js' -o -name '*.js.*' \) -print -delete
|
2021-09-27 13:53:29 +00:00
|
|
|
%if %{with doc_pdf}
|
2021-09-27 18:44:40 +00:00
|
|
|
install '%{_vpath_builddir}/docs/reference/latex/refman.pdf' -p -m 0644 \
|
|
|
|
'%{buildroot}%{_docdir}/cairomm-%{apiver}/reference/cairomm-%{apiver}.pdf'
|
2021-09-27 13:53:29 +00:00
|
|
|
%endif
|
2021-09-26 16:30:15 +00:00
|
|
|
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
%meson_test
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license COPYING
|
2022-12-19 18:56:20 +00:00
|
|
|
%{_libdir}/libcairomm-%{apiver}.so.%{so_version}{,.*}
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
2022-12-19 18:56:06 +00:00
|
|
|
%{_includedir}/cairomm-%{apiver}/
|
2021-02-17 16:24:00 +00:00
|
|
|
%{_libdir}/libcairomm-%{apiver}.so
|
|
|
|
%{_libdir}/pkgconfig/cairomm-%{apiver}.pc
|
|
|
|
%{_libdir}/pkgconfig/cairomm-*-%{apiver}.pc
|
2022-12-19 18:56:06 +00:00
|
|
|
%{_libdir}/cairomm-%{apiver}/
|
2021-02-17 16:24:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%license COPYING
|
2021-10-01 22:10:33 +00:00
|
|
|
# Note: JavaScript has been removed from HTML reference manual, degrading the
|
|
|
|
# browser experience. It is still needed for Devhelp support.
|
2022-12-19 18:56:06 +00:00
|
|
|
%doc %{_docdir}/cairomm-%{apiver}/
|
2021-02-17 16:24:00 +00:00
|
|
|
%doc %{_datadir}/devhelp/
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2021-07-20 19:03:05 +00:00
|
|
|
%autochangelog
|