void-packages/srcpkgs/dispcalGUI/patches/error.patch
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

34 lines
1.4 KiB
Diff

Reason: error(3) does not exist on musl, and on glibc the signature
is (int, int, char*, ...) and not (char*, ...).
Therefore the current code either results in garbled output or
doesn't work at all. Replace it with a simple printf.
---
--- a/DisplayCAL/RealDisplaySizeMM.c 2018-07-25 16:47:01.000000000 +0200
+++ b/DisplayCAL/RealDisplaySizeMM.c 2018-07-25 16:47:01.000000000 +0200
@@ -822,13 +822,13 @@
sprintf(desc1, "_ICC_PROFILE_%d",disps[ndisps]->uscreen);
if ((disps[ndisps]->icc_atom = XInternAtom(mydisplay, desc1, False)) == None)
- error("Unable to intern atom '%s'",desc1);
+ fprintf(stderr, "Unable to intern atom '%s'",desc1);
debugrr2((errout,"Root atom '%s'\n",desc1));
/* Create the atom of the output that may contain the associated ICC profile */
if ((disps[ndisps]->icc_out_atom = XInternAtom(mydisplay, "_ICC_PROFILE", False)) == None)
- error("Unable to intern atom '%s'","_ICC_PROFILE");
+ fprintf(stderr, "Unable to intern atom '%s'","_ICC_PROFILE");
/* Grab the EDID from the output */
{
@@ -993,7 +993,7 @@
sprintf(desc1, "_ICC_PROFILE_%d",disps[i]->uscreen);
if ((disps[i]->icc_atom = XInternAtom(mydisplay, desc1, False)) == None)
- error("Unable to intern atom '%s'",desc1);
+ fprintf(stderr, "Unable to intern atom '%s'",desc1);
/* See if we can locate the EDID of the monitor for this screen */
for (j = 0; j < 2; j++) {