From nobody Fri Jul 01 06:17:11 2022 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 0FE228AAA71; Fri, 1 Jul 2022 06:17:12 +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 4LZ4jg6Hvcz4pY9; Fri, 1 Jul 2022 06:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656656231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fntMyfP4dnwtt97EFClg7MM9AW57VzxofrJ3K/IwAsU=; b=UNjPNDVJO3q49e1Gp9qdl8cDTHqCAB/a3EPyukqTIr7vDScv2Jb21dcyHBiNUbUy/PV+63 Vu5e1P/azspQ7yfTcLjU7/cyrw01MZjoZ9Z6UM18giNUzSUes6C3/rTTNymoI6bO97IAbW vriwXV1XlvteXTwqj5HLkXFSu4K66CiH2pnNqz/TtCnxdEfLAChLKwVw1vr5o3O4qf1l12 Wkup6OjRzZhki1lSbFs9RQ4XZdFa9HIQmxPNuPzak3NWBnJWdgQp0t8LuiMZjXFKVVpYiV /FhGzmjh+PJNckV8LZLwG8D+MAhJTw0TMVR3sBOD4LDkU3w8Rt44JARCvHs1rA== 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 AA66415DC4; Fri, 1 Jul 2022 06:17:11 +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 2616HBYd052314; Fri, 1 Jul 2022 06:17:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2616HBBg052313; Fri, 1 Jul 2022 06:17:11 GMT (envelope-from git) Date: Fri, 1 Jul 2022 06:17:11 GMT Message-Id: <202207010617.2616HBBg052313@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Piotr Kubaj Subject: git: b4056c50abab - main - net-im/libsignal-node: fix build on powerpc64* 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: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4056c50ababae5927076dcbf42bc9e0870f5674 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656656231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fntMyfP4dnwtt97EFClg7MM9AW57VzxofrJ3K/IwAsU=; b=ODMnjaWWegedue8pquzn/cmmkAk8oSFCEoJVlhIQDtfxQOx12H5aF4k3QEWY+OvZbmenEa 4o3Rtbnmta2TjE21zlsBuGCHx3DdioV022g4edtWBasPrHwTM+Ha+CFRXpczzbCeINPO2C yhVLc4VmB2aPj2VY0/Geh5MVXWix+FA603u35KLKeM99naLDLUnJN0Ahryw3EoJMfMAaa8 osKgVz/sCj936dLxfaFDrAcshgYUUJPmdb+ReD+l4IcUJersG3cuWJbR+gqyFFP3hbUsnc Tknt2G/DyRxHW2sfqyE3ydnK5EnK5Y5AKHFyN4rc2r/ZtjaytLq2/ZVgYbY9cA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656656231; a=rsa-sha256; cv=none; b=bLHRrsA9NZGNFQAPt/85EQ1pWJn0bSl0RsS5x5gGhWOK2nUfDD+4p2b1Pih3DVJuljzATF jKU+bLcqzywmiwT/Ty1rI75Art6Le34/POgvz0AITFnaj+ynm4HgCvUEj5/MdsLG1VBbXf BU0YDsyxpKy8CdR5V/vXNHrfpGGcFs+epFNnqhIfaXSRe/L1UetIDyVDyTytDeLeyI2Kcc c63huTq2u68Hhi0aU2wfFSi04FZxaVkOhn212lIBNkcGLpR5ZwaYw5szkMeF96o6AY1vOP aoxkD77cYLHVsen8k916twT2Ltaj/5QRWIXdt8Bn8DOmh2s2sneYlgXjcPg13w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=b4056c50ababae5927076dcbf42bc9e0870f5674 commit b4056c50ababae5927076dcbf42bc9e0870f5674 Author: Piotr Kubaj AuthorDate: 2022-07-01 01:35:09 +0000 Commit: Piotr Kubaj CommitDate: 2022-07-01 06:17:09 +0000 net-im/libsignal-node: fix build on powerpc64* Properly set CARGO_ARCH. Since nodejs sets ppc64 target_arch for both powerpc64* architectures, create separate patches for both. Also modify do-install target to account for powerpc64*. --- net-im/libsignal-node/Makefile | 8 +++++++- .../libsignal-node/files/powerpc64-patch-node_binding.gyp | 15 +++++++++++++++ .../files/powerpc64le-patch-node_binding.gyp | 15 +++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/net-im/libsignal-node/Makefile b/net-im/libsignal-node/Makefile index 3e0acd1e7368..7b6b23727b70 100644 --- a/net-im/libsignal-node/Makefile +++ b/net-im/libsignal-node/Makefile @@ -259,6 +259,12 @@ USE_LDCONFIG= yes PLIST_FILES= lib/libsignal_node.so +.include + +.if ${ARCH:Mpowerpc64*} +EXTRA_PATCHES= ${FILESDIR}/${ARCH}-patch-node_binding.gyp +.endif + post-patch: ${REINPLACE_CMD} "s#python3#${PYTHON_CMD}#" \ ${WRKSRC}/node/binding.gyp @@ -271,7 +277,7 @@ do-build: ${SETENV} ${MAKE_ENV} yarn tsc do-install: - ${INSTALL_DATA} ${WRKSRC}/node/build/Release/obj.target/libsignal_client_freebsd_x64.node/geni/rust/x86_64-unknown-freebsd/release/libsignal_node.so \ + ${INSTALL_DATA} ${WRKSRC}/node/build/Release/obj.target/libsignal_client_freebsd_${ARCH:S/amd64/x64/:C/powerpc64.*/ppc64/}.node/geni/rust/${ARCH:S/amd64/x86_64/}-unknown-freebsd/release/libsignal_node.so \ ${STAGEDIR}${PREFIX}/lib/ create-caches-tarball: diff --git a/net-im/libsignal-node/files/powerpc64-patch-node_binding.gyp b/net-im/libsignal-node/files/powerpc64-patch-node_binding.gyp new file mode 100644 index 000000000000..792299ec4618 --- /dev/null +++ b/net-im/libsignal-node/files/powerpc64-patch-node_binding.gyp @@ -0,0 +1,15 @@ +--- node/binding.gyp.orig 2022-05-13 21:30:30 UTC ++++ node/binding.gyp +@@ -6,11 +6,12 @@ + { + 'conditions': [ + ['OS=="mac"', {'variables': {'NODE_OS_NAME': 'darwin', 'CARGO_TARGET_SUFFIX': 'apple-darwin'}}, + 'OS=="win"', {'variables': {'NODE_OS_NAME': 'win32', 'CARGO_TARGET_SUFFIX': 'pc-windows-msvc'}}, + 'OS=="linux"', {'variables': {'NODE_OS_NAME': 'linux', 'CARGO_TARGET_SUFFIX': 'unknown-linux-gnu'}}, + {'variables': {'NODE_OS_NAME': '<(OS)'}}], + ['target_arch=="ia32"', {'variables': {'CARGO_ARCH': 'i686'}}, + 'target_arch=="x64"', {'variables': {'CARGO_ARCH': 'x86_64'}}, ++ 'target_arch=="ppc64"', {'variables': {'CARGO_ARCH': 'powerpc64'}}, + 'target_arch=="arm64"', {'variables': {'CARGO_ARCH': 'aarch64'}}] + ], + 'targets': [ diff --git a/net-im/libsignal-node/files/powerpc64le-patch-node_binding.gyp b/net-im/libsignal-node/files/powerpc64le-patch-node_binding.gyp new file mode 100644 index 000000000000..d4a1ffe0b623 --- /dev/null +++ b/net-im/libsignal-node/files/powerpc64le-patch-node_binding.gyp @@ -0,0 +1,15 @@ +--- node/binding.gyp.orig 2022-05-13 21:30:30 UTC ++++ node/binding.gyp +@@ -6,11 +6,12 @@ + { + 'conditions': [ + ['OS=="mac"', {'variables': {'NODE_OS_NAME': 'darwin', 'CARGO_TARGET_SUFFIX': 'apple-darwin'}}, + 'OS=="win"', {'variables': {'NODE_OS_NAME': 'win32', 'CARGO_TARGET_SUFFIX': 'pc-windows-msvc'}}, + 'OS=="linux"', {'variables': {'NODE_OS_NAME': 'linux', 'CARGO_TARGET_SUFFIX': 'unknown-linux-gnu'}}, + {'variables': {'NODE_OS_NAME': '<(OS)'}}], + ['target_arch=="ia32"', {'variables': {'CARGO_ARCH': 'i686'}}, + 'target_arch=="x64"', {'variables': {'CARGO_ARCH': 'x86_64'}}, ++ 'target_arch=="ppc64"', {'variables': {'CARGO_ARCH': 'powerpc64le'}}, + 'target_arch=="arm64"', {'variables': {'CARGO_ARCH': 'aarch64'}}] + ], + 'targets': [