File hyprland.spec of Package hyprland-legacyrenderer

# spec file for package hyprland
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2022/23 Florian "sp1rit" <>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%bcond_without devel

Name:           hyprland-legacyrenderer
Version:        0.31.0
Release:        0
Summary:        Dynamic tiling Wayland compositor, built for older GPUs
License:        BSD-3-Clause
Source0:        hyprland-%{version}.tar.xz
Patch1:         0002-fix-patched-wlroots-build.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++ >= 11
BuildRequires:  git
BuildRequires:  glslang-devel
BuildRequires:  jq
BuildRequires:  meson
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(gbm) >= 17.1.0
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(hwdata)
BuildRequires:  pkgconfig(libdisplay-info)
BuildRequires:  pkgconfig(libdrm) >= 2.4.113
BuildRequires:  pkgconfig(libinput) >= 1.14.0
BuildRequires:  pkgconfig(libseat) >= 0.2.0
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(pixman-1) >= 0.42.0
BuildRequires:  pkgconfig(vulkan) >= 1.2.182
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-protocols) >= 1.26
BuildRequires:  pkgconfig(wayland-scanner)
BuildRequires:  pkgconfig(wayland-server) >= 1.22
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-icccm)
BuildRequires:  pkgconfig(xcb-renderutil)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  pkgconfig(xwayland)
%if 0%{?suse_version}
BuildRequires:  Mesa-libGLESv3-devel
%bcond_without  xcb_errors
%bcond_with  xcb_errors
%if %{with xcb_errors}
BuildRequires:  pkgconfig(xcb-errors)
%if %{with devel}
Suggests:       %{name}-devel

Hyprland is a dynamic tiling Wayland compositor based on wlroots
that doesn't sacrifice on its looks.

It supports multiple layouts, fancy effects, has a very flexible IPC
model allowing for a lot of customization, and more.

%if %{with devel}
%package devel
Summary:        Files required to build Hyprland plugins
Requires:       %{name}

%description devel
This package contains the neccessary files that are required to
build plugins for hyprland.

tar -xJf %{_sourcedir}/hyprland-%{version}.tar.xz
mv hyprland-%{version} %{_builddir}/%{name}-%{version}
%autosetup -p1 -D
patch -p1 -d subprojects/wlroots/ < subprojects/packagefiles/wlroots-meson-build.patch

%meson \
	 -Dwlroots:xcb-errors=%{?with_xcb_errors:enabled}%{!?with_xcb_errors:disabled} \

%meson_install --tags runtime,man%{?with_devel:,devel}
%if %{with devel}
rm %{buildroot}/%{_libdir}/libwlroots.a %{buildroot}/%{_libdir}/pkgconfig/wlroots.pc

%license LICENSE
%dir %{_datadir}/wayland-sessions/
%dir %{_datadir}/xdg-desktop-portal

%if %{with devel}
%files devel

openSUSE Build Service is sponsored by