git: 46fda53e81d0 - main - editors/lite-xl: new port had been added (+)

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Thu, 10 Nov 2022 10:48:48 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=46fda53e81d0ebad95648d1940a21be617836b18

commit 46fda53e81d0ebad95648d1940a21be617836b18
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-11-10 10:45:46 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-11-10 10:45:46 +0000

    editors/lite-xl: new port had been added (+)
    
    Lite XL editor is a lightweight, simple, fast, feature-filled, and
    extremely extensible text editor written in C, and Lua, descendant
    of the `editors/lite'.
    
    WWW: https://lite-xl.com/
---
 editors/Makefile                       |   1 +
 editors/lite-xl/Makefile               |  39 ++++++
 editors/lite-xl/distinfo               |   9 ++
 editors/lite-xl/files/patch-src_main.c |  29 ++++
 editors/lite-xl/pkg-descr              |   3 +
 editors/lite-xl/pkg-plist              | 239 +++++++++++++++++++++++++++++++++
 6 files changed, 320 insertions(+)

diff --git a/editors/Makefile b/editors/Makefile
index dbf8f88dd1b6..8a763bb30b62 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -197,6 +197,7 @@
     SUBDIR += linux-sublime3
     SUBDIR += linux-wps-office
     SUBDIR += lite
+    SUBDIR += lite-xl
     SUBDIR += madedit
     SUBDIR += marker
     SUBDIR += mg
diff --git a/editors/lite-xl/Makefile b/editors/lite-xl/Makefile
new file mode 100644
index 000000000000..04b50a49a3ec
--- /dev/null
+++ b/editors/lite-xl/Makefile
@@ -0,0 +1,39 @@
+PORTNAME=	lite-xl
+PORTVERSION=	2.1.0
+DISTVERSIONPREFIX=	v
+CATEGORIES=	editors
+
+MAINTAINER=	danfe@FreeBSD.org
+COMMENT=	Lightweight text editor written mostly in Lua
+WWW=		https://lite-xl.com/
+
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES=	56e465c35183e5bea6c10fcf346ccba946aa60c1.patch:-p1
+
+LICENSE=	MIT
+
+LIB_DEPENDS=	libfreetype.so:print/freetype2 \
+		libpcre2-8.so:devel/pcre2
+
+USES=		lua:54 meson pkgconfig sdl
+USE_SDL=	sdl2
+
+USE_GITHUB=	yes
+GH_PROJECT=	${PORTNAME}-colors:colors ${PORTNAME}-plugins:plugins
+GH_TAGNAME=	b245158:colors 62f8740:plugins
+
+OPTIONS_DEFINE=	DOCS
+
+PORTDOCS=	changelog.md licenses.md
+
+post-install:
+	${CP} -a ${WRKSRC_colors}/colors ${STAGEDIR}${DATADIR}
+	${MV} ${WRKSRC_plugins}/plugins/language_*.lua \
+		${STAGEDIR}${DATADIR}/plugins
+	${CP} -a ${WRKSRC_plugins}/plugins \
+		${STAGEDIR}${DATADIR}/plugins/extra
+
+post-install-DOCS-on:
+	${INSTALL_DATA} ${WRKSRC}/changelog.md ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/editors/lite-xl/distinfo b/editors/lite-xl/distinfo
new file mode 100644
index 000000000000..d79e40728f1c
--- /dev/null
+++ b/editors/lite-xl/distinfo
@@ -0,0 +1,9 @@
+TIMESTAMP = 1667356738
+SHA256 (lite-xl-lite-xl-v2.1.0_GH0.tar.gz) = 761d390d0ef2706eeed1c685211d8ff5ce63dacd51d561e56c7e0f7ec0e7ea62
+SIZE (lite-xl-lite-xl-v2.1.0_GH0.tar.gz) = 514227
+SHA256 (lite-xl-lite-xl-colors-b245158_GH0.tar.gz) = 50c98b690a9bf3ecb2f0e0d5c8f1d245123d6df7083edb4a05c29d8dc1485004
+SIZE (lite-xl-lite-xl-colors-b245158_GH0.tar.gz) = 14247
+SHA256 (lite-xl-lite-xl-plugins-62f8740_GH0.tar.gz) = cc3ce3272964adf6c78af4c27575120fd2c7664b7a0081e361aff3f71a872e08
+SIZE (lite-xl-lite-xl-plugins-62f8740_GH0.tar.gz) = 141027
+SHA256 (56e465c35183e5bea6c10fcf346ccba946aa60c1.patch) = 6e29d22be9bc9efe779ee9ee65708677b48313e8dd2a18cee855da02004b3a7b
+SIZE (56e465c35183e5bea6c10fcf346ccba946aa60c1.patch) = 1756
diff --git a/editors/lite-xl/files/patch-src_main.c b/editors/lite-xl/files/patch-src_main.c
new file mode 100644
index 000000000000..e4d075bd477b
--- /dev/null
+++ b/editors/lite-xl/files/patch-src_main.c
@@ -0,0 +1,29 @@
+--- src/main.c.orig	2022-11-02 02:38:58 UTC
++++ src/main.c
+@@ -7,11 +7,14 @@
+ 
+ #ifdef _WIN32
+   #include <windows.h>
+-#elif __linux__ || __FreeBSD__
++#elif __linux__
+   #include <unistd.h>
+   #include <signal.h>
+ #elif __APPLE__
+   #include <mach-o/dyld.h>
++#elif __FreeBSD__
++  #include <sys/sysctl.h>
++  #include <signal.h>
+ #endif
+ 
+ 
+@@ -43,6 +46,10 @@ static void get_exe_filename(char *buf, int sz) {
+   char exepath[size];
+   _NSGetExecutablePath(exepath, &size);
+   realpath(exepath, buf);
++#elif __FreeBSD__
++  size_t len = sz;
++  const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
++  sysctl(mib, 4, buf, &len, NULL, 0);
+ #else
+   strcpy(buf, "./lite");
+ #endif
diff --git a/editors/lite-xl/pkg-descr b/editors/lite-xl/pkg-descr
new file mode 100644
index 000000000000..8bbc4fc3d35a
--- /dev/null
+++ b/editors/lite-xl/pkg-descr
@@ -0,0 +1,3 @@
+Lite XL editor is a lightweight, simple, fast, feature-filled, and
+extremely extensible text editor written in C, and Lua, descendant
+of the `editors/lite'.
diff --git a/editors/lite-xl/pkg-plist b/editors/lite-xl/pkg-plist
new file mode 100644
index 000000000000..0bdba6b4aac0
--- /dev/null
+++ b/editors/lite-xl/pkg-plist
@@ -0,0 +1,239 @@
+bin/lite-xl
+%%DATADIR%%/colors/abyss.lua
+%%DATADIR%%/colors/betelgeuse.lua
+%%DATADIR%%/colors/c0mfy.lua
+%%DATADIR%%/colors/cold_lime.lua
+%%DATADIR%%/colors/default.lua
+%%DATADIR%%/colors/dracula.lua
+%%DATADIR%%/colors/duorand.lua
+%%DATADIR%%/colors/duotone.lua
+%%DATADIR%%/colors/fall.lua
+%%DATADIR%%/colors/github-dark-dimmed.lua
+%%DATADIR%%/colors/github.lua
+%%DATADIR%%/colors/github_dark.lua
+%%DATADIR%%/colors/gruvbox_dark.lua
+%%DATADIR%%/colors/gruvbox_light.lua
+%%DATADIR%%/colors/jellybeans.lua
+%%DATADIR%%/colors/liqube.lua
+%%DATADIR%%/colors/mariana.lua
+%%DATADIR%%/colors/moe.lua
+%%DATADIR%%/colors/monodark.lua
+%%DATADIR%%/colors/monokai-pro-classic.lua
+%%DATADIR%%/colors/monokai.lua
+%%DATADIR%%/colors/nord.lua
+%%DATADIR%%/colors/onedark.lua
+%%DATADIR%%/colors/only_dark.lua
+%%DATADIR%%/colors/plasma.lua
+%%DATADIR%%/colors/solarized_light.lua
+%%DATADIR%%/colors/solarobj.lua
+%%DATADIR%%/colors/summer.lua
+%%DATADIR%%/colors/synthwave.lua
+%%DATADIR%%/colors/textadept.lua
+%%DATADIR%%/colors/tokyo-night.lua
+%%DATADIR%%/colors/vscode-dark.lua
+%%DATADIR%%/colors/winter.lua
+%%DATADIR%%/colors/zenburn.lua
+%%DATADIR%%/core/bit.lua
+%%DATADIR%%/core/command.lua
+%%DATADIR%%/core/commands/command.lua
+%%DATADIR%%/core/commands/core.lua
+%%DATADIR%%/core/commands/dialog.lua
+%%DATADIR%%/core/commands/doc.lua
+%%DATADIR%%/core/commands/drawwhitespace.lua
+%%DATADIR%%/core/commands/files.lua
+%%DATADIR%%/core/commands/findreplace.lua
+%%DATADIR%%/core/commands/log.lua
+%%DATADIR%%/core/commands/root.lua
+%%DATADIR%%/core/commands/statusbar.lua
+%%DATADIR%%/core/commandview.lua
+%%DATADIR%%/core/common.lua
+%%DATADIR%%/core/config.lua
+%%DATADIR%%/core/contextmenu.lua
+%%DATADIR%%/core/dirwatch.lua
+%%DATADIR%%/core/doc/highlighter.lua
+%%DATADIR%%/core/doc/init.lua
+%%DATADIR%%/core/doc/search.lua
+%%DATADIR%%/core/doc/translate.lua
+%%DATADIR%%/core/docview.lua
+%%DATADIR%%/core/emptyview.lua
+%%DATADIR%%/core/ime.lua
+%%DATADIR%%/core/init.lua
+%%DATADIR%%/core/keymap-macos.lua
+%%DATADIR%%/core/keymap.lua
+%%DATADIR%%/core/logview.lua
+%%DATADIR%%/core/modkeys-generic.lua
+%%DATADIR%%/core/modkeys-macos.lua
+%%DATADIR%%/core/nagview.lua
+%%DATADIR%%/core/node.lua
+%%DATADIR%%/core/object.lua
+%%DATADIR%%/core/regex.lua
+%%DATADIR%%/core/rootview.lua
+%%DATADIR%%/core/scrollbar.lua
+%%DATADIR%%/core/start.lua
+%%DATADIR%%/core/statusview.lua
+%%DATADIR%%/core/strict.lua
+%%DATADIR%%/core/style.lua
+%%DATADIR%%/core/syntax.lua
+%%DATADIR%%/core/titleview.lua
+%%DATADIR%%/core/tokenizer.lua
+%%DATADIR%%/core/utf8string.lua
+%%DATADIR%%/core/view.lua
+%%DATADIR%%/fonts/FiraSans-Regular.ttf
+%%DATADIR%%/fonts/JetBrainsMono-Regular.ttf
+%%DATADIR%%/fonts/icons.ttf
+%%DATADIR%%/globals.lua
+%%DATADIR%%/plugins/autocomplete.lua
+%%DATADIR%%/plugins/autoreload.lua
+%%DATADIR%%/plugins/contextmenu.lua
+%%DATADIR%%/plugins/detectindent.lua
+%%DATADIR%%/plugins/drawwhitespace.lua
+%%DATADIR%%/plugins/extra/align_carets.lua
+%%DATADIR%%/plugins/extra/autoinsert.lua
+%%DATADIR%%/plugins/extra/autosave.lua
+%%DATADIR%%/plugins/extra/autosaveonfocuslost.lua
+%%DATADIR%%/plugins/extra/autowrap.lua
+%%DATADIR%%/plugins/extra/bigclock.lua
+%%DATADIR%%/plugins/extra/bracketmatch.lua
+%%DATADIR%%/plugins/extra/centerdoc.lua
+%%DATADIR%%/plugins/extra/colorpreview.lua
+%%DATADIR%%/plugins/extra/copyfilelocation.lua
+%%DATADIR%%/plugins/extra/datetimestamps.lua
+%%DATADIR%%/plugins/extra/dragdropselected.lua
+%%DATADIR%%/plugins/extra/ephemeral_tabs.lua
+%%DATADIR%%/plugins/extra/eval.lua
+%%DATADIR%%/plugins/extra/exec.lua
+%%DATADIR%%/plugins/extra/extend_selection_line.lua
+%%DATADIR%%/plugins/extra/fontconfig.lua
+%%DATADIR%%/plugins/extra/force_syntax.lua
+%%DATADIR%%/plugins/extra/ghmarkdown.lua
+%%DATADIR%%/plugins/extra/gitstatus.lua
+%%DATADIR%%/plugins/extra/gofmt.lua
+%%DATADIR%%/plugins/extra/indent_convert.lua
+%%DATADIR%%/plugins/extra/indentguide.lua
+%%DATADIR%%/plugins/extra/ipc.lua
+%%DATADIR%%/plugins/extra/lfautoinsert.lua
+%%DATADIR%%/plugins/extra/linenumbers.lua
+%%DATADIR%%/plugins/extra/macmodkeys.lua
+%%DATADIR%%/plugins/extra/markers.lua
+%%DATADIR%%/plugins/extra/memoryusage.lua
+%%DATADIR%%/plugins/extra/minimap.lua
+%%DATADIR%%/plugins/extra/motiontrail.lua
+%%DATADIR%%/plugins/extra/navigate.lua
+%%DATADIR%%/plugins/extra/nonicons.lua
+%%DATADIR%%/plugins/extra/opacity.lua
+%%DATADIR%%/plugins/extra/open_ext.lua
+%%DATADIR%%/plugins/extra/openfilelocation.lua
+%%DATADIR%%/plugins/extra/openselected.lua
+%%DATADIR%%/plugins/extra/pdfview.lua
+%%DATADIR%%/plugins/extra/primary_selection.lua
+%%DATADIR%%/plugins/extra/rainbowparen.lua
+%%DATADIR%%/plugins/extra/regexreplacepreview.lua
+%%DATADIR%%/plugins/extra/restoretabs.lua
+%%DATADIR%%/plugins/extra/scalestatus.lua
+%%DATADIR%%/plugins/extra/select_colorscheme.lua
+%%DATADIR%%/plugins/extra/selectionhighlight.lua
+%%DATADIR%%/plugins/extra/settings.lua
+%%DATADIR%%/plugins/extra/smallclock.lua
+%%DATADIR%%/plugins/extra/smoothcaret.lua
+%%DATADIR%%/plugins/extra/sort.lua
+%%DATADIR%%/plugins/extra/spellcheck.lua
+%%DATADIR%%/plugins/extra/statusclock.lua
+%%DATADIR%%/plugins/extra/tabnumbers.lua
+%%DATADIR%%/plugins/extra/texcompile.lua
+%%DATADIR%%/plugins/extra/themeselect.lua
+%%DATADIR%%/plugins/extra/titleize.lua
+%%DATADIR%%/plugins/extra/togglesnakecamel.lua
+%%DATADIR%%/plugins/extra/typingspeed.lua
+%%DATADIR%%/plugins/extra/unboundedscroll.lua
+%%DATADIR%%/plugins/extra/wordcount.lua
+%%DATADIR%%/plugins/language_R.lua
+%%DATADIR%%/plugins/language_angelscript.lua
+%%DATADIR%%/plugins/language_assembly_x86.lua
+%%DATADIR%%/plugins/language_batch.lua
+%%DATADIR%%/plugins/language_bib.lua
+%%DATADIR%%/plugins/language_c.lua
+%%DATADIR%%/plugins/language_caddyfile.lua
+%%DATADIR%%/plugins/language_cmake.lua
+%%DATADIR%%/plugins/language_cpp.lua
+%%DATADIR%%/plugins/language_csharp.lua
+%%DATADIR%%/plugins/language_css.lua
+%%DATADIR%%/plugins/language_d.lua
+%%DATADIR%%/plugins/language_dart.lua
+%%DATADIR%%/plugins/language_diff.lua
+%%DATADIR%%/plugins/language_elixir.lua
+%%DATADIR%%/plugins/language_elm.lua
+%%DATADIR%%/plugins/language_erb.lua
+%%DATADIR%%/plugins/language_fe.lua
+%%DATADIR%%/plugins/language_fennel.lua
+%%DATADIR%%/plugins/language_fstab.lua
+%%DATADIR%%/plugins/language_gdscript.lua
+%%DATADIR%%/plugins/language_glsl.lua
+%%DATADIR%%/plugins/language_gmi.lua
+%%DATADIR%%/plugins/language_go.lua
+%%DATADIR%%/plugins/language_hlsl.lua
+%%DATADIR%%/plugins/language_hs.lua
+%%DATADIR%%/plugins/language_htaccess.lua
+%%DATADIR%%/plugins/language_html.lua
+%%DATADIR%%/plugins/language_ini.lua
+%%DATADIR%%/plugins/language_java.lua
+%%DATADIR%%/plugins/language_jiyu.lua
+%%DATADIR%%/plugins/language_js.lua
+%%DATADIR%%/plugins/language_jsx.lua
+%%DATADIR%%/plugins/language_julia.lua
+%%DATADIR%%/plugins/language_liquid.lua
+%%DATADIR%%/plugins/language_lobster.lua
+%%DATADIR%%/plugins/language_lua.lua
+%%DATADIR%%/plugins/language_make.lua
+%%DATADIR%%/plugins/language_md.lua
+%%DATADIR%%/plugins/language_meson.lua
+%%DATADIR%%/plugins/language_miniscript.lua
+%%DATADIR%%/plugins/language_moon.lua
+%%DATADIR%%/plugins/language_nginx.lua
+%%DATADIR%%/plugins/language_nim.lua
+%%DATADIR%%/plugins/language_objc.lua
+%%DATADIR%%/plugins/language_odin.lua
+%%DATADIR%%/plugins/language_perl.lua
+%%DATADIR%%/plugins/language_php.lua
+%%DATADIR%%/plugins/language_pico8.lua
+%%DATADIR%%/plugins/language_pkgbuild.lua
+%%DATADIR%%/plugins/language_po.lua
+%%DATADIR%%/plugins/language_powershell.lua
+%%DATADIR%%/plugins/language_psql.lua
+%%DATADIR%%/plugins/language_python.lua
+%%DATADIR%%/plugins/language_rescript.lua
+%%DATADIR%%/plugins/language_rivet.lua
+%%DATADIR%%/plugins/language_ruby.lua
+%%DATADIR%%/plugins/language_rust.lua
+%%DATADIR%%/plugins/language_sass.lua
+%%DATADIR%%/plugins/language_scala.lua
+%%DATADIR%%/plugins/language_sh.lua
+%%DATADIR%%/plugins/language_ssh_config.lua
+%%DATADIR%%/plugins/language_tcl.lua
+%%DATADIR%%/plugins/language_teal.lua
+%%DATADIR%%/plugins/language_tex.lua
+%%DATADIR%%/plugins/language_toml.lua
+%%DATADIR%%/plugins/language_ts.lua
+%%DATADIR%%/plugins/language_tsx.lua
+%%DATADIR%%/plugins/language_v.lua
+%%DATADIR%%/plugins/language_wren.lua
+%%DATADIR%%/plugins/language_xml.lua
+%%DATADIR%%/plugins/language_yaml.lua
+%%DATADIR%%/plugins/language_zig.lua
+%%DATADIR%%/plugins/lineguide.lua
+%%DATADIR%%/plugins/linewrapping.lua
+%%DATADIR%%/plugins/macro.lua
+%%DATADIR%%/plugins/projectsearch.lua
+%%DATADIR%%/plugins/quote.lua
+%%DATADIR%%/plugins/reflow.lua
+%%DATADIR%%/plugins/scale.lua
+%%DATADIR%%/plugins/tabularize.lua
+%%DATADIR%%/plugins/toolbarview.lua
+%%DATADIR%%/plugins/treeview.lua
+%%DATADIR%%/plugins/trimwhitespace.lua
+%%DATADIR%%/plugins/workspace.lua
+%%DATADIR%%/process.lua
+%%DATADIR%%/regex.lua
+%%DATADIR%%/renderer.lua
+%%DATADIR%%/string.lua
+%%DATADIR%%/system.lua
+%%DATADIR%%/utf8extra.lua