From nobody Wed Oct 6 12:15:51 2021 X-Original-To: dev-commits-ports-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CC40B12D91AE; Wed, 6 Oct 2021 12:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HPYMC5RdDz3CYT; Wed, 6 Oct 2021 12:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 972BB1FDAA; Wed, 6 Oct 2021 12:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 196CFp4X040201; Wed, 6 Oct 2021 12:15:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 196CFpKF040200; Wed, 6 Oct 2021 12:15:51 GMT (envelope-from git) Date: Wed, 6 Oct 2021 12:15:51 GMT Message-Id: <202110061215.196CFpKF040200@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Koichiro Iwao Subject: git: d770515c6687 - 2021Q4 - devel/electron12: fix build List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: meta X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q4 X-Git-Reftype: branch X-Git-Commit: d770515c66879c01deab29d91d575dc3b0872a2f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2021Q4 has been updated by meta: URL: https://cgit.FreeBSD.org/ports/commit/?id=d770515c66879c01deab29d91d575dc3b0872a2f commit d770515c66879c01deab29d91d575dc3b0872a2f Author: Tomoaki AOKI AuthorDate: 2021-10-06 08:52:26 +0000 Commit: Koichiro Iwao CommitDate: 2021-10-06 12:13:58 +0000 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 Tested by: meta Approved by: maintainer timeout (> 2 weeks) MFH: 2021Q4 (cherry picked from commit 9cdeb88eac13fab9aed2f3972cef30d229890bde) --- devel/electron12/Makefile | 6 ++++++ devel/electron12/files/extra-patch-no-mempcpy-nasm | 11 +++++++++++ .../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 +# 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