hyprland-wiki icon indicating copy to clipboard operation
hyprland-wiki copied to clipboard

Installation: improve FreeBSD instructions for Manual Build

Open jbeich opened this issue 1 year ago • 12 comments

jbeich avatar Apr 25 '23 15:04 jbeich

huh why is cmake linux only?

vaxerski avatar Apr 25 '23 16:04 vaxerski

huh why is cmake linux only?

I've dropped 2ec125b41299 in favor of https://github.com/hyprwm/Hyprland/pull/2209

jbeich avatar May 01 '23 21:05 jbeich

@jbeich has anything changed since 4 months ago?

fufexan avatar Aug 11 '23 17:08 fufexan

Not much:

  • Both CMake and Meson (from this PR) instructions still work
  • FreeBSD 13.3/14.0 haven't been released yet, so building with GCC is still easier

105b55239eba added meson subprojects update --reset but it's broken outside of Nix:

$ git clone https://github.com/hyprwm/Hyprland
$ cd Hyprland
$ meson subprojects update --reset
Updating udis86...
  -> Cannot update subproject with no wrap file
Updating tracy...
  -> Cannot update subproject with no wrap file
Updating hyprland-protocols...
  -> Cannot update subproject with no wrap file
Initialized empty Git repository in /tmp/Hyprland/subprojects/wlroots/.git/
remote: Enumerating objects: 480, done.
remote: Counting objects: 100% (480/480), done.
remote: Compressing objects: 100% (466/466), done.
remote: Total 480 (delta 27), reused 160 (delta 5), pack-reused 0
Receiving objects: 100% (480/480), 773.01 KiB | 300.00 KiB/s, done.
Resolving deltas: 100% (27/27), done.
From https://gitlab.freedesktop.org/wlroots/wlroots
 * branch            c74f89d4f84bfed0284d3908aee5d207698c70c5 -> FETCH_HEAD
HEAD is now at c74f89d Avoid using memcpy() to copy structs
Applying diff file "wlroots-meson-build.patch"
Updating wlroots...
  -> c74f89d (grafted, HEAD) Avoid using memcpy() to copy structs [Simon Ser]

$ meson setup build
$ meson compile -C build
[...]
../subprojects/wlroots/include/wlr/render/egl.h:19:10: fatal error: 'wlr/config.h' file not found
#include <wlr/config.h>
         ^~~~~~~~~~~~~~

$ find . -name config.h
./build/subprojects/wlroots/include/wlroots/config.h
./build/subprojects/wlroots/include/config.h
$ find . -name wlr
./subprojects/wlroots/include/wlr
./subprojects/wlroots/include/wlr/wlr
$ readlink ./subprojects/wlroots/include/wlr/wlr
/tmp/Hyprland/subprojects/wlroots/include/wlr

$ cat subprojects/packagefiles/wlroots-meson-build.patch
[...]
-install_subdir('wlr',
+install_subdir('wlroots',
[...]

jbeich avatar Aug 11 '23 21:08 jbeich

but it's broken outside of Nix

Can I fix it somehow or is it better to just not use meson subprojects?

fufexan avatar Aug 12 '23 11:08 fufexan

Better remove wlroots.wrap. It's not consistent with other subprojects (e.g., hyprland-protocols, udis86) or CMake support.

Downstream I use git submodule instead of meson subprojects and system wlroots (a la Nix), so don't need synthetic soversion bump.

jbeich avatar Nov 10 '23 13:11 jbeich

Alright, I'll remove it soon (unless I forget).

fufexan avatar Nov 10 '23 21:11 fufexan

Is there anything left to do in this PR or is it ready? @jbeich

fufexan avatar Jan 31 '24 12:01 fufexan

Tested both Meson and CMake instructions - still good.

jbeich avatar Jan 31 '24 12:01 jbeich

Wait, --skip-subprojects may be wrong for the plugin API.

jbeich avatar Jan 31 '24 12:01 jbeich

Is there anything that can be done on the meson side, so we don't have to include all the commands here? The wlroots.wrap file used to patch the subproject so it properly installed headers, but now I don't know of a better approach.

fufexan avatar Jan 31 '24 13:01 fufexan

I've dropped Meson workaround and rebased after aquamarine switch.

jbeich avatar Sep 21 '24 15:09 jbeich