gui-wm/river: update zig src_unpack()

Signed-off-by: Daichi Yamamoto <dev@dyama.net>
This commit is contained in:
Daichi Yamamoto
2024-08-04 20:37:46 +09:00
parent 1c486a2cae
commit 8547c7f8e2
4 changed files with 20 additions and 41 deletions

View File

@@ -1,27 +0,0 @@
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -4,20 +4,16 @@
.paths = .{""},
.dependencies = .{
.@"zig-pixman" = .{
- .url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.2.0.tar.gz",
- .hash = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56",
+ .path = "deps/zig-pixman",
},
.@"zig-wayland" = .{
- .url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz",
- .hash = "1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242",
+ .path = "deps/zig-wayland",
},
.@"zig-wlroots" = .{
- .url = "https://codeberg.org/ifreund/zig-wlroots/archive/v0.18.0.tar.gz",
- .hash = "12204d789e17c158971f69c7b900e8d8f288e7b9e42b2242f3adfbca57e8266d848f",
+ .path = "deps/zig-wlroots",
},
.@"zig-xkbcommon" = .{
- .url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.2.0.tar.gz",
- .hash = "1220c90b2228d65fd8427a837d31b0add83e9fade1dcfa539bb56fd06f1f8461605f",
+ .path = "deps/zig-xkbcommon",
},
},
}

View File

@@ -1,6 +1,6 @@
zig-wayland-0.2.0 zig-wayland-0.2.0
--- a/deps/zig-wayland/src/scanner.zig --- a/deps/p/1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242/src/scanner.zig
+++ b/deps/zig-wayland/src/scanner.zig +++ b/deps/p/1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242/src/scanner.zig
@@ -528,7 +528,7 @@ @@ -528,7 +528,7 @@
// These interfaces are special in that their version may never be increased. // These interfaces are special in that their version may never be increased.
// That is, they are pinned to version 1 forever. They also may break the // That is, they are pinned to version 1 forever. They also may break the

View File

@@ -8,7 +8,6 @@
<use> <use>
<flag name="fish-completion">Enable fish-completion support</flag> <flag name="fish-completion">Enable fish-completion support</flag>
<flag name="llvm">Use LLVM Zig backend</flag> <flag name="llvm">Use LLVM Zig backend</flag>
<flag name="xwayland">Enable xwayland support</flag>
</use> </use>
<upstream> <upstream>
<remote-id type="codeberg">river/river</remote-id> <remote-id type="codeberg">river/river</remote-id>

View File

@@ -18,27 +18,31 @@ SRC_URI="
S="${WORKDIR}/${PN}" S="${WORKDIR}/${PN}"
PATCHES=( PATCHES=(
"${FILESDIR}/${P}-build-zig-zon.patch"
"${FILESDIR}/${P}-zig-0.12.0.patch" "${FILESDIR}/${P}-zig-0.12.0.patch"
) )
LICENSE="GPL-3+" LICENSE="GPL-3+"
SLOT="0" SLOT="0"
KEYWORDS="~amd64" KEYWORDS="~amd64"
IUSE="+llvm +man pie xwayland bash-completion zsh-completion fish-completion" IUSE="+X +llvm +man pie bash-completion zsh-completion fish-completion"
EZIG_MIN="0.12" EZIG_MIN="0.12"
EZIG_MAX_EXCLUSIVE="0.13" EZIG_MAX_EXCLUSIVE="0.13"
DEPEND=" DEPEND="
|| ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} ) dev-libs/libevdev
dev-libs/wayland dev-libs/wayland
gui-libs/wlroots:0.18 dev-libs/wayland-protocols
xwayland? ( x11-base/xwayland ) gui-libs/wlroots:0.18=[X?]
x11-libs/libxkbcommon x11-libs/libxkbcommon:=[X?]
x11-libs/pixman x11-libs/pixman
" "
RDEPEND="${DEPEND}" RDEPEND="${DEPEND}"
BDEPEND="
|| ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} )
man? ( app-text/scdoc )
virtual/pkgconfig
"
DOCS=( README.md ) DOCS=( README.md )
@@ -108,16 +112,19 @@ ezig() {
src_unpack() { src_unpack() {
default default
# unpacking into ${S} to patch zig-wayland-0.2.0
# without patches, it would be better using ${WORKDIR}/deps
mkdir "${S}/deps" || die mkdir "${S}/deps" || die
mv zig-pixman "${S}/deps" || die ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zig-pixman-0.2.0.tar.gz"
mv zig-wayland "${S}/deps" || die ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zig-wayland-0.2.0.tar.gz"
mv zig-wlroots "${S}/deps" || die ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zig-wlroots-0.18.0.tar.gz"
mv zig-xkbcommon "${S}/deps" || die ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zig-xkbcommon-0.2.0.tar.gz"
} }
src_configure() { src_configure() {
export ZBS_ARGS=( export ZBS_ARGS=(
--prefix usr/ --prefix usr/
--system "${S}/deps/p"
-Doptimize=ReleaseSafe -Doptimize=ReleaseSafe
-Dpie=$(usex pie true false) -Dpie=$(usex pie true false)
@@ -126,7 +133,7 @@ src_configure() {
-Dbash-completion=$(usex bash-completion true false) -Dbash-completion=$(usex bash-completion true false)
-Dzsh-completion=$(usex zsh-completion true false) -Dzsh-completion=$(usex zsh-completion true false)
-Dfish-completion=$(usex fish-completion true false) -Dfish-completion=$(usex fish-completion true false)
-Dxwayland=$(usex xwayland true false) -Dxwayland=$(usex X true false)
) )
} }