aboutsummaryrefslogtreecommitdiff
path: root/x11/ly
diff options
context:
space:
mode:
authorNeel Chauhan <nc@FreeBSD.org>2021-02-05 16:18:46 +0000
committerNeel Chauhan <nc@FreeBSD.org>2021-02-05 16:18:46 +0000
commit3aeef08faec1604e02517ed382891bc074942d10 (patch)
tree04f2709f5d29b902c58b3618f963ec30e513a570 /x11/ly
parentbf5be356408a6f0fa13bbb7864a5dcd4507f634c (diff)
downloadports-3aeef08faec1604e02517ed382891bc074942d10.tar.gz
ports-3aeef08faec1604e02517ed382891bc074942d10.zip
x11/ly: Update to 0.5.0 and adopt port
Changes: https://github.com/nullgemm/ly/releases/tag/v0.5.0 Reviewed by: 0mp Approved by: 0mp (mentor) Differential Revision: https://reviews.freebsd.org/D28457
Notes
Notes: svn path=/head/; revision=564128
Diffstat (limited to 'x11/ly')
-rw-r--r--x11/ly/Makefile4
-rw-r--r--x11/ly/distinfo6
-rw-r--r--x11/ly/files/patch-makefile22
-rw-r--r--x11/ly/files/patch-res_config.ini18
-rw-r--r--x11/ly/files/patch-res_xsetup.sh2
-rw-r--r--x11/ly/files/patch-src_config.c18
-rw-r--r--x11/ly/files/patch-src_config.h6
-rw-r--r--x11/ly/files/patch-src_login.c84
-rw-r--r--x11/ly/pkg-plist1
9 files changed, 119 insertions, 42 deletions
diff --git a/x11/ly/Makefile b/x11/ly/Makefile
index c33092f00454..c5776175e577 100644
--- a/x11/ly/Makefile
+++ b/x11/ly/Makefile
@@ -2,10 +2,10 @@
PORTNAME= ly
DISTVERSIONPREFIX= v
-DISTVERSION= 0.4.0
+DISTVERSION= 0.5.0
CATEGORIES= x11
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= nc@FreeBSD.org
COMMENT= TUI (ncurses-like) display manager for X and Wayland
LICENSE= WTFPL
diff --git a/x11/ly/distinfo b/x11/ly/distinfo
index 95e524b10afb..139fb7b0eb2c 100644
--- a/x11/ly/distinfo
+++ b/x11/ly/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1573652164
-SHA256 (cylgom-ly-v0.4.0_GH0.tar.gz) = c4e505be200d54679f27929cffb1f4625c20ab51e8b6ffe7c06b3bccff5fb40d
-SIZE (cylgom-ly-v0.4.0_GH0.tar.gz) = 18807
+TIMESTAMP = 1612242690
+SHA256 (cylgom-ly-v0.5.0_GH0.tar.gz) = 5311d77a1f9e5e827adc26e7bdf4a6dadb5ada0fa7d85b451b35231cb6d84b6d
+SIZE (cylgom-ly-v0.5.0_GH0.tar.gz) = 20355
SHA256 (cylgom-argoat-36c41f09ecc2a10c9acf35e4194e08b6fa10cf45_GH0.tar.gz) = 5c284cae748b1cec4eef311845f53ad673f91996ec425c6e323f0c40e829e77f
SIZE (cylgom-argoat-36c41f09ecc2a10c9acf35e4194e08b6fa10cf45_GH0.tar.gz) = 5497
SHA256 (cylgom-testoasterror-71620b47872b5535f87c908883576d73153a6911_GH0.tar.gz) = bffa1100ffbb7d541a16a9a543e216748fe6f6264fd2b9137738cebcf68d3e8c
diff --git a/x11/ly/files/patch-makefile b/x11/ly/files/patch-makefile
index a13426278faa..b9a706ac6cba 100644
--- a/x11/ly/files/patch-makefile
+++ b/x11/ly/files/patch-makefile
@@ -1,11 +1,11 @@
---- makefile.orig 2019-09-21 16:00:16 UTC
+--- makefile.orig 2020-02-03 07:51:05 UTC
+++ makefile
@@ -1,9 +1,9 @@
NAME = ly
CC = gcc
FLAGS = -std=c99 -pedantic -g
--FLAGS+= -Wall -Wno-unused-parameter -Wextra -Werror=vla -Werror
-+FLAGS+= -Wall -Wno-unused-parameter -Wextra -Werror=vla
+-FLAGS+= -Wall -Wextra -Werror=vla -Wno-unused-parameter
++FLAGS+= -Wall -Wextra -Wno-unused-parameter
#FLAGS+= -DDEBUG
-FLAGS+= -DGIT_VERSION_STRING=\"$(shell git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')\"
+FLAGS+= -DGIT_VERSION_STRING=\"${DISTVERSIONFULL}\"
@@ -23,25 +23,25 @@
BIND = bin
OBJD = obj
-@@ -68,14 +72,13 @@ leakgrind: $(BIND)/$(NAME)
+@@ -71,14 +75,13 @@ leakgrind: $(BIND)/$(NAME)
install: $(BIND)/$(NAME)
@echo "installing"
- @install -dZ ${DESTDIR}/etc/ly
- @install -DZ $(BIND)/$(NAME) -t ${DESTDIR}/usr/bin
-- @install -DZ $(RESD)/xsetup.sh -t ${DESTDIR}/etc/ly
-- @install -DZ $(RESD)/wsetup.sh -t ${DESTDIR}/etc/ly
- @install -DZ $(RESD)/config.ini -t ${DESTDIR}/etc/ly
-- @install -dZ ${DESTDIR}/etc/ly/lang
-- @install -DZ $(RESD)/lang/* -t ${DESTDIR}/etc/ly/lang
+- @install -DZ $(RESD)/xsetup.sh -t $(DATADIR)
+- @install -DZ $(RESD)/wsetup.sh -t $(DATADIR)
+- @install -dZ $(DATADIR)/lang
+- @install -DZ $(RESD)/lang/* -t $(DATADIR)/lang
- @install -DZ $(RESD)/ly.service -t ${DESTDIR}/usr/lib/systemd/system
+ @install -dZ ${DESTDIR}${PREFIX}/etc/ly
+ @install -DZ $(BIND)/$(NAME) -t ${DESTDIR}${PREFIX}/bin
++ @install -DZ $(RESD)/config.ini -t ${DESTDIR}${PREFIX}/etc/ly
+ @install -DZ $(RESD)/xsetup.sh -t ${DESTDIR}${PREFIX}/etc/ly
+ @install -DZ $(RESD)/wsetup.sh -t ${DESTDIR}${PREFIX}/etc/ly
-+ @install -DZ $(RESD)/config.ini -t ${DESTDIR}${PREFIX}/etc/ly
+ @install -dZ ${DESTDIR}${PREFIX}/etc/ly/lang
+ @install -DZ $(RESD)/lang/* -t ${DESTDIR}${PREFIX}/etc/ly/lang
- uninstall:
- @echo "uninstalling"
+ installnoconf: $(BIND)/$(NAME)
+ @echo "installing without the configuration file"
diff --git a/x11/ly/files/patch-res_config.ini b/x11/ly/files/patch-res_config.ini
index 0b60773658f5..36c9c6df22ef 100644
--- a/x11/ly/files/patch-res_config.ini
+++ b/x11/ly/files/patch-res_config.ini
@@ -1,28 +1,27 @@
---- res/config.ini.orig 2019-06-26 21:11:33 UTC
-+++ res/config.ini
+--- res/config.ini.orig 2020-02-02 23:51:05.000000000 -0800
++++ res/config.ini 2021-02-02 19:37:58.212398000 -0800
@@ -1,3 +1,5 @@
+# This is a FreeBSD-ready patched version of the upstream configuration file.
+
# animation enabled
#animate = false
#animate = true
-@@ -52,12 +54,15 @@
+@@ -52,12 +54,14 @@
# cookie generator
#mcookie_cmd = /usr/bin/mcookie
-+# startx uses the same replacement for mcookie.
+mcookie_cmd = /usr/bin/openssl rand -hex 16
# event timeout in milliseconds
#min_refresh_delta = 5
# default path
- #path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/env
-+path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/bin/env
+ #path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin
++path = /sbin:/bin:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin:/usr/sbin:/usr/bin:/usr/bin/env
# command executed when pressing F2
#restart_cmd = /sbin/shutdown -r now
-@@ -67,12 +72,14 @@
+@@ -67,12 +71,14 @@
# file in which to save and load the default desktop and login
#save_file = /etc/ly/save
@@ -37,7 +36,7 @@
# terminal reset command (tput is faster)
#term_reset_cmd = /usr/bin/tput reset
-@@ -80,20 +87,29 @@
+@@ -80,23 +86,32 @@
# tty in use
#tty = 2
@@ -48,6 +47,9 @@
#wayland_cmd = /etc/ly/wsetup.sh
+wayland_cmd = %%ETCDIR%%/wsetup.sh
+ # add wayland specifier to session names
+ #wayland_specifier = false
+
# wayland desktop environments
#waylandsessions = /usr/share/wayland-sessions
+waylandsessions = %%LOCALBASE%%/share/wayland-sessions
diff --git a/x11/ly/files/patch-res_xsetup.sh b/x11/ly/files/patch-res_xsetup.sh
index 7e2123be67d4..222dff3ca11d 100644
--- a/x11/ly/files/patch-res_xsetup.sh
+++ b/x11/ly/files/patch-res_xsetup.sh
@@ -1,4 +1,4 @@
---- res/xsetup.sh.orig 2019-11-13 13:46:11 UTC
+--- res/xsetup.sh.orig 2020-02-03 07:51:05 UTC
+++ res/xsetup.sh
@@ -55,8 +55,8 @@ esac
[ -f $HOME/.xprofile ] && . $HOME/.xprofile
diff --git a/x11/ly/files/patch-src_config.c b/x11/ly/files/patch-src_config.c
index 697407edca34..4476d8704f41 100644
--- a/x11/ly/files/patch-src_config.c
+++ b/x11/ly/files/patch-src_config.c
@@ -1,25 +1,25 @@
---- src/config.c.orig 2019-06-26 21:11:33 UTC
-+++ src/config.c
+--- src/config.c.orig 2020-02-02 23:51:05.000000000 -0800
++++ src/config.c 2021-02-02 19:41:09.071495000 -0800
@@ -9,8 +9,8 @@
#include <unistd.h>
#ifndef DEBUG
-- #define INI_LANG "/etc/ly/lang/%s.ini"
+- #define INI_LANG DATADIR "/lang/%s.ini"
- #define INI_CONFIG "/etc/ly/config.ini"
+ #define INI_LANG "%%ETCDIR%%/lang/%s.ini"
+ #define INI_CONFIG "%%ETCDIR%%/config.ini"
#else
#define INI_LANG "../res/lang/%s.ini"
#define INI_CONFIG "../res/config.ini"
-@@ -179,6 +179,7 @@ void config_load()
+@@ -183,6 +183,7 @@
{"shutdown_cmd", &config.shutdown_cmd, config_handle_str},
{"term_reset_cmd", &config.term_reset_cmd, config_handle_str},
{"tty", &config.tty, config_handle_u8},
+ {"vt", &config.vt, config_handle_u8},
{"wayland_cmd", &config.wayland_cmd, config_handle_str},
+ {"wayland_specifier", &config.wayland_specifier, config_handle_bool},
{"waylandsessions", &config.waylandsessions, config_handle_str},
- {"x_cmd", &config.x_cmd, config_handle_str},
-@@ -187,7 +188,7 @@ void config_load()
+@@ -192,7 +193,7 @@
{"xsessions", &config.xsessions, config_handle_str},
};
@@ -28,11 +28,11 @@
struct configator_param* map[] =
{
map_no_section,
-@@ -284,6 +285,7 @@ void config_defaults()
+@@ -289,6 +290,7 @@
config.shutdown_cmd = strdup("/sbin/shutdown -a now");
config.term_reset_cmd = strdup("/usr/bin/tput reset");
config.tty = 2;
+ config.vt = 9;
- config.wayland_cmd = strdup("/etc/ly/wsetup.sh");
+ config.wayland_cmd = strdup(DATADIR "/wsetup.sh");
+ config.wayland_specifier = false;
config.waylandsessions = strdup("/usr/share/wayland-sessions");
- config.x_cmd = strdup("/usr/bin/X");
diff --git a/x11/ly/files/patch-src_config.h b/x11/ly/files/patch-src_config.h
index 4203e7d0782f..da9e735340b9 100644
--- a/x11/ly/files/patch-src_config.h
+++ b/x11/ly/files/patch-src_config.h
@@ -1,10 +1,10 @@
---- src/config.h.orig 2019-11-12 22:29:26 UTC
+--- src/config.h.orig 2020-02-03 07:51:05 UTC
+++ src/config.h
-@@ -82,6 +82,7 @@ struct config
+@@ -88,6 +88,7 @@ struct config
char* shutdown_cmd;
char* term_reset_cmd;
u8 tty;
+ u8 vt;
char* wayland_cmd;
+ bool wayland_specifier;
char* waylandsessions;
- char* x_cmd;
diff --git a/x11/ly/files/patch-src_login.c b/x11/ly/files/patch-src_login.c
index ae732aca101d..8d70b31c605f 100644
--- a/x11/ly/files/patch-src_login.c
+++ b/x11/ly/files/patch-src_login.c
@@ -1,6 +1,15 @@
---- src/login.c.orig 2019-09-21 16:00:16 UTC
+--- src/login.c.orig 2020-02-03 07:51:05 UTC
+++ src/login.c
-@@ -239,9 +239,15 @@ void env_init(struct passwd* pwd, const char* display_
+@@ -18,7 +18,7 @@
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <unistd.h>
+-#include <utmp.h>
++#include <utmpx.h>
+ #include <xcb/xcb.h>
+
+ int get_free_display()
+@@ -243,9 +243,15 @@ void env_init(struct passwd* pwd)
void env_xdg(const char* tty_id, const enum display_server display_server)
{
@@ -19,12 +28,77 @@
setenv("XDG_SESSION_CLASS", "user", 0);
setenv("XDG_SEAT", "seat0", 0);
setenv("XDG_VTNR", tty_id, 0);
-@@ -553,7 +559,7 @@ void auth(
+@@ -271,8 +277,8 @@ void env_xdg(const char* tty_id, const enum display_se
+ }
+ }
+
+-void add_utmp_entry(
+- struct utmp *entry,
++void add_utmpx_entry(
++ struct utmpx *entry,
+ char *username,
+ pid_t display_pid
+ ) {
+@@ -283,24 +289,23 @@ void add_utmp_entry(
+ /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
+ strcpy(entry->ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
+
+- time((long int *) &entry->ut_time);
++ time((long int *) &entry->ut_tv.tv_sec);
+
+- strncpy(entry->ut_user, username, UT_NAMESIZE);
+- memset(entry->ut_host, 0, UT_HOSTSIZE);
+- entry->ut_addr = 0;
+- setutent();
++ strncpy(entry->ut_user, username, sizeof(entry->ut_user));
++ memset(entry->ut_host, 0, sizeof(entry->ut_host));
++ setutxent();
+
+- pututline(entry);
++ pututxline(entry);
+ }
+
+-void remove_utmp_entry(struct utmp *entry) {
++void remove_utmpx_entry(struct utmpx *entry) {
+ entry->ut_type = DEAD_PROCESS;
+- memset(entry->ut_line, 0, UT_LINESIZE);
+- entry->ut_time = 0;
+- memset(entry->ut_user, 0, UT_NAMESIZE);
+- setutent();
+- pututline(entry);
+- endutent();
++ memset(entry->ut_line, 0, sizeof(entry->ut_line));
++ entry->ut_tv.tv_sec = 0;
++ memset(entry->ut_user, 0, sizeof(entry->ut_user));
++ setutxent();
++ pututxline(entry);
++ endutxent();
+ }
+
+ void xauth(const char* display_name, const char* shell, const char* dir)
+@@ -581,7 +586,7 @@ void auth(
+ char vt[5];
- snprintf(display_name, 3, ":%d", display_id);
snprintf(tty_id, 3, "%d", config.tty);
- snprintf(vt, 5, "vt%d", config.tty);
+ snprintf(vt, 5, "vt%d", config.vt);
// set env
- env_init(pwd, display_name);
+ env_init(pwd);
+@@ -636,13 +641,13 @@ void auth(
+ }
+
+ // add utmp audit
+- struct utmp entry;
+- add_utmp_entry(&entry, pwd->pw_name, pid);
++ struct utmpx entry;
++ add_utmpx_entry(&entry, pwd->pw_name, pid);
+
+ // wait for the session to stop
+ int status;
+ waitpid(pid, &status, 0);
+- remove_utmp_entry(&entry);
++ remove_utmpx_entry(&entry);
+
+ reset_terminal(pwd);
+
diff --git a/x11/ly/pkg-plist b/x11/ly/pkg-plist
index a0c9d33b95ca..688781f4df32 100644
--- a/x11/ly/pkg-plist
+++ b/x11/ly/pkg-plist
@@ -1,6 +1,7 @@
bin/ly
@sample %%ETCDIR%%/config.ini.sample
%%ETCDIR%%/lang/en.ini
+%%ETCDIR%%/lang/es.ini
%%ETCDIR%%/lang/fr.ini
@sample %%ETCDIR%%/wsetup.sh.sample
@sample %%ETCDIR%%/xsetup.sh.sample