void-packages/srcpkgs/gamin/patches/disable-tests-for-cross-build.patch
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```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

53 lines
1.4 KiB
Diff

Disable abstract socket namespace test since can't be achieved while cross-building.
--- a/configure.in
+++ b/configure.in
@@ -388,47 +388,9 @@
#### Abstract sockets
AC_MSG_CHECKING(abstract socket namespace)
-AC_LANG_PUSH(C)
-AC_RUN_IFELSE([AC_LANG_PROGRAM(
-[[
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <errno.h>
-]],
-[[
- int listen_fd;
- struct sockaddr_un addr;
-
- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
-
- if (listen_fd < 0)
- {
- fprintf (stderr, "socket() failed: %s\n", strerror (errno));
- exit (1);
- }
-
- memset (&addr, '\0', sizeof (addr));
- addr.sun_family = AF_UNIX;
- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
- addr.sun_path[0] = '\0'; /* this is what makes it abstract */
-
- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
- {
- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
- strerror (errno));
- exit (1);
- }
- else
- exit (0);
-]])],
- [have_abstract_sockets=yes],
- [have_abstract_sockets=no])
-AC_LANG_POP(C)
+have_abstract_sockets=yes
AC_MSG_RESULT($have_abstract_sockets)
+AC_MSG_WARN([Emptied abstract socket namespace test for cross-building])
if test x$enable_abstract_sockets = xyes; then
if test x$have_abstract_sockets = xno; then