public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: x11-misc/ly/, x11-misc/ly/files/
@ 2024-08-02 13:13 David Roman
  0 siblings, 0 replies; 3+ messages in thread
From: David Roman @ 2024-08-02 13:13 UTC (permalink / raw
  To: gentoo-commits

commit:     fd06f17790f63d198235533c53ba91580bf28e7a
Author:     Michal Vu <saigon-tech <AT> tuta <DOT> io>
AuthorDate: Fri Aug  2 10:02:36 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Fri Aug  2 10:05:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fd06f177

x11-misc/ly: new package, add 1.0.1

Signed-off-by: Michal Vu <saigon-tech <AT> tuta.io>

 x11-misc/ly/Manifest                               |  4 ++
 x11-misc/ly/files/ly-build-zig-zon-1.0.1.patch     | 19 +++++
 .../ly/files/ly-zigini-build-zig-zon-1.0.1.patch   | 14 ++++
 x11-misc/ly/ly-1.0.1.ebuild                        | 82 ++++++++++++++++++++++
 x11-misc/ly/metadata.xml                           | 18 +++++
 5 files changed, 137 insertions(+)

diff --git a/x11-misc/ly/Manifest b/x11-misc/ly/Manifest
new file mode 100644
index 000000000..fbacb68e8
--- /dev/null
+++ b/x11-misc/ly/Manifest
@@ -0,0 +1,4 @@
+DIST ly-1.0.1.tar.gz 64004 BLAKE2B daf90c17ab467d71ba24f65ff42a36ca008c20a1b0706e158a580b1ee3c11bf0d93dacb3531359797d3c5cf2290daf792ef9c0621bbab8993b530536b2d08376 SHA512 a72ee6cda8849b2a7c249ba3abc5159e1f5ac9c220732513a331d50afef32ed6be04f7452f2995bc5783181b2f627d8a2299aad4504af946d7384d905b9727ca
+DIST zig-clap.tar.gz 22722 BLAKE2B 2a157daf2551e78fe441322f7ad071fb8fc44ca66e8400b54ab1f061197334b766460d2db6f78d4d9f74287fe0e45f327efff9b502da3f8846d18290ed3bf763 SHA512 5ea19e67ab0c6b4a2ea439d45ae578c68eff6e62275f7901ef94984fad3b0502cb596c656aa4dc5aae5ebfca75ef3d4f6e854d6c2899984b073d6b2a28750a88
+DIST zigini.tar.gz 5529 BLAKE2B 956c6d66e5a1040effd0ae465941c1740a16b66142414bc83143c3607a79d84103079858a8bd74865ea5340369baf684dcbfef44fddccf84774499e721713f70 SHA512 a90fe54560775bc96e7d97ccdc1bb45d3cd4becae0c28c0905a030e19956dc0c6a97f1207671a7c9759a226b055a62505f3c7440bea4926292cce53eabb5972c
+DIST ziglibini.tar.gz 6834 BLAKE2B 479f947b40c4e99340977bb5b5191ccaff5d47515d7dc7f0fdd1277883079cddcb4574929df03d5f0e135a9732b950f2c171809c62a6d73196ef44cb38b1d4d5 SHA512 3b3a604e7e4f26f4277a0aa0e347996bd059a45fc2ae8baad5d7b133698cdf972b889fe80d6032f1ad42a362314290177f014d2866627a48da7dd03e112f3bce

diff --git a/x11-misc/ly/files/ly-build-zig-zon-1.0.1.patch b/x11-misc/ly/files/ly-build-zig-zon-1.0.1.patch
new file mode 100644
index 000000000..b8b1e5698
--- /dev/null
+++ b/x11-misc/ly/files/ly-build-zig-zon-1.0.1.patch
@@ -0,0 +1,19 @@
+diff --git a/build.zig.zon b/build.zig.zon
+index 0594da1..d3e6a33 100644
+--- a/build.zig.zon
++++ b/build.zig.zon
+@@ -3,12 +3,10 @@
+     .version = "1.0.0",
+     .dependencies = .{
+         .clap = .{
+-            .url = "https://github.com/Hejsil/zig-clap/archive/8c98e6404b22aafc0184e999d8f068b81cc22fa1.tar.gz",
+-            .hash = "122014e73fd712190e109950837b97f6143f02d7e2b6986e1db70b6f4aadb5ba6a0d",
++	    .path = "./deps/zig-clap",
+         },
+         .zigini = .{
+-            .url = "https://github.com/Kawaii-Ash/zigini/archive/ce1f322482099db058f5d9fdd05fbfa255d79723.tar.gz",
+-            .hash = "1220e7a99793a0430e0a7c0b938cb3c98321035bc297e21cd0e2413cf740b4923b9f",
++	    .path = "./deps/zigini",
+         },
+     },
+     .paths = .{""},

diff --git a/x11-misc/ly/files/ly-zigini-build-zig-zon-1.0.1.patch b/x11-misc/ly/files/ly-zigini-build-zig-zon-1.0.1.patch
new file mode 100644
index 000000000..2e0085da3
--- /dev/null
+++ b/x11-misc/ly/files/ly-zigini-build-zig-zon-1.0.1.patch
@@ -0,0 +1,14 @@
+diff --git a/deps/zigini/build.zig.zon b/deps/zigini/build.zig.zon
+index dac05b3..86a38f0 100644
+--- a/deps/zigini/build.zig.zon
++++ b/deps/zigini/build.zig.zon
+@@ -3,8 +3,7 @@
+     .version = "0.2.0",
+     .dependencies = .{
+         .ini = .{
+-            .url = "https://github.com/ziglibs/ini/archive/19e1210063882ab7db73a8aaa60e733d4aaafe9f.tar.gz",
+-            .hash = "1220f1b89fc24ced663baf8cb0d32d951497d88bbd5df8f6e26d7e5ea9579d684786",
++	    .path = "./ini",
+         },
+     },
+     .paths = .{

diff --git a/x11-misc/ly/ly-1.0.1.ebuild b/x11-misc/ly/ly-1.0.1.ebuild
new file mode 100644
index 000000000..f37f4d665
--- /dev/null
+++ b/x11-misc/ly/ly-1.0.1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd pam
+
+DESCRIPTION="Ly - a TUI display manager"
+HOMEPAGE="https://github.com/fairyglade/ly"
+
+CLAP="8c98e6404b22aafc0184e999d8f068b81cc22fa1"
+ZIGINI="ce1f322482099db058f5d9fdd05fbfa255d79723"
+ZIGLIBINI="da0af3a32e3403e3113e103767065cbe9584f505"
+
+SRC_URI="
+	https://github.com/fairyglade/ly/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+	https://github.com/Hejsil/zig-clap/archive/${CLAP}.tar.gz -> zig-clap.tar.gz
+	https://github.com/Kawaii-Ash/zigini/archive/${ZIGINI}.tar.gz -> zigini.tar.gz
+	https://github.com/ziglibs/ini/archive/${ZIGLIBINI}.tar.gz -> ziglibini.tar.gz
+"
+LICENSE="WTFPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+EZIG_MIN="0.12"
+DEPEND="
+	|| ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} )
+	sys-libs/pam
+	x11-libs/libxcb
+"
+
+RDEPEND="
+	x11-base/xorg-server
+	x11-apps/xauth
+	sys-libs/ncurses
+"
+
+RES="${S}/res"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-build-zig-zon-${PV}.patch"
+	"${FILESDIR}/${PN}-zigini-build-zig-zon-${PV}.patch"
+)
+
+src_unpack() {
+	default
+
+	# create a subdir for deps
+	mkdir "${S}/deps" || die
+
+	# move all deps to the subdir
+	mv "zig-clap-${CLAP}" "${S}/deps/zig-clap" || die
+	mv "zigini-${ZIGINI}" "${S}/deps/zigini" || die
+	mv "ini-${ZIGLIBINI}" "${S}/deps/zigini/ini" || die
+}
+
+src_compile() {
+	zig build || die "Zig build failed"
+}
+
+src_install() {
+	dobin "${S}/zig-out/bin/${PN}"
+	newinitd "${RES}/${PN}-openrc" ly
+	systemd_dounit "${RES}/${PN}.service"
+	insinto /etc/ly
+	doins "${RES}/config.ini" "${RES}/xsetup.sh" "${RES}/wsetup.sh"
+	insinto /etc/ly/lang
+	doins "${RES}"/lang/*.ini
+	newpamd "${RES}/pam.d/ly" ly
+}
+
+pkg_postinst() {
+	systemd_reenable "${PN}.service"
+
+	ewarn
+	ewarn "The init scripts are installed only for systemd/openrc"
+	ewarn "If you are using something else like runit etc."
+	ewarn "Please check upstream for get some help"
+	ewarn "You may need to take a look at /etc/ly/config.ini"
+	ewarn "If you are using a window manager as DWM"
+	ewarn "Please make sure there is a .desktop file in /usr/share/xsessions for it"
+}

diff --git a/x11-misc/ly/metadata.xml b/x11-misc/ly/metadata.xml
new file mode 100644
index 000000000..a7a065516
--- /dev/null
+++ b/x11-misc/ly/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+    <maintainer type="person">
+        <email>saigon-tech@tuta.io</email>
+        <name>Michal Vu</name>
+    </maintainer>
+    <longdescription>
+        Ly is a lightweight TUI (Terminal User Interface) display manager for Linux.
+        It aims to be simple, fast, and easily configurable. Ly supports various
+        desktop environments and window managers, and provides a minimalistic
+        yet functional login experience. It's designed to be an alternative to
+        heavier graphical display managers while still offering essential features.
+    </longdescription>
+    <upstream>
+        <remote-id type="github">fairyglade/ly</remote-id>
+    </upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: x11-misc/ly/, x11-misc/ly/files/
@ 2024-08-05  5:20 Viorel Munteanu
  0 siblings, 0 replies; 3+ messages in thread
From: Viorel Munteanu @ 2024-08-05  5:20 UTC (permalink / raw
  To: gentoo-commits

commit:     a96e18adf336d4671ce1f25dbb10e2ddf1b4da27
Author:     Daichi Yamamoto <dev <AT> dyama <DOT> net>
AuthorDate: Sun Aug  4 17:28:02 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sun Aug  4 17:28:02 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a96e18ad

x11-misc/ly: add 1.0.2, drop 1.0.1

Signed-off-by: Daichi Yamamoto <dev <AT> dyama.net>

 x11-misc/ly/Manifest                               |   8 +-
 x11-misc/ly/files/ly-build-zig-zon-1.0.1.patch     |  19 ---
 .../ly/files/ly-zigini-build-zig-zon-1.0.1.patch   |  14 --
 x11-misc/ly/ly-1.0.1.ebuild                        |  82 ------------
 x11-misc/ly/ly-1.0.2.ebuild                        | 144 +++++++++++++++++++++
 5 files changed, 148 insertions(+), 119 deletions(-)

diff --git a/x11-misc/ly/Manifest b/x11-misc/ly/Manifest
index fbacb68e8..dd4b82ea6 100644
--- a/x11-misc/ly/Manifest
+++ b/x11-misc/ly/Manifest
@@ -1,4 +1,4 @@
-DIST ly-1.0.1.tar.gz 64004 BLAKE2B daf90c17ab467d71ba24f65ff42a36ca008c20a1b0706e158a580b1ee3c11bf0d93dacb3531359797d3c5cf2290daf792ef9c0621bbab8993b530536b2d08376 SHA512 a72ee6cda8849b2a7c249ba3abc5159e1f5ac9c220732513a331d50afef32ed6be04f7452f2995bc5783181b2f627d8a2299aad4504af946d7384d905b9727ca
-DIST zig-clap.tar.gz 22722 BLAKE2B 2a157daf2551e78fe441322f7ad071fb8fc44ca66e8400b54ab1f061197334b766460d2db6f78d4d9f74287fe0e45f327efff9b502da3f8846d18290ed3bf763 SHA512 5ea19e67ab0c6b4a2ea439d45ae578c68eff6e62275f7901ef94984fad3b0502cb596c656aa4dc5aae5ebfca75ef3d4f6e854d6c2899984b073d6b2a28750a88
-DIST zigini.tar.gz 5529 BLAKE2B 956c6d66e5a1040effd0ae465941c1740a16b66142414bc83143c3607a79d84103079858a8bd74865ea5340369baf684dcbfef44fddccf84774499e721713f70 SHA512 a90fe54560775bc96e7d97ccdc1bb45d3cd4becae0c28c0905a030e19956dc0c6a97f1207671a7c9759a226b055a62505f3c7440bea4926292cce53eabb5972c
-DIST ziglibini.tar.gz 6834 BLAKE2B 479f947b40c4e99340977bb5b5191ccaff5d47515d7dc7f0fdd1277883079cddcb4574929df03d5f0e135a9732b950f2c171809c62a6d73196ef44cb38b1d4d5 SHA512 3b3a604e7e4f26f4277a0aa0e347996bd059a45fc2ae8baad5d7b133698cdf972b889fe80d6032f1ad42a362314290177f014d2866627a48da7dd03e112f3bce
+DIST ly-1.0.2.tar.gz 64603 BLAKE2B a1521be4d1191c0b527867e77e6968142062948b2950ef96e3ba4c90bd14386fca4248ed9942959b530c17c1a0dfc3ffbec24b1275d70af5da9fbd6fa4f41da2 SHA512 9431abcb6d3662e74a39b6ba52f2d12de83607764c8cd6e41dda0ae0c71c9618596711e9dd1f519a61835a63ea6dda5bc083509a9757d232213ddf74df3513b7
+DIST zig-clap-8c98e6404b22aafc0184e999d8f068b81cc22fa1.tar.gz 22722 BLAKE2B 2a157daf2551e78fe441322f7ad071fb8fc44ca66e8400b54ab1f061197334b766460d2db6f78d4d9f74287fe0e45f327efff9b502da3f8846d18290ed3bf763 SHA512 5ea19e67ab0c6b4a2ea439d45ae578c68eff6e62275f7901ef94984fad3b0502cb596c656aa4dc5aae5ebfca75ef3d4f6e854d6c2899984b073d6b2a28750a88
+DIST zigini-0bba97a12582928e097f4074cc746c43351ba4c8.tar.gz 5797 BLAKE2B e5c4e20e7d23bb1096c9012acd19898fb0450d33c0ee78200ee817c3658d3cad048fe6a475977fa62ad0ba254d4a78b3b1181203fa7faf81b70ff75115552681 SHA512 7d2f2ccc9bf99cb2848c1059c34cd2163d48d6fa0a090f2c03cd92e2441dc0029868e28ac23a8a310941f969c5270ad26b5768a2a303bdccf35803ac027e7a88
+DIST ziglibini-e18d36665905c1e7ba0c1ce3e8780076b33e3002.tar.gz 7398 BLAKE2B e8f8a026c876d120340f57beb4fda3fba396fe4f1f0aa5515f76399a68291087aa0909dde69139e4153a60587e37dd8b4ba94c5f481ce42c60a0cfee5f31cbe6 SHA512 3d18368d5e0e06e24a580698bec9eb35d85dfc528d4b24a354e41b402b31c06a547a3e85d59254781b1e0eafe13c1db23bebbd4a531c6a6a789af2e833e5a693

diff --git a/x11-misc/ly/files/ly-build-zig-zon-1.0.1.patch b/x11-misc/ly/files/ly-build-zig-zon-1.0.1.patch
deleted file mode 100644
index b8b1e5698..000000000
--- a/x11-misc/ly/files/ly-build-zig-zon-1.0.1.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/build.zig.zon b/build.zig.zon
-index 0594da1..d3e6a33 100644
---- a/build.zig.zon
-+++ b/build.zig.zon
-@@ -3,12 +3,10 @@
-     .version = "1.0.0",
-     .dependencies = .{
-         .clap = .{
--            .url = "https://github.com/Hejsil/zig-clap/archive/8c98e6404b22aafc0184e999d8f068b81cc22fa1.tar.gz",
--            .hash = "122014e73fd712190e109950837b97f6143f02d7e2b6986e1db70b6f4aadb5ba6a0d",
-+	    .path = "./deps/zig-clap",
-         },
-         .zigini = .{
--            .url = "https://github.com/Kawaii-Ash/zigini/archive/ce1f322482099db058f5d9fdd05fbfa255d79723.tar.gz",
--            .hash = "1220e7a99793a0430e0a7c0b938cb3c98321035bc297e21cd0e2413cf740b4923b9f",
-+	    .path = "./deps/zigini",
-         },
-     },
-     .paths = .{""},

diff --git a/x11-misc/ly/files/ly-zigini-build-zig-zon-1.0.1.patch b/x11-misc/ly/files/ly-zigini-build-zig-zon-1.0.1.patch
deleted file mode 100644
index 2e0085da3..000000000
--- a/x11-misc/ly/files/ly-zigini-build-zig-zon-1.0.1.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/deps/zigini/build.zig.zon b/deps/zigini/build.zig.zon
-index dac05b3..86a38f0 100644
---- a/deps/zigini/build.zig.zon
-+++ b/deps/zigini/build.zig.zon
-@@ -3,8 +3,7 @@
-     .version = "0.2.0",
-     .dependencies = .{
-         .ini = .{
--            .url = "https://github.com/ziglibs/ini/archive/19e1210063882ab7db73a8aaa60e733d4aaafe9f.tar.gz",
--            .hash = "1220f1b89fc24ced663baf8cb0d32d951497d88bbd5df8f6e26d7e5ea9579d684786",
-+	    .path = "./ini",
-         },
-     },
-     .paths = .{

diff --git a/x11-misc/ly/ly-1.0.1.ebuild b/x11-misc/ly/ly-1.0.1.ebuild
deleted file mode 100644
index f37f4d665..000000000
--- a/x11-misc/ly/ly-1.0.1.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit systemd pam
-
-DESCRIPTION="Ly - a TUI display manager"
-HOMEPAGE="https://github.com/fairyglade/ly"
-
-CLAP="8c98e6404b22aafc0184e999d8f068b81cc22fa1"
-ZIGINI="ce1f322482099db058f5d9fdd05fbfa255d79723"
-ZIGLIBINI="da0af3a32e3403e3113e103767065cbe9584f505"
-
-SRC_URI="
-	https://github.com/fairyglade/ly/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
-	https://github.com/Hejsil/zig-clap/archive/${CLAP}.tar.gz -> zig-clap.tar.gz
-	https://github.com/Kawaii-Ash/zigini/archive/${ZIGINI}.tar.gz -> zigini.tar.gz
-	https://github.com/ziglibs/ini/archive/${ZIGLIBINI}.tar.gz -> ziglibini.tar.gz
-"
-LICENSE="WTFPL-2"
-SLOT="0"
-KEYWORDS="~amd64"
-
-EZIG_MIN="0.12"
-DEPEND="
-	|| ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} )
-	sys-libs/pam
-	x11-libs/libxcb
-"
-
-RDEPEND="
-	x11-base/xorg-server
-	x11-apps/xauth
-	sys-libs/ncurses
-"
-
-RES="${S}/res"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-build-zig-zon-${PV}.patch"
-	"${FILESDIR}/${PN}-zigini-build-zig-zon-${PV}.patch"
-)
-
-src_unpack() {
-	default
-
-	# create a subdir for deps
-	mkdir "${S}/deps" || die
-
-	# move all deps to the subdir
-	mv "zig-clap-${CLAP}" "${S}/deps/zig-clap" || die
-	mv "zigini-${ZIGINI}" "${S}/deps/zigini" || die
-	mv "ini-${ZIGLIBINI}" "${S}/deps/zigini/ini" || die
-}
-
-src_compile() {
-	zig build || die "Zig build failed"
-}
-
-src_install() {
-	dobin "${S}/zig-out/bin/${PN}"
-	newinitd "${RES}/${PN}-openrc" ly
-	systemd_dounit "${RES}/${PN}.service"
-	insinto /etc/ly
-	doins "${RES}/config.ini" "${RES}/xsetup.sh" "${RES}/wsetup.sh"
-	insinto /etc/ly/lang
-	doins "${RES}"/lang/*.ini
-	newpamd "${RES}/pam.d/ly" ly
-}
-
-pkg_postinst() {
-	systemd_reenable "${PN}.service"
-
-	ewarn
-	ewarn "The init scripts are installed only for systemd/openrc"
-	ewarn "If you are using something else like runit etc."
-	ewarn "Please check upstream for get some help"
-	ewarn "You may need to take a look at /etc/ly/config.ini"
-	ewarn "If you are using a window manager as DWM"
-	ewarn "Please make sure there is a .desktop file in /usr/share/xsessions for it"
-}

diff --git a/x11-misc/ly/ly-1.0.2.ebuild b/x11-misc/ly/ly-1.0.2.ebuild
new file mode 100644
index 000000000..28335a1f1
--- /dev/null
+++ b/x11-misc/ly/ly-1.0.2.ebuild
@@ -0,0 +1,144 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo pam systemd
+
+DESCRIPTION="Ly - a TUI display manager"
+HOMEPAGE="https://github.com/fairyglade/ly"
+
+CLAP="8c98e6404b22aafc0184e999d8f068b81cc22fa1"
+ZIGINI="0bba97a12582928e097f4074cc746c43351ba4c8"
+ZIGLIBINI="e18d36665905c1e7ba0c1ce3e8780076b33e3002"
+
+SRC_URI="
+	https://github.com/fairyglade/ly/archive/v${PV}/${P}.tar.gz
+	https://github.com/Hejsil/zig-clap/archive/${CLAP}.tar.gz -> zig-clap-${CLAP}.tar.gz
+	https://github.com/Kawaii-Ash/zigini/archive/${ZIGINI}.tar.gz -> zigini-${ZIGINI}.tar.gz
+	https://github.com/ziglibs/ini/archive/${ZIGLIBINI}.tar.gz -> ziglibini-${ZIGLIBINI}.tar.gz
+"
+
+LICENSE="WTFPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+EZIG_MIN="0.12"
+EZIG_MAX_EXCLUSIVE="0.13"
+
+DEPEND="
+	|| ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} )
+	sys-libs/pam
+	x11-libs/libxcb
+"
+RDEPEND="
+	x11-base/xorg-server
+	x11-apps/xauth
+	sys-libs/ncurses
+"
+
+# https://github.com/ziglang/zig/issues/3382
+QA_FLAGS_IGNORED="usr/bin/ly"
+
+RES="${S}/res"
+
+# copied from sys-fs/ncdu::gentoo
+# Many thanks to Florian Schmaus (Flowdalic)!
+# Adapted from https://github.com/gentoo/gentoo/pull/28986
+# Set the EZIG environment variable.
+zig-set_EZIG() {
+	[[ -n ${EZIG} ]] && return
+
+	if [[ -n ${EZIG_OVERWRITE} ]]; then
+		export EZIG="${EZIG_OVERWRITE}"
+		return
+	fi
+
+	local candidate selected selected_ver ver
+
+	for candidate in "${BROOT}"/usr/bin/zig-*; do
+		if [[ ! -L ${candidate} || ${candidate} != */zig?(-bin)-+([0-9.]) ]]; then
+			continue
+		fi
+
+		ver=${candidate##*-}
+
+		if [[ -n ${EZIG_EXACT_VER} ]]; then
+			ver_test "${ver}" -ne "${EZIG_EXACT_VER}" && continue
+
+			selected="${candidate}"
+			selected_ver="${ver}"
+			break
+		fi
+
+		if [[ -n ${EZIG_MIN} ]] \
+			  && ver_test "${ver}" -lt "${EZIG_MIN}"; then
+			# Candidate does not satisfy EZIG_MIN condition.
+			continue
+		fi
+
+		if [[ -n ${EZIG_MAX_EXCLUSIVE} ]] \
+			  && ver_test "${ver}" -ge "${EZIG_MAX_EXCLUSIVE}"; then
+			# Candidate does not satisfy EZIG_MAX_EXCLUSIVE condition.
+			continue
+		fi
+
+		if [[ -n ${selected_ver} ]] \
+			  && ver_test "${selected_ver}" -gt "${ver}"; then
+			# Candidate is older than the currently selected candidate.
+			continue
+		fi
+
+		selected="${candidate}"
+		selected_ver="${ver}"
+	done
+
+	if [[ -z ${selected} ]]; then
+		die "Could not find (suitable) zig installation in ${BROOT}/usr/bin"
+	fi
+
+	export EZIG="${selected}"
+	export EZIG_VER="${selected_ver}"
+}
+
+ezig() {
+	zig-set_EZIG
+	edo "${EZIG}" "${@}"
+}
+
+src_unpack() {
+	default
+
+	mkdir "${WORKDIR}/deps" || die
+	ezig fetch --global-cache-dir "${WORKDIR}/deps" "${DISTDIR}/zig-clap-${CLAP}.tar.gz"
+	ezig fetch --global-cache-dir "${WORKDIR}/deps" "${DISTDIR}/zigini-${ZIGINI}.tar.gz"
+	ezig fetch --global-cache-dir "${WORKDIR}/deps" "${DISTDIR}/ziglibini-${ZIGLIBINI}.tar.gz"
+}
+
+src_compile() {
+	ezig build --system "${WORKDIR}/deps/p" -Doptimize=ReleaseSafe
+}
+
+src_install() {
+	dobin "${S}/zig-out/bin/${PN}"
+	newinitd "${RES}/${PN}-openrc" ly
+	systemd_dounit "${RES}/${PN}.service"
+	insinto /etc/ly
+	doins "${RES}/config.ini" "${RES}/xsetup.sh" "${RES}/wsetup.sh"
+	insinto /etc/ly/lang
+	doins "${RES}"/lang/*.ini
+	newpamd "${RES}/pam.d/ly" ly
+	fperms +x /etc/${PN}/{x,w}setup.sh
+}
+
+pkg_postinst() {
+	systemd_reenable "${PN}.service"
+
+	ewarn
+	ewarn "The init scripts are installed only for systemd/openrc"
+	ewarn "If you are using something else like runit etc."
+	ewarn "Please check upstream for get some help"
+	ewarn "You may need to take a look at /etc/ly/config.ini"
+	ewarn "If you are using a window manager as DWM"
+	ewarn "Please make sure there is a .desktop file in /usr/share/xsessions for it"
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: x11-misc/ly/, x11-misc/ly/files/
@ 2024-08-23 17:00 David Roman
  0 siblings, 0 replies; 3+ messages in thread
From: David Roman @ 2024-08-23 17:00 UTC (permalink / raw
  To: gentoo-commits

commit:     82e087c7d3b030ef6e83803107427b6b2efa8984
Author:     Eric Joldasov <bratishkaerik <AT> landless-city <DOT> net>
AuthorDate: Fri Aug 23 10:38:53 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Fri Aug 23 10:38:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=82e087c7

x11-misc/ly: patch 1.0.2 to work with Zig 0.13

Signed-off-by: Eric Joldasov <bratishkaerik <AT> landless-city.net>

 .../ly/files/ly-1.0.2-update-to-zig-0.13.0.patch   | 122 +++++++++++++++++++++
 x11-misc/ly/ly-1.0.2.ebuild                        |  18 +--
 2 files changed, 133 insertions(+), 7 deletions(-)

diff --git a/x11-misc/ly/files/ly-1.0.2-update-to-zig-0.13.0.patch b/x11-misc/ly/files/ly-1.0.2-update-to-zig-0.13.0.patch
new file mode 100644
index 000000000..7bb21a82c
--- /dev/null
+++ b/x11-misc/ly/files/ly-1.0.2-update-to-zig-0.13.0.patch
@@ -0,0 +1,122 @@
+From: Eric Joldasov <bratishkaerik@landless-city.net>
+
+Update ly source code and dependencies to Zig 0.13.0.
+
+diff --git a/build.zig b/build.zig
+index 083bd2a..720a4a5 100644
+--- a/build.zig
++++ b/build.zig
+@@ -25,7 +25,7 @@ pub fn build(b: *std.Build) !void {
+ 
+     const exe = b.addExecutable(.{
+         .name = "ly",
+-        .root_source_file = .{ .path = "src/main.zig" },
++        .root_source_file = b.path("src/main.zig"),
+         .target = target,
+         .optimize = optimize,
+     });
+@@ -38,14 +38,14 @@ pub fn build(b: *std.Build) !void {
+     const clap = b.dependency("clap", .{ .target = target, .optimize = optimize });
+     exe.root_module.addImport("clap", clap.module("clap"));
+ 
+-    exe.addIncludePath(.{ .path = "include" });
++    exe.addIncludePath(b.path("include"));
+     exe.linkSystemLibrary("pam");
+     exe.linkSystemLibrary("xcb");
+     exe.linkLibC();
+ 
+     // HACK: Only fails with ReleaseSafe, so we'll override it.
+     const translate_c = b.addTranslateC(.{
+-        .root_source_file = .{ .path = "include/termbox2.h" },
++        .root_source_file = b.path("include/termbox2.h"),
+         .target = target,
+         .optimize = if (optimize == .ReleaseSafe) .ReleaseFast else optimize,
+     });
+@@ -94,7 +94,7 @@ pub fn build(b: *std.Build) !void {
+ 
+ pub fn ExeInstaller(install_conf: bool) type {
+     return struct {
+-        pub fn make(step: *std.Build.Step, progress: *std.Progress.Node) !void {
++        pub fn make(step: *std.Build.Step, progress: std.Progress.Node) !void {
+             _ = progress;
+             try install_ly(step.owner.allocator, install_conf);
+         }
+@@ -108,7 +108,7 @@ const InitSystem = enum {
+ };
+ pub fn ServiceInstaller(comptime init_system: InitSystem) type {
+     return struct {
+-        pub fn make(step: *std.Build.Step, progress: *std.Progress.Node) !void {
++        pub fn make(step: *std.Build.Step, progress: std.Progress.Node) !void {
+             _ = progress;
+             const allocator = step.owner.allocator;
+             switch (init_system) {
+@@ -220,7 +220,7 @@ fn install_ly(allocator: std.mem.Allocator, install_config: bool) !void {
+     }
+ }
+ 
+-pub fn uninstallall(step: *std.Build.Step, progress: *std.Progress.Node) !void {
++pub fn uninstallall(step: *std.Build.Step, progress: std.Progress.Node) !void {
+     _ = progress;
+     try std.fs.cwd().deleteTree(data_directory);
+     const allocator = step.owner.allocator;
+diff --git a/deps/p/122014e73fd712190e109950837b97f6143f02d7e2b6986e1db70b6f4aadb5ba6a0d/build.zig b/deps/p/122014e73fd712190e109950837b97f6143f02d7e2b6986e1db70b6f4aadb5ba6a0d/build.zig
+index 53e5f90..0e35a04 100644
+--- a/deps/p/122014e73fd712190e109950837b97f6143f02d7e2b6986e1db70b6f4aadb5ba6a0d/build.zig
++++ b/deps/p/122014e73fd712190e109950837b97f6143f02d7e2b6986e1db70b6f4aadb5ba6a0d/build.zig
+@@ -1,14 +1,14 @@
+ const std = @import("std");
+ 
+ pub fn build(b: *std.Build) void {
+-    const clap_mod = b.addModule("clap", .{ .root_source_file = .{ .path = "clap.zig" } });
++    const clap_mod = b.addModule("clap", .{ .root_source_file = b.path("clap.zig") });
+ 
+     const optimize = b.standardOptimizeOption(.{});
+     const target = b.standardTargetOptions(.{});
+ 
+     const test_step = b.step("test", "Run all tests in all modes.");
+     const tests = b.addTest(.{
+-        .root_source_file = .{ .path = "clap.zig" },
++        .root_source_file = b.path("clap.zig"),
+         .target = target,
+         .optimize = optimize,
+     });
+@@ -25,7 +25,7 @@ pub fn build(b: *std.Build) void {
+     }) |example_name| {
+         const example = b.addExecutable(.{
+             .name = example_name,
+-            .root_source_file = .{ .path = b.fmt("example/{s}.zig", .{example_name}) },
++            .root_source_file = b.path(b.fmt("example/{s}.zig", .{example_name})),
+             .target = target,
+             .optimize = optimize,
+         });
+@@ -63,7 +63,7 @@ fn readMeStep(b: *std.Build) *std.Build.Step {
+         .name = "ReadMeStep",
+         .owner = b,
+         .makeFn = struct {
+-            fn make(step: *std.Build.Step, _: *std.Progress.Node) anyerror!void {
++            fn make(step: *std.Build.Step, _: std.Progress.Node) anyerror!void {
+                 @setEvalBranchQuota(10000);
+                 _ = step;
+                 const file = try std.fs.cwd().createFile("README.md", .{});
+diff --git a/src/main.zig b/src/main.zig
+index ddee718..022ff54 100644
+--- a/src/main.zig
++++ b/src/main.zig
+@@ -512,7 +512,7 @@ pub fn main() !void {
+                     run = false;
+                 } else if (pressed_key == sleep_key) {
+                     if (config.sleep_cmd) |sleep_cmd| {
+-                        var sleep = std.ChildProcess.init(&[_][]const u8{ "/bin/sh", "-c", sleep_cmd }, allocator);
++                        var sleep = std.process.Child.init(&[_][]const u8{ "/bin/sh", "-c", sleep_cmd }, allocator);
+                         _ = sleep.spawnAndWait() catch .{};
+                     }
+                 }
+@@ -617,7 +617,7 @@ pub fn main() !void {
+ 
+                 update = true;
+ 
+-                var restore_cursor = std.ChildProcess.init(&[_][]const u8{ "/bin/sh", "-c", config.term_restore_cursor_cmd }, allocator);
++                var restore_cursor = std.process.Child.init(&[_][]const u8{ "/bin/sh", "-c", config.term_restore_cursor_cmd }, allocator);
+                 _ = restore_cursor.spawnAndWait() catch .{};
+             },
+             else => {

diff --git a/x11-misc/ly/ly-1.0.2.ebuild b/x11-misc/ly/ly-1.0.2.ebuild
index bd378ed69..b2bc90a1e 100644
--- a/x11-misc/ly/ly-1.0.2.ebuild
+++ b/x11-misc/ly/ly-1.0.2.ebuild
@@ -23,8 +23,8 @@ LICENSE="WTFPL-2"
 SLOT="0"
 KEYWORDS="~amd64"
 
-EZIG_MIN="0.12"
-EZIG_MAX_EXCLUSIVE="0.13"
+EZIG_MIN="0.13"
+EZIG_MAX_EXCLUSIVE="0.14"
 
 DEPEND="
 	|| ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} )
@@ -44,6 +44,10 @@ QA_FLAGS_IGNORED="usr/bin/ly"
 
 RES="${S}/res"
 
+PATCHES=(
+	"${FILESDIR}/ly-1.0.2-update-to-zig-0.13.0.patch"
+)
+
 # copied from sys-fs/ncdu::gentoo
 # Many thanks to Florian Schmaus (Flowdalic)!
 # Adapted from https://github.com/gentoo/gentoo/pull/28986
@@ -111,10 +115,10 @@ ezig() {
 src_unpack() {
 	default
 
-	mkdir "${WORKDIR}/deps" || die
-	ezig fetch --global-cache-dir "${WORKDIR}/deps" "${DISTDIR}/zig-clap-${CLAP}.tar.gz"
-	ezig fetch --global-cache-dir "${WORKDIR}/deps" "${DISTDIR}/zigini-${ZIGINI}.tar.gz"
-	ezig fetch --global-cache-dir "${WORKDIR}/deps" "${DISTDIR}/ziglibini-${ZIGLIBINI}.tar.gz"
+	mkdir "${S}/deps" || die
+	ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zig-clap-${CLAP}.tar.gz"
+	ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zigini-${ZIGINI}.tar.gz"
+	ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/ziglibini-${ZIGLIBINI}.tar.gz"
 }
 
 src_prepare(){
@@ -125,7 +129,7 @@ src_prepare(){
 
 src_compile() {
 	# Building ly & accomodate for prefixed environment
-	ezig build --system "${WORKDIR}/deps/p" -Doptimize=ReleaseSafe -Ddata_directory="${EPREFIX}/etc/ly"
+	ezig build --system "${S}/deps/p/" -Doptimize=ReleaseSafe -Ddata_directory="${EPREFIX}/etc/ly"
 }
 
 src_install() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-23 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 17:00 [gentoo-commits] repo/proj/guru:master commit in: x11-misc/ly/, x11-misc/ly/files/ David Roman
  -- strict thread matches above, loose matches on Subject: below --
2024-08-05  5:20 Viorel Munteanu
2024-08-02 13:13 David Roman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox