From nobody Tue Nov 14 18:37:28 2023 X-Original-To: dev-commits-ports-all@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 4SVFQc4mSpz50Wh7; Tue, 14 Nov 2023 18:37:28 +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 4SVFQc4L6Bz4H4L; Tue, 14 Nov 2023 18:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699987048; 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=5YoX8yjbOHrlOtcGlkT4saBkpOOhPnrszvyLD/szLO8=; b=GKghxCygJWQj40J4eBnyK5uI5aTfNyqYDVGHJTmjOKEPw6G4SqrpnBpslK9wUHDLYzuGwW Lz753Fko8iAFjEf+XfkH+oo+UubggIZzZzJj2XrFL3Y8X/WKen/oJl8wAs20a6Xss0yWZG QevSW3dZwbOlkT+gR84FD4HkICF+QjtDVDg+z23ubrEgXy9Wpun9ztthnv67onPNYbnzqU 3D9iGyOmS4T8SeRMDcqfwZe13l1jV77S77LAxKGsPQXDGveyX0K8u77yCog1WkisXC79ZR 4cQfiitFxm92x2tPcen2QyY+brvLNIw7jpi3AgzJubZxYYO7rVfGg0eS7BT15w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699987048; 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=5YoX8yjbOHrlOtcGlkT4saBkpOOhPnrszvyLD/szLO8=; b=hL3tL4dfHiPlupEWi9e+jQpZXc4y8CtWgJh6kEaQxq2NPpuyeXwah5GNnp/hX6Lqez4tMz h2KPQcTeXbhu/nSMlaq07rTgWfzeakGDwMFxF0x0lJwaflfVi6ik7xwT7/t5+zQxM7PBXa JX39agSQjYlJzWirCEvaLyMRVzj2/HpNpgwlCTm3LC9EF/BL4SE0g4u1VBrVzM/y/+MTCh XQGvYyO1gxfulYhaDszbxtm9k3MAeKA3WvP7yFBx0KfDhLZigmenzThvZCeupq3VUReWaw 3jIQ4CxUr26idU4QN0B0EUDq51w4nGVBpPmIN2/cypicXB3a9NNAwZnEFtIGOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699987048; a=rsa-sha256; cv=none; b=CdQA73rSL1ZLKenzcpnthsJJPrvO9AUqxnkyiJLAqHfaFryoEXfVkYc9z4RbX/p4lD5sg3 Lqi2wH8XurlzK5QVolp8RioT2pUDw6bXDW2yv0DoRUeuikVca+qGtkleqbQSjnGiUpUapZ RhmSKwAjmg4C4/tYrxC0suoBSAk9mB1q7SSs9VHAJjNuY5T01QyJwQwQfYz5TjcQXjt8Nu kpq/YixOPENG5Rw3yfxzh7x5rubOAxBUdHJnTvOUsIn5aRxr+QNmOzF/MmP9Tx6Sx6+L6X 02CBdw87pWEQ7p8Z5u+30wGsxu+9qUefCsSCawz9Q5x9odmZd7wjYXexoaagKw== 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 4SVFQc37Mgz10Kt; Tue, 14 Nov 2023 18:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AEIbSgl005187; Tue, 14 Nov 2023 18:37:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AEIbSp8005184; Tue, 14 Nov 2023 18:37:28 GMT (envelope-from git) Date: Tue, 14 Nov 2023 18:37:28 GMT Message-Id: <202311141837.3AEIbSp8005184@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 7ba7ca77add0 - main - textproc/logseq: Repackage native better-sqlite module. List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ba7ca77add02ed6d344c1bf131f3d714a3b125b Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=7ba7ca77add02ed6d344c1bf131f3d714a3b125b commit 7ba7ca77add02ed6d344c1bf131f3d714a3b125b Author: Gleb Popov AuthorDate: 2023-11-14 18:36:23 +0000 Commit: Gleb Popov CommitDate: 2023-11-14 18:37:23 +0000 textproc/logseq: Repackage native better-sqlite module. Sponsored by: Serenity Cybersecurity, LLC --- textproc/logseq/Makefile | 50 +++++++++++++++++++++++++++++++++++++++++++++-- textproc/logseq/distinfo | 8 +++++--- textproc/logseq/pkg-plist | 28 +------------------------- 3 files changed, 54 insertions(+), 32 deletions(-) diff --git a/textproc/logseq/Makefile b/textproc/logseq/Makefile index 2ee927c03186..d38a7445adeb 100644 --- a/textproc/logseq/Makefile +++ b/textproc/logseq/Makefile @@ -1,10 +1,12 @@ PORTNAME= logseq PORTVERSION= 0.9.20 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= https://github.com/logseq/logseq/releases/download/${PORTVERSION}/ \ - LOCAL/arrowd/:rsapi + LOCAL/arrowd/:node_modules DISTFILES= Logseq-linux-x64-${PORTVERSION}${EXTRACT_SUFX} \ - logseq/rsapi.freebsd-x64.node${EXTRACT_SUFX}:rsapi + logseq/rsapi-${RSAPI_HASH}.freebsd-x64.node${EXTRACT_SUFX}:node_modules \ + logseq/better-sqlite-${BETTER_SQLITE_VERSION}.node${EXTRACT_SUFX}:node_modules MAINTAINER= arrowd@FreeBSD.org COMMENT= Open-source platform for knowledge management and collaboration @@ -20,6 +22,9 @@ SUB_FILES= Logseq NO_BUILD= yes WRKSRC= ${WRKDIR}/Logseq-linux-x64 +RSAPI_HASH= 18bd98cfc4d084182b534c1c72a6e473a7174b45 +BETTER_SQLITE_VERSION= 9.1.1 + post-patch: ${RM} ${WRKSRC}/resources/app/node_modules/@logseq/rsapi-linux-x64-gnu/package.json.orig @@ -31,6 +36,47 @@ do-install: ${FIND} ${STAGEDIR}${DATADIR} -type d -empty -delete ${MV} ${STAGEDIR}${DATADIR}/resources/app/node_modules/@logseq/rsapi-linux-x64-gnu \ ${STAGEDIR}${DATADIR}/resources/app/node_modules/@logseq/rsapi-freebsd-x64 + ${RM} ${STAGEDIR}${DATADIR}/resources/app/node_modules/@logseq/rsapi-freebsd-x64/rsapi.linux-x64-gnu.node ${INSTALL_PROGRAM} ${WRKDIR}/rsapi.freebsd-x64.node ${STAGEDIR}${DATADIR}/resources/app/node_modules/@logseq/rsapi-freebsd-x64 + ${RM} -r ${STAGEDIR}${DATADIR}/resources/app/node_modules/better-sqlite3/bin + ${RM} -r ${STAGEDIR}${DATADIR}/resources/app/node_modules/better-sqlite3/build/Release + ${INSTALL_PROGRAM} ${WRKDIR}/better_sqlite3.node ${STAGEDIR}${DATADIR}/resources/app/node_modules/better-sqlite3/build + +repackage-node-modules: + pkg info curl git yarn npm zip > /dev/null + ${MKDIR} /tmp/logseq/ + curl https://sh.rustup.rs -sSf --output ${WRKDIR}/rustup.sh + ${SETENV} HOME=${WRKDIR}/home \ + sh ${WRKDIR}/rustup.sh -y --profile minimal --default-toolchain stable + + git clone https://github.com/logseq/rsapi.git ${WRKDIR}/rsapi-git + cd ${WRKDIR}/rsapi-git && git checkout ${RSAPI_HASH} + cd ${WRKDIR}/rsapi-git && ${SETENV} HOME=${WRKDIR}/home PATH=${PATH}:${WRKDIR}/home/.cargo/bin \ + yarn install --immutable --mode=skip-build + cd ${WRKDIR}/rsapi-git && ${SETENV} HOME=${WRKDIR}/home PATH=${PATH}:${WRKDIR}/home/.cargo/bin \ + yarn build + ${STRIP_CMD} ${WRKDIR}/rsapi-git/packages/rsapi/rsapi.freebsd-x64.node + cd ${WRKDIR}/rsapi-git/packages/rsapi && zip /tmp/logseq/rsapi-${RSAPI_HASH}.freebsd-x64.node.zip rsapi.freebsd-x64.node + + git clone https://github.com/WiseLibs/better-sqlite3.git ${WRKDIR}/better-sqlite + cd ${WRKDIR}/better-sqlite && git checkout v${BETTER_SQLITE_VERSION} + ${SED} -i.bak -e 's|node-gyp rebuild|node-gyp rebuild --arch=x64 --dist-url=https://electronjs.org/headers --target=${ELECTRON_VER}|g' \ + ${WRKDIR}/better-sqlite/package.json + cd ${WRKDIR}/better-sqlite && ${SETENV} HOME=${WRKDIR}/home \ + npm install --ignore-scripts + cd ${WRKDIR}/better-sqlite && ${SETENV} HOME=${WRKDIR}/home \ + npm run build-release + ${STRIP_CMD} ${WRKDIR}/better-sqlite/build/Release/better_sqlite3.node + cd ${WRKDIR}/better-sqlite/build/Release && zip /tmp/logseq/better-sqlite-${BETTER_SQLITE_VERSION}.node.zip better_sqlite3.node + + @cd /tmp \ + && sha256 logseq/rsapi-${RSAPI_HASH}.freebsd-x64.node.zip \ + && ${ECHO_CMD} -n "SIZE (logseq/rsapi-${RSAPI_HASH}.freebsd-x64.node.zip) = " \ + && ${STAT} -f %z /tmp/logseq/rsapi-${RSAPI_HASH}.freebsd-x64.node.zip \ + && sha256 logseq/better-sqlite-${BETTER_SQLITE_VERSION}.node.zip \ + && ${ECHO_CMD} -n "SIZE (logseq/better-sqlite-${BETTER_SQLITE_VERSION}.node.zip) = " \ + && ${STAT} -f %z /tmp/logseq/better-sqlite-${BETTER_SQLITE_VERSION}.node.zip + @${ECHO_CMD} + .include diff --git a/textproc/logseq/distinfo b/textproc/logseq/distinfo index 59266d922918..d905ebbd5f7a 100644 --- a/textproc/logseq/distinfo +++ b/textproc/logseq/distinfo @@ -1,5 +1,7 @@ -TIMESTAMP = 1699189271 +TIMESTAMP = 1699702116 SHA256 (Logseq-linux-x64-0.9.20.zip) = fb9002a317063fd8473c3d08b8ffd0546bc30fbef257747cfafe2bf17e88c3d4 SIZE (Logseq-linux-x64-0.9.20.zip) = 191060640 -SHA256 (logseq/rsapi.freebsd-x64.node.zip) = 104ac8d27cbbbbdb0034e08326f043bd12a790b296d09511a37367d9c184d08c -SIZE (logseq/rsapi.freebsd-x64.node.zip) = 3190039 +SHA256 (logseq/rsapi-18bd98cfc4d084182b534c1c72a6e473a7174b45.freebsd-x64.node.zip) = 08fede53b6b6ff5914c896279844e664b67809c7f5b2b7401493400c1ba8af1f +SIZE (logseq/rsapi-18bd98cfc4d084182b534c1c72a6e473a7174b45.freebsd-x64.node.zip) = 2361021 +SHA256 (logseq/better-sqlite-9.1.1.node.zip) = 77437d9ac7629ffdc03d47234b0b9b123cf7caf895a63de30273ce90de3fca42 +SIZE (logseq/better-sqlite-9.1.1.node.zip) = 955517 diff --git a/textproc/logseq/pkg-plist b/textproc/logseq/pkg-plist index 25414d01a860..47914933bd55 100644 --- a/textproc/logseq/pkg-plist +++ b/textproc/logseq/pkg-plist @@ -1210,7 +1210,6 @@ share/applications/Logseq.desktop %%DATADIR%%/resources/app/node_modules/@logseq/rsapi-freebsd-x64/README.md %%DATADIR%%/resources/app/node_modules/@logseq/rsapi-freebsd-x64/package.json %%DATADIR%%/resources/app/node_modules/@logseq/rsapi-freebsd-x64/rsapi.freebsd-x64.node -%%DATADIR%%/resources/app/node_modules/@logseq/rsapi-freebsd-x64/rsapi.linux-x64-gnu.node %%DATADIR%%/resources/app/node_modules/@logseq/rsapi/LICENSE %%DATADIR%%/resources/app/node_modules/@logseq/rsapi/index.d.ts %%DATADIR%%/resources/app/node_modules/@logseq/rsapi/index.js @@ -2852,34 +2851,9 @@ share/applications/Logseq.desktop %%DATADIR%%/resources/app/node_modules/base64-js/package.json %%DATADIR%%/resources/app/node_modules/better-sqlite3/LICENSE %%DATADIR%%/resources/app/node_modules/better-sqlite3/README.md -%%DATADIR%%/resources/app/node_modules/better-sqlite3/bin/linux-x64-116/better-sqlite3.node %%DATADIR%%/resources/app/node_modules/better-sqlite3/binding.gyp %%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Makefile -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/better_sqlite3.node.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/better_sqlite3.node.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/better_sqlite3/src/better_sqlite3.o.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/deps/locate_sqlite3.stamp.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/deps/sqlite3.a.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/test_extension.node.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/test_extension/deps/test_extension.o.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/sqlite3.a.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/Release/test_extension.node.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.deps/ba23eeee118cd63e16015df367567cb043fed872.intermediate.d -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/.forge-meta -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj.target/better_sqlite3.node -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj.target/better_sqlite3/src/better_sqlite3.o -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj.target/deps/locate_sqlite3.stamp -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj.target/deps/sqlite3.a -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj.target/test_extension.node -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj.target/test_extension/deps/test_extension.o -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.c -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.h -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3ext.h -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/sqlite3.a -%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/Release/test_extension.node +%%DATADIR%%/resources/app/node_modules/better-sqlite3/build/better_sqlite3.node %%DATADIR%%/resources/app/node_modules/better-sqlite3/build/better_sqlite3.target.mk %%DATADIR%%/resources/app/node_modules/better-sqlite3/build/binding.Makefile %%DATADIR%%/resources/app/node_modules/better-sqlite3/build/config.gypi