Created attachment 800755 [details] cairo-1.17.6.ebuild At the moment, the version of the Cairo graphics library is 1.16, which is three years old. The most recent upstream release is 1.17.6. https://gitlab.freedesktop.org/cairo/cairo/-/tags/1.17.6 Despite being an odd release version, other distros have been packaging the 1.17.x branch of cairo for quite some time. https://src.fedoraproject.org/rpms/cairo https://archlinux.org/packages/extra/x86_64/cairo/ Support for subpixel positioning, which was added to cairo in release 1.17.4, is used in GTK4 font rendering. https://gitlab.gnome.org/GNOME/gtk/-/issues/3787 (see the first reply by Matthias Clasen) Given the above, I'd like to request for cairo-1.17 to be made available in Gentoo as well. Personally, I've been packaging cairo-1.17.x in a local overlay for almost a year and have yet to run into any issues. I think the biggest hurdle might be the upstream transition from autotools to meson. This my version of the cairo ebuild adapted for meson, which I've been using for a while now: # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit meson-multilib if [[ ${PV} == *9999* ]]; then inherit git-r3 EGIT_REPO_URI="https://gitlab.freedesktop.org/cairo/cairo.git" SRC_URI="" else SRC_URI="https://gitlab.freedesktop.org/cairo/cairo/-/archive/${PV}/cairo-${PV}.tar.gz" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" fi DESCRIPTION="A vector graphics library with cross-device output support" HOMEPAGE="https://www.cairographics.org/ https://gitlab.freedesktop.org/cairo/cairo" LICENSE="|| ( LGPL-2.1 MPL-1.1 )" SLOT="0" IUSE="X aqua debug gles2-only +glib opengl +png +svg" # gtk-doc regeneration doesn't seem to work with out-of-source builds #[[ ${PV} == *9999* ]] && IUSE="${IUSE} doc" # API docs are provided in tarball, no need to regenerate # Test causes a circular depend on gtk+... since gtk+ needs cairo but test needs gtk+ so we need to block it RESTRICT="test" BDEPEND=" virtual/pkgconfig >=sys-devel/libtool-2" RDEPEND=" >=dev-libs/lzo-2.06-r1[${MULTILIB_USEDEP}] >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] >=media-libs/freetype-2.5.0.1:2[png,${MULTILIB_USEDEP}] >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] >=x11-libs/pixman-0.36[${MULTILIB_USEDEP}] debug? ( sys-libs/binutils-libs:0=[${MULTILIB_USEDEP}] ) gles2-only? ( >=media-libs/mesa-9.1.6[gles2,${MULTILIB_USEDEP}] ) glib? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] ) opengl? ( >=media-libs/mesa-9.1.6[egl(+),X(+),${MULTILIB_USEDEP}] ) png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] ) X? ( >=x11-libs/libXrender-0.9.8[${MULTILIB_USEDEP}] >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] >=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}] )" DEPEND="${RDEPEND} X? ( x11-base/xorg-proto )" #[[ ${PV} == *9999* ]] && DEPEND="${DEPEND} # doc? ( # >=dev-util/gtk-doc-1.6 # ~app-text/docbook-xml-dtd-4.2 # )" REQUIRED_USE=" gles2-only? ( !opengl ) " PATCHES=( "${FILESDIR}"/${PN}-respect-fontconfig.patch ) src_prepare() { default } multilib_src_configure() { local myopts if use opengl ; then myopts+="-Dgl-backend=gl" elif use gles2-only ; then myopts+="-Dgl-backend=glesv2" else myopts+="-Dgl-backend=disabled" fi local emesonargs=( -Dfontconfig=enabled -Dfreetype=enabled -Dspectre=disabled -Dtests=disabled -Dxlib-xcb=disabled -Dzlib=enabled $(meson_feature aqua quartz) $(meson_feature debug symbol-lookup) $(meson_feature glib) $(meson_feature png) $(meson_feature X tee) $(meson_feature X xcb) $(meson_feature X xlib) ${myopts} ) meson_src_configure } multilib_src_install_all() { find "${D}" -name '*.la' -delete || die einstalldocs } Due to the build system switch, I had to rework some parts of the ebuild: The config option for svg has been merged with the png option, which is why I introduced the latter as a new USE flag. (the svg flag is just there for compatibility) Support for building cairo with valgrind / statically was dropped in meson. I took the liberty to make the dependency on binutils-libs, which is used when enabling the "symbol-lookup" feature, conditionally on the debug USE flag. While building the cairo utils is supported with meson, there's currently no config option to explicitly enable/disable them.
See also: https://www.cairographics.org/news/cairo-1.17.4/ https://www.cairographics.org/news/cairo-1.17.2/ Thanks Johannes, in general it is better to supply a unified diff so maintainers can easily check your changes. Unless the ebuild looks completely different ofc.
By policy, we usually don't add unstable/development versions even into ~arch. Adding it masked or unkeyworded is acceptable though. It is possible (although I don't know how I feel about it yet) that it could be unleashed into ~arch but I wouldn't count on it.
"This snapshot sees the removal of the following backends and platform support: Qt4 BeOS OS/2 DirectFB DRM Cogl OpenVG Thanks to all past contributors for their work on them. If you were using any of these backends then you will need to stick to Cairo 1.16." As that snapshot is already 5 months old and a lot of ongoing development I think it would be better to convert cairo-9999.ebuild first.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f56f8cba094e6d35237e4f2bca81b3327bd6bea commit 0f56f8cba094e6d35237e4f2bca81b3327bd6bea Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2022-10-06 15:52:24 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2022-10-07 21:49:05 +0000 x11-libs/cairo: Version bump to 1.17.6 Closes: https://bugs.gentoo.org/866305 Signed-off-by: Matt Turner <mattst88@gentoo.org> profiles/package.mask | 4 ++ x11-libs/cairo/Manifest | 1 + x11-libs/cairo/cairo-1.17.6.ebuild | 100 ++++++++++++++++++++++++++++ x11-libs/cairo/cairo-9999.ebuild | 133 ++++++++++++++++--------------------- x11-libs/cairo/metadata.xml | 1 + 5 files changed, 162 insertions(+), 77 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7110bad9690683614300a1f0974822bb1ed45463 commit 7110bad9690683614300a1f0974822bb1ed45463 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2022-11-01 09:23:31 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2022-11-01 09:24:27 +0000 profiles: Unmask x11-libs/cairo-1.17 Bug: https://bugs.gentoo.org/866305 Signed-off-by: Matt Turner <mattst88@gentoo.org> profiles/package.mask | 4 ---- 1 file changed, 4 deletions(-)