svn commit: r564128 - in head/x11/ly: . files

Neel Chauhan nc at FreeBSD.org
Fri Feb 5 16:18:48 UTC 2021


Author: nc
Date: Fri Feb  5 16:18:46 2021
New Revision: 564128
URL: https://svnweb.freebsd.org/changeset/ports/564128

Log:
  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

Modified:
  head/x11/ly/Makefile
  head/x11/ly/distinfo
  head/x11/ly/files/patch-makefile
  head/x11/ly/files/patch-res_config.ini
  head/x11/ly/files/patch-res_xsetup.sh
  head/x11/ly/files/patch-src_config.c
  head/x11/ly/files/patch-src_config.h
  head/x11/ly/files/patch-src_login.c
  head/x11/ly/pkg-plist

Modified: head/x11/ly/Makefile
==============================================================================
--- head/x11/ly/Makefile	Fri Feb  5 16:07:14 2021	(r564127)
+++ head/x11/ly/Makefile	Fri Feb  5 16:18:46 2021	(r564128)
@@ -2,10 +2,10 @@
 
 PORTNAME=	ly
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.4.0
+DISTVERSION=	0.5.0
 CATEGORIES=	x11
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	nc at FreeBSD.org
 COMMENT=	TUI (ncurses-like) display manager for X and Wayland
 
 LICENSE=	WTFPL

Modified: head/x11/ly/distinfo
==============================================================================
--- head/x11/ly/distinfo	Fri Feb  5 16:07:14 2021	(r564127)
+++ head/x11/ly/distinfo	Fri Feb  5 16:18:46 2021	(r564128)
@@ -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

Modified: head/x11/ly/files/patch-makefile
==============================================================================
--- head/x11/ly/files/patch-makefile	Fri Feb  5 16:07:14 2021	(r564127)
+++ head/x11/ly/files/patch-makefile	Fri Feb  5 16:18:46 2021	(r564128)
@@ -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"

Modified: head/x11/ly/files/patch-res_config.ini
==============================================================================
--- head/x11/ly/files/patch-res_config.ini	Fri Feb  5 16:07:14 2021	(r564127)
+++ head/x11/ly/files/patch-res_config.ini	Fri Feb  5 16:18:46 2021	(r564128)
@@ -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
  
@@ -47,6 +46,9 @@
  # wayland setup command
  #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

Modified: head/x11/ly/files/patch-res_xsetup.sh
==============================================================================
--- head/x11/ly/files/patch-res_xsetup.sh	Fri Feb  5 16:07:14 2021	(r564127)
+++ head/x11/ly/files/patch-res_xsetup.sh	Fri Feb  5 16:18:46 2021	(r564128)
@@ -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

Modified: head/x11/ly/files/patch-src_config.c
==============================================================================
--- head/x11/ly/files/patch-src_config.c	Fri Feb  5 16:07:14 2021	(r564127)
+++ head/x11/ly/files/patch-src_config.c	Fri Feb  5 16:18:46 2021	(r564128)
@@ -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");

Modified: head/x11/ly/files/patch-src_config.h
==============================================================================
--- head/x11/ly/files/patch-src_config.h	Fri Feb  5 16:07:14 2021	(r564127)
+++ head/x11/ly/files/patch-src_config.h	Fri Feb  5 16:18:46 2021	(r564128)
@@ -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;

Modified: head/x11/ly/files/patch-src_login.c
==============================================================================
--- head/x11/ly/files/patch-src_login.c	Fri Feb  5 16:07:14 2021	(r564127)
+++ head/x11/ly/files/patch-src_login.c	Fri Feb  5 16:18:46 2021	(r564128)
@@ -1,7 +1,16 @@
---- 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)
  {
 -	char user[15];
@@ -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
+ 	}
+ }
  
- 		snprintf(display_name, 3, ":%d", display_id);
+-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(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);
+ 

Modified: head/x11/ly/pkg-plist
==============================================================================
--- head/x11/ly/pkg-plist	Fri Feb  5 16:07:14 2021	(r564127)
+++ head/x11/ly/pkg-plist	Fri Feb  5 16:18:46 2021	(r564128)
@@ -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


More information about the svn-ports-all mailing list