bsd-ac / wayland-desktop

Gentoo overlay for Wayland related ebuilds
https://gentoo.org
ISC License
62 stars 19 forks source link

Update gui-wm/river to 0.2.2 to finally use Zig 0.10 #43

Closed gbrlsnchs closed 1 year ago

gbrlsnchs commented 1 year ago

river 0.2.2 has been released with the sole purpose of being able to be built with Zig 0.10.

Edit: wlroots 0.16 is required for the 0.2 releases.

BurnyLlama commented 1 year ago

I am trying to work on this, however I am having some issues with installing wlroots 0.16 and my system in general. I hope to be done in the coming day or so...

BurnyLlama commented 1 year ago

So far I have modified Aisha Tammy's ebuild like this:

# Copyright 2021-2022 Aisha Tammy
# Distributed under the terms of the ISC License

EAPI=8

# NOTE: zig is weird it is doing the install during
#       the compile phase for some reason, so we
#       first do the install to a temporary directory

DESCRIPTION="Dynamic tiling wayland compositor"
HOMEPAGE="https://github.com/riverwm/river"

if [[ ${PV} == 9999 ]]; then
    inherit git-r3
    EGIT_REPO_URI="https://github.com/riverwm/river"
else
    SRC_URI="https://github.com/riverwm/river/releases/download/v${PV}/${P}.tar.gz"
    KEYWORDS="~amd64"
fi

LICENSE="GPL-3"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"

RDEPEND="
    dev-libs/libevdev
    dev-libs/libinput
    dev-libs/wayland
    >=gui-libs/wlroots-0.16.0:0/16[X]
    x11-libs/cairo[X]
    x11-libs/libxkbcommon:=[X]
    x11-libs/pixman
"
DEPEND="${RDEPEND}"
BDEPEND="
    || ( >=dev-lang/zig-0.10 >=dev-lang/zig-bin-0.10 )
    dev-libs/wayland-protocols
    virtual/pkgconfig
    app-text/scdoc
"

src_configure() {
    export zigoptions=(
        --verbose
        -Drelease-safe
        -Dxwayland=true
        -Dman-pages=true
        "${EXTRA_ECONF[@]}"
    )
    export CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
}

src_compile() {
    zig build "${zigoptions[@]}" --prefix "${T}/temp_install" || die
}

src_test() {
    zig build test "${zigoptions[@]}" --prefix "${T}/temp_install" || die
}

src_install() {
    zig build install "${zigoptions[@]}" --prefix "${ED}/usr" || die
    mkdir "${ED}"/usr/etc || die
    mv "${ED}"/usr/etc "${ED}" || die
}

However, I haven't gotten it to work, but I believe it is because of package conflicts that I am currently trying to solve.

BratishkaErik commented 1 year ago

However, I haven't gotten it to work, but I believe it is because of package conflicts that I am currently trying to solve.

I'm not sure what does it mean, but I see some small enchantments can be done here. Would you like to wait a little (while I'm playing with Zig's ebuild) and that I can send you my version?

BurnyLlama commented 1 year ago

However, I haven't gotten it to work, but I believe it is because of package conflicts that I am currently trying to solve.

I'm not sure what does it mean, but I see some small enchantments can be done here. Would you like to wait a little (while I'm playing with Zig's ebuild) and that I can send you my version?

When testing the ebuild I get an error saying that I need wlroots 0.16 installed. Turns out the version I have is 0.15, but I can't install 0.16 because of another package requiring 0.15. Also, for some reason my emerges are ~10x slower than usual, I am trying to figure that out as well.

Anyways, yes, I can wait for a bit and I would like to see your version! ^>^

gbrlsnchs commented 1 year ago

I have river 0.2.2 working here. The template was based off the one from here. We can use that as reference to open a PR, what do you think? :-)

BurnyLlama commented 1 year ago

I have river 0.2.2 working here. The template was based off the one from here. We can use that as reference to open a PR, what do you think? :-)

I will take a look at it later today! If it works properly, you can of course open a PR yourself as well! ^>^

epsilon-0 commented 1 year ago

Closed with https://github.com/bsd-ac/wayland-desktop/commit/8faed2ede44375790125ed95fc2c384d50ddcafd