Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163410856
D22228.id63902.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
9 KB
Referenced Files
None
Subscribers
None
D22228.id63902.diff
View Options
Index: x11/ly/Makefile
===================================================================
--- /dev/null
+++ x11/ly/Makefile
@@ -0,0 +1,60 @@
+# $FreeBSD$
+
+PORTNAME= ly
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.4.0
+CATEGORIES= x11
+
+MAINTAINER= 0mp@FreeBSD.org
+COMMENT= TUI (ncurses-like) display manager for X and Wayland
+
+LICENSE= WTFPL
+LICENSE_FILE= ${WRKSRC}/license.md
+
+BUILD_DEPENDS= ginstall:sysutils/coreutils
+
+USES= gmake localbase xorg
+USE_GITHUB= yes
+GH_ACCOUNT= cylgom
+GH_TUPLE= cylgom:argoat:36c41f09ecc2a10c9acf35e4194e08b6fa10cf45:argoat/sub/argoat \
+ cylgom:testoasterror:71620b47872b5535f87c908883576d73153a6911:testoasterror/sub/argoat/sub/testoasterror \
+ cylgom:configator:8227b3a835bf4c7e50a57e4ad6aff620ba0dc349:configator/sub/configator \
+ cylgom:ctypes:5dd979d3644ab0c85ca14e72b61e6d3d238d432b:ctypes/sub/ctypes \
+ cylgom:dragonfail:6b40d1f8b7f6dda9746e688666af623dfbcceb94:dragonfail/sub/dragonfail \
+ cylgom:termbox_next:2312da153e44face7bb45aa2798ec284289c17ca:termbox_next/sub/termbox_next
+USE_RC_SUBR= ly
+USE_XORG= xcb
+
+MAKEFILE= makefile
+MAKE_ARGS= CC="${CC}" \
+ DISTVERSIONFULL="${DISTVERSIONFULL}"
+ALL_TARGET= final
+
+BINARY_ALIAS= install=ginstall
+
+SUB_FILES= config.ini.sample
+
+_GITDIR= ${WRKDIR}/${GH_PROJECT}-git
+
+post-patch:
+ @${REINPLACE_CMD} "s|/etc/ly|${ETCDIR}|g" ${WRKSRC}/src/config.c
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ly
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+ @${MV} ${STAGEDIR}${ETCDIR}/config.ini \
+ ${STAGEDIR}${DATADIR}/config.ini
+ @${INSTALL_DATA} ${WRKDIR}/config.ini.sample ${STAGEDIR}${ETCDIR}
+
+# Target for maintainers. Use this target to regenerate GH_TUPLE for Git
+# submodules used by the project (and project's dependencies).
+_git-submodules-to-gh-tuple:
+ ${RM} -r ${_GITDIR}
+ git clone https://github.com/${GH_ACCOUNT}/${GH_PROJECT} ${_GITDIR}
+ git -C ${_GITDIR} checkout ${GH_TAGNAME}
+ ${REINPLACE_CMD} 's/make github/${MAKE_CMD} github/g' ${_GITDIR}/makefile
+ ${MAKE_CMD} -C ${_GITDIR} github
+ git -C ${_GITDIR} submodule status --recursive | cut -c 2- | \
+ ${AWK} -f ${FILESDIR}/git-submodules-to-gh-tuple.awk
+
+.include <bsd.port.mk>
Index: x11/ly/distinfo
===================================================================
--- /dev/null
+++ x11/ly/distinfo
@@ -0,0 +1,15 @@
+TIMESTAMP = 1572783399
+SHA256 (cylgom-ly-v0.4.0_GH0.tar.gz) = c4e505be200d54679f27929cffb1f4625c20ab51e8b6ffe7c06b3bccff5fb40d
+SIZE (cylgom-ly-v0.4.0_GH0.tar.gz) = 18807
+SHA256 (cylgom-argoat-36c41f09ecc2a10c9acf35e4194e08b6fa10cf45_GH0.tar.gz) = 5c284cae748b1cec4eef311845f53ad673f91996ec425c6e323f0c40e829e77f
+SIZE (cylgom-argoat-36c41f09ecc2a10c9acf35e4194e08b6fa10cf45_GH0.tar.gz) = 5497
+SHA256 (cylgom-testoasterror-71620b47872b5535f87c908883576d73153a6911_GH0.tar.gz) = bffa1100ffbb7d541a16a9a543e216748fe6f6264fd2b9137738cebcf68d3e8c
+SIZE (cylgom-testoasterror-71620b47872b5535f87c908883576d73153a6911_GH0.tar.gz) = 3360
+SHA256 (cylgom-configator-8227b3a835bf4c7e50a57e4ad6aff620ba0dc349_GH0.tar.gz) = bde1826acb80092bd551985082dc872c7f3e48e03132c377f0e5cdd2f9f331e3
+SIZE (cylgom-configator-8227b3a835bf4c7e50a57e4ad6aff620ba0dc349_GH0.tar.gz) = 4501
+SHA256 (cylgom-ctypes-5dd979d3644ab0c85ca14e72b61e6d3d238d432b_GH0.tar.gz) = 778189ee022a0ad97073372681fb92a7b2a1ecc5a242e99b1f23745f084ee3e1
+SIZE (cylgom-ctypes-5dd979d3644ab0c85ca14e72b61e6d3d238d432b_GH0.tar.gz) = 1242
+SHA256 (cylgom-dragonfail-6b40d1f8b7f6dda9746e688666af623dfbcceb94_GH0.tar.gz) = c185f739e392313c08b0d5fd27e93891b89c36b7b49b83570b601b9cbfbddae1
+SIZE (cylgom-dragonfail-6b40d1f8b7f6dda9746e688666af623dfbcceb94_GH0.tar.gz) = 3348
+SHA256 (cylgom-termbox_next-2312da153e44face7bb45aa2798ec284289c17ca_GH0.tar.gz) = b788c86e1454c32cd218d0478a87def0a4d1322fef407885359d1ed0c343b045
+SIZE (cylgom-termbox_next-2312da153e44face7bb45aa2798ec284289c17ca_GH0.tar.gz) = 23558
Index: x11/ly/files/config.ini.sample.in
===================================================================
--- /dev/null
+++ x11/ly/files/config.ini.sample.in
@@ -0,0 +1,115 @@
+# $FreeBSD$
+#
+# This is a FreeBSD-ready version of the upstream configuration file.
+# The original config file is available in the installed documentation:
+# %%DATADIR%%/config.ini
+
+# animation enabled
+#animate = false
+#animate = true
+
+# the active animation (only animation '0' available for now)
+#animation = 0
+
+# the char used to mask the password
+#asterisk = *
+#asterisk = o
+
+# background color id
+#bg = 0
+
+# blank main box
+#blank_box = true
+
+# erase password input on failure
+#blank_password = true
+
+# console path
+#console_dev = /dev/console
+
+# input active by default on startup
+#default_input = 2
+
+# foreground color id
+#fg = 9
+
+# remove main box borders
+#hide_borders = false
+#hide_borders = true
+
+# number of visible chars on an input
+#input_len = 34
+
+# active language
+#lang = en
+#lang = fr
+
+# load the saved desktop and login
+#load = true
+
+# main box margins
+#margin_box_h = 2
+#margin_box_v = 1
+
+# total input sizes
+#max_desktop_len = 100
+#max_login_len = 255
+#max_password_len = 255
+
+# 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
+
+# command executed when pressing F2
+#restart_cmd = /sbin/shutdown -r now
+
+# save the current desktop and login as defaults
+#save = true
+
+# file in which to save and load the default desktop and login
+#save_file = /etc/ly/save
+save_file = %%ETCDIR%%/ly/save
+
+# service name (pam needs this set to login)
+#service_name = login
+
+# command executed when pressing F1
+#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
+
+# tty in use
+#tty = 2
+
+# wayland setup command
+#wayland_cmd = /etc/ly/wsetup.sh
+wayland_cmd = %%ETCDIR%%/ly/wsetup.sh
+
+# wayland desktop environments
+#waylandsessions = /usr/share/wayland-sessions
+waylandsessions = %%LOCALBASE%%/share/wayland-sessions
+
+# xorg server command
+#x_cmd = /usr/bin/X
+x_cmd = %%LOCALBASE%%/bin/X
+
+# xorg setup command
+#x_cmd_setup = /etc/ly/xsetup.sh
+x_cmd_setup = %%ETCDIR%%/ly/xsetup.sh
+
+# xorg xauthority edition tool
+#xauth_cmd = /usr/bin/xauth
+xauth_cmd = %%LOCALBASE%%/bin/xauth
+
+# xorg desktop environments
+#xsessions = /usr/share/xsessions
+xsessions = %%LOCALBASE%%/share/xsessions
Index: x11/ly/files/git-submodules-to-gh-tuple.awk
===================================================================
--- /dev/null
+++ x11/ly/files/git-submodules-to-gh-tuple.awk
@@ -0,0 +1,20 @@
+#! /usr/bin/awk -f
+# $Id$
+
+BEGIN {
+ group_number = 0
+ printf "GH_TUPLE="
+}
+
+{
+ account = "cylgom"
+ project = $2
+ gsub(".*/", "", project)
+ hash = $1
+ path = $2
+ printf " \\\n\t%s:%s:%s:%s/%s", account, project, hash, project, path
+}
+
+END {
+ printf "\n"
+}
Index: x11/ly/files/ly.in
===================================================================
--- /dev/null
+++ x11/ly/files/ly.in
@@ -0,0 +1,25 @@
+#! /bin/sh -
+
+# $FreeBSD$
+#
+# PROVIDE: ly
+# REQUIRE: LOGIN dbus
+#
+# Add the following line to /etc/rc.conf to enable ly:
+# ly_enable="YES"
+
+. /etc/rc.subr
+
+name="ly"
+rcvar="ly_enable"
+
+load_rc_config ly
+
+: "${ly_enable:="NO"}"
+
+pidfile="/var/run/ly.pid"
+procname="%%PREFIX%%/bin/ly"
+command="/usr/sbin/daemon"
+command_args="-p ${pidfile} ${procname}"
+
+run_rc_command "$1"
Index: x11/ly/files/patch-makefile
===================================================================
--- /dev/null
+++ x11/ly/files/patch-makefile
@@ -0,0 +1,47 @@
+--- makefile.orig 2019-09-21 16:00:16 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+= -DDEBUG
+-FLAGS+= -DGIT_VERSION_STRING=\"$(shell git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')\"
++FLAGS+= -DGIT_VERSION_STRING=\"${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)
+ ifeq ($(OS), Linux)
+ FLAGS+= -D_DEFAULT_SOURCE
+ endif
++ifeq ($(OS), FreeBSD)
++ FLAGS+= -D_DEFAULT_SOURCE ${CPPFLAGS} ${CFLAGS}
++ LINK+= ${LIBS}
++endif
+
+ BIND = bin
+ OBJD = obj
+@@ -68,14 +72,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)/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)/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"
Index: x11/ly/pkg-plist
===================================================================
--- /dev/null
+++ x11/ly/pkg-plist
@@ -0,0 +1,7 @@
+bin/ly
+@sample %%ETCDIR%%/config.ini.sample
+%%ETCDIR%%/lang/en.ini
+%%ETCDIR%%/lang/fr.ini
+%%ETCDIR%%/wsetup.sh
+%%ETCDIR%%/xsetup.sh
+%%DATADIR%%/config.ini
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 23, 11:38 PM (18 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35419878
Default Alt Text
D22228.id63902.diff (9 KB)
Attached To
Mode
D22228: New port: x11/ly: TUI (ncurses-like) display manager for X and Wayland
Attached
Detach File
Event Timeline
Log In to Comment