[arch-commits] Commit in appstream/repos/extra-x86_64 (5 files)

Antonio Rojas arojas at gemini.archlinux.org
Tue Feb 22 17:20:46 UTC 2022


    Date: Tuesday, February 22, 2022 @ 17:20:46
  Author: arojas
Revision: 437962

archrelease: copy trunk to extra-x86_64

Added:
  appstream/repos/extra-x86_64/PKGBUILD
    (from rev 437961, appstream/trunk/PKGBUILD)
  appstream/repos/extra-x86_64/update-appstream-cache.hook
    (from rev 437961, appstream/trunk/update-appstream-cache.hook)
Deleted:
  appstream/repos/extra-x86_64/0001-compose-Fix-SVG-scaling-with-librsvg-2.52.patch
  appstream/repos/extra-x86_64/PKGBUILD
  appstream/repos/extra-x86_64/update-appstream-cache.hook

------------------------------------------------------+
 0001-compose-Fix-SVG-scaling-with-librsvg-2.52.patch |  105 ----------------
 PKGBUILD                                             |  108 +++++++----------
 update-appstream-cache.hook                          |   34 ++---
 3 files changed, 67 insertions(+), 180 deletions(-)

Deleted: 0001-compose-Fix-SVG-scaling-with-librsvg-2.52.patch
===================================================================
--- 0001-compose-Fix-SVG-scaling-with-librsvg-2.52.patch	2022-02-22 17:20:36 UTC (rev 437961)
+++ 0001-compose-Fix-SVG-scaling-with-librsvg-2.52.patch	2022-02-22 17:20:46 UTC (rev 437962)
@@ -1,105 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
-Date: Fri, 7 Jan 2022 18:35:12 +0000
-Subject: [PATCH] compose: Fix SVG scaling with librsvg 2.52
-
-We should only scale the canvas in the legacy path, since the viewport
-already takes care of scaling.
-
-Also, while we're here:
-
-- We should `cairo_save` before scaling, so that on error the
-  `cairo_restore` doesn't leave the canvas in the scaled state.
-- The SVG size is only used in the legacy path.
-- We don't inspect the error so no need to have `tmp_error`.
-
-Fixes: https://github.com/ximion/appstream/issues/375
----
- compose/asc-canvas.c | 36 ++++++++++--------------------------
- 1 file changed, 10 insertions(+), 26 deletions(-)
-
-diff --git a/compose/asc-canvas.c b/compose/asc-canvas.c
-index 609b404fa548..bce396bb5369 100644
---- a/compose/asc-canvas.c
-+++ b/compose/asc-canvas.c
-@@ -156,70 +156,54 @@ asc_canvas_render_svg (AscCanvas *canvas, GInputStream *stream, GError **error)
- 	RsvgHandle *handle = NULL;
- 	gboolean ret = FALSE;
- 	gdouble srf_width, srf_height;
--	gdouble svg_width, svg_height;
- #if LIBRSVG_CHECK_VERSION(2, 52, 0)
- 	RsvgRectangle viewport;
--	GError *tmp_error = NULL;
- #else
- 	RsvgDimensionData dims;
- #endif
- 
- 	/* NOTE: unfortunately, Cairo/RSvg may use Fontconfig internally, so
- 	 * we need to lock this down since a parallel-processed font
- 	 * might need to access this too. */
- 	g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&fontconfig_mutex);
- 
- 	handle = rsvg_handle_new_from_stream_sync (stream,
- 						   NULL,
- 						   RSVG_HANDLE_FLAGS_NONE,
- 						   NULL,
- 						   error);
- 	if (handle == NULL)
- 		goto out;
- 	rsvg_handle_set_dpi (handle, 100);
- 
- 	srf_width = (gdouble) cairo_image_surface_get_width (priv->srf);
- 	srf_height = (gdouble) cairo_image_surface_get_height (priv->srf);
- 
--#if LIBRSVG_CHECK_VERSION(2, 52, 0)
--	ret = rsvg_handle_get_intrinsic_size_in_pixels(handle, &svg_width, &svg_height);
--	if (!ret) {
--		/* we would need a viewport to get an intrinsic pixel size. Work around this issue
--		 * by just scaling the SVG as high or low as we want to */
--		svg_width = srf_width;
--		svg_height = srf_height;
--	}
--#else
--	rsvg_handle_get_dimensions (handle, &dims);
--	svg_width = dims.width;
--	svg_height = dims.height;
--#endif
--
--	/* cairo_translate (cr, (srf_width - svg_width) / 2, (srf_height - svg_height) / 2); */
--	cairo_scale (priv->cr,
--		     srf_width / svg_width,
--		     srf_height / svg_height);
--
- 	cairo_save (priv->cr);
- 
--
- #if LIBRSVG_CHECK_VERSION(2, 52, 0)
- 	viewport.x = 0;
- 	viewport.y = 0;
- 	viewport.width = srf_width;
- 	viewport.height = srf_height;
-+
- 	ret = rsvg_handle_render_document (handle,
- 					   priv->cr,
- 					   &viewport,
--					   &tmp_error);
-+					   error);
- 	if (!ret) {
- 		cairo_restore (priv->cr);
--		g_propagate_prefixed_error (error,
--					    tmp_error,
--					    "SVG graphic rendering failed:");
-+		g_prefix_error (error, "SVG graphic rendering failed:");
- 		goto out;
- 	}
- #else
-+	rsvg_handle_get_dimensions (handle, &dims);
-+
-+	/* cairo_translate (cr, (srf_width - dims.width) / 2, (srf_height - dims.height) / 2); */
-+	cairo_scale (priv->cr,
-+		     srf_width / dims.width,
-+		     srf_height / dims.height);
-+
- 	ret = rsvg_handle_render_cairo (handle, priv->cr);
- 	if (!ret) {
- 		cairo_restore (priv->cr);

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-02-22 17:20:36 UTC (rev 437961)
+++ PKGBUILD	2022-02-22 17:20:46 UTC (rev 437962)
@@ -1,58 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Jameson Pugh <imntreal at gmail.com>
-# Contributor: Tim Jester-Pfadt <t.jp<at>gmx.de>
-
-pkgbase=appstream
-pkgname=(appstream appstream-qt)
-pkgver=0.15.1
-pkgrel=2
-pkgdesc='Provides a standard for creating app stores across distributions'
-arch=(x86_64)
-url='https://distributions.freedesktop.org/wiki/AppStream'
-license=(GPL)
-depends=(curl librsvg libyaml libxmlb libsoup)
-makedepends=(meson xmlto gobject-introspection gtk-doc qt5-tools itstool vala gperf)
-source=(https://www.freedesktop.org/software/appstream/releases/AppStream-$pkgver.tar.xz{,.asc}
-        0001-compose-Fix-SVG-scaling-with-librsvg-2.52.patch
-        update-appstream-cache.hook)
-sha256sums=('8d71471c37fba769134d674000f3225645f6b5482ab2348b51542aa9ea8edf57'
-            'SKIP'
-            '7800c61968961a8bf63b9b8abc8069395a7b784c12d9c7d7836709e69e67139e'
-            '3a96a1479cfd18dad36c2ca3181aabe46af9bf772c00b965d86ec5f55cd0e0eb')
-validpgpkeys=(D33A3F0CA16B0ACC51A60738494C8A5FBF4DECEB) # Matthias Klumpp <matthias at tenstral.net>
-
-prepare() {
-  cd AppStream-$pkgver
-
-  # https://github.com/ximion/appstream/pull/376
-  patch -Np1 -i ../0001-compose-Fix-SVG-scaling-with-librsvg-2.52.patch
-}
-
-build() {
-  meson build AppStream-$pkgver \
-    --prefix=/usr \
-    --libexecdir=lib \
-    -Dqt=true \
-    -Dvapi=true \
-    -Dcompose=true
-  meson compile -C build
-}
-
-package_appstream() {
-  meson install --destdir "$pkgdir" -C build
-
-# provided by -qt subpackage
-  rm -r "$pkgdir"/usr/{include/AppStreamQt,lib/cmake,lib/libAppStreamQt.*}
-
-  install -Dm644 update-appstream-cache.hook "$pkgdir"/usr/share/libalpm/hooks/90-update-appstream-cache.hook
-}
-
-package_appstream-qt() {
-  pkgdesc='Qt5 interface for AppStream'
-  depends=(appstream qt5-base)
-
-  meson install --destdir "$pkgdir" -C build
-
-# provided by appstream
-  rm -r "$pkgdir"{/etc,/usr/{bin,include/appstream{,-compose},lib/{appstreamcli-compose,girepository-1.0,libappstream*,pkgconfig},share}}
-}

Copied: appstream/repos/extra-x86_64/PKGBUILD (from rev 437961, appstream/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-02-22 17:20:46 UTC (rev 437962)
@@ -0,0 +1,50 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Jameson Pugh <imntreal at gmail.com>
+# Contributor: Tim Jester-Pfadt <t.jp<at>gmx.de>
+
+pkgbase=appstream
+pkgname=(appstream appstream-qt)
+pkgver=0.15.2
+pkgrel=1
+pkgdesc='Provides a standard for creating app stores across distributions'
+arch=(x86_64)
+url='https://distributions.freedesktop.org/wiki/AppStream'
+license=(GPL)
+depends=(curl librsvg libyaml libxmlb libsoup)
+makedepends=(meson xmlto gobject-introspection gtk-doc qt5-tools itstool vala gperf)
+source=(https://www.freedesktop.org/software/appstream/releases/AppStream-$pkgver.tar.xz{,.asc}
+        update-appstream-cache.hook)
+sha256sums=('8f6c1cd288c7c59f5bf21746a6cfd1424cd9d7cbeb0b7920dbcdf9ef10e9c74a'
+            'SKIP'
+            '3a96a1479cfd18dad36c2ca3181aabe46af9bf772c00b965d86ec5f55cd0e0eb')
+validpgpkeys=(D33A3F0CA16B0ACC51A60738494C8A5FBF4DECEB) # Matthias Klumpp <matthias at tenstral.net>
+options=(debug)
+
+build() {
+  meson build AppStream-$pkgver \
+    --prefix=/usr \
+    --libexecdir=lib \
+    -Dqt=true \
+    -Dvapi=true \
+    -Dcompose=true
+  meson compile -C build
+}
+
+package_appstream() {
+  meson install --destdir "$pkgdir" -C build
+
+# provided by -qt subpackage
+  rm -r "$pkgdir"/usr/{include/AppStreamQt,lib/cmake,lib/libAppStreamQt.*}
+
+  install -Dm644 update-appstream-cache.hook "$pkgdir"/usr/share/libalpm/hooks/90-update-appstream-cache.hook
+}
+
+package_appstream-qt() {
+  pkgdesc='Qt5 interface for AppStream'
+  depends=(appstream qt5-base)
+
+  meson install --destdir "$pkgdir" -C build
+
+# provided by appstream
+  rm -r "$pkgdir"{/etc,/usr/{bin,include/appstream{,-compose},lib/{appstreamcli-compose,girepository-1.0,libappstream*,pkgconfig},share}}
+}

Deleted: update-appstream-cache.hook
===================================================================
--- update-appstream-cache.hook	2022-02-22 17:20:36 UTC (rev 437961)
+++ update-appstream-cache.hook	2022-02-22 17:20:46 UTC (rev 437962)
@@ -1,17 +0,0 @@
-[Trigger]
-Type = Path
-Operation = Install
-Operation = Upgrade
-Operation = Remove
-Target = usr/share/app-info/*
-
-[Trigger]
-Type = Package
-Operation = Install
-Operation = Upgrade
-Target = appstream
-
-[Action]
-Description = Updating the appstream cache...
-When = PostTransaction
-Exec = /usr/bin/appstreamcli refresh-cache --force

Copied: appstream/repos/extra-x86_64/update-appstream-cache.hook (from rev 437961, appstream/trunk/update-appstream-cache.hook)
===================================================================
--- update-appstream-cache.hook	                        (rev 0)
+++ update-appstream-cache.hook	2022-02-22 17:20:46 UTC (rev 437962)
@@ -0,0 +1,17 @@
+[Trigger]
+Type = Path
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/share/app-info/*
+
+[Trigger]
+Type = Package
+Operation = Install
+Operation = Upgrade
+Target = appstream
+
+[Action]
+Description = Updating the appstream cache...
+When = PostTransaction
+Exec = /usr/bin/appstreamcli refresh-cache --force



More information about the arch-commits mailing list