Files
perl-X11-Xlib/perl-X11-Xlib.spec
2025-08-12 18:18:32 +02:00

103 lines
3.6 KiB
RPMSpec

#
# spec file for package perl-X11-Xlib
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
%define cpan_name X11-Xlib
Name: perl-X11-Xlib
Version: 0.250.0
Release: 0
%define cpan_version 0.25
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Low-level access to the X11 library
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/N/NE/NERDVANA/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Devel::CheckLib) >= 1.03
BuildRequires: perl(ExtUtils::Depends) >= 0.405
BuildRequires: perl(Try::Tiny)
Requires: perl(Try::Tiny)
Provides: perl(X11::Xlib) = 0.250.0
Provides: perl(X11::Xlib::Colormap) = 0.250.0
Provides: perl(X11::Xlib::Display) = 0.250.0
Provides: perl(X11::Xlib::GC)
Provides: perl(X11::Xlib::Keymap) = 0.250.0
Provides: perl(X11::Xlib::Opaque) = 0.250.0
Provides: perl(X11::Xlib::Pixmap) = 0.250.0
Provides: perl(X11::Xlib::Screen) = 0.250.0
Provides: perl(X11::Xlib::Struct) = 0.250.0
Provides: perl(X11::Xlib::Visual)
Provides: perl(X11::Xlib::Window) = 0.250.0
Provides: perl(X11::Xlib::XEvent) = 0.250.0
Provides: perl(X11::Xlib::XID) = 0.250.0
Provides: perl(X11::Xlib::XKeyboardState)
Provides: perl(X11::Xlib::XRectangle)
Provides: perl(X11::Xlib::XRenderPictFormat)
Provides: perl(X11::Xlib::XSetWindowAttributes)
Provides: perl(X11::Xlib::XSizeHints)
Provides: perl(X11::Xlib::XVisualInfo)
Provides: perl(X11::Xlib::XWindowAttributes)
Provides: perl(X11::Xlib::XWindowChanges)
Provides: perl(X11::Xlib::XserverRegion) = 0.250.0
%undefine __perllib_provides
%{perl_requires}
# MANUAL BEGIN
BuildRequires: gcc glibc-devel pkgconfig
BuildRequires: libX11-devel
BuildRequires: libXtst-devel
BuildRequires: xvfb-run
# MANUAL END
%description
This module provides low-level access to Xlib functions.
This includes access to some X11 extensions like the X11 test library
(Xtst).
If you import the Xlib functions directly, or call them as methods on an
instance of X11::Xlib, you get a near-C experience where you are required
to manage the lifespan of resources, XIDs are integers instead of objects,
and the library does not make any attempt to keep you from passing bad data
to Xlib.
If you instead create a X11::Xlib::Display object and call all your methods
on that, you get a more friendly wrapper around Xlib that helps you manage
resource lifespan, wraps XIDs with perl objects, and does some sanity
checking on the state of the library when you call methods.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%make_build
%check
xvfb-run -a %{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README
%changelog