Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gentoo tutorial #6

Open
mazunki opened this issue Sep 8, 2021 · 4 comments
Open

Gentoo tutorial #6

mazunki opened this issue Sep 8, 2021 · 4 comments

Comments

@mazunki
Copy link
Contributor

mazunki commented Sep 8, 2021

While I'm doing this on Gentoo right now, I figured I'd pass by a tutorial.

Portage offers a clean way to include patches into ebuilds (which is essentially the same as PKGBUILDs in Arch). We want to copy these into /etc/portage/patches/${category}/${package}. Make sure portage has read access to these files, at the very least.

We are lucky the ebuild for glfw injects patches without having to do anything else. This is a convention most packages follow.

Before you begin, make sure the USE flag for glfw includes wayland-only, as otherwise you'd be running XWayland. Yikes. Do this in your preferred manner, I suggest adding media-libs/glfw wayland-only to /etc/portage/package.use/minecraft.use.

The next step is trivial: copy the files from this repository into the directory you created, and rebuild.

mkdir -p /etc/portage/patches/media-libs/glfw
git clone https://github.com/Admicos/minecraft-wayland.git /etc/portage/patches/media-libs/glfw
emerge -1 glfw

Done :)

Note: Minecraft 1.17 and above require Java 16, which requires an overlay in Gentoo, since officially Gentoo is still stuck at Java8 for some weird reason.

I added 2xsaiko with layman -a 2xsaiko and installed it with emerge openjdk:16

@Admicos
Copy link
Owner

Admicos commented Nov 1, 2021

I linked to this issue in the README. Just like in the other distro-specific issues I'll keep this open for discussion.

@mazunki
Copy link
Contributor Author

mazunki commented Nov 1, 2021

A month and so has passed since I made that comment. Gentoo's official repositories have since (finally!) updated to Java 17 on the premise that it's LTS :)
No need to use overlays anymore!

@dtrauma
Copy link

dtrauma commented Jul 10, 2023

glfw now has native wayland support in Gentoo, so no patch downloading, but you still have to choose on compile time with a use flag:

wayland-only : Enable wayland support and disable X11 support

@ZerdoX-x
Copy link

@dtrauma nah, I had to patch anyway because of the "focus" error.

Though these patches are not compatible with gentoo, patches are failing. If anyone trying to make it work: see #54 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants