Skip to content

Commit

Permalink
gui-wm/river: update zig src_unpack()
Browse files Browse the repository at this point in the history
Signed-off-by: Daichi Yamamoto <[email protected]>
  • Loading branch information
yamader committed Aug 4, 2024
1 parent 1c486a2 commit 8547c7f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 41 deletions.
27 changes: 0 additions & 27 deletions gui-wm/river/files/river-0.3.5-build-zig-zon.patch

This file was deleted.

4 changes: 2 additions & 2 deletions gui-wm/river/files/river-0.3.5-zig-0.12.0.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
zig-wayland-0.2.0
--- a/deps/zig-wayland/src/scanner.zig
+++ b/deps/zig-wayland/src/scanner.zig
--- a/deps/p/1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242/src/scanner.zig
+++ b/deps/p/1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242/src/scanner.zig
@@ -528,7 +528,7 @@
// 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
Expand Down
1 change: 0 additions & 1 deletion gui-wm/river/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<use>
<flag name="fish-completion">Enable fish-completion support</flag>
<flag name="llvm">Use LLVM Zig backend</flag>
<flag name="xwayland">Enable xwayland support</flag>
</use>
<upstream>
<remote-id type="codeberg">river/river</remote-id>
Expand Down
29 changes: 18 additions & 11 deletions gui-wm/river/river-0.3.5.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,31 @@ SRC_URI="
S="${WORKDIR}/${PN}"

PATCHES=(
"${FILESDIR}/${P}-build-zig-zon.patch"
"${FILESDIR}/${P}-zig-0.12.0.patch"
)

LICENSE="GPL-3+"
SLOT="0"
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_MAX_EXCLUSIVE="0.13"

DEPEND="
|| ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} )
dev-libs/libevdev
dev-libs/wayland
gui-libs/wlroots:0.18
xwayland? ( x11-base/xwayland )
x11-libs/libxkbcommon
dev-libs/wayland-protocols
gui-libs/wlroots:0.18=[X?]
x11-libs/libxkbcommon:=[X?]
x11-libs/pixman
"
RDEPEND="${DEPEND}"
BDEPEND="
|| ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} )
man? ( app-text/scdoc )
virtual/pkgconfig
"

DOCS=( README.md )

Expand Down Expand Up @@ -108,16 +112,19 @@ ezig() {
src_unpack() {
default

# unpacking into ${S} to patch zig-wayland-0.2.0
# without patches, it would be better using ${WORKDIR}/deps
mkdir "${S}/deps" || die
mv zig-pixman "${S}/deps" || die
mv zig-wayland "${S}/deps" || die
mv zig-wlroots "${S}/deps" || die
mv zig-xkbcommon "${S}/deps" || die
ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zig-pixman-0.2.0.tar.gz"
ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zig-wayland-0.2.0.tar.gz"
ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zig-wlroots-0.18.0.tar.gz"
ezig fetch --global-cache-dir "${S}/deps" "${DISTDIR}/zig-xkbcommon-0.2.0.tar.gz"
}

src_configure() {
export ZBS_ARGS=(
--prefix usr/
--system "${S}/deps/p"
-Doptimize=ReleaseSafe

-Dpie=$(usex pie true false)
Expand All @@ -126,7 +133,7 @@ src_configure() {
-Dbash-completion=$(usex bash-completion true false)
-Dzsh-completion=$(usex zsh-completion true false)
-Dfish-completion=$(usex fish-completion true false)
-Dxwayland=$(usex xwayland true false)
-Dxwayland=$(usex X true false)
)
}

Expand Down

0 comments on commit 8547c7f

Please sign in to comment.