From nobody Fri Aug 12 11:26:58 2022 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 4M41bl1TFKz4Yks0; Fri, 12 Aug 2022 11:26:59 +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 4M41bl0y2Sz3N9t; Fri, 12 Aug 2022 11:26:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660303619; 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=rOGrHH5Q+PJHRR0sOKD49ZEaw0aTmG+3zSrs6BaGh/I=; b=vPOtXH/GtfzjjMYgs6xf6geumWEjFQreffgYBkqmp6rIE3wYw5XdQFLwCbu0YZ5KaX+wMA b+suy/GZxOD3bIBzDehaF24woX0BbMXNwbrdyXeBtTuLlBynQpRmaSU5NDl1os2HFm5qQz 7xyPeiU1hTkuIgmNKD/UljaR4aGdM0kMTepCzWTNT+FOsFrwWmshcYIOp4zOJsusbc6ZOv ampW6DjtI9PWCIUUhPROo1/X4Xv42Qzjm3I2F5mOq9Qjxvc6Pp5EplMCwjL91VmGt7CEEO 5nfoRPmydZiVvnPsIAu7JfxKYKrVTiR7kqUqPaxx5adERTeFKZBqyoLV4V6uQA== 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 4M41bl00znzVwm; Fri, 12 Aug 2022 11:26:59 +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 27CBQwge003415; Fri, 12 Aug 2022 11:26:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27CBQwiM003414; Fri, 12 Aug 2022 11:26:58 GMT (envelope-from git) Date: Fri, 12 Aug 2022 11:26:58 GMT Message-Id: <202208121126.27CBQwiM003414@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Thierry Thomas Subject: git: 5a22bf5e34cc - main - editors/bee-host: host part of the Browser's Exernal Editor extension 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: thierry X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a22bf5e34cc0f56ab8821091a92dfc89d0de041 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660303619; 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=rOGrHH5Q+PJHRR0sOKD49ZEaw0aTmG+3zSrs6BaGh/I=; b=GVF/7rM9EV5QNjFk5IryQ+5247QeW2yW+gMopdwT98+Jre/t0rqAj/qvu9oT3YzfquZ5iY xgmJnDZ040ml12t7r9udZhoowaaE8LF8lAATbJyAisrjoNDeETgU5cmeUC7wQXY7YNlGhq RPOuNa0iyDkwZldLmdqfqCFH9EU7wdVTdbLe83EYH1Ki+fIK1FxFXhfwMIBDfyXD6260GL a2Z606aSGPSVXsHljKPl8TdLNAsvCXlkKEqZVa1JzMKuVvs0tsW0EFSb/mNpJPn4bgf2B3 h0COyVw/KVQ8SMCfY+sb/pePXz/r6HoaMtu3apg60Ndj1uusyJf1e+t06E/zbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660303619; a=rsa-sha256; cv=none; b=HvOVmXjr9ZptyY2DRBxF7Mz68SZywH9BCYj7J4VDorF8sNxbr/ml87E4tV8LbYbXKTFa7k 3qGkwbMBXATfISKqc+WO8qF/56VE86bDVc6h7MhOhDCamO+QyYCjTI3Rl+HoUtlHU0lLjr LvzH+Qpetrf+PcGJKnsrpzPqSCNaPYNV0iceRrOsv2//w9g/dm1qlMUwPzLmbk6UE17gPM 5J8YQeZ3wYM/BDgMclnSRWXb/5n8UxkCpW+rlXTcJ33le2Jojp7GYR99YqKMzv9XefiPc+ CftFWK1IxDep8gJWQ2kKaScgFmng7Rfw9CiJXxA52dY2nCrMx+UchT4Yd9s58w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by thierry: URL: https://cgit.FreeBSD.org/ports/commit/?id=5a22bf5e34cc0f56ab8821091a92dfc89d0de041 commit 5a22bf5e34cc0f56ab8821091a92dfc89d0de041 Author: Thierry Thomas AuthorDate: 2022-08-12 09:01:42 +0000 Commit: Thierry Thomas CommitDate: 2022-08-12 11:26:33 +0000 editors/bee-host: host part of the Browser's Exernal Editor extension BeeCtl is the host part of Chrome-bee, a Chrome/Firefox extension that allows to edit text fields with an external editor. --- editors/Makefile | 1 + editors/bee-host/Makefile | 25 ++++++++++ editors/bee-host/distinfo | 3 ++ editors/bee-host/files/patch-CMakeLists.txt | 73 +++++++++++++++++++++++++++++ editors/bee-host/files/patch-vars.sh | 13 +++++ editors/bee-host/pkg-descr | 8 ++++ editors/bee-host/pkg-plist | 5 ++ 7 files changed, 128 insertions(+) diff --git a/editors/Makefile b/editors/Makefile index cd1343505a36..1b3da9a033ce 100644 --- a/editors/Makefile +++ b/editors/Makefile @@ -9,6 +9,7 @@ SUBDIR += apel SUBDIR += asedit SUBDIR += beav + SUBDIR += bee-host SUBDIR += biew SUBDIR += bitedit SUBDIR += boiling-egg diff --git a/editors/bee-host/Makefile b/editors/bee-host/Makefile new file mode 100644 index 000000000000..1b803b8e5917 --- /dev/null +++ b/editors/bee-host/Makefile @@ -0,0 +1,25 @@ +PORTNAME= bee-host +PORTVERSION= 1.3.4 +CATEGORIES= editors www + +MAINTAINER= thierry@FreeBSD.org +COMMENT= Host application for Browser's Exernal Editor extension + +LICENSE= MIT + +LIB_DEPENDS= libcjson.so:devel/libcjson + +USE_GITHUB= yes +GH_ACCOUNT= rosmanov + +USES= cmake:noninja localbase:ldflags python shebangfix +SHEBANG_GLOB= *.sh +LDFLAGS+= -lcjson -lcjson_utils +CMAKE_ARGS= -DCMAKE_DOC_DIR:PATH=${DOCSDIR_REL} + +OPTIONS_DEFINE= DOCS + +pre-configure: + ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE:C|/||}|' ${WRKSRC}/vars.sh + +.include diff --git a/editors/bee-host/distinfo b/editors/bee-host/distinfo new file mode 100644 index 000000000000..f9693402fffa --- /dev/null +++ b/editors/bee-host/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1660238948 +SHA256 (rosmanov-bee-host-1.3.4_GH0.tar.gz) = 715ab4edff8900dddef27303a5b19060b680cb0c341e4e3d6def4d04eeeb591d +SIZE (rosmanov-bee-host-1.3.4_GH0.tar.gz) = 30742 diff --git a/editors/bee-host/files/patch-CMakeLists.txt b/editors/bee-host/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..b14ecb0976a2 --- /dev/null +++ b/editors/bee-host/files/patch-CMakeLists.txt @@ -0,0 +1,73 @@ +--- CMakeLists.txt.orig 2022-04-07 09:03:56 UTC ++++ CMakeLists.txt +@@ -33,27 +33,7 @@ endif() + + set(EXTERNAL_DIR ${CMAKE_CURRENT_BINARY_DIR}/external) + +-# cJSON and cJSONUtils +-ExternalProject_Add(cjson +- GIT_REPOSITORY "https://github.com/DaveGamble/cJSON" +- GIT_TAG "v1.7.14" +- PREFIX "${EXTERNAL_DIR}/cJSON" +- BUILD_IN_SOURCE 1 +- TEST_COMMAND "" +- INSTALL_COMMAND "" +- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= +- -DBUILD_SHARED_AND_STATIC_LIBS=On +- -DBUILD_SHARED_LIBS=Off +- -DENABLE_CJSON_TEST=Off +- -DENABLE_CJSON_UTILS=On +- -DENABLE_TARGET_EXPORT=On +- ) +-ExternalProject_Get_Property(cjson source_dir) +-ExternalProject_Get_Property(cjson binary_dir) +-ExternalProject_Get_Property(cjson download_dir) +-set(CJSON_SOURCE_DIR "${source_dir}") +-set(CJSON_BINARY_DIR "${binary_dir}") +-set(CJSON_DOWNLOAD_DIR "${download_dir}") ++# cJSON and cJSONUtils installed from devel/libcjson + + # beectl + set(BEECTL_SRCS +@@ -64,21 +44,13 @@ set(BEECTL_SRCS + src/mkstemps.c + # This is nasty, but I couldn't find a way to use CMAKE_TOOLCHAIN_FILE + # for the external project (see comments below.) +- "${CJSON_SOURCE_DIR}/cJSON.c" + ) + + add_executable(beectl ${BEECTL_SRCS}) + +-# Workaround for CMake versions which require the cJSON.c file to exist before +-# downloading the external project. +-add_custom_command(TARGET beectl PRE_BUILD +- BYPRODUCTS "${CJSON_SOURCE_DIR}/cJSON.c" +- COMMAND touch "${CJSON_SOURCE_DIR}/cJSON.c") +- + target_compile_features(beectl PRIVATE c_variadic_macros) + target_include_directories(beectl PRIVATE "${CJSON_DOWNLOAD_DIR}") + set_property(TARGET beectl PROPERTY C_STANDARD 11) # C11 +-add_dependencies(beectl cjson) + + # The following would be better approach than including cJSON files in our + # source list. But the build fails when cross-compiling, since +@@ -103,8 +75,8 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURC + + message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") + set(BEECTL_MANIFEST_TARGET_PATH "${CMAKE_INSTALL_PREFIX}/bin/beectl") +-set(BEECTL_CHROME_MANIFEST_DIR "etc/opt/chrome/native-messaging-hosts") +-set(BEECTL_FIREFOX_MANIFEST_DIR "usr/lib/mozilla/native-messaging-hosts") ++set(BEECTL_CHROME_MANIFEST_DIR "etc/chrome/native-messaging-hosts") ++set(BEECTL_FIREFOX_MANIFEST_DIR "lib/mozilla/native-messaging-hosts") + + # RPM package properties + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/beectl.spec.in" +@@ -226,7 +198,7 @@ elseif(uppercase_CMAKE_SYSTEM_NAME MATCHES DARWIN) + COMPONENT config) + else(uppercase_CMAKE_SYSTEM_NAME MATCHES WINDOWS) + # Install host app +- install(TARGETS beectl RUNTIME DESTINATION usr/local/bin COMPONENT applications) ++ install(TARGETS beectl RUNTIME DESTINATION bin COMPONENT applications) + + configure_file( + chrome-com.ruslan_osmanov.bee.json.in diff --git a/editors/bee-host/files/patch-vars.sh b/editors/bee-host/files/patch-vars.sh new file mode 100644 index 000000000000..12201417b955 --- /dev/null +++ b/editors/bee-host/files/patch-vars.sh @@ -0,0 +1,13 @@ +--- vars.sh.orig 2022-04-07 09:03:56 UTC ++++ vars.sh +@@ -45,8 +45,8 @@ case "$kernel" in + *) + if [ $EUID == 0 ]; then + # If superuser +- chrome_target_manifest_dir='/etc/opt/chrome/native-messaging-hosts' +- firefox_target_manifest_dir='/usr/lib/mozilla/native-messaging-hosts' ++ chrome_target_manifest_dir='%%LOCALBASE%%/chrome/native-messaging-hosts' ++ firefox_target_manifest_dir='%%LOCALBASE%%/lib/mozilla/native-messaging-hosts' + else + # If normal user + chrome_target_manifest_dir="$HOME/.config/google-chrome/NativeMessagingHosts" diff --git a/editors/bee-host/pkg-descr b/editors/bee-host/pkg-descr new file mode 100644 index 000000000000..d91a8c6d1bf5 --- /dev/null +++ b/editors/bee-host/pkg-descr @@ -0,0 +1,8 @@ +BeeCtl, a native messaging host application for Browser's Exernal Editor +extension (https://github.com/rosmanov/chrome-bee). + +When installing the add-on External Editor for Firefox (or Chrome), +https://addons.mozilla.org/en-US/firefox/addon/external-editor/ +this is the required host part. + +WWW: https://github.com/rosmanov/bee-host diff --git a/editors/bee-host/pkg-plist b/editors/bee-host/pkg-plist new file mode 100644 index 000000000000..cd3eb79eefcb --- /dev/null +++ b/editors/bee-host/pkg-plist @@ -0,0 +1,5 @@ +bin/beectl +etc/chrome/native-messaging-hosts/com.ruslan_osmanov.bee.json +lib/mozilla/native-messaging-hosts/com.ruslan_osmanov.bee.json +%%PORTDOCS%%%%DOCSDIR%%/LICENSE +%%PORTDOCS%%%%DOCSDIR%%/README.md