* [PR PATCH] New package: lite-1.11
@ 2022-10-13 4:42 drichline
2022-10-13 5:51 ` [PR REVIEW] " classabbyamp
` (19 more replies)
0 siblings, 20 replies; 21+ messages in thread
From: drichline @ 2022-10-13 4:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]
There is a new pull request by drichline against master on the void-packages repository
https://github.com/drichline/void-packages lite-branch
https://github.com/void-linux/void-packages/pull/39925
New package: lite-1.11
Note: even though lite is a GUI app, it is meant to be launched from the terminal, e.g. `lite project-dir/`; upstream does not provide an svg icon or .desktop file.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/39925.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lite-branch-39925.patch --]
[-- Type: text/x-diff, Size: 1207 bytes --]
From 6ec2ae4730cd31bc0f52e641dd7cc76d5dc4f27c Mon Sep 17 00:00:00 2001
From: Dakota Richline <43507179+drichline@users.noreply.github.com>
Date: Thu, 13 Oct 2022 00:36:42 -0400
Subject: [PATCH] New package: lite-1.11
---
srcpkgs/lite/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/lite/template
diff --git a/srcpkgs/lite/template b/srcpkgs/lite/template
new file mode 100644
index 000000000000..1e1e5c2fbf25
--- /dev/null
+++ b/srcpkgs/lite/template
@@ -0,0 +1,24 @@
+# Template file for 'lite'
+pkgname=lite
+version=1.11
+revision=1
+makedepends="SDL2-devel"
+short_desc="lite is a lightweight text editor written mostly in Lua"
+maintainer="Dakota Richline <drichline@protonmail.com>"
+license="MIT"
+homepage="https://github.com/rxi/lite"
+distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
+checksum=2fd9466663182da56a36a557d05925d226dc1c5de6fb24e423a7b0056db2eec4
+
+do_build(){
+ bash ${wrksrc}/build.sh
+}
+
+do_install(){
+ vlicense ${wrksrc}/LICENSE
+ vmkdir opt/${pkgname}
+ vinstall ${wrksrc}/lite 755 opt/${pkgname}
+ vcopy ${wrksrc}/data opt/${pkgname}
+ vmkdir usr/bin
+ ln -s /opt/${pkgname}/lite ${DESTDIR}/usr/bin/lite
+}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (2 preceding siblings ...)
2022-10-13 5:51 ` classabbyamp
@ 2022-10-13 5:51 ` classabbyamp
2022-10-13 5:51 ` classabbyamp
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: classabbyamp @ 2022-10-13 5:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#discussion_r994174970
Comment:
you should be able to use `/usr/share/lite` instead of `/opt` for this (see [AUR](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=lite#n31), for example)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
2022-10-13 5:51 ` [PR REVIEW] " classabbyamp
@ 2022-10-13 5:51 ` classabbyamp
2022-10-13 5:51 ` classabbyamp
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: classabbyamp @ 2022-10-13 5:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 233 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#discussion_r994172775
Comment:
```suggestion
vinstall lite 755 opt/${pkgname}
vcopy data opt/${pkgname}
```
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (3 preceding siblings ...)
2022-10-13 5:51 ` classabbyamp
@ 2022-10-13 5:51 ` classabbyamp
2022-10-13 6:16 ` [PR PATCH] [Updated] " drichline
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: classabbyamp @ 2022-10-13 5:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#discussion_r994172230
Comment:
```suggestion
bash build.sh
```
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
2022-10-13 5:51 ` [PR REVIEW] " classabbyamp
2022-10-13 5:51 ` classabbyamp
@ 2022-10-13 5:51 ` classabbyamp
2022-10-13 5:51 ` classabbyamp
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: classabbyamp @ 2022-10-13 5:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 248 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#discussion_r994172319
Comment:
```suggestion
distfiles="https://github.com/rxi/lite/archive/refs/tags/v${version}.tar.gz"
```
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR REVIEW] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
@ 2022-10-13 5:51 ` classabbyamp
2022-10-13 5:51 ` classabbyamp
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: classabbyamp @ 2022-10-13 5:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#discussion_r994172636
Comment:
```suggestion
vlicense LICENSE
```
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (4 preceding siblings ...)
2022-10-13 5:51 ` classabbyamp
@ 2022-10-13 6:16 ` drichline
2022-10-13 6:22 ` drichline
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-10-13 6:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
There is an updated pull request by drichline against master on the void-packages repository
https://github.com/drichline/void-packages lite-branch
https://github.com/void-linux/void-packages/pull/39925
New package: lite-1.11
Note: even though lite is a GUI app, it is meant to be launched from the terminal, e.g. `lite project-dir/`; upstream does not provide an svg icon or .desktop file.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/39925.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lite-branch-39925.patch --]
[-- Type: text/x-diff, Size: 4650 bytes --]
From 246773c8aca249d83daaad3be72f45b1df58b8c7 Mon Sep 17 00:00:00 2001
From: Dakota Richline <43507179+drichline@users.noreply.github.com>
Date: Thu, 13 Oct 2022 00:36:42 -0400
Subject: [PATCH] New package: lite-1.11
---
srcpkgs/lite/patches/lite-path-fix.patch | 73 ++++++++++++++++++++++++
srcpkgs/lite/template | 23 ++++++++
2 files changed, 96 insertions(+)
create mode 100644 srcpkgs/lite/patches/lite-path-fix.patch
create mode 100644 srcpkgs/lite/template
diff --git a/srcpkgs/lite/patches/lite-path-fix.patch b/srcpkgs/lite/patches/lite-path-fix.patch
new file mode 100644
index 000000000000..5087bc267c58
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-path-fix.patch
@@ -0,0 +1,73 @@
+Upstream Issue: https://github.com/rxi/lite/issues/49
+
+(Patch adapted from Alpine Linux, updated for 1.06)
+
+diff --git a/data/core/commands/core.lua b/data/core/commands/core.lua
+index 5c9d622..568f0ef 100644
+--- a/data/core/commands/core.lua
++++ b/data/core/commands/core.lua
+@@ -85,7 +85,7 @@ command.add(nil, {
+ end,
+
+ ["core:open-user-module"] = function()
+- core.root_view:open_doc(core.open_doc(EXEDIR .. "/data/user/init.lua"))
++ core.root_view:open_doc(core.open_doc("/usr/share/lite/user/init.lua"))
+ end,
+
+ ["core:open-project-module"] = function()
+diff --git a/data/core/init.lua b/data/core/init.lua
+index a25cdb5..3bea486 100644
+--- a/data/core/init.lua
++++ b/data/core/init.lua
+@@ -150,7 +150,7 @@ end
+
+ function core.load_plugins()
+ local no_errors = true
+- local files = system.list_dir(EXEDIR .. "/data/plugins")
++ local files = system.list_dir("/usr/share/lite/plugins")
+ for _, filename in ipairs(files) do
+ local modname = "plugins." .. filename:gsub(".lua$", "")
+ local ok = core.try(require, modname)
+@@ -421,7 +421,7 @@ end
+
+ function core.on_error(err)
+ -- write error to file
+- local fp = io.open(EXEDIR .. "/error.txt", "wb")
++ local fp = io.open("/tmp/lite-editor-error.txt", "wb")
+ fp:write("Error: " .. tostring(err) .. "\n")
+ fp:write(debug.traceback(nil, 4))
+ fp:close()
+diff --git a/data/core/style.lua b/data/core/style.lua
+index ab597c2..23b551f 100644
+--- a/data/core/style.lua
++++ b/data/core/style.lua
+@@ -7,10 +7,10 @@ style.scrollbar_size = common.round(4 * SCALE)
+ style.caret_width = common.round(2 * SCALE)
+ style.tab_width = common.round(170 * SCALE)
+
+-style.font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 14 * SCALE)
+-style.big_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 34 * SCALE)
+-style.icon_font = renderer.font.load(EXEDIR .. "/data/fonts/icons.ttf", 14 * SCALE)
+-style.code_font = renderer.font.load(EXEDIR .. "/data/fonts/monospace.ttf", 13.5 * SCALE)
++style.font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 14 * SCALE)
++style.big_font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 34 * SCALE)
++style.icon_font = renderer.font.load("/usr/share/lite/fonts/icons.ttf", 14 * SCALE)
++style.code_font = renderer.font.load("/usr/share/lite/fonts/monospace.ttf", 13.5 * SCALE)
+
+ style.background = { common.color "#2e2e32" }
+ style.background2 = { common.color "#252529" }
+diff --git a/src/main.c b/src/main.c
+index c739f5f..0b796fa 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -119,8 +119,8 @@ int main(int argc, char **argv) {
+ " SCALE = tonumber(os.getenv(\"LITE_SCALE\")) or SCALE\n"
+ " PATHSEP = package.config:sub(1, 1)\n"
+ " EXEDIR = EXEFILE:match(\"^(.+)[/\\\\].*$\")\n"
+- " package.path = EXEDIR .. '/data/?.lua;' .. package.path\n"
+- " package.path = EXEDIR .. '/data/?/init.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?/init.lua;' .. package.path\n"
+ " core = require('core')\n"
+ " core.init()\n"
+ " core.run()\n"
diff --git a/srcpkgs/lite/template b/srcpkgs/lite/template
new file mode 100644
index 000000000000..8c29ffbd8f1e
--- /dev/null
+++ b/srcpkgs/lite/template
@@ -0,0 +1,23 @@
+# Template file for 'lite'
+pkgname=lite
+version=1.11
+revision=1
+makedepends="SDL2-devel"
+short_desc="lite is a lightweight text editor written mostly in Lua"
+maintainer="Dakota Richline <drichline@protonmail.com>"
+license="MIT"
+homepage="https://github.com/rxi/lite"
+distfiles="https://github.com/rxi/lite/archive/refs/tags/v${version}.tar.gz"
+checksum=2fd9466663182da56a36a557d05925d226dc1c5de6fb24e423a7b0056db2eec4
+
+do_build() {
+ bash build.sh
+}
+
+do_install() {
+ vlicense LICENSE
+ vmkdir usr/share/${pkgname}
+ vbin lite
+ vcopy data/* usr/share/${pkgname}
+ vmkdir usr/bin
+}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (5 preceding siblings ...)
2022-10-13 6:16 ` [PR PATCH] [Updated] " drichline
@ 2022-10-13 6:22 ` drichline
2022-10-13 19:13 ` drichline
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-10-13 6:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
There is an updated pull request by drichline against master on the void-packages repository
https://github.com/drichline/void-packages lite-branch
https://github.com/void-linux/void-packages/pull/39925
New package: lite-1.11
Note: even though lite is a GUI app, it is meant to be launched from the terminal, e.g. `lite project-dir/`; upstream does not provide an svg icon or .desktop file.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/39925.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lite-branch-39925.patch --]
[-- Type: text/x-diff, Size: 4632 bytes --]
From a9957577c5899bd12b9645ad727cfadb3ea890db Mon Sep 17 00:00:00 2001
From: Dakota Richline <43507179+drichline@users.noreply.github.com>
Date: Thu, 13 Oct 2022 00:36:42 -0400
Subject: [PATCH] New package: lite-1.11
---
srcpkgs/lite/patches/lite-path-fix.patch | 73 ++++++++++++++++++++++++
srcpkgs/lite/template | 22 +++++++
2 files changed, 95 insertions(+)
create mode 100644 srcpkgs/lite/patches/lite-path-fix.patch
create mode 100644 srcpkgs/lite/template
diff --git a/srcpkgs/lite/patches/lite-path-fix.patch b/srcpkgs/lite/patches/lite-path-fix.patch
new file mode 100644
index 000000000000..5087bc267c58
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-path-fix.patch
@@ -0,0 +1,73 @@
+Upstream Issue: https://github.com/rxi/lite/issues/49
+
+(Patch adapted from Alpine Linux, updated for 1.06)
+
+diff --git a/data/core/commands/core.lua b/data/core/commands/core.lua
+index 5c9d622..568f0ef 100644
+--- a/data/core/commands/core.lua
++++ b/data/core/commands/core.lua
+@@ -85,7 +85,7 @@ command.add(nil, {
+ end,
+
+ ["core:open-user-module"] = function()
+- core.root_view:open_doc(core.open_doc(EXEDIR .. "/data/user/init.lua"))
++ core.root_view:open_doc(core.open_doc("/usr/share/lite/user/init.lua"))
+ end,
+
+ ["core:open-project-module"] = function()
+diff --git a/data/core/init.lua b/data/core/init.lua
+index a25cdb5..3bea486 100644
+--- a/data/core/init.lua
++++ b/data/core/init.lua
+@@ -150,7 +150,7 @@ end
+
+ function core.load_plugins()
+ local no_errors = true
+- local files = system.list_dir(EXEDIR .. "/data/plugins")
++ local files = system.list_dir("/usr/share/lite/plugins")
+ for _, filename in ipairs(files) do
+ local modname = "plugins." .. filename:gsub(".lua$", "")
+ local ok = core.try(require, modname)
+@@ -421,7 +421,7 @@ end
+
+ function core.on_error(err)
+ -- write error to file
+- local fp = io.open(EXEDIR .. "/error.txt", "wb")
++ local fp = io.open("/tmp/lite-editor-error.txt", "wb")
+ fp:write("Error: " .. tostring(err) .. "\n")
+ fp:write(debug.traceback(nil, 4))
+ fp:close()
+diff --git a/data/core/style.lua b/data/core/style.lua
+index ab597c2..23b551f 100644
+--- a/data/core/style.lua
++++ b/data/core/style.lua
+@@ -7,10 +7,10 @@ style.scrollbar_size = common.round(4 * SCALE)
+ style.caret_width = common.round(2 * SCALE)
+ style.tab_width = common.round(170 * SCALE)
+
+-style.font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 14 * SCALE)
+-style.big_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 34 * SCALE)
+-style.icon_font = renderer.font.load(EXEDIR .. "/data/fonts/icons.ttf", 14 * SCALE)
+-style.code_font = renderer.font.load(EXEDIR .. "/data/fonts/monospace.ttf", 13.5 * SCALE)
++style.font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 14 * SCALE)
++style.big_font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 34 * SCALE)
++style.icon_font = renderer.font.load("/usr/share/lite/fonts/icons.ttf", 14 * SCALE)
++style.code_font = renderer.font.load("/usr/share/lite/fonts/monospace.ttf", 13.5 * SCALE)
+
+ style.background = { common.color "#2e2e32" }
+ style.background2 = { common.color "#252529" }
+diff --git a/src/main.c b/src/main.c
+index c739f5f..0b796fa 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -119,8 +119,8 @@ int main(int argc, char **argv) {
+ " SCALE = tonumber(os.getenv(\"LITE_SCALE\")) or SCALE\n"
+ " PATHSEP = package.config:sub(1, 1)\n"
+ " EXEDIR = EXEFILE:match(\"^(.+)[/\\\\].*$\")\n"
+- " package.path = EXEDIR .. '/data/?.lua;' .. package.path\n"
+- " package.path = EXEDIR .. '/data/?/init.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?/init.lua;' .. package.path\n"
+ " core = require('core')\n"
+ " core.init()\n"
+ " core.run()\n"
diff --git a/srcpkgs/lite/template b/srcpkgs/lite/template
new file mode 100644
index 000000000000..3e41458e85d9
--- /dev/null
+++ b/srcpkgs/lite/template
@@ -0,0 +1,22 @@
+# Template file for 'lite'
+pkgname=lite
+version=1.11
+revision=1
+makedepends="SDL2-devel"
+short_desc="lite is a lightweight text editor written mostly in Lua"
+maintainer="Dakota Richline <drichline@protonmail.com>"
+license="MIT"
+homepage="https://github.com/rxi/lite"
+distfiles="https://github.com/rxi/lite/archive/refs/tags/v${version}.tar.gz"
+checksum=2fd9466663182da56a36a557d05925d226dc1c5de6fb24e423a7b0056db2eec4
+
+do_build() {
+ bash build.sh
+}
+
+do_install() {
+ vlicense LICENSE
+ vmkdir usr/share/${pkgname}
+ vbin lite
+ vcopy data/* usr/share/${pkgname}
+}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (6 preceding siblings ...)
2022-10-13 6:22 ` drichline
@ 2022-10-13 19:13 ` drichline
2022-10-13 19:23 ` classabbyamp
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-10-13 19:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
New comment by drichline on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#issuecomment-1278065248
Comment:
@classabbyamp Sorry for the ping, but I have one more question for this template. The upstream (nonstandard) build script is known to have issues with cross-compiling; is it appropriate to just add `archs="x86_64-*` and commit?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (7 preceding siblings ...)
2022-10-13 19:13 ` drichline
@ 2022-10-13 19:23 ` classabbyamp
2022-10-14 19:39 ` [PR PATCH] [Updated] " drichline
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: classabbyamp @ 2022-10-13 19:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 682 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#issuecomment-1278081823
Comment:
adding this patch worked for me:
```patch
--- a/build.sh
+++ b/build.sh
@@ -1,7 +1,7 @@
#!/bin/bash
-cflags="-Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
-lflags="-lSDL2 -lm"
+cflags="$CFLAGS -Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
+lflags="$LDFLAGS -lSDL2 -lm"
if [[ $* == *windows* ]]; then
platform="windows"
@@ -14,7 +14,7 @@
else
platform="unix"
outfile="lite"
- compiler="gcc"
+ compiler="$CC"
cflags="$cflags -DLUA_USE_POSIX"
lflags="$lflags -o $outfile"
fi
```
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (8 preceding siblings ...)
2022-10-13 19:23 ` classabbyamp
@ 2022-10-14 19:39 ` drichline
2022-10-14 19:41 ` drichline
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-10-14 19:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
There is an updated pull request by drichline against master on the void-packages repository
https://github.com/drichline/void-packages lite-branch
https://github.com/void-linux/void-packages/pull/39925
New package: lite-1.11
Note: even though lite is a GUI app, it is meant to be launched from the terminal, e.g. `lite project-dir/`; upstream does not provide an svg icon or .desktop file.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/39925.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lite-branch-39925.patch --]
[-- Type: text/x-diff, Size: 5510 bytes --]
From 66268390a10f72d3a31dad7b9e12a5cfd60ccbf4 Mon Sep 17 00:00:00 2001
From: Dakota Richline <43507179+drichline@users.noreply.github.com>
Date: Thu, 13 Oct 2022 00:36:42 -0400
Subject: [PATCH] New package: lite-1.11
---
srcpkgs/lite/patches/lite-build-fix.patch | 22 +++++++
srcpkgs/lite/patches/lite-path-fix.patch | 73 +++++++++++++++++++++++
srcpkgs/lite/template | 22 +++++++
3 files changed, 117 insertions(+)
create mode 100644 srcpkgs/lite/patches/lite-build-fix.patch
create mode 100644 srcpkgs/lite/patches/lite-path-fix.patch
create mode 100644 srcpkgs/lite/template
diff --git a/srcpkgs/lite/patches/lite-build-fix.patch b/srcpkgs/lite/patches/lite-build-fix.patch
new file mode 100644
index 000000000000..9efea67ea7a3
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-build-fix.patch
@@ -0,0 +1,22 @@
+(Patch from @classabbyamp on GitHub)
+--- a/build.sh
++++ b/build.sh
+@@ -1,7 +1,7 @@
+ #!/bin/bash
+
+-cflags="-Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
+-lflags="-lSDL2 -lm"
++cflags="$CFLAGS -Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
++lflags="$LDFLAGS -lSDL2 -lm"
+
+ if [[ $* == *windows* ]]; then
+ platform="windows"
+@@ -14,7 +14,7 @@
+ else
+ platform="unix"
+ outfile="lite"
+- compiler="gcc"
++ compiler="$CC"
+ cflags="$cflags -DLUA_USE_POSIX"
+ lflags="$lflags -o $outfile"
+ fi
diff --git a/srcpkgs/lite/patches/lite-path-fix.patch b/srcpkgs/lite/patches/lite-path-fix.patch
new file mode 100644
index 000000000000..5087bc267c58
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-path-fix.patch
@@ -0,0 +1,73 @@
+Upstream Issue: https://github.com/rxi/lite/issues/49
+
+(Patch adapted from Alpine Linux, updated for 1.06)
+
+diff --git a/data/core/commands/core.lua b/data/core/commands/core.lua
+index 5c9d622..568f0ef 100644
+--- a/data/core/commands/core.lua
++++ b/data/core/commands/core.lua
+@@ -85,7 +85,7 @@ command.add(nil, {
+ end,
+
+ ["core:open-user-module"] = function()
+- core.root_view:open_doc(core.open_doc(EXEDIR .. "/data/user/init.lua"))
++ core.root_view:open_doc(core.open_doc("/usr/share/lite/user/init.lua"))
+ end,
+
+ ["core:open-project-module"] = function()
+diff --git a/data/core/init.lua b/data/core/init.lua
+index a25cdb5..3bea486 100644
+--- a/data/core/init.lua
++++ b/data/core/init.lua
+@@ -150,7 +150,7 @@ end
+
+ function core.load_plugins()
+ local no_errors = true
+- local files = system.list_dir(EXEDIR .. "/data/plugins")
++ local files = system.list_dir("/usr/share/lite/plugins")
+ for _, filename in ipairs(files) do
+ local modname = "plugins." .. filename:gsub(".lua$", "")
+ local ok = core.try(require, modname)
+@@ -421,7 +421,7 @@ end
+
+ function core.on_error(err)
+ -- write error to file
+- local fp = io.open(EXEDIR .. "/error.txt", "wb")
++ local fp = io.open("/tmp/lite-editor-error.txt", "wb")
+ fp:write("Error: " .. tostring(err) .. "\n")
+ fp:write(debug.traceback(nil, 4))
+ fp:close()
+diff --git a/data/core/style.lua b/data/core/style.lua
+index ab597c2..23b551f 100644
+--- a/data/core/style.lua
++++ b/data/core/style.lua
+@@ -7,10 +7,10 @@ style.scrollbar_size = common.round(4 * SCALE)
+ style.caret_width = common.round(2 * SCALE)
+ style.tab_width = common.round(170 * SCALE)
+
+-style.font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 14 * SCALE)
+-style.big_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 34 * SCALE)
+-style.icon_font = renderer.font.load(EXEDIR .. "/data/fonts/icons.ttf", 14 * SCALE)
+-style.code_font = renderer.font.load(EXEDIR .. "/data/fonts/monospace.ttf", 13.5 * SCALE)
++style.font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 14 * SCALE)
++style.big_font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 34 * SCALE)
++style.icon_font = renderer.font.load("/usr/share/lite/fonts/icons.ttf", 14 * SCALE)
++style.code_font = renderer.font.load("/usr/share/lite/fonts/monospace.ttf", 13.5 * SCALE)
+
+ style.background = { common.color "#2e2e32" }
+ style.background2 = { common.color "#252529" }
+diff --git a/src/main.c b/src/main.c
+index c739f5f..0b796fa 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -119,8 +119,8 @@ int main(int argc, char **argv) {
+ " SCALE = tonumber(os.getenv(\"LITE_SCALE\")) or SCALE\n"
+ " PATHSEP = package.config:sub(1, 1)\n"
+ " EXEDIR = EXEFILE:match(\"^(.+)[/\\\\].*$\")\n"
+- " package.path = EXEDIR .. '/data/?.lua;' .. package.path\n"
+- " package.path = EXEDIR .. '/data/?/init.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?/init.lua;' .. package.path\n"
+ " core = require('core')\n"
+ " core.init()\n"
+ " core.run()\n"
diff --git a/srcpkgs/lite/template b/srcpkgs/lite/template
new file mode 100644
index 000000000000..80099e09984c
--- /dev/null
+++ b/srcpkgs/lite/template
@@ -0,0 +1,22 @@
+# Template file for 'lite'
+pkgname=lite
+version=1.11
+revision=1
+makedepends="SDL2-devel"
+short_desc="Lite is a lightweight text editor written mostly in Lua"
+maintainer="Dakota Richline <drichline@protonmail.com>"
+license="MIT"
+homepage="https://github.com/rxi/lite"
+distfiles="https://github.com/rxi/lite/archive/refs/tags/v${version}.tar.gz"
+checksum=2fd9466663182da56a36a557d05925d226dc1c5de6fb24e423a7b0056db2eec4
+
+do_build() {
+ bash build.sh
+}
+
+do_install() {
+ vlicense LICENSE
+ vmkdir usr/share/${pkgname}
+ vbin lite
+ vcopy data/* usr/share/${pkgname}
+}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (9 preceding siblings ...)
2022-10-14 19:39 ` [PR PATCH] [Updated] " drichline
@ 2022-10-14 19:41 ` drichline
2022-10-14 19:44 ` drichline
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-10-14 19:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
There is an updated pull request by drichline against master on the void-packages repository
https://github.com/drichline/void-packages lite-branch
https://github.com/void-linux/void-packages/pull/39925
New package: lite-1.11
Note: even though lite is a GUI app, it is meant to be launched from the terminal, e.g. `lite project-dir/`; upstream does not provide an svg icon or .desktop file.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/39925.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lite-branch-39925.patch --]
[-- Type: text/x-diff, Size: 5502 bytes --]
From 872f9f0226e28f7055c1638804a322527bc8315d Mon Sep 17 00:00:00 2001
From: Dakota Richline <43507179+drichline@users.noreply.github.com>
Date: Thu, 13 Oct 2022 00:36:42 -0400
Subject: [PATCH] New package: lite-1.11
---
srcpkgs/lite/patches/lite-build-fix.patch | 22 +++++++
srcpkgs/lite/patches/lite-path-fix.patch | 73 +++++++++++++++++++++++
srcpkgs/lite/template | 22 +++++++
3 files changed, 117 insertions(+)
create mode 100644 srcpkgs/lite/patches/lite-build-fix.patch
create mode 100644 srcpkgs/lite/patches/lite-path-fix.patch
create mode 100644 srcpkgs/lite/template
diff --git a/srcpkgs/lite/patches/lite-build-fix.patch b/srcpkgs/lite/patches/lite-build-fix.patch
new file mode 100644
index 000000000000..9efea67ea7a3
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-build-fix.patch
@@ -0,0 +1,22 @@
+(Patch from @classabbyamp on GitHub)
+--- a/build.sh
++++ b/build.sh
+@@ -1,7 +1,7 @@
+ #!/bin/bash
+
+-cflags="-Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
+-lflags="-lSDL2 -lm"
++cflags="$CFLAGS -Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
++lflags="$LDFLAGS -lSDL2 -lm"
+
+ if [[ $* == *windows* ]]; then
+ platform="windows"
+@@ -14,7 +14,7 @@
+ else
+ platform="unix"
+ outfile="lite"
+- compiler="gcc"
++ compiler="$CC"
+ cflags="$cflags -DLUA_USE_POSIX"
+ lflags="$lflags -o $outfile"
+ fi
diff --git a/srcpkgs/lite/patches/lite-path-fix.patch b/srcpkgs/lite/patches/lite-path-fix.patch
new file mode 100644
index 000000000000..5087bc267c58
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-path-fix.patch
@@ -0,0 +1,73 @@
+Upstream Issue: https://github.com/rxi/lite/issues/49
+
+(Patch adapted from Alpine Linux, updated for 1.06)
+
+diff --git a/data/core/commands/core.lua b/data/core/commands/core.lua
+index 5c9d622..568f0ef 100644
+--- a/data/core/commands/core.lua
++++ b/data/core/commands/core.lua
+@@ -85,7 +85,7 @@ command.add(nil, {
+ end,
+
+ ["core:open-user-module"] = function()
+- core.root_view:open_doc(core.open_doc(EXEDIR .. "/data/user/init.lua"))
++ core.root_view:open_doc(core.open_doc("/usr/share/lite/user/init.lua"))
+ end,
+
+ ["core:open-project-module"] = function()
+diff --git a/data/core/init.lua b/data/core/init.lua
+index a25cdb5..3bea486 100644
+--- a/data/core/init.lua
++++ b/data/core/init.lua
+@@ -150,7 +150,7 @@ end
+
+ function core.load_plugins()
+ local no_errors = true
+- local files = system.list_dir(EXEDIR .. "/data/plugins")
++ local files = system.list_dir("/usr/share/lite/plugins")
+ for _, filename in ipairs(files) do
+ local modname = "plugins." .. filename:gsub(".lua$", "")
+ local ok = core.try(require, modname)
+@@ -421,7 +421,7 @@ end
+
+ function core.on_error(err)
+ -- write error to file
+- local fp = io.open(EXEDIR .. "/error.txt", "wb")
++ local fp = io.open("/tmp/lite-editor-error.txt", "wb")
+ fp:write("Error: " .. tostring(err) .. "\n")
+ fp:write(debug.traceback(nil, 4))
+ fp:close()
+diff --git a/data/core/style.lua b/data/core/style.lua
+index ab597c2..23b551f 100644
+--- a/data/core/style.lua
++++ b/data/core/style.lua
+@@ -7,10 +7,10 @@ style.scrollbar_size = common.round(4 * SCALE)
+ style.caret_width = common.round(2 * SCALE)
+ style.tab_width = common.round(170 * SCALE)
+
+-style.font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 14 * SCALE)
+-style.big_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 34 * SCALE)
+-style.icon_font = renderer.font.load(EXEDIR .. "/data/fonts/icons.ttf", 14 * SCALE)
+-style.code_font = renderer.font.load(EXEDIR .. "/data/fonts/monospace.ttf", 13.5 * SCALE)
++style.font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 14 * SCALE)
++style.big_font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 34 * SCALE)
++style.icon_font = renderer.font.load("/usr/share/lite/fonts/icons.ttf", 14 * SCALE)
++style.code_font = renderer.font.load("/usr/share/lite/fonts/monospace.ttf", 13.5 * SCALE)
+
+ style.background = { common.color "#2e2e32" }
+ style.background2 = { common.color "#252529" }
+diff --git a/src/main.c b/src/main.c
+index c739f5f..0b796fa 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -119,8 +119,8 @@ int main(int argc, char **argv) {
+ " SCALE = tonumber(os.getenv(\"LITE_SCALE\")) or SCALE\n"
+ " PATHSEP = package.config:sub(1, 1)\n"
+ " EXEDIR = EXEFILE:match(\"^(.+)[/\\\\].*$\")\n"
+- " package.path = EXEDIR .. '/data/?.lua;' .. package.path\n"
+- " package.path = EXEDIR .. '/data/?/init.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?/init.lua;' .. package.path\n"
+ " core = require('core')\n"
+ " core.init()\n"
+ " core.run()\n"
diff --git a/srcpkgs/lite/template b/srcpkgs/lite/template
new file mode 100644
index 000000000000..fef48ded06c6
--- /dev/null
+++ b/srcpkgs/lite/template
@@ -0,0 +1,22 @@
+# Template file for 'lite'
+pkgname=lite
+version=1.11
+revision=1
+makedepends="SDL2-devel"
+short_desc="A lightweight text editor written mostly in Lua"
+maintainer="Dakota Richline <drichline@protonmail.com>"
+license="MIT"
+homepage="https://github.com/rxi/lite"
+distfiles="https://github.com/rxi/lite/archive/refs/tags/v${version}.tar.gz"
+checksum=2fd9466663182da56a36a557d05925d226dc1c5de6fb24e423a7b0056db2eec4
+
+do_build() {
+ bash build.sh
+}
+
+do_install() {
+ vlicense LICENSE
+ vmkdir usr/share/${pkgname}
+ vbin lite
+ vcopy data/* usr/share/${pkgname}
+}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (10 preceding siblings ...)
2022-10-14 19:41 ` drichline
@ 2022-10-14 19:44 ` drichline
2022-10-14 19:45 ` drichline
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-10-14 19:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
There is an updated pull request by drichline against master on the void-packages repository
https://github.com/drichline/void-packages lite-branch
https://github.com/void-linux/void-packages/pull/39925
New package: lite-1.11
Note: even though lite is a GUI app, it is meant to be launched from the terminal, e.g. `lite project-dir/`; upstream does not provide an svg icon or .desktop file.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/39925.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lite-branch-39925.patch --]
[-- Type: text/x-diff, Size: 5502 bytes --]
From 82811eb5edc1b732fc9c9c0e8e25a67845b11155 Mon Sep 17 00:00:00 2001
From: Dakota Richline <43507179+drichline@users.noreply.github.com>
Date: Thu, 13 Oct 2022 00:36:42 -0400
Subject: [PATCH] New package: lite-1.11
---
srcpkgs/lite/patches/lite-build-fix.patch | 22 +++++++
srcpkgs/lite/patches/lite-path-fix.patch | 73 +++++++++++++++++++++++
srcpkgs/lite/template | 22 +++++++
3 files changed, 117 insertions(+)
create mode 100644 srcpkgs/lite/patches/lite-build-fix.patch
create mode 100644 srcpkgs/lite/patches/lite-path-fix.patch
create mode 100644 srcpkgs/lite/template
diff --git a/srcpkgs/lite/patches/lite-build-fix.patch b/srcpkgs/lite/patches/lite-build-fix.patch
new file mode 100644
index 000000000000..9efea67ea7a3
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-build-fix.patch
@@ -0,0 +1,22 @@
+(Patch from @classabbyamp on GitHub)
+--- a/build.sh
++++ b/build.sh
+@@ -1,7 +1,7 @@
+ #!/bin/bash
+
+-cflags="-Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
+-lflags="-lSDL2 -lm"
++cflags="$CFLAGS -Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
++lflags="$LDFLAGS -lSDL2 -lm"
+
+ if [[ $* == *windows* ]]; then
+ platform="windows"
+@@ -14,7 +14,7 @@
+ else
+ platform="unix"
+ outfile="lite"
+- compiler="gcc"
++ compiler="$CC"
+ cflags="$cflags -DLUA_USE_POSIX"
+ lflags="$lflags -o $outfile"
+ fi
diff --git a/srcpkgs/lite/patches/lite-path-fix.patch b/srcpkgs/lite/patches/lite-path-fix.patch
new file mode 100644
index 000000000000..5087bc267c58
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-path-fix.patch
@@ -0,0 +1,73 @@
+Upstream Issue: https://github.com/rxi/lite/issues/49
+
+(Patch adapted from Alpine Linux, updated for 1.06)
+
+diff --git a/data/core/commands/core.lua b/data/core/commands/core.lua
+index 5c9d622..568f0ef 100644
+--- a/data/core/commands/core.lua
++++ b/data/core/commands/core.lua
+@@ -85,7 +85,7 @@ command.add(nil, {
+ end,
+
+ ["core:open-user-module"] = function()
+- core.root_view:open_doc(core.open_doc(EXEDIR .. "/data/user/init.lua"))
++ core.root_view:open_doc(core.open_doc("/usr/share/lite/user/init.lua"))
+ end,
+
+ ["core:open-project-module"] = function()
+diff --git a/data/core/init.lua b/data/core/init.lua
+index a25cdb5..3bea486 100644
+--- a/data/core/init.lua
++++ b/data/core/init.lua
+@@ -150,7 +150,7 @@ end
+
+ function core.load_plugins()
+ local no_errors = true
+- local files = system.list_dir(EXEDIR .. "/data/plugins")
++ local files = system.list_dir("/usr/share/lite/plugins")
+ for _, filename in ipairs(files) do
+ local modname = "plugins." .. filename:gsub(".lua$", "")
+ local ok = core.try(require, modname)
+@@ -421,7 +421,7 @@ end
+
+ function core.on_error(err)
+ -- write error to file
+- local fp = io.open(EXEDIR .. "/error.txt", "wb")
++ local fp = io.open("/tmp/lite-editor-error.txt", "wb")
+ fp:write("Error: " .. tostring(err) .. "\n")
+ fp:write(debug.traceback(nil, 4))
+ fp:close()
+diff --git a/data/core/style.lua b/data/core/style.lua
+index ab597c2..23b551f 100644
+--- a/data/core/style.lua
++++ b/data/core/style.lua
+@@ -7,10 +7,10 @@ style.scrollbar_size = common.round(4 * SCALE)
+ style.caret_width = common.round(2 * SCALE)
+ style.tab_width = common.round(170 * SCALE)
+
+-style.font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 14 * SCALE)
+-style.big_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 34 * SCALE)
+-style.icon_font = renderer.font.load(EXEDIR .. "/data/fonts/icons.ttf", 14 * SCALE)
+-style.code_font = renderer.font.load(EXEDIR .. "/data/fonts/monospace.ttf", 13.5 * SCALE)
++style.font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 14 * SCALE)
++style.big_font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 34 * SCALE)
++style.icon_font = renderer.font.load("/usr/share/lite/fonts/icons.ttf", 14 * SCALE)
++style.code_font = renderer.font.load("/usr/share/lite/fonts/monospace.ttf", 13.5 * SCALE)
+
+ style.background = { common.color "#2e2e32" }
+ style.background2 = { common.color "#252529" }
+diff --git a/src/main.c b/src/main.c
+index c739f5f..0b796fa 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -119,8 +119,8 @@ int main(int argc, char **argv) {
+ " SCALE = tonumber(os.getenv(\"LITE_SCALE\")) or SCALE\n"
+ " PATHSEP = package.config:sub(1, 1)\n"
+ " EXEDIR = EXEFILE:match(\"^(.+)[/\\\\].*$\")\n"
+- " package.path = EXEDIR .. '/data/?.lua;' .. package.path\n"
+- " package.path = EXEDIR .. '/data/?/init.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?/init.lua;' .. package.path\n"
+ " core = require('core')\n"
+ " core.init()\n"
+ " core.run()\n"
diff --git a/srcpkgs/lite/template b/srcpkgs/lite/template
new file mode 100644
index 000000000000..fef48ded06c6
--- /dev/null
+++ b/srcpkgs/lite/template
@@ -0,0 +1,22 @@
+# Template file for 'lite'
+pkgname=lite
+version=1.11
+revision=1
+makedepends="SDL2-devel"
+short_desc="A lightweight text editor written mostly in Lua"
+maintainer="Dakota Richline <drichline@protonmail.com>"
+license="MIT"
+homepage="https://github.com/rxi/lite"
+distfiles="https://github.com/rxi/lite/archive/refs/tags/v${version}.tar.gz"
+checksum=2fd9466663182da56a36a557d05925d226dc1c5de6fb24e423a7b0056db2eec4
+
+do_build() {
+ bash build.sh
+}
+
+do_install() {
+ vlicense LICENSE
+ vmkdir usr/share/${pkgname}
+ vbin lite
+ vcopy data/* usr/share/${pkgname}
+}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (11 preceding siblings ...)
2022-10-14 19:44 ` drichline
@ 2022-10-14 19:45 ` drichline
2022-10-14 19:45 ` [PR PATCH] [Updated] " drichline
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-10-14 19:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
New comment by drichline on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#issuecomment-1279393170
Comment:
Sorry for the last few commits, forgot to check `xlint`
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (12 preceding siblings ...)
2022-10-14 19:45 ` drichline
@ 2022-10-14 19:45 ` drichline
2022-11-03 20:16 ` classabbyamp
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-10-14 19:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
There is an updated pull request by drichline against master on the void-packages repository
https://github.com/drichline/void-packages lite-branch
https://github.com/void-linux/void-packages/pull/39925
New package: lite-1.11
Note: even though lite is a GUI app, it is meant to be launched from the terminal, e.g. `lite project-dir/`; upstream does not provide an svg icon or .desktop file.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/39925.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lite-branch-39925.patch --]
[-- Type: text/x-diff, Size: 5500 bytes --]
From 0718b9e9991a75b8447dbfc2dfe003bbc7c34942 Mon Sep 17 00:00:00 2001
From: Dakota Richline <43507179+drichline@users.noreply.github.com>
Date: Thu, 13 Oct 2022 00:36:42 -0400
Subject: [PATCH] New package: lite-1.11
---
srcpkgs/lite/patches/lite-build-fix.patch | 22 +++++++
srcpkgs/lite/patches/lite-path-fix.patch | 73 +++++++++++++++++++++++
srcpkgs/lite/template | 22 +++++++
3 files changed, 117 insertions(+)
create mode 100644 srcpkgs/lite/patches/lite-build-fix.patch
create mode 100644 srcpkgs/lite/patches/lite-path-fix.patch
create mode 100644 srcpkgs/lite/template
diff --git a/srcpkgs/lite/patches/lite-build-fix.patch b/srcpkgs/lite/patches/lite-build-fix.patch
new file mode 100644
index 000000000000..9efea67ea7a3
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-build-fix.patch
@@ -0,0 +1,22 @@
+(Patch from @classabbyamp on GitHub)
+--- a/build.sh
++++ b/build.sh
+@@ -1,7 +1,7 @@
+ #!/bin/bash
+
+-cflags="-Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
+-lflags="-lSDL2 -lm"
++cflags="$CFLAGS -Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc"
++lflags="$LDFLAGS -lSDL2 -lm"
+
+ if [[ $* == *windows* ]]; then
+ platform="windows"
+@@ -14,7 +14,7 @@
+ else
+ platform="unix"
+ outfile="lite"
+- compiler="gcc"
++ compiler="$CC"
+ cflags="$cflags -DLUA_USE_POSIX"
+ lflags="$lflags -o $outfile"
+ fi
diff --git a/srcpkgs/lite/patches/lite-path-fix.patch b/srcpkgs/lite/patches/lite-path-fix.patch
new file mode 100644
index 000000000000..5087bc267c58
--- /dev/null
+++ b/srcpkgs/lite/patches/lite-path-fix.patch
@@ -0,0 +1,73 @@
+Upstream Issue: https://github.com/rxi/lite/issues/49
+
+(Patch adapted from Alpine Linux, updated for 1.06)
+
+diff --git a/data/core/commands/core.lua b/data/core/commands/core.lua
+index 5c9d622..568f0ef 100644
+--- a/data/core/commands/core.lua
++++ b/data/core/commands/core.lua
+@@ -85,7 +85,7 @@ command.add(nil, {
+ end,
+
+ ["core:open-user-module"] = function()
+- core.root_view:open_doc(core.open_doc(EXEDIR .. "/data/user/init.lua"))
++ core.root_view:open_doc(core.open_doc("/usr/share/lite/user/init.lua"))
+ end,
+
+ ["core:open-project-module"] = function()
+diff --git a/data/core/init.lua b/data/core/init.lua
+index a25cdb5..3bea486 100644
+--- a/data/core/init.lua
++++ b/data/core/init.lua
+@@ -150,7 +150,7 @@ end
+
+ function core.load_plugins()
+ local no_errors = true
+- local files = system.list_dir(EXEDIR .. "/data/plugins")
++ local files = system.list_dir("/usr/share/lite/plugins")
+ for _, filename in ipairs(files) do
+ local modname = "plugins." .. filename:gsub(".lua$", "")
+ local ok = core.try(require, modname)
+@@ -421,7 +421,7 @@ end
+
+ function core.on_error(err)
+ -- write error to file
+- local fp = io.open(EXEDIR .. "/error.txt", "wb")
++ local fp = io.open("/tmp/lite-editor-error.txt", "wb")
+ fp:write("Error: " .. tostring(err) .. "\n")
+ fp:write(debug.traceback(nil, 4))
+ fp:close()
+diff --git a/data/core/style.lua b/data/core/style.lua
+index ab597c2..23b551f 100644
+--- a/data/core/style.lua
++++ b/data/core/style.lua
+@@ -7,10 +7,10 @@ style.scrollbar_size = common.round(4 * SCALE)
+ style.caret_width = common.round(2 * SCALE)
+ style.tab_width = common.round(170 * SCALE)
+
+-style.font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 14 * SCALE)
+-style.big_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", 34 * SCALE)
+-style.icon_font = renderer.font.load(EXEDIR .. "/data/fonts/icons.ttf", 14 * SCALE)
+-style.code_font = renderer.font.load(EXEDIR .. "/data/fonts/monospace.ttf", 13.5 * SCALE)
++style.font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 14 * SCALE)
++style.big_font = renderer.font.load("/usr/share/lite/fonts/font.ttf", 34 * SCALE)
++style.icon_font = renderer.font.load("/usr/share/lite/fonts/icons.ttf", 14 * SCALE)
++style.code_font = renderer.font.load("/usr/share/lite/fonts/monospace.ttf", 13.5 * SCALE)
+
+ style.background = { common.color "#2e2e32" }
+ style.background2 = { common.color "#252529" }
+diff --git a/src/main.c b/src/main.c
+index c739f5f..0b796fa 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -119,8 +119,8 @@ int main(int argc, char **argv) {
+ " SCALE = tonumber(os.getenv(\"LITE_SCALE\")) or SCALE\n"
+ " PATHSEP = package.config:sub(1, 1)\n"
+ " EXEDIR = EXEFILE:match(\"^(.+)[/\\\\].*$\")\n"
+- " package.path = EXEDIR .. '/data/?.lua;' .. package.path\n"
+- " package.path = EXEDIR .. '/data/?/init.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?.lua;' .. package.path\n"
++ " package.path = '/usr/share/lite/?/init.lua;' .. package.path\n"
+ " core = require('core')\n"
+ " core.init()\n"
+ " core.run()\n"
diff --git a/srcpkgs/lite/template b/srcpkgs/lite/template
new file mode 100644
index 000000000000..4c8813a7073b
--- /dev/null
+++ b/srcpkgs/lite/template
@@ -0,0 +1,22 @@
+# Template file for 'lite'
+pkgname=lite
+version=1.11
+revision=1
+makedepends="SDL2-devel"
+short_desc="Lightweight text editor written mostly in Lua"
+maintainer="Dakota Richline <drichline@protonmail.com>"
+license="MIT"
+homepage="https://github.com/rxi/lite"
+distfiles="https://github.com/rxi/lite/archive/refs/tags/v${version}.tar.gz"
+checksum=2fd9466663182da56a36a557d05925d226dc1c5de6fb24e423a7b0056db2eec4
+
+do_build() {
+ bash build.sh
+}
+
+do_install() {
+ vlicense LICENSE
+ vmkdir usr/share/${pkgname}
+ vbin lite
+ vcopy data/* usr/share/${pkgname}
+}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (13 preceding siblings ...)
2022-10-14 19:45 ` [PR PATCH] [Updated] " drichline
@ 2022-11-03 20:16 ` classabbyamp
2022-11-03 20:32 ` tranzystorek-io
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: classabbyamp @ 2022-11-03 20:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#issuecomment-1302617996
Comment:
what are the differences between lite and lite-xl (#40316)? does it make sense to have both of them packaged?
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (14 preceding siblings ...)
2022-11-03 20:16 ` classabbyamp
@ 2022-11-03 20:32 ` tranzystorek-io
2022-11-03 21:30 ` [PR PATCH] [Closed]: " drichline
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tranzystorek-io @ 2022-11-03 20:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 351 bytes --]
New comment by tranzystorek-io on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#issuecomment-1302632591
Comment:
@drichline would you be opposed to dropping this package, seeing as lite-xl is the direct continuation and actively maintained? I could also transfer maintainership of xl over to you if you'd like 🙂
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (16 preceding siblings ...)
2022-11-03 21:30 ` [PR PATCH] [Closed]: " drichline
@ 2022-11-03 21:30 ` drichline
2022-11-04 6:41 ` drichline
2022-11-04 7:21 ` tranzystorek-io
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-11-03 21:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 695 bytes --]
New comment by drichline on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#issuecomment-1302685126
Comment:
> @drichline would you be opposed to dropping this package, seeing as lite-xl is the direct continuation and actively maintained? I could also transfer maintainership of xl over to you if you'd like slightly_smiling_face
> what are the differences between lite and lite-xl (#40316)? does it make sense to have both of them packaged?
To be honest, I wanted to learn xbps-src, and looked for popular software that's relatively easy to package. I apologize if any maintainer time was wasted, and it's totally fine to delete the PR for lite. Thanks!
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Closed]: New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (15 preceding siblings ...)
2022-11-03 20:32 ` tranzystorek-io
@ 2022-11-03 21:30 ` drichline
2022-11-03 21:30 ` drichline
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-11-03 21:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]
There's a closed pull request on the void-packages repository
New package: lite-1.11
https://github.com/void-linux/void-packages/pull/39925
Description:
Note: even though lite is a GUI app, it is meant to be launched from the terminal, e.g. `lite project-dir/`; upstream does not provide an svg icon or .desktop file.
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (17 preceding siblings ...)
2022-11-03 21:30 ` drichline
@ 2022-11-04 6:41 ` drichline
2022-11-04 7:21 ` tranzystorek-io
19 siblings, 0 replies; 21+ messages in thread
From: drichline @ 2022-11-04 6:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 495 bytes --]
New comment by drichline on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#issuecomment-1303038019
Comment:
> @drichline would you be opposed to dropping this package, seeing as lite-xl is the direct continuation and actively maintained? I could also transfer maintainership of xl over to you if you'd like slightly_smiling_face
Thank you, that would be amazing if you're willing to. I'm also the maintainer of `qodem`, which doesn't get frequent updates.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: New package: lite-1.11
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
` (18 preceding siblings ...)
2022-11-04 6:41 ` drichline
@ 2022-11-04 7:21 ` tranzystorek-io
19 siblings, 0 replies; 21+ messages in thread
From: tranzystorek-io @ 2022-11-04 7:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 167 bytes --]
New comment by tranzystorek-io on void-packages repository
https://github.com/void-linux/void-packages/pull/39925#issuecomment-1303061834
Comment:
Done, see #40316
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2022-11-04 7:21 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13 4:42 [PR PATCH] New package: lite-1.11 drichline
2022-10-13 5:51 ` [PR REVIEW] " classabbyamp
2022-10-13 5:51 ` classabbyamp
2022-10-13 5:51 ` classabbyamp
2022-10-13 5:51 ` classabbyamp
2022-10-13 5:51 ` classabbyamp
2022-10-13 6:16 ` [PR PATCH] [Updated] " drichline
2022-10-13 6:22 ` drichline
2022-10-13 19:13 ` drichline
2022-10-13 19:23 ` classabbyamp
2022-10-14 19:39 ` [PR PATCH] [Updated] " drichline
2022-10-14 19:41 ` drichline
2022-10-14 19:44 ` drichline
2022-10-14 19:45 ` drichline
2022-10-14 19:45 ` [PR PATCH] [Updated] " drichline
2022-11-03 20:16 ` classabbyamp
2022-11-03 20:32 ` tranzystorek-io
2022-11-03 21:30 ` [PR PATCH] [Closed]: " drichline
2022-11-03 21:30 ` drichline
2022-11-04 6:41 ` drichline
2022-11-04 7:21 ` tranzystorek-io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).