diff --git a/editors/Makefile b/editors/Makefile index cd1343505a36..1b3da9a033ce 100644 --- a/editors/Makefile +++ b/editors/Makefile @@ -1,284 +1,285 @@ COMMENT = Editors SUBDIR += 2bsd-vi SUBDIR += abiword SUBDIR += abiword-docs SUBDIR += aee SUBDIR += aewan SUBDIR += amp SUBDIR += apel SUBDIR += asedit SUBDIR += beav + SUBDIR += bee-host SUBDIR += biew SUBDIR += bitedit SUBDIR += boiling-egg SUBDIR += bpatch SUBDIR += bvi SUBDIR += calligra SUBDIR += calligraplan SUBDIR += chexedit SUBDIR += cooledit SUBDIR += cpeditor SUBDIR += cream SUBDIR += cudatext SUBDIR += deforaos-editor SUBDIR += dhex SUBDIR += diakonos SUBDIR += diamond SUBDIR += dkns SUBDIR += drjava SUBDIR += dte SUBDIR += e3 SUBDIR += e93 SUBDIR += ecce SUBDIR += ecrire SUBDIR += edith SUBDIR += editorconfig-core-c SUBDIR += elementary-code SUBDIR += emacs SUBDIR += emacs-devel SUBDIR += encryptpad SUBDIR += featherpad SUBDIR += fileobj SUBDIR += flim SUBDIR += focuswriter SUBDIR += fpc-ide SUBDIR += fte SUBDIR += fxite SUBDIR += gedit SUBDIR += gedit-plugins SUBDIR += ghex SUBDIR += ghostwriter SUBDIR += gmanedit SUBDIR += gnome-latex SUBDIR += gnome-text-editor SUBDIR += gobby SUBDIR += gomate SUBDIR += gummi SUBDIR += helix SUBDIR += heme SUBDIR += hexcurse SUBDIR += hexedit SUBDIR += hexer SUBDIR += hexpert SUBDIR += hnb SUBDIR += hte SUBDIR += imhex SUBDIR += impress SUBDIR += jed SUBDIR += jedit SUBDIR += joe SUBDIR += jove SUBDIR += jucipp SUBDIR += jupp SUBDIR += kak-lsp SUBDIR += kakoune SUBDIR += kate SUBDIR += kibi SUBDIR += kile SUBDIR += komodo-edit SUBDIR += lazarus SUBDIR += lazarus-devel SUBDIR += lazarus-qt5 SUBDIR += lazarus-qt5-devel SUBDIR += le SUBDIR += leafpad SUBDIR += led SUBDIR += libreoffice SUBDIR += libreoffice-af SUBDIR += libreoffice-am SUBDIR += libreoffice-as SUBDIR += libreoffice-ast SUBDIR += libreoffice-be SUBDIR += libreoffice-bg SUBDIR += libreoffice-bn SUBDIR += libreoffice-bn_IN SUBDIR += libreoffice-bo SUBDIR += libreoffice-br SUBDIR += libreoffice-brx SUBDIR += libreoffice-bs SUBDIR += libreoffice-ca SUBDIR += libreoffice-ca_valencia SUBDIR += libreoffice-ckb SUBDIR += libreoffice-cs SUBDIR += libreoffice-cy SUBDIR += libreoffice-da SUBDIR += libreoffice-dgo SUBDIR += libreoffice-dsb SUBDIR += libreoffice-dz SUBDIR += libreoffice-el SUBDIR += libreoffice-en_GB SUBDIR += libreoffice-en_ZA SUBDIR += libreoffice-eo SUBDIR += libreoffice-es SUBDIR += libreoffice-et SUBDIR += libreoffice-eu SUBDIR += libreoffice-fa SUBDIR += libreoffice-fi SUBDIR += libreoffice-fur SUBDIR += libreoffice-fy SUBDIR += libreoffice-ga SUBDIR += libreoffice-gd SUBDIR += libreoffice-gl SUBDIR += libreoffice-gu SUBDIR += libreoffice-gug SUBDIR += libreoffice-hi SUBDIR += libreoffice-hr SUBDIR += libreoffice-hsb SUBDIR += libreoffice-i18n SUBDIR += libreoffice-id SUBDIR += libreoffice-is SUBDIR += libreoffice-it SUBDIR += libreoffice-ka SUBDIR += libreoffice-kab SUBDIR += libreoffice-kk SUBDIR += libreoffice-km SUBDIR += libreoffice-kmr_Latn SUBDIR += libreoffice-kn SUBDIR += libreoffice-kok SUBDIR += libreoffice-ks SUBDIR += libreoffice-lb SUBDIR += libreoffice-lo SUBDIR += libreoffice-lt SUBDIR += libreoffice-lv SUBDIR += libreoffice-mai SUBDIR += libreoffice-mk SUBDIR += libreoffice-ml SUBDIR += libreoffice-mn SUBDIR += libreoffice-mni SUBDIR += libreoffice-mr SUBDIR += libreoffice-my SUBDIR += libreoffice-nb SUBDIR += libreoffice-ne SUBDIR += libreoffice-nl SUBDIR += libreoffice-nn SUBDIR += libreoffice-nr SUBDIR += libreoffice-nso SUBDIR += libreoffice-oc SUBDIR += libreoffice-om SUBDIR += libreoffice-or SUBDIR += libreoffice-pa_IN SUBDIR += libreoffice-ro SUBDIR += libreoffice-rw SUBDIR += libreoffice-sa_IN SUBDIR += libreoffice-sat SUBDIR += libreoffice-sd SUBDIR += libreoffice-si SUBDIR += libreoffice-sid SUBDIR += libreoffice-sk SUBDIR += libreoffice-sl SUBDIR += libreoffice-sq SUBDIR += libreoffice-sr SUBDIR += libreoffice-sr_Latn SUBDIR += libreoffice-ss SUBDIR += libreoffice-st SUBDIR += libreoffice-sv SUBDIR += libreoffice-sw_TZ SUBDIR += libreoffice-szl SUBDIR += libreoffice-ta SUBDIR += libreoffice-te SUBDIR += libreoffice-tg SUBDIR += libreoffice-th SUBDIR += libreoffice-tn SUBDIR += libreoffice-tr SUBDIR += libreoffice-ts SUBDIR += libreoffice-tt SUBDIR += libreoffice-ug SUBDIR += libreoffice-uz SUBDIR += libreoffice-ve SUBDIR += libreoffice-vec SUBDIR += libreoffice-xh SUBDIR += libreoffice-zu SUBDIR += linux-bcompare SUBDIR += linux-sublime SUBDIR += linux-sublime-text4 SUBDIR += linux-sublime3 SUBDIR += linux-wps-office SUBDIR += lite SUBDIR += madedit SUBDIR += marker SUBDIR += mg SUBDIR += micro SUBDIR += mined SUBDIR += mle SUBDIR += morla SUBDIR += mousepad SUBDIR += mp SUBDIR += nano SUBDIR += ne SUBDIR += nedit SUBDIR += neovim SUBDIR += neovim-qt SUBDIR += notepadnext SUBDIR += nvi-m17n SUBDIR += nvi2 SUBDIR += o SUBDIR += openoffice-4 SUBDIR += openoffice-devel SUBDIR += p5-Proc-InvokeEditor SUBDIR += p5-Vimana SUBDIR += paredit-mode.el SUBDIR += parinfer-rust SUBDIR += pdfedit SUBDIR += pico-alpine SUBDIR += picpas SUBDIR += pluma SUBDIR += pluma-plugins SUBDIR += poedit SUBDIR += poke SUBDIR += psgml SUBDIR += puff SUBDIR += py-babi SUBDIR += py-editorconfig SUBDIR += py-pynvim SUBDIR += py-vim-bridge SUBDIR += quilter SUBDIR += rehex SUBDIR += rubygem-neovim SUBDIR += scite SUBDIR += se SUBDIR += semi SUBDIR += setzer SUBDIR += shed SUBDIR += slime SUBDIR += sly SUBDIR += sly-asdf SUBDIR += sly-named-readtables SUBDIR += sly-quicklisp SUBDIR += ssed SUBDIR += sted SUBDIR += tamago SUBDIR += tea SUBDIR += teco SUBDIR += ted SUBDIR += tetradraw SUBDIR += texmacs SUBDIR += texmaker SUBDIR += texstudio SUBDIR += textadept SUBDIR += texworks SUBDIR += the SUBDIR += treeform SUBDIR += tweak SUBDIR += uemacs SUBDIR += uzap SUBDIR += ved SUBDIR += vigor SUBDIR += vile SUBDIR += vim SUBDIR += vscode SUBDIR += web-mode SUBDIR += with-editor SUBDIR += with-editor-devel SUBDIR += wordgrinder SUBDIR += wxhexeditor SUBDIR += xcoral SUBDIR += xed SUBDIR += xi-core SUBDIR += xi-term SUBDIR += xmlcopyeditor SUBDIR += xvile SUBDIR += yudit SUBDIR += zile .include 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