Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] pixman: update to 0.40.0.
@ 2020-10-02 23:09 ericonr
  2020-10-02 23:14 ` [PR PATCH] [Updated] " ericonr
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: ericonr @ 2020-10-02 23:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 3092 bytes --]

From 05f4029206a71b7d9055cdb0d0cf0e9fe8f3f270 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0.

Update links, simplify musl patch.
---
 .../musl-static__thread-scanline_buffer.patch | 21 +------------------
 srcpkgs/pixman/template                       | 10 +++++----
 2 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
index 0b9339dbea0..8984221f62f 100644
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
@@ -9,27 +9,8 @@ general_composite_rect() which allocates a large buffer
  {
      PIXMAN_COMPOSITE_ARGS (info);
 -    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
 +    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
+     uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
      uint8_t *src_buffer, *mask_buffer, *dest_buffer;
      pixman_iter_t src_iter, mask_iter, dest_iter;
      pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..d49267112b1 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,6 +1,6 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
 build_style=gnu-configure
 configure_args="--disable-gtk" # do not require gtk+!
@@ -8,14 +8,16 @@ hostmakedepends="pkg-config perl"
 short_desc="Library of low-level pixel manipulation routines"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
 pre_configure() {
 	case "$XBPS_TARGET_MACHINE" in
 		arm*) configure_args+=" --disable-arm-iwmmxt --disable-arm-iwmmxt2";;
 	esac
+
+	vsed -e 's/stack_scanline_buffer/static_scanline_buffer/g' -i pixman/pixman-general.c
 }
 
 post_install() {

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
@ 2020-10-02 23:14 ` ericonr
  2020-10-02 23:41 ` ericonr
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-02 23:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 2976 bytes --]

From cf3547bd7782ae5acedec47879282ec7129e8011 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0.

Update links, simplify musl patch.
---
 .../musl-static__thread-scanline_buffer.patch | 23 ++-----------------
 srcpkgs/pixman/template                       |  8 +++----
 2 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
index 0b9339dbea0..ab158a12000 100644
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
@@ -9,27 +9,8 @@ general_composite_rect() which allocates a large buffer
  {
      PIXMAN_COMPOSITE_ARGS (info);
 -    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
++    static __thread uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
+     uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
      uint8_t *src_buffer, *mask_buffer, *dest_buffer;
      pixman_iter_t src_iter, mask_iter, dest_iter;
      pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..ad6082b356a 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,6 +1,6 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
 build_style=gnu-configure
 configure_args="--disable-gtk" # do not require gtk+!
@@ -8,9 +8,9 @@ hostmakedepends="pkg-config perl"
 short_desc="Library of low-level pixel manipulation routines"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
 pre_configure() {
 	case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
  2020-10-02 23:14 ` [PR PATCH] [Updated] " ericonr
@ 2020-10-02 23:41 ` ericonr
  2020-10-09  5:00 ` [PR PATCH] [Updated] " ericonr
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-02 23:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25301#issuecomment-703002405

Comment:
Yeah alpine does it by setting stack size manually: https://gitlab.alpinelinux.org/alpine/aports/-/blob/b4bbca3b59db4edb27885498eeded16e8e681ec9/main/pixman/APKBUILD

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
  2020-10-02 23:14 ` [PR PATCH] [Updated] " ericonr
  2020-10-02 23:41 ` ericonr
@ 2020-10-09  5:00 ` ericonr
  2020-10-09  5:01 ` ericonr
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-09  5:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 3341 bytes --]

From 4d4df7833e0df4ed1002430bfe5557407d4dd0f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0.

Update links, use linker flag for stack size instead of patch.
---
 .../musl-static__thread-scanline_buffer.patch | 35 -------------------
 srcpkgs/pixman/template                       | 11 +++---
 2 files changed, 7 insertions(+), 39 deletions(-)
 delete mode 100644 srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
deleted file mode 100644
index 0b9339dbea0..00000000000
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Reduce the stack footprint of pixman's function
-general_composite_rect() which allocates a large buffer
-`stack_scanline_buffer`. Make it `static __thread` instead.
-
---- pixman/pixman-general.c	2015-12-27 21:37:37.000000000 +0100
-+++ pixman/pixman-general.c	2016-05-05 12:24:47.346661080 +0200
-@@ -128,8 +128,8 @@
-                          pixman_composite_info_t *info)
- {
-     PIXMAN_COMPOSITE_ARGS (info);
--    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
-     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-     pixman_iter_t src_iter, mask_iter, dest_iter;
-     pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..fd39674f39c 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,6 +1,6 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
 build_style=gnu-configure
 configure_args="--disable-gtk" # do not require gtk+!
@@ -8,9 +8,12 @@ hostmakedepends="pkg-config perl"
 short_desc="Library of low-level pixel manipulation routines"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
+
+# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+LDFLAGS="-Wl,-z,stack-size=2097152"
 
 pre_configure() {
 	case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (2 preceding siblings ...)
  2020-10-09  5:00 ` [PR PATCH] [Updated] " ericonr
@ 2020-10-09  5:01 ` ericonr
  2020-10-13 22:00 ` ericonr
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-09  5:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25301#issuecomment-705968889

Comment:
Fully removed patch, moved to linker flags for fixing on musl.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (3 preceding siblings ...)
  2020-10-09  5:01 ` ericonr
@ 2020-10-13 22:00 ` ericonr
  2020-10-13 22:20 ` ifreund
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-13 22:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25301#issuecomment-708032710

Comment:
@ifreund iirc I couldn't find the tarballs for meson (it might have been another package). If I can find it, I can definitely switch for this release.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (4 preceding siblings ...)
  2020-10-13 22:00 ` ericonr
@ 2020-10-13 22:20 ` ifreund
  2020-10-13 22:20 ` ifreund
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ifreund @ 2020-10-13 22:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

New comment by ifreund on void-packages repository

https://github.com/void-linux/void-packages/pull/25301#issuecomment-708040606

Comment:
@ericonr the tarballs downloaded from [here](https://gitlab.freedesktop.org/pixman/pixman/-/tags) have meson build files at least, I haven't tried to build it though: 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (5 preceding siblings ...)
  2020-10-13 22:20 ` ifreund
@ 2020-10-13 22:20 ` ifreund
  2020-10-13 22:22 ` ericonr
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ifreund @ 2020-10-13 22:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

New comment by ifreund on void-packages repository

https://github.com/void-linux/void-packages/pull/25301#issuecomment-708040606

Comment:
@ericonr the tarballs downloaded from [here](https://gitlab.freedesktop.org/pixman/pixman/-/tags) have meson build files at least, I haven't tried to build it though.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (6 preceding siblings ...)
  2020-10-13 22:20 ` ifreund
@ 2020-10-13 22:22 ` ericonr
  2020-10-13 22:42 ` ericonr
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-13 22:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25301#issuecomment-708041622

Comment:
Those are source tarballs, not release ones :/

But I guess it's a good enough option.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (7 preceding siblings ...)
  2020-10-13 22:22 ` ericonr
@ 2020-10-13 22:42 ` ericonr
  2020-10-14 20:23 ` [PR PATCH] [Updated] " ericonr
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-13 22:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25301#issuecomment-708048499

Comment:
And it wasn't pixman that lacked meson files. I will do the switch, then.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (8 preceding siblings ...)
  2020-10-13 22:42 ` ericonr
@ 2020-10-14 20:23 ` ericonr
  2020-10-14 20:41 ` ericonr
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-14 20:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 4687 bytes --]

From 760778fe7b2d7ee0ee5546fa933ad97bf21abb89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0, adopt.

- Update links, use linker flag for stack size instead of patch.
- Move to meson build style.
---
 .../musl-static__thread-scanline_buffer.patch | 35 ---------------
 srcpkgs/pixman/template                       | 43 +++++++++++++------
 2 files changed, 29 insertions(+), 49 deletions(-)
 delete mode 100644 srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
deleted file mode 100644
index 0b9339dbea0..00000000000
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Reduce the stack footprint of pixman's function
-general_composite_rect() which allocates a large buffer
-`stack_scanline_buffer`. Make it `static __thread` instead.
-
---- pixman/pixman-general.c	2015-12-27 21:37:37.000000000 +0100
-+++ pixman/pixman-general.c	2016-05-05 12:24:47.346661080 +0200
-@@ -128,8 +128,8 @@
-                          pixman_composite_info_t *info)
- {
-     PIXMAN_COMPOSITE_ARGS (info);
--    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
-     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-     pixman_iter_t src_iter, mask_iter, dest_iter;
-     pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..7d350e26378 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,25 +1,41 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
-build_style=gnu-configure
-configure_args="--disable-gtk" # do not require gtk+!
+build_style=meson
+# gtk is only necessary for demos, disabled to avoid dependency loop
+# OpenMP isn't recommended by upstream:
+#   https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c#L8
+configure_args="--auto-features=disabled -Dgtk=disabled -Dopenmp=disabled
+-Dgnu-inline-asm=enabled"
 hostmakedepends="pkg-config perl"
+checkdepends="libpng-devel"
 short_desc="Library of low-level pixel manipulation routines"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
-pre_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		arm*) configure_args+=" --disable-arm-iwmmxt --disable-arm-iwmmxt2";;
-	esac
-}
+# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+LDFLAGS="-Wl,-z,stack-size=2097152"
+
+if [ "$XBPS_CHECK_PKGS" ]; then
+	configure_args+=" -Dlibpng=enabled"
+fi
+
+# enable vectorized implementations per arch
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*) configure_args+=" -Dsse2=enabled -Dssse3=enabled";;
+	i686*) configure_args+=" -Dmmx=enabled -Dsse2=enabled -Dssse3=enabled";;
+	ppc64*) configure_args+=" -Dvmx=enabled";;
+	arm*) configure_args+=" -Darm-simd=enabled";;
+	aarch64*) configure_args+=" -Dneon=enabled -Diwmmxt=enabled -Diwmmxt2=true";;
+	mips*) configure_args+=" -Dmips-dspr2=enabled";;
+esac
 
 post_install() {
-	vlicense COPYING
+	vlicense COPYING LICENSE
 }
 
 pixman-devel_package() {
@@ -28,7 +44,6 @@ pixman-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 	}
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (9 preceding siblings ...)
  2020-10-14 20:23 ` [PR PATCH] [Updated] " ericonr
@ 2020-10-14 20:41 ` ericonr
  2020-10-14 21:27 ` ericonr
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-14 20:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 4656 bytes --]

From 90e031b00067fdd13bee6023fcc4a9bbc57027f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0, adopt.

- Update links, use linker flag for stack size instead of patch.
- Move to meson build style.
---
 .../musl-static__thread-scanline_buffer.patch | 35 ---------------
 srcpkgs/pixman/template                       | 43 +++++++++++++------
 2 files changed, 29 insertions(+), 49 deletions(-)
 delete mode 100644 srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
deleted file mode 100644
index 0b9339dbea0..00000000000
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Reduce the stack footprint of pixman's function
-general_composite_rect() which allocates a large buffer
-`stack_scanline_buffer`. Make it `static __thread` instead.
-
---- pixman/pixman-general.c	2015-12-27 21:37:37.000000000 +0100
-+++ pixman/pixman-general.c	2016-05-05 12:24:47.346661080 +0200
-@@ -128,8 +128,8 @@
-                          pixman_composite_info_t *info)
- {
-     PIXMAN_COMPOSITE_ARGS (info);
--    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
-     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-     pixman_iter_t src_iter, mask_iter, dest_iter;
-     pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..e20583149c1 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,25 +1,41 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
-build_style=gnu-configure
-configure_args="--disable-gtk" # do not require gtk+!
+build_style=meson
+# gtk is only necessary for demos, disabled to avoid dependency loop
+# OpenMP isn't recommended by upstream:
+#   https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c#L8
+configure_args="--auto-features=disabled -Dgtk=disabled -Dopenmp=disabled
+ -Dgnu-inline-asm=enabled"
 hostmakedepends="pkg-config perl"
+checkdepends="libpng-devel"
 short_desc="Library of low-level pixel manipulation routines"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
-pre_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		arm*) configure_args+=" --disable-arm-iwmmxt --disable-arm-iwmmxt2";;
-	esac
-}
+# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+LDFLAGS="-Wl,-z,stack-size=2097152"
+
+if [ "$XBPS_CHECK_PKGS" ]; then
+	configure_args+=" -Dlibpng=enabled"
+fi
+
+# enable vectorized implementations per arch
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*) configure_args+=" -Dsse2=enabled -Dssse3=enabled";;
+	i686*) configure_args+=" -Dmmx=enabled -Dsse2=enabled -Dssse3=enabled";;
+	ppc64*) configure_args+=" -Dvmx=enabled";;
+	arm*) configure_args+=" -Darm-simd=enabled";;
+	aarch64*) configure_args+=" -Dneon=enabled";;
+	mips*) configure_args+=" -Dmips-dspr2=enabled";;
+esac
 
 post_install() {
-	vlicense COPYING
+	vlicense COPYING LICENSE
 }
 
 pixman-devel_package() {
@@ -28,7 +44,6 @@ pixman-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 	}
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (10 preceding siblings ...)
  2020-10-14 20:41 ` ericonr
@ 2020-10-14 21:27 ` ericonr
  2020-10-14 21:43 ` ericonr
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-14 21:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 4677 bytes --]

From 53dcd09a35d42d1a62161bb89f46aeecd9f0ac6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0, adopt.

- Update links, use linker flag for stack size instead of patch.
- Move to meson build style.
---
 .../musl-static__thread-scanline_buffer.patch | 35 ---------------
 srcpkgs/pixman/template                       | 43 +++++++++++++------
 2 files changed, 29 insertions(+), 49 deletions(-)
 delete mode 100644 srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
deleted file mode 100644
index 0b9339dbea0..00000000000
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Reduce the stack footprint of pixman's function
-general_composite_rect() which allocates a large buffer
-`stack_scanline_buffer`. Make it `static __thread` instead.
-
---- pixman/pixman-general.c	2015-12-27 21:37:37.000000000 +0100
-+++ pixman/pixman-general.c	2016-05-05 12:24:47.346661080 +0200
-@@ -128,8 +128,8 @@
-                          pixman_composite_info_t *info)
- {
-     PIXMAN_COMPOSITE_ARGS (info);
--    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
-     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-     pixman_iter_t src_iter, mask_iter, dest_iter;
-     pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..a3281ce5f73 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,25 +1,41 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
-build_style=gnu-configure
-configure_args="--disable-gtk" # do not require gtk+!
+build_style=meson
+# gtk is only necessary for demos, disabled to avoid dependency loop
+# OpenMP isn't recommended by upstream:
+#   https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c#L8
+configure_args="--auto-features=disabled -Dgtk=disabled -Dopenmp=disabled
+ -Dgnu-inline-asm=enabled"
 hostmakedepends="pkg-config perl"
+checkdepends="libpng-devel"
 short_desc="Library of low-level pixel manipulation routines"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
-pre_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		arm*) configure_args+=" --disable-arm-iwmmxt --disable-arm-iwmmxt2";;
-	esac
-}
+# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+LDFLAGS="-Wl,-z,stack-size=2097152"
+
+if [ "$XBPS_CHECK_PKGS" ]; then
+	configure_args+=" -Dlibpng=enabled"
+fi
+
+# enable vectorized implementations per arch
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*) configure_args+=" -Dsse2=enabled -Dssse3=enabled";;
+	i686*) configure_args+=" -Dmmx=enabled -Dsse2=enabled -Dssse3=enabled";;
+	ppc64*) configure_args+=" -Dvmx=enabled";;
+	armv6l*) configure_args+=" -Darm-simd=enabled";;
+	armv7l*) configure_args+=" -Darm-simd=enabled -Dneon=enabled";;
+	mips*) configure_args+=" -Dmips-dspr2=enabled";;
+esac
 
 post_install() {
-	vlicense COPYING
+	vlicense COPYING LICENSE
 }
 
 pixman-devel_package() {
@@ -28,7 +44,6 @@ pixman-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 	}
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (11 preceding siblings ...)
  2020-10-14 21:27 ` ericonr
@ 2020-10-14 21:43 ` ericonr
  2020-10-14 21:47 ` ericonr
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-14 21:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 4349 bytes --]

From 5cdde10eb24ea41edd0634656ff1f58ac3c32ed4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0, adopt.

- Update links, use linker flag for stack size instead of patch.
- Move to meson build style.
---
 .../musl-static__thread-scanline_buffer.patch | 35 -------------------
 srcpkgs/pixman/template                       | 34 ++++++++++--------
 2 files changed, 20 insertions(+), 49 deletions(-)
 delete mode 100644 srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
deleted file mode 100644
index 0b9339dbea0..00000000000
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Reduce the stack footprint of pixman's function
-general_composite_rect() which allocates a large buffer
-`stack_scanline_buffer`. Make it `static __thread` instead.
-
---- pixman/pixman-general.c	2015-12-27 21:37:37.000000000 +0100
-+++ pixman/pixman-general.c	2016-05-05 12:24:47.346661080 +0200
-@@ -128,8 +128,8 @@
-                          pixman_composite_info_t *info)
- {
-     PIXMAN_COMPOSITE_ARGS (info);
--    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
-     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-     pixman_iter_t src_iter, mask_iter, dest_iter;
-     pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..d2a93cae44c 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,25 +1,32 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
-build_style=gnu-configure
-configure_args="--disable-gtk" # do not require gtk+!
+build_style=meson
+# allow meson to autodetect the features it should use
+# gtk is only necessary for demos, disabled to avoid dependency loop
+configure_args="--auto-features=auto -Dgtk=disabled -Dgnu-inline-asm=enabled"
 hostmakedepends="pkg-config perl"
+checkdepends="libpng-devel libgomp-devel"
 short_desc="Library of low-level pixel manipulation routines"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
-pre_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		arm*) configure_args+=" --disable-arm-iwmmxt --disable-arm-iwmmxt2";;
-	esac
-}
+# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+LDFLAGS="-Wl,-z,stack-size=2097152"
+
+if [ "$XBPS_CHECK_PKGS" ]; then
+	# OpenMP isn't recommended by upstream:
+	#   https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c#L8
+	# But the build only uses it for tests
+	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+fi
 
 post_install() {
-	vlicense COPYING
+	vlicense COPYING LICENSE
 }
 
 pixman-devel_package() {
@@ -28,7 +35,6 @@ pixman-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 	}
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (12 preceding siblings ...)
  2020-10-14 21:43 ` ericonr
@ 2020-10-14 21:47 ` ericonr
  2020-10-14 22:03 ` ericonr
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-14 21:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 4345 bytes --]

From 878c5404615bf5edc2f59b1435ca922d858cbe5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0, adopt.

- Update links, use linker flag for stack size instead of patch.
- Move to meson build style.
---
 .../musl-static__thread-scanline_buffer.patch | 35 -------------------
 srcpkgs/pixman/template                       | 33 +++++++++--------
 2 files changed, 19 insertions(+), 49 deletions(-)
 delete mode 100644 srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
deleted file mode 100644
index 0b9339dbea0..00000000000
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Reduce the stack footprint of pixman's function
-general_composite_rect() which allocates a large buffer
-`stack_scanline_buffer`. Make it `static __thread` instead.
-
---- pixman/pixman-general.c	2015-12-27 21:37:37.000000000 +0100
-+++ pixman/pixman-general.c	2016-05-05 12:24:47.346661080 +0200
-@@ -128,8 +128,8 @@
-                          pixman_composite_info_t *info)
- {
-     PIXMAN_COMPOSITE_ARGS (info);
--    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
-     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-     pixman_iter_t src_iter, mask_iter, dest_iter;
-     pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..11527c629b0 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,25 +1,31 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
-build_style=gnu-configure
-configure_args="--disable-gtk" # do not require gtk+!
+build_style=meson
+# allow meson to autodetect the features it should use
+# gtk is only necessary for demos, disabled to avoid dependency loop
+configure_args="--auto-features=auto -Dgtk=disabled -Dgnu-inline-asm=enabled"
 hostmakedepends="pkg-config perl"
+checkdepends="libpng-devel libgomp-devel"
 short_desc="Library of low-level pixel manipulation routines"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
-pre_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		arm*) configure_args+=" --disable-arm-iwmmxt --disable-arm-iwmmxt2";;
-	esac
-}
+# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+LDFLAGS="-Wl,-z,stack-size=2097152"
+
+if [ "$XBPS_CHECK_PKGS" ]; then
+	# OpenMP isn't recommended by upstream, but the build only uses it for tests:
+	#   https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c#L8
+	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+fi
 
 post_install() {
-	vlicense COPYING
+	vlicense COPYING LICENSE
 }
 
 pixman-devel_package() {
@@ -28,7 +34,6 @@ pixman-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 	}
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (13 preceding siblings ...)
  2020-10-14 21:47 ` ericonr
@ 2020-10-14 22:03 ` ericonr
  2020-10-20  5:50 ` ericonr
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-14 22:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 4265 bytes --]

From 41b7340f278174650835f2ab4accf74a577138bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0, adopt.

- Update links, use linker flag for stack size instead of patch.
- Move to meson build style.
---
 .../musl-static__thread-scanline_buffer.patch | 35 -------------------
 srcpkgs/pixman/template                       | 32 +++++++++--------
 2 files changed, 18 insertions(+), 49 deletions(-)
 delete mode 100644 srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
deleted file mode 100644
index 0b9339dbea0..00000000000
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Reduce the stack footprint of pixman's function
-general_composite_rect() which allocates a large buffer
-`stack_scanline_buffer`. Make it `static __thread` instead.
-
---- pixman/pixman-general.c	2015-12-27 21:37:37.000000000 +0100
-+++ pixman/pixman-general.c	2016-05-05 12:24:47.346661080 +0200
-@@ -128,8 +128,8 @@
-                          pixman_composite_info_t *info)
- {
-     PIXMAN_COMPOSITE_ARGS (info);
--    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
-     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-     pixman_iter_t src_iter, mask_iter, dest_iter;
-     pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..d257aa43d78 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,25 +1,30 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
-build_style=gnu-configure
-configure_args="--disable-gtk" # do not require gtk+!
+build_style=meson
+# gtk is only necessary for demos, disabled to avoid dependency loop
+configure_args="-Dgtk=disabled -Dgnu-inline-asm=enabled"
 hostmakedepends="pkg-config perl"
+checkdepends="libpng-devel libgomp-devel"
 short_desc="Library of low-level pixel manipulation routines"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
-pre_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		arm*) configure_args+=" --disable-arm-iwmmxt --disable-arm-iwmmxt2";;
-	esac
-}
+# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+LDFLAGS="-Wl,-z,stack-size=2097152"
+
+if [ "$XBPS_CHECK_PKGS" ]; then
+	# libpng and openmp are used only for testing; the file below isn't built:
+	#   https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c#L8
+	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+fi
 
 post_install() {
-	vlicense COPYING
+	vlicense COPYING LICENSE
 }
 
 pixman-devel_package() {
@@ -28,7 +33,6 @@ pixman-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 	}
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (14 preceding siblings ...)
  2020-10-14 22:03 ` ericonr
@ 2020-10-20  5:50 ` ericonr
  2020-11-06 13:52 ` ericonr
  2020-11-06 14:00 ` [PR PATCH] [Merged]: " ericonr
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-10-20  5:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 4271 bytes --]

From ac2cc4c658587ba8c2931e2ccae45bcc90560f9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0, adopt.

- Update links, use linker flag for stack size instead of patch.
- Move to meson build style.
---
 .../musl-static__thread-scanline_buffer.patch | 35 -------------------
 srcpkgs/pixman/template                       | 32 +++++++++--------
 2 files changed, 18 insertions(+), 49 deletions(-)
 delete mode 100644 srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
deleted file mode 100644
index 0b9339dbea0..00000000000
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Reduce the stack footprint of pixman's function
-general_composite_rect() which allocates a large buffer
-`stack_scanline_buffer`. Make it `static __thread` instead.
-
---- pixman/pixman-general.c	2015-12-27 21:37:37.000000000 +0100
-+++ pixman/pixman-general.c	2016-05-05 12:24:47.346661080 +0200
-@@ -128,8 +128,8 @@
-                          pixman_composite_info_t *info)
- {
-     PIXMAN_COMPOSITE_ARGS (info);
--    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
-     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-     pixman_iter_t src_iter, mask_iter, dest_iter;
-     pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..d00e050d916 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,25 +1,30 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
-build_style=gnu-configure
-configure_args="--disable-gtk" # do not require gtk+!
+build_style=meson
+# gtk is only necessary for demos, disabled to avoid dependency loop
+configure_args="-Dgtk=disabled -Dgnu-inline-asm=enabled"
 hostmakedepends="pkg-config perl"
+checkdepends="libpng-devel libgomp-devel"
 short_desc="Library of low-level pixel manipulation routines"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
-pre_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		arm*) configure_args+=" --disable-arm-iwmmxt --disable-arm-iwmmxt2";;
-	esac
-}
+# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+LDFLAGS="-Wl,-z,stack-size=2097152"
+
+if [ "$XBPS_CHECK_PKGS" ]; then
+	# libpng and openmp are used only for testing; the make-blue-noise.c file isn't built
+	# https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c
+	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+fi
 
 post_install() {
-	vlicense COPYING
+	vlicense COPYING LICENSE
 }
 
 pixman-devel_package() {
@@ -28,7 +33,6 @@ pixman-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 	}
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (15 preceding siblings ...)
  2020-10-20  5:50 ` ericonr
@ 2020-11-06 13:52 ` ericonr
  2020-11-06 14:00 ` [PR PATCH] [Merged]: " ericonr
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-11-06 13:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages pixman
https://github.com/void-linux/void-packages/pull/25301

pixman: update to 0.40.0.
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

A patch file from https://github.com/void-linux/void-packages/pull/25301.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pixman-25301.patch --]
[-- Type: text/x-diff, Size: 4289 bytes --]

From d095706466e85163157ffd99518fbb3d6e895779 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 2 Oct 2020 20:07:03 -0300
Subject: [PATCH] pixman: update to 0.40.0, adopt.

- Update links, use linker flag for stack size instead of patch.
- Move to meson build style.
---
 .../musl-static__thread-scanline_buffer.patch | 35 -------------------
 srcpkgs/pixman/template                       | 32 +++++++++--------
 2 files changed, 18 insertions(+), 49 deletions(-)
 delete mode 100644 srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch

diff --git a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch b/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
deleted file mode 100644
index 0b9339dbea0..00000000000
--- a/srcpkgs/pixman/patches/musl-static__thread-scanline_buffer.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Reduce the stack footprint of pixman's function
-general_composite_rect() which allocates a large buffer
-`stack_scanline_buffer`. Make it `static __thread` instead.
-
---- pixman/pixman-general.c	2015-12-27 21:37:37.000000000 +0100
-+++ pixman/pixman-general.c	2016-05-05 12:24:47.346661080 +0200
-@@ -128,8 +128,8 @@
-                          pixman_composite_info_t *info)
- {
-     PIXMAN_COMPOSITE_ARGS (info);
--    uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
--    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
-+    static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH];
-+    uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer;
-     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
-     pixman_iter_t src_iter, mask_iter, dest_iter;
-     pixman_combine_32_func_t compose;
-@@ -158,7 +158,7 @@
-     if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3))
- 	return;
- 
--    if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3)
-+    if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3)
-     {
- 	scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3);
- 
-@@ -232,7 +232,7 @@
-     if (dest_iter.fini)
- 	dest_iter.fini (&dest_iter);
-     
--    if (scanline_buffer != (uint8_t *) stack_scanline_buffer)
-+    if (scanline_buffer != (uint8_t *) static_scanline_buffer)
- 	free (scanline_buffer);
- }
- 
diff --git a/srcpkgs/pixman/template b/srcpkgs/pixman/template
index eb4a6da3b03..ca5bf9632b0 100644
--- a/srcpkgs/pixman/template
+++ b/srcpkgs/pixman/template
@@ -1,25 +1,30 @@
 # Template file for 'pixman'
 pkgname=pixman
-version=0.38.4
+version=0.40.0
 revision=1
-build_style=gnu-configure
-configure_args="--disable-gtk" # do not require gtk+!
+build_style=meson
+# gtk is only necessary for demos, disabled to avoid dependency loop
+configure_args="-Dgtk=disabled -Dgnu-inline-asm=enabled -Diwmmxt=disabled"
 hostmakedepends="pkg-config perl"
+checkdepends="libpng-devel libgomp-devel"
 short_desc="Library of low-level pixel manipulation routines"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="https://wiki.freedesktop.org/xorg/"
-distfiles="${XORG_SITE}/lib/${pkgname}-${version}.tar.bz2"
-checksum=84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550
+homepage="http://pixman.org/"
+distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
+checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 
-pre_configure() {
-	case "$XBPS_TARGET_MACHINE" in
-		arm*) configure_args+=" --disable-arm-iwmmxt --disable-arm-iwmmxt2";;
-	esac
-}
+# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+LDFLAGS="-Wl,-z,stack-size=2097152"
+
+if [ "$XBPS_CHECK_PKGS" ]; then
+	# libpng and openmp are used only for testing; the make-blue-noise.c file isn't built
+	# https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c
+	configure_args+=" -Dlibpng=enabled -Dopenmp=enabled"
+fi
 
 post_install() {
-	vlicense COPYING
+	vlicense COPYING LICENSE
 }
 
 pixman-devel_package() {
@@ -28,7 +33,6 @@ pixman-devel_package() {
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 	}
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Merged]: pixman: update to 0.40.0.
  2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
                   ` (16 preceding siblings ...)
  2020-11-06 13:52 ` ericonr
@ 2020-11-06 14:00 ` ericonr
  17 siblings, 0 replies; 19+ messages in thread
From: ericonr @ 2020-11-06 14:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 392 bytes --]

There's a merged pull request on the void-packages repository

pixman: update to 0.40.0.
https://github.com/void-linux/void-packages/pull/25301

Description:
Update links, simplify musl patch.

---

I'm not sure I understand the musl patch. The main thing with musl is that thread stack size is small, so putting the array in thread storage seems worse than leaving it in the main stack.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-11-06 14:00 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 23:09 [PR PATCH] pixman: update to 0.40.0 ericonr
2020-10-02 23:14 ` [PR PATCH] [Updated] " ericonr
2020-10-02 23:41 ` ericonr
2020-10-09  5:00 ` [PR PATCH] [Updated] " ericonr
2020-10-09  5:01 ` ericonr
2020-10-13 22:00 ` ericonr
2020-10-13 22:20 ` ifreund
2020-10-13 22:20 ` ifreund
2020-10-13 22:22 ` ericonr
2020-10-13 22:42 ` ericonr
2020-10-14 20:23 ` [PR PATCH] [Updated] " ericonr
2020-10-14 20:41 ` ericonr
2020-10-14 21:27 ` ericonr
2020-10-14 21:43 ` ericonr
2020-10-14 21:47 ` ericonr
2020-10-14 22:03 ` ericonr
2020-10-20  5:50 ` ericonr
2020-11-06 13:52 ` ericonr
2020-11-06 14:00 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).