Skip to content

Commit

Permalink
x11/ly: update to 0.6.0
Browse files Browse the repository at this point in the history
This update also incorporate some patches from upstream to fix an
issue with cusom X command
While here:
- remove dependency on gnu coreutils
- remove patches or part of patches which has been upstream

PR:	272368
Initial patch send by: 	embhd@posteo.de
  • Loading branch information
bapt committed Jul 31, 2023
1 parent 937a073 commit 09e2ae1
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 141 deletions.
11 changes: 6 additions & 5 deletions x11/ly/Makefile
@@ -1,17 +1,20 @@
PORTNAME= ly
DISTVERSIONPREFIX= v
DISTVERSION= 0.5.3
DISTVERSION= 0.6.0
CATEGORIES= x11

PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+= 0edb0012abb52ce13d1e9157e7a25557cda01195.patch:-p1
PATCHFILES+= 42bf929756675f1e6cb922f721665d581574fdc6.patch:-p1
PATCHFILES+= 2ca870cfc5cd6611bb1fd52dcd67ef40895ad787.patch:-p1

MAINTAINER= bapt@FreeBSD.org
COMMENT= TUI (ncurses-like) display manager for X and Wayland
WWW= https://github.com/fairyglade/ly

LICENSE= WTFPL
LICENSE_FILE= ${WRKSRC}/license.md

BUILD_DEPENDS= ginstall:sysutils/coreutils

USES= gmake localbase xorg
USE_GITHUB= yes
GH_ACCOUNT= fairyglade
Expand All @@ -26,8 +29,6 @@ MAKE_ARGS= CC="${CC}" \
DISTVERSIONFULL="${DISTVERSIONFULL}"
ALL_TARGET= final

BINARY_ALIAS= install=ginstall

SUB_FILES= pkg-message

_GITDIR= ${WRKDIR}/${GH_PROJECT}-git
Expand Down
12 changes: 9 additions & 3 deletions x11/ly/distinfo
@@ -1,6 +1,6 @@
TIMESTAMP = 1680865749
SHA256 (fairyglade-ly-v0.5.3_GH0.tar.gz) = ddbd8bd6d7a00867d269154c564d0c059f2d5b0df111e1995b4abfbb89f683d5
SIZE (fairyglade-ly-v0.5.3_GH0.tar.gz) = 22464
TIMESTAMP = 1690811292
SHA256 (fairyglade-ly-v0.6.0_GH0.tar.gz) = 10b3777f49e0a9370efe5132b3c6618294330700a14a659ee66b5bf313f4baae
SIZE (fairyglade-ly-v0.6.0_GH0.tar.gz) = 32706
SHA256 (nullgemm-argoat-36c41f09ecc2a10c9acf35e4194e08b6fa10cf45_GH0.tar.gz) = 5c284cae748b1cec4eef311845f53ad673f91996ec425c6e323f0c40e829e77f
SIZE (nullgemm-argoat-36c41f09ecc2a10c9acf35e4194e08b6fa10cf45_GH0.tar.gz) = 5497
SHA256 (nullgemm-configator-8227b3a835bf4c7e50a57e4ad6aff620ba0dc349_GH0.tar.gz) = bde1826acb80092bd551985082dc872c7f3e48e03132c377f0e5cdd2f9f331e3
Expand All @@ -9,3 +9,9 @@ SHA256 (nullgemm-dragonfail-6b40d1f8b7f6dda9746e688666af623dfbcceb94_GH0.tar.gz)
SIZE (nullgemm-dragonfail-6b40d1f8b7f6dda9746e688666af623dfbcceb94_GH0.tar.gz) = 3348
SHA256 (nullgemm-termbox_next-2312da153e44face7bb45aa2798ec284289c17ca_GH0.tar.gz) = b788c86e1454c32cd218d0478a87def0a4d1322fef407885359d1ed0c343b045
SIZE (nullgemm-termbox_next-2312da153e44face7bb45aa2798ec284289c17ca_GH0.tar.gz) = 23558
SHA256 (0edb0012abb52ce13d1e9157e7a25557cda01195.patch) = 0a9fcc8b04d3c2562dc6c3ed81f643a0431aab862680d05d34f9eaeb07db9471
SIZE (0edb0012abb52ce13d1e9157e7a25557cda01195.patch) = 739
SHA256 (42bf929756675f1e6cb922f721665d581574fdc6.patch) = 9328794678317d02ce6ac4b9220c14b55f59923c435a2fab76a05aa45bb8db99
SIZE (42bf929756675f1e6cb922f721665d581574fdc6.patch) = 25931
SHA256 (2ca870cfc5cd6611bb1fd52dcd67ef40895ad787.patch) = d0f0f9c4d7d3168916776b6b1df4917bf3d95ca2b61af312cada203f73deefe6
SIZE (2ca870cfc5cd6611bb1fd52dcd67ef40895ad787.patch) = 1215
40 changes: 18 additions & 22 deletions x11/ly/files/patch-makefile
@@ -1,49 +1,45 @@
--- makefile.orig 2020-07-28 15:35:08 UTC
--- makefile.orig 2023-06-15 07:30:09 UTC
+++ makefile
@@ -1,9 +1,9 @@
NAME = ly
CC = gcc
@@ -3,7 +3,7 @@ FLAGS+= -Wall -Wextra -Werror=vla -Wno-unused-paramete
FLAGS = -std=c99 -pedantic -g
-FLAGS+= -Wall -Wextra -Werror=vla -Wno-unused-parameter
+FLAGS+= -Wall -Wextra -Wno-unused-parameter
FLAGS+= -Wall -Wextra -Werror=vla -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}\"
-FLAGS+= -DLY_VERSION=\"$(shell git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')\"
+FLAGS+= -DLY_VERSION=\"${DISTVERSIONFULL}\"
LINK = -lpam -lxcb
VALGRIND = --show-leak-kinds=all --track-origins=yes --leak-check=full --suppressions=../res/valgrind.supp
CMD = ./$(NAME)
@@ -12,6 +12,10 @@ OS:= $(shell uname -s)
@@ -12,6 +12,10 @@ endif
ifeq ($(OS), Linux)
FLAGS+= -D_DEFAULT_SOURCE
endif
+ifeq ($(OS), FreeBSD)
+ FLAGS+= -D_DEFAULT_SOURCE ${CPPFLAGS} ${CFLAGS}
+ LINK+= ${LIBS}
+ LINK+= ${LIBS}
+endif

BIND = bin
OBJD = obj
@@ -71,15 +75,14 @@ leakgrind: $(BIND)/$(NAME)
@@ -71,14 +75,14 @@ install: $(BIND)/$(NAME)

install: $(BIND)/$(NAME)
@echo "installing"
@echo "installing ly"
- @install -dZ ${DESTDIR}/etc/ly
- @install -DZ $(BIND)/$(NAME) -t ${DESTDIR}/usr/bin
- @install -DZ $(RESD)/config.ini -t ${DESTDIR}/etc/ly
- @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 -m 644 -t ${DESTDIR}/usr/lib/systemd/system
- @install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d
+ @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 ${DESTDIR}${PREFIX}/etc/ly/lang
+ @install -DZ $(RESD)/lang/* -t ${DESTDIR}${PREFIX}/etc/ly/lang
+ @install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}${PREFIX}/etc/pam.d
+ @install -d ${DESTDIR}/etc/ly
+ @install $(BIND)/$(NAME) -t ${DESTDIR}/usr/bin
+ @install $(RESD)/config.ini -t ${DESTDIR}/etc/ly
+ @install $(RESD)/xsetup.sh -t $(DATADIR)
+ @install $(RESD)/wsetup.sh -t $(DATADIR)
+ @install -d $(DATADIR)/lang
+ @install $(RESD)/lang/* -t $(DATADIR)/lang
+ @install $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d

installnoconf: $(BIND)/$(NAME)
@echo "installing without the configuration file"
@echo "installing ly without the configuration file"
86 changes: 46 additions & 40 deletions x11/ly/files/patch-res_config.ini
@@ -1,72 +1,78 @@
--- res/config.ini.orig 2020-07-28 15:35:08 UTC
--- res/config.ini.orig 2023-07-31 13:38:18 UTC
+++ res/config.ini
@@ -1,3 +1,5 @@
+# This is a FreeBSD-ready patched version of the upstream configuration file.
+
# animation enabled
# Animation enabled/disabled
#animate = false
#animate = true
@@ -53,12 +55,14 @@

# cookie generator
#mcookie_cmd = /usr/bin/mcookie
+mcookie_cmd = /usr/bin/openssl rand -hex 16

# event timeout in milliseconds
#min_refresh_delta = 5
@@ -74,6 +76,7 @@

# default path
#path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin
+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
@@ -68,12 +72,14 @@

# file in which to save and load the default desktop and login
# File in which to save and load the default desktop and login
#save_file = /etc/ly/save
+save_file = %%ETCDIR%%/save
+save_file = /usr/local/etc/ly/save


# service name (set to ly to use the provided pam config file)
#service_name = ly
# Remove power management command hints
@@ -87,6 +90,7 @@

# command executed when pressing F1
# Command executed when pressing shutdown_key
#shutdown_cmd = /sbin/shutdown -a now
+shutdown_cmd = /sbin/shutdown -p now

# terminal reset command (tput is faster)
#term_reset_cmd = /usr/bin/tput reset
@@ -81,8 +87,12 @@
# Command executed when pressing restart_key
#restart_cmd = /sbin/shutdown -r now
@@ -100,11 +104,16 @@
# tty in use
#tty = 2

+# vt in use by X or Wayland
+#vt = 9
+
# wayland setup command
+
# Console path
#console_dev = /dev/console

# Default path
#path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin
+path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/bin/env


# Event timeout in milliseconds
@@ -118,16 +127,19 @@

# Cookie generator
#mcookie_cmd = /usr/bin/mcookie
+mcookie_cmd = /usr/bin/openssl rand -hex 16


# Wayland setup command
#wayland_cmd = /etc/ly/wsetup.sh
+wayland_cmd = %%ETCDIR%%/wsetup.sh
+wayland_cmd = /usr/local/etc/ly/wsetup.sh

# add wayland specifier to session names
# Add wayland specifier to session names
#wayland_specifier = false
@@ -90,15 +100,20 @@

# wayland desktop environments
# Wayland desktop environments
#waylandsessions = /usr/share/wayland-sessions
+waylandsessions = %%LOCALBASE%%/share/wayland-sessions
+waylandsessions = /usr/local/share/wayland-sessions


# xinitrc
@@ -135,12 +147,16 @@

# xorg server command
# Xorg server command
#x_cmd = /usr/bin/X
+x_cmd = %%LOCALBASE%%/bin/X
+x_cmd = /usr/local/bin/X

# xorg setup command
# Xorg setup command
#x_cmd_setup = /etc/ly/xsetup.sh
+x_cmd_setup = %%ETCDIR%%/xsetup.sh
+x_cmd_setup = /usr/local/etc/ly/xsetup.sh

# xorg xauthority edition tool
# Xorg xauthority edition tool
#xauth_cmd = /usr/bin/xauth
+xauth_cmd = %%LOCALBASE%%/bin/xauth
+xauth_cmd = /usr/local/bin/xauth

# xorg desktop environments
# Xorg desktop environments
#xsessions = /usr/share/xsessions
+xsessions = %%LOCALBASE%%/share/xsessions
+xsessions = /usr/local/share/xsessions
22 changes: 11 additions & 11 deletions x11/ly/files/patch-res_xsetup.sh
@@ -1,13 +1,13 @@
--- res/xsetup.sh.orig 2020-02-03 07:51:05 UTC
--- res/xsetup.sh.orig 2023-06-15 07:30:09 UTC
+++ res/xsetup.sh
@@ -55,8 +55,8 @@ esac
[ -f $HOME/.xprofile ] && . $HOME/.xprofile

# run all system xinitrc shell scripts.
-if [ -d /etc/X11/xinit/xinitrc.d ]; then
- for i in /etc/X11/xinit/xinitrc.d/* ; do
+if [ -d %%LOCALBASE%%/etc/X11/xinit/xinitrc.d ]; then
+ for i in %%LOCALBASE%%/etc/X11/xinit/xinitrc.d/* ; do
+if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then
+ for i in /usr/local/etc/X11/xinit/xinitrc.d/* ; do
if [ -x "$i" ]; then
. "$i"
fi
Expand All @@ -17,25 +17,25 @@
# by the scripts to work
-xsessionddir="/etc/X11/Xsession.d"
-OPTIONFILE=/etc/X11/Xsession.options
+xsessionddir="%%LOCALBASE%%/etc/X11/Xsession.d"
+OPTIONFILE=%%LOCALBASE%%/etc/X11/Xsession.options
+xsessionddir="/usr/local/etc/X11/Xsession.d"
+OPTIONFILE=/usr/local/etc/X11/Xsession.options
USERXSESSION=$HOME/.xsession
USERXSESSIONRC=$HOME/.xsessionrc
ALTUSERXSESSION=$HOME/.Xsession
@@ -82,12 +82,12 @@ if [ -d "$xsessionddir" ]; then
@@ -82,12 +82,12 @@ fi
done
fi

-if [ -d /etc/X11/Xresources ]; then
- for i in /etc/X11/Xresources/*; do
+if [ -d %%LOCALBASE%%/etc/X11/Xresources ]; then
+ for i in %%LOCALBASE%%/etc/X11/Xresources/*; do
+if [ -d /usr/local/etc/X11/Xresources ]; then
+ for i in /usr/local/etc/X11/Xresources/*; do
[ -f $i ] && xrdb -merge $i
done
-elif [ -f /etc/X11/Xresources ]; then
- xrdb -merge /etc/X11/Xresources
+elif [ -f %%LOCALBASE%%/etc/X11/Xresources ]; then
+ xrdb -merge %%LOCALBASE%%/etc/X11/Xresources
+elif [ -f /usr/local/etc/X11/Xresources ]; then
+ xrdb -merge /usr/local/etc/X11/Xresources
fi
[ -f $HOME/.Xresources ] && xrdb -merge $HOME/.Xresources

[ -f $XDG_CONFIG_HOME/X11/Xresources ] && xrdb -merge $XDG_CONFIG_HOME/X11/Xresources
20 changes: 10 additions & 10 deletions x11/ly/files/patch-src_config.c
@@ -1,35 +1,35 @@
--- src/config.c.orig 2021-10-07 13:58:27 UTC
--- src/config.c.orig 2023-07-31 13:38:18 UTC
+++ src/config.c
@@ -11,8 +11,8 @@
#include <unistd.h>

#ifndef DEBUG
- #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"
+ #define INI_LANG "/usr/local/etc/ly/lang/%s.ini"
+ #define INI_CONFIG "/usr/local/etc/ly/config.ini"
#else
#define INI_LANG "../res/lang/%s.ini"
#define INI_CONFIG "../res/config.ini"
@@ -185,6 +185,7 @@ void config_load(const char *cfg_path)
{"shutdown_cmd", &config.shutdown_cmd, config_handle_str},
@@ -190,6 +190,7 @@ void config_load(const char *cfg_path)
{"shutdown_key", &config.shutdown_key, 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},
@@ -194,7 +195,7 @@ void config_load(const char *cfg_path)
@@ -200,7 +201,7 @@ void config_load(const char *cfg_path)
{"xsessions", &config.xsessions, config_handle_str},
};

- uint16_t map_len[] = {34};
+ uint16_t map_len[] = {35};
- uint16_t map_len[] = {41};
+ uint16_t map_len[] = {42};
struct configator_param* map[] =
{
map_no_section,
@@ -291,6 +292,7 @@ void config_defaults()
config.shutdown_cmd = strdup("/sbin/shutdown -a now");
@@ -302,6 +303,7 @@ void config_defaults()
config.shutdown_key = strdup("F1");
config.term_reset_cmd = strdup("/usr/bin/tput reset");
config.tty = 2;
+ config.vt = 9;
Expand Down
6 changes: 3 additions & 3 deletions x11/ly/files/patch-src_config.h
@@ -1,7 +1,7 @@
--- src/config.h.orig 2021-10-07 13:58:27 UTC
--- src/config.h.orig 2023-07-31 13:27:47 UTC
+++ src/config.h
@@ -89,6 +89,7 @@ struct config
char* shutdown_cmd;
@@ -94,6 +94,7 @@ struct config
char* shutdown_key;
char* term_reset_cmd;
uint8_t tty;
+ uint8_t vt;
Expand Down
11 changes: 0 additions & 11 deletions x11/ly/files/patch-src_draw.c

This file was deleted.

0 comments on commit 09e2ae1

Please sign in to comment.