void-packages/srcpkgs/scribus/patches/fix-musl.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```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

31 lines
885 B
Diff

--- a/scribus/util.cpp 2019-07-31 00:35:04.000000000 +0200
+++ b/scribus/util.cpp 2019-07-31 00:35:04.000000000 +0200
@@ -40,7 +40,7 @@
#include <csignal>
-#if !defined(_WIN32) && !defined(Q_OS_MAC)
+#if defined(__GLIBC__)
#include <execinfo.h>
#include <cxxabi.h>
#endif
--- a/scribus/util_debug.cpp 2019-07-31 00:35:07.000000000 +0200
+++ b/scribus/util_debug.cpp 2019-07-31 00:35:07.000000000 +0200
@@ -24,7 +24,7 @@
#include <QDateTime>
#include <QtGlobal>
-#if !defined(_WIN32) && !defined(Q_OS_MAC)
+#if defined(__GLIBC__)
#include <execinfo.h>
#include <cxxabi.h>
#endif
@@ -54,7 +54,7 @@
*/
void printBacktrace ( int nFrames )
{
-#if !defined(_WIN32) && !defined(Q_OS_MAC) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_FREEBSD)
+#if defined(__GLIBC__)
void ** trace = new void*[nFrames + 1];
char **messages = ( char ** ) nullptr;
int i, trace_size = 0;