commit: 8c7d3519b3bccba1693afe1deef351aca885d9ad Author: Eric Joldasov <bratishkaerik <AT> landless-city <DOT> net> AuthorDate: Sun Dec 15 13:31:44 2024 +0000 Commit: Eric Joldasov <bratishkaerik <AT> getgoogleoff <DOT> me> CommitDate: Sun Dec 15 13:31:50 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8c7d3519
gui-wm/river: add 0.3.6, use `zig.eclass` Signed-off-by: Eric Joldasov <bratishkaerik <AT> landless-city.net> gui-wm/river/Manifest | 5 ++ .../river/files/river-0.3.6-fix-no-lazypath.patch | 31 +++++++++ gui-wm/river/river-0.3.6.ebuild | 79 ++++++++++++++++++++++ 3 files changed, 115 insertions(+) diff --git a/gui-wm/river/Manifest b/gui-wm/river/Manifest index 36e44d7c1..123660472 100644 --- a/gui-wm/river/Manifest +++ b/gui-wm/river/Manifest @@ -1,5 +1,10 @@ DIST river-0.3.5.tar.gz 170903 BLAKE2B a4bdfc0ddd1dc92d6bed392c8a68a2639ef6ae3ee5d217c93d326edcec52af87286ac1c376a60554f9f65443a3130a1d44ff7841dba903a0d17516c94c95ce27 SHA512 49e3d0488030aee4f69936605fafc0027b2c78a9a399b5153d54a5ba64592c7efdc67bfd7fedcab6ba93c0689bc921f5a978f7b4b1a12e0c5fda0242900d328c +DIST river-0.3.6.tar.gz 171853 BLAKE2B ffa66b698a250eeaef6034ce7f58175d99ae93b644525b30e192938620410efe494bf8bbf0dc6885d784d1566c26a13e026a490ec21db8e664d42a1ddb5eb222 SHA512 62a7a39a697507813018e02d7d05374dfdab2bbd531623b870b1ea75d34a4bd3dea55146fb6b37620ee4633d5a1fd011461de097bc1fd4db6c6ca95251033f27 DIST zig-pixman-0.2.0.tar.gz 7874 BLAKE2B 25e0e0a65ab45c08e13ed48393e0d009a63e0ec4c2d8452f08ec4b013f9b696adb1d7356a49b1c3b25710982fb34629002df8d433382d433fcdefd1de5fd4358 SHA512 61ce38e9788e9a3701cf32b2d8721424088e1a8bd11841fecc999a31f9b46148e63a35cf770a39edcc7887913019654f7df945b7d7e3b57437d007f7d45609b9 +DIST zig-pixman-12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56.tar.gz 7874 BLAKE2B 25e0e0a65ab45c08e13ed48393e0d009a63e0ec4c2d8452f08ec4b013f9b696adb1d7356a49b1c3b25710982fb34629002df8d433382d433fcdefd1de5fd4358 SHA512 61ce38e9788e9a3701cf32b2d8721424088e1a8bd11841fecc999a31f9b46148e63a35cf770a39edcc7887913019654f7df945b7d7e3b57437d007f7d45609b9 DIST zig-wayland-0.2.0.tar.gz 56543 BLAKE2B aaf82efe78d25c59a87de050147857fcf9a19764141cb40d92b0dd48b96ea0ec52d00a1ab0df1afe4c45cda6d64dda97f296f0aa29d8b9ea3da49e1d5cd69e50 SHA512 dfb140c06d9e3c566034f9102426e7bd47dcde87a2ae16d43ce3ea72cf44bea872bab1d9a23a24ae9d57d2d4ae6c56060a6b10f869de3990046426b0462db85e +DIST zig-wayland-1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242.tar.gz 56543 BLAKE2B aaf82efe78d25c59a87de050147857fcf9a19764141cb40d92b0dd48b96ea0ec52d00a1ab0df1afe4c45cda6d64dda97f296f0aa29d8b9ea3da49e1d5cd69e50 SHA512 dfb140c06d9e3c566034f9102426e7bd47dcde87a2ae16d43ce3ea72cf44bea872bab1d9a23a24ae9d57d2d4ae6c56060a6b10f869de3990046426b0462db85e DIST zig-wlroots-0.18.0.tar.gz 56568 BLAKE2B 2ff804f7472d9c48cc29375afcdbdaba996b0c73b4660a89cd982058c79603a0d3f5e7233b0bfe7f2a5af33046ea7dddddad95136a890997020be0f0beb3b050 SHA512 a67b35c0475253b581728a407d46e256ca1f587d7cc105f00f5a7e5eb39808cea46a3d302c965f92e08801e99e67a450c11f085a94b57b1d86c0c3bab83b806d +DIST zig-wlroots-122083317b028705b5d27be12976feebf17066a4e51802b3b5e9f970bec580e433e1.tar.gz 56926 BLAKE2B 50a143f816b47516b3fc3b051a7445162efbcbb802a3515fe554e005e2f1191f75eaeea4bab68972ecb5b9f0b72f7cec12838c7ec98a1d05ed54803b3a79ca66 SHA512 523f29b06ece2aefbd90e8f9ce15bfcf59edf47e583fe963a8f58af0209d7e9a8dda857424469a40e3c7defb31d01df9f977f8dc58dc3ba7468e20f7b3a4e417 DIST zig-xkbcommon-0.2.0.tar.gz 22700 BLAKE2B 85045d002b4ec1ac8dadda67d3ce6f588e53938ac0a67c06d6cebc85a944d7a23fd1cc295410ce1a91cce9ffb587834f7eca2400e1468fec0193583ac71d6f86 SHA512 a99b6a2fefe34507fd687b58a9618a27ca617966798b410a72c9e53462c3f9c6dd0476a22bb9686cbf49994ca502743b4d25fdc55125359d4fe2860094bf0e82 +DIST zig-xkbcommon-1220c90b2228d65fd8427a837d31b0add83e9fade1dcfa539bb56fd06f1f8461605f.tar.gz 22700 BLAKE2B 85045d002b4ec1ac8dadda67d3ce6f588e53938ac0a67c06d6cebc85a944d7a23fd1cc295410ce1a91cce9ffb587834f7eca2400e1468fec0193583ac71d6f86 SHA512 a99b6a2fefe34507fd687b58a9618a27ca617966798b410a72c9e53462c3f9c6dd0476a22bb9686cbf49994ca502743b4d25fdc55125359d4fe2860094bf0e82 diff --git a/gui-wm/river/files/river-0.3.6-fix-no-lazypath.patch b/gui-wm/river/files/river-0.3.6-fix-no-lazypath.patch new file mode 100644 index 000000000..fe955884f --- /dev/null +++ b/gui-wm/river/files/river-0.3.6-fix-no-lazypath.patch @@ -0,0 +1,31 @@ +From: Eric Joldasov <[email protected]> + +Temporary fix for building river when out-of-source. This is exactly +things that "separate BUILD_DIR by default" in `zig.eclass` was meant +to catch. + +Proper fix here would be to patch upstream to use `std.Build.LazyPath` +instead of plain string, like mentioned in TODO here: +https://codeberg.org/ifreund/zig-wayland/src/tag/v0.2.0/build.zig#L134-L135 + +diff --git a/build.zig b/build.zig +index 55f7ced..f49f9b1 100644 +--- a/build.zig ++++ b/build.zig +@@ -100,11 +100,11 @@ pub fn build(b: *Build) !void { + scanner.addSystemProtocol("unstable/pointer-gestures/pointer-gestures-unstable-v1.xml"); + scanner.addSystemProtocol("unstable/xdg-decoration/xdg-decoration-unstable-v1.xml"); + +- scanner.addCustomProtocol("protocol/river-control-unstable-v1.xml"); +- scanner.addCustomProtocol("protocol/river-status-unstable-v1.xml"); +- scanner.addCustomProtocol("protocol/river-layout-v3.xml"); +- scanner.addCustomProtocol("protocol/wlr-layer-shell-unstable-v1.xml"); +- scanner.addCustomProtocol("protocol/wlr-output-power-management-unstable-v1.xml"); ++ scanner.addCustomProtocol(b.pathFromRoot("protocol/river-control-unstable-v1.xml")); ++ scanner.addCustomProtocol(b.pathFromRoot("protocol/river-status-unstable-v1.xml")); ++ scanner.addCustomProtocol(b.pathFromRoot("protocol/river-layout-v3.xml")); ++ scanner.addCustomProtocol(b.pathFromRoot("protocol/wlr-layer-shell-unstable-v1.xml")); ++ scanner.addCustomProtocol(b.pathFromRoot("protocol/wlr-output-power-management-unstable-v1.xml")); + + // Some of these versions may be out of date with what wlroots implements. + // This is not a problem in practice though as long as river successfully compiles. diff --git a/gui-wm/river/river-0.3.6.ebuild b/gui-wm/river/river-0.3.6.ebuild new file mode 100644 index 000000000..1342330ce --- /dev/null +++ b/gui-wm/river/river-0.3.6.ebuild @@ -0,0 +1,79 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +declare -r -A ZBS_DEPENDENCIES=( + [zig-pixman-12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56.tar.gz]='https://codeberg.org/ifreund/zig-pixman/archive/v0.2.0.tar.gz' + [zig-wayland-1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242.tar.gz]='https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz' + [zig-wlroots-122083317b028705b5d27be12976feebf17066a4e51802b3b5e9f970bec580e433e1.tar.gz]='https://codeberg.org/ifreund/zig-wlroots/archive/v0.18.1.tar.gz' + [zig-xkbcommon-1220c90b2228d65fd8427a837d31b0add83e9fade1dcfa539bb56fd06f1f8461605f.tar.gz]='https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.2.0.tar.gz' +) + +ZIG_SLOT="0.13" +inherit zig + +DESCRIPTION="A dynamic tiling Wayland compositor" +HOMEPAGE="https://isaacfreund.com/software/river/ https://codeberg.org/river/river" +# TODO verify-sig support +SRC_URI=" + https://codeberg.org/river/river/archive/v${PV}.tar.gz -> ${P}.tar.gz + ${ZBS_DEPENDENCIES_SRC_URI} +" +S="${WORKDIR}/${PN}" + +# river: GPL-3-or-later +# zig-pixman, zig-wayland, zig-wlroots, zig-xkbcommon: MIT +LICENSE="GPL-3+ MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="X +llvm man" + +BDEPEND=" + dev-libs/wayland-protocols + dev-util/wayland-scanner + man? ( app-text/scdoc ) + || ( + dev-lang/zig:${ZIG_SLOT}[llvm(+)?] + dev-lang/zig-bin:${ZIG_SLOT} + ) +" +DEPEND=" + dev-libs/libevdev + dev-libs/libinput:= + dev-libs/wayland + gui-libs/wlroots:0.18[X?] + x11-libs/libxkbcommon[wayland,X?] + x11-libs/pixman +" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${P}-fix-no-lazypath.patch" ) + +DOCS=( "README.md" ) + +src_unpack() { + zig_src_unpack +} + +src_configure() { + local my_zbs_args=( + -Dstrip=false # Let Portage control this + -Dpie=true + -Dno-llvm=$(usex llvm false true) + -Dman-pages=$(usex man true false) + -Dxwayland=$(usex X true false) + ) + + zig_src_configure +} + +src_install() { + zig_src_install + + insinto /usr/share/wayland-sessions/ + doins contrib/river.desktop + + insinto /usr/share/river/ + doins -r example/ +}
