From nobody Wed Oct 06 12:12:18 2021 X-Original-To: dev-commits-ports-main@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 C355A12D8EC7; Wed, 6 Oct 2021 12:12:18 +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 4HPYH65CcXz3CST; Wed, 6 Oct 2021 12:12:18 +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 9306B1F47C; Wed, 6 Oct 2021 12:12:18 +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 196CCIfw038811; Wed, 6 Oct 2021 12:12:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 196CCIio038810; Wed, 6 Oct 2021 12:12:18 GMT (envelope-from git) Date: Wed, 6 Oct 2021 12:12:18 GMT Message-Id: <202110061212.196CCIio038810@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Koichiro Iwao Subject: git: 9cdeb88eac13 - main - devel/electron12: fix build List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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/main X-Git-Reftype: branch X-Git-Commit: 9cdeb88eac13fab9aed2f3972cef30d229890bde Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by meta: URL: https://cgit.FreeBSD.org/ports/commit/?id=9cdeb88eac13fab9aed2f3972cef30d229890bde commit 9cdeb88eac13fab9aed2f3972cef30d229890bde Author: Tomoaki AOKI AuthorDate: 2021-10-06 08:52:26 +0000 Commit: Koichiro Iwao CommitDate: 2021-10-06 12:11:29 +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 --- 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