From 1a4ed19cb577852a7f4262bfe856f286ff473835 Mon Sep 17 00:00:00 2001 From: Jan Pokorný Date: Jun 23 2019 09:02:05 +0000 Subject: 0.6.0-1 - Updated to version 0.6.0 (see https://github.com/swaywm/wlroots/releases/tag/0.6.0) - Overhaul dependencies and shipped examples in -devel Signed-off-by: Jan Pokorný --- diff --git a/examples.meson.build b/examples.meson.build new file mode 100644 index 0000000..99efc58 --- /dev/null +++ b/examples.meson.build @@ -0,0 +1,89 @@ +project( + 'wlroots-examples', + 'c', + meson_version: '>=0.48.0', + default_options: [ + 'c_std=c11', + 'warning_level=2', + 'werror=false', + ], +) + +cc = meson.get_compiler('c') +add_global_arguments('-DWLR_USE_UNSTABLE', language : 'c') + +wlroots = dependency('wlroots') +wayland_client = dependency('wayland-client') +wayland_server = dependency('wayland-server') +glesv2 = dependency('glesv2') +xkbcommon = dependency('xkbcommon') + +wlr_protos = dependency('wlroots') +rt = cc.find_library('rt') + +# epoll is a separate library in FreeBSD +if host_machine.system() == 'freebsd' + libepoll = [dependency('epoll-shim')] +else + libepoll = [] +endif + +libpng = dependency('libpng', required: false) + +# Small hack until https://github.com/mesonbuild/meson/pull/3386/ is merged +foreach dep : ['libpng'] + if not get_variable(dep).found() + set_variable(dep, disabler()) + endif +endforeach + +examples = { + 'simple': { + 'src': 'simple.c', + 'dep': [wlroots, wayland_server, glesv2, xkbcommon], + }, + 'pointer': { + 'src': 'pointer.c', + 'dep': [wlroots, wayland_server, xkbcommon], + }, + 'touch': { + 'src': ['touch.c', 'cat.c'], + 'dep': [wlroots, wayland_server, xkbcommon], + }, + 'tablet': { + 'src': 'tablet.c', + 'dep': [wlroots, wayland_server, xkbcommon], + }, + 'rotation': { + 'src': ['rotation.c', 'cat.c'], + 'dep': [wlroots, wayland_server, xkbcommon], + }, + 'multi-pointer': { + 'src': 'multi-pointer.c', + 'dep': [wlroots, wayland_server, glesv2, xkbcommon], + }, + 'output-layout': { + 'src': ['output-layout.c', 'cat.c'], + 'dep': [wlroots, wayland_server, xkbcommon], + }, + 'screencopy': { + 'src': 'screencopy.c', + 'dep': [libpng, wayland_client, wlr_protos, rt], + }, +} + +foreach name, info : examples + all_dep_found = true + foreach d : info.get('dep') + all_dep_found = all_dep_found and d.found() + endforeach + if all_dep_found + executable( + name, + info.get('src'), + dependencies: info.get('dep'), + ) + else + warning('Dependencies not satisfied for ' + name) + endif +endforeach diff --git a/sources b/sources index 78964d9..063af68 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wlroots-0.5.0.tar.gz) = 4defecff91a6179d3a6b7d05c92c14b20c7fa69263a889869912e913a5d1e29f9fd4684f9816b03e2427a21c004d64236f35d8282e02e8d27d826442f1f8b3a7 +SHA512 (wlroots-0.6.0.tar.gz) = c205d4303a381e11ef2f4db2faac1ddf9ad85c675824aae9cfe62d9f8bd313f1568d4810db1d006416783b50c8364198648a46d1ba453a0d8f659d6920618286 diff --git a/wlroots.spec b/wlroots.spec index 94d09e2..70ecb41 100644 --- a/wlroots.spec +++ b/wlroots.spec @@ -1,4 +1,4 @@ -%global commit 0.5.0 +%global commit 0.6.0 %global gitdate %{nil} %global gitrel %{nil} %global gitver %{nil} @@ -8,46 +8,82 @@ #global gitver -#{gitdate}git#{scommit} -%global api_ver 2 +%global api_ver 3 Name: wlroots -Version: 0.5.0 -Release: 2%{?gitrel}%{?dist} +Version: 0.6.0 +Release: 1%{?gitrel}%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but -# - LGPL (v2.1 or later) +# - LGPLv2.1+ # * protocol/idle.xml # * protocol/server-decoration.xml # Those files are processed to C-compilable files by the -# `wayland-scanner` binary during build and don't alter the -# main license of the binaries linking with them by the -# underlying licenses. +# `wayland-scanner` binary during build and don't alter +# the main license of the binaries linking with them by +# the underlying licenses. + License: MIT URL: https://github.com/swaywm/%{name} Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{version}%{?gitver}.tar.gz - +# this file is a modification of examples/meson.build so as to: +# - make it self-contained +# - only has targets for examples known to compile well (cf. "examples) global) +Source1: examples.meson.build BuildRequires: gcc -BuildRequires: libcap-devel -BuildRequires: libinput-devel -BuildRequires: libpng -BuildRequires: libxkbcommon-devel -BuildRequires: mesa-libEGL-devel -BuildRequires: mesa-libGLES-devel -BuildRequires: mesa-libgbm-devel -BuildRequires: mesa-libwayland-egl-devel -BuildRequires: meson -BuildRequires: pixman-devel -BuildRequires: systemd-devel -BuildRequires: wayland-devel -BuildRequires: wayland-protocols-devel -BuildRequires: xcb-util-image-devel -BuildRequires: xcb-util-wm-devel +BuildRequires: meson >= 0.48.0 # patch application #BuildRequires: git +BuildRequires: pkgconfig(freerdp2) +# freerdp-devel +BuildRequires: pkgconfig(libcap) +# libcap-devel +BuildRequires: pkgconfig(libdrm) >= 2.4.95 +# libdrm-devel >= 2.4.95 +# # transitively: mesa-libEGL-devel +BuildRequires: pkgconfig(libinput) >= 1.9.0 +# libinput-devel >= 1.9.0 +BuildRequires: pkgconfig(winpr2) +# libwinpr-devel +BuildRequires: pkgconfig(xkbcommon) +# libxkbcommon-devel +# # transitively: freerdp-devel +BuildRequires: pkgconfig(egl) +# mesa-libEGL-devel +BuildRequires: pkgconfig(glesv2) +BuildRequires: pkgconfig(gbm) >= 17.1.0 +# mesa-libgbm-devel >= 17.1.0 +BuildRequires: pkgconfig(pixman-1) +# pixman-devel +BuildRequires: pkgconfig(libudev) +# systemd-devel +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-server) >= 1.16 +# wayland-devel >= 1.16 +# # transitively: freerdp-devel +BuildRequires: pkgconfig(wayland-protocols) >= 1.17 +# wayland-protocols-devel >= 1.17 +BuildRequires: pkgconfig(xcb-icccm) +# xcb-util-wm-devel + +# these are for examples only: +#BuildRequires: pkgconfig(libpng) +# libpng +# for: examples/screencopy +#BuildRequires: libavcoded libavformat libavutil +# not in Fedora +# for: examples/dmabuf-capture + + +# only select examples are supported for being readily compilable (see SOURCE1) +%global examples %{nil \ +} cat multi-pointer output-layout pointer rotation screencopy simple tablet touch + + %description %{summary}. @@ -56,14 +92,19 @@ BuildRequires: xcb-util-wm-devel Summary: Development files for %{name} Requires: %{name}%{?_isa} == %{version}-%{release} -Requires: libinput-devel%{?_isa} -Requires: libxcb-devel%{?_isa} -Requires: libxkbcommon-devel%{?_isa} -Requires: mesa-libEGL-devel%{?_isa} -Requires: pixman-devel%{?_isa} -Requires: systemd-devel%{?_isa} -Requires: wayland-devel%{?_isa} Requires: xcb-util-wm-devel%{?_isa} +# these dependencies are fulfilled with automatic "pkgconfig(*)") +#Requires: libinput-devel#{?_isa} >= 1.9.0 +#Requires: libxkbcommon-devel${?_isa} +#Requires: mesa-libEGL-devel${?_isa} +#Requires: pixman-devel#{?_isa} +#Requires: systemd-devel#{?_isa} +#Requires: wayland-devel#{?_isa} >= 1.16 + +# for examples +Suggests: gcc +Suggests: libpng +Suggests: meson %description devel Development files for %{name}. @@ -88,8 +129,11 @@ Development files for %{name}. %meson_install # %%doc && examples. -%{__mkdir} -p %{buildroot}%{_pkgdocdir} -%{__cp} -pr README.md examples %{buildroot}%{_pkgdocdir} +%{__mkdir} -p %{buildroot}%{_pkgdocdir}/examples +%{__cp} -p README.md %{buildroot}%{_pkgdocdir} +examples=$(for e in %{examples}; do echo examples/$e.[ch]; done) +%{__cp} -p ${examples} %{buildroot}%{_pkgdocdir}/examples +%{__cp} -p %SOURCE1 %{buildroot}%{_pkgdocdir}/examples/meson.build %check @@ -111,6 +155,11 @@ Development files for %{name}. %changelog +* Thu May 09 2019 Jan Pokorný - 0.6.0-1 +- Updated to version 0.6.0 + (see https://github.com/swaywm/wlroots/releases/tag/0.6.0) +- Overhaul dependencies and shipped examples in -devel + * Tue Apr 16 2019 Adam Williamson - 0.5.0-2 - Rebuild with Meson fix for #1699099