File libnvidia-egl-wayland2.spec of Package libnvidia-egl-wayland2
#
# spec file for package libnvidia-egl-wayland
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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 https://bugs.opensuse.org/
#
%global commit0 295712b113d5863ca2de0feeac478c73965c5dfd
%global date 20251018
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
#global tag %%{version}
%define so_ver 1
%define lname libnvidia-egl-wayland2%{so_ver}
%define rname egl-wayland2
Name: libnvidia-egl-wayland2
Version: 1.0.1%{!?tag:~%{date}git%{shortcommit0}}
Release: 0
Summary: Dma-buf-based Wayland external platform library
# src/wayland/dma-buf.h is GPL 2, rest is Apache 2.0
License: Apache-2.0 and GPL-2.0
URL: https://github.com/NVIDIA/egl-wayland2
Group: Development/Libraries/C and C++
%if 0%{?tag:1}
Source0: %{url}/archive/%{version}/%{rname}-%{version}.tar.gz
%else
Source0: %{url}/archive/%{commit0}/%{rname}-%{shortcommit0}.tar.gz
%endif
Source1: baselibs.conf
BuildRequires: Mesa-libGL-devel
BuildRequires: gcc-c++
BuildRequires: meson >= 0.50
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(eglexternalplatform) >= 1.1
BuildRequires: pkgconfig(gbm) >= 21.2.0
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-egl-backend) >= 3
BuildRequires: pkgconfig(wayland-protocols) >= 1.34
BuildRequires: pkgconfig(wayland-scanner)
BuildRequires: pkgconfig(wayland-server)
%description
This is a new implementation of the EGL External Platform Library for Wayland
(EGL_KHR_platform_wayland), using the NVIDIA driver's new platform surface
interface, which simplifies a lot of the library and improves window resizing.
%package -n %{lname}
Summary: Dma-buf-based Wayland external platform library
Group: System/Libraries
%description -n %{lname}
This is a new implementation of the EGL External Platform Library for Wayland
(EGL_KHR_platform_wayland), using the NVIDIA driver's new platform surface
interface, which simplifies a lot of the library and improves window resizing.
%prep
%if 0%{?tag:1}
%autosetup -p1
%else
%autosetup -p1 -n %{rname}-%{commit0}
%endif
%build
export LDFLAGS="-Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro %{?_lto_cflags}"
%meson
%meson_build
%install
%meson_install
rm -f %{buildroot}%{_libdir}/libnvidia-egl-wayland2.so
%ldconfig_scriptlets -n %{lname}
%files -n %{lname}
%license LICENSE
%doc README.md
%{_libdir}/libnvidia-egl-wayland2.so.%{so_ver}*
%dir %{_datadir}/egl
%dir %{_datadir}/egl/egl_external_platform.d
%{_datadir}/egl/egl_external_platform.d/09_nvidia_wayland2.json
%changelog