diff options
author | Tomoaki AOKI <junchoon@dec.sakura.ne.jp> | 2021-10-06 08:52:26 +0000 |
---|---|---|
committer | Koichiro Iwao <meta@FreeBSD.org> | 2021-10-06 12:13:58 +0000 |
commit | d770515c66879c01deab29d91d575dc3b0872a2f (patch) | |
tree | 82bdc1732f9dfcb81f1ba62d11eeeb6a0a7fffec /devel | |
parent | ee7fe36e78adbec94aa5e3e3a80e75fde16e1de3 (diff) | |
download | ports-d770515c66879c01deab29d91d575dc3b0872a2f.tar.gz ports-d770515c66879c01deab29d91d575dc3b0872a2f.zip |
devel/electron12: fix build
In file included from ../../third_party/nasm/asm/assemble.c:178:
../../third_party/nasm/include/compiler.h:249:21: error: static declaration of 'mempcpy' follows non-static declaration
static inline void *mempcpy(void *dst, const void *src, size_t n)
^
/usr/include/string.h:70:7: note: previous declaration is here
void *mempcpy(void * __restrict, const void * __restrict, size_t);
^
PR: 257378
Reported by: Robert Cina <transitive@gmail.com>
Tested by: meta
Approved by: maintainer timeout (> 2 weeks)
MFH: 2021Q4
(cherry picked from commit 9cdeb88eac13fab9aed2f3972cef30d229890bde)
Diffstat (limited to 'devel')
-rw-r--r-- | devel/electron12/Makefile | 6 | ||||
-rw-r--r-- | devel/electron12/files/extra-patch-no-mempcpy-nasm | 11 | ||||
-rw-r--r-- | devel/electron12/files/patch-third__party_nasm_config_config-linux.h | 9 |
3 files changed, 17 insertions, 9 deletions
diff --git a/devel/electron12/Makefile b/devel/electron12/Makefile index 68c14d7abd54..05431df0af4f 100644 --- a/devel/electron12/Makefile +++ b/devel/electron12/Makefile @@ -152,6 +152,12 @@ GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles .include "Makefile.version" .include <bsd.port.pre.mk> +# Add extra-patch-no-mempcpy-nasm only when there's no mempcpy() in base. +# Nested variable expansion avoids executing the test when not needed for +# expanding EXTRA_PATCHES. +EXTRA_PATCHES+= ${"${:!${GREP} mempcpy ${CROSS_SYSROOT}/usr/include/string.h \ + || ${TRUE}!}" == "":?${PATCHDIR}/extra-patch-no-mempcpy-nasm:} + .if ${ARCH} == "amd64" PLIST_SUB+= AMD64="" .else diff --git a/devel/electron12/files/extra-patch-no-mempcpy-nasm b/devel/electron12/files/extra-patch-no-mempcpy-nasm new file mode 100644 index 000000000000..d1ccea1bcd80 --- /dev/null +++ b/devel/electron12/files/extra-patch-no-mempcpy-nasm @@ -0,0 +1,11 @@ +--- third_party/nasm/config/config-linux.h.orig 2021-01-07 00:39:33 UTC ++++ third_party/nasm/config/config-linux.h +@@ -336,7 +336,7 @@ + #define HAVE_MEMORY_H 1 + + /* Define to 1 if you have the `mempcpy' function. */ +-#define HAVE_MEMPCPY 1 ++/* #undef HAVE_MEMPCPY */ + + /* Define to 1 if you have a working `mmap' system call. */ + #define HAVE_MMAP 1 diff --git a/devel/electron12/files/patch-third__party_nasm_config_config-linux.h b/devel/electron12/files/patch-third__party_nasm_config_config-linux.h index 7c3e51e706d3..f005f98b1248 100644 --- a/devel/electron12/files/patch-third__party_nasm_config_config-linux.h +++ b/devel/electron12/files/patch-third__party_nasm_config_config-linux.h @@ -18,15 +18,6 @@ /* Define to 1 if you have the `faccessat' function. */ #define HAVE_FACCESSAT 1 -@@ -336,7 +336,7 @@ - #define HAVE_MEMORY_H 1 - - /* Define to 1 if you have the `mempcpy' function. */ --#define HAVE_MEMPCPY 1 -+/* #undef HAVE_MEMPCPY */ - - /* Define to 1 if you have a working `mmap' system call. */ - #define HAVE_MMAP 1 @@ -411,7 +411,7 @@ #define HAVE_SYSCONF 1 |