void-packages/srcpkgs/rpm/patches/fix-musl.patch
Đoàn Trần Công Danh 103ab731ab srcpkgs/r*: convert patches to -Np1
* runit 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

31 lines
957 B
Diff

--- a/configure.ac
+++ b/configure.ac
@@ -229,6 +229,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
# Check for libelf library. Prefer external, otherwise none.
WITH_LIBELF_LIB=
AC_CHECK_HEADER([libelf.h])
+AC_CHECK_HEADERS([error.h], [WITH_ERROR_H=yes])
AC_CHECK_HEADERS([gelf.h], [
AC_CHECK_LIB(elf, gelf_getvernaux, [
AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
@@ -237,7 +238,7 @@ AC_CHECK_HEADERS([gelf.h], [
])
])
AC_SUBST(WITH_LIBELF_LIB)
-AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes])
+AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes && test "$WITH_ERROR_H" = yes])
AC_CHECK_HEADERS([dwarf.h], [
WITH_LIBDWARF=yes
diff --git rpmio/digest_nss.c rpmio/digest_nss.c
index 992d9ac..5f43b57 100644
--- a/rpmio/digest_nss.c
+++ b/rpmio/digest_nss.c
@@ -6,6 +6,7 @@
#include <keyhi.h>
#include <cryptohi.h>
#include <blapit.h>
+#include <signal.h>
#include <rpm/rpmlog.h>
#include "rpmio/digest.h"