#
# spec file for package libXext
#
# 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/
#


Name:           libXext
%define lname	libXext6
Version:        1.3.6
Release:        1.2
Summary:        Common extensions to the X11 protocol
License:        MIT
Group:          Development/Libraries/C and C++
URL:            http://xorg.freedesktop.org/

#Git-Clone:	git://anongit.freedesktop.org/xorg/lib/libXext
#Git-Web:	http://cgit.freedesktop.org/xorg/lib/libXext/
Source:         http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.xz
Source1:        baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#git#BuildRequires:	autoconf >= 2.60, automake, libtool
BuildRequires:  fdupes
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(x11) >= 1.1.99.1
BuildRequires:  pkgconfig(xextproto) >= 7.1.99
BuildRequires:  pkgconfig(xorg-macros) >= 1.12
BuildRequires:  pkgconfig(xproto) >= 7.0.13

%description
The Xext library contains a handful of X11 extensions:
- Double Buffer extension (DBE/Xdbe)
- Display Power Management Signaling (DPMS) extension
- X11 Nonrectangular Window Shape extension (Xshape)
- The MIT Shared Memory extension (MIT-SHM/Xshm)
- TOG-CUP (colormap utilization policy) protocol extension (Xcup)
- X Extended Visual Information extension (XEvi)
- X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf)

%package -n %lname
Summary:        Common extensions to the X11 protocol
# O/P added for 12.2
Group:          System/Libraries
Provides:       xorg-x11-libXext = 7.6_%version-%release
Obsoletes:      xorg-x11-libXext < 7.6_%version-%release

%description -n %lname
The Xext library contains a handful of X11 extensions:
- Double Buffer extension (DBE/Xdbe)
- Display Power Management Signaling (DPMS) extension
- X11 Nonrectangular Window Shape extension (Xshape)
- The MIT Shared Memory extension (MIT-SHM/Xshm)
- TOG-CUP (colormap) protocol extension (Xcup)
- X Extended Visual Information extension (XEvi)
- X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf)

%package devel
Summary:        Development files for the X11 Common Extensions library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version
# O/P added for 12.2
Provides:       xorg-x11-libXext-devel = 7.6_%version-%release
Obsoletes:      xorg-x11-libXext-devel < 7.6_%version-%release

%description devel
The Xext library contains a handful of X11 extensions:
- Double Buffer extension (DBE/Xdbe)
- Display Power Management Signaling (DPMS) extension
- X11 Nonrectangular Window Shape extension (Xshape)
- The MIT Shared Memory extension (MIT-SHM/Xshm)
- TOG-CUP (colormap) protocol extension (Xcup)
- X Extended Visual Information extension (XEvi)
- X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf)

This package contains the development headers for the library found
in %lname.

%prep
%setup -q

%build
%configure --docdir=%_docdir/%name --disable-static
make %{?_smp_mflags}

%install
make install DESTDIR="%buildroot"
rm -f "%buildroot/%_libdir"/*.la
%fdupes %buildroot/%_prefix

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%_libdir/libXext.so.6*

%files devel
%defattr(-,root,root)
%_includedir/X11/*
%_libdir/libXext.so
%_libdir/pkgconfig/xext.pc
%_mandir/man3/*
%_docdir/%name

%changelog
* Mon Feb  5 2024 Stefan Dirsch <sndirsch@suse.com>
- Update to version 1.3.6
  * Wrap Xext*CheckExtension() in do { ... } while(0)
  * configure: raise minimum autoconf requirement to 2.70
  * configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
  * _xgeGetExtensionVersion should not free info on failure
  * Check for malloc failure in _xgeGetExtensionVersion
  * _xgeDpyClose: handle NULL return from _xgeFindDisplay
  * XEVI: fix -Walloc-size
* Sat Oct 29 2022 Stefan Dirsch <sndirsch@suse.com>
- Update to version 1.3.5
  * Fix spelling/wording issues
  * gitlab CI: add a basic build test
  * Xge.c, Xge.h: convert from ISO-8859-1 to UTF-8
  * Add extutilP.h header for xgeExtRegister() prototype
  * Remove unnecessary casts of malloc/calloc results
  * Remove unnecessary (char *) casts from Xfree() arguments
  * Use calloc instead of malloc if we may not initialize all the bytes
  * Import reallocarray() from libX11
  * Convert calls to Xmalloc arrays to use Xmallocarray instead
  * configure: Use AC_USE_SYSTEM_EXTENSIONS to set GNU_SOURCE & other defines
  * Remove "All rights reserved" from Oracle copyright notices.
  * COPYING: Add info for Xge.* and reallocarray.* files
  * add ACLOCAL_AMFLAGS = -I m4 to make aclocal pick ax_gcc_builtin.m4
* Thu Mar 21 2019 Stefan Dirsch <sndirsch@suse.com>
- Update to version 1.3.3
  * autogen: add default patch prefix
  * autogen.sh: use quoted string variables
  * autogen.sh: use exec instead of waiting for configure to finish
  * Update configure.ac bug URL for gitlab migration
  * Assert that values buffer has enough room for provided values
  * Fix typos in man pages
  * Use __builtin_popcountl if available to replace Ones() in XSecurity.c
  * Add description of libXext to README.md
  * XSecurityGenerateAuthorization: Allocate enough space in values buffer
  * Update README for gitlab migration
* Thu Jul 24 2014 sndirsch@suse.com
- added baselibs.conf as source to specfile
* Thu Jul 24 2014 sndirsch@suse.com
- Update to version 1.3.3
  * Time for a release before the accumulated patches are old
    enough to vote.  Two new requirements: libX11 1.6 and a C89
    preprocessor.
* Sat Jun  1 2013 tobias.johannes.klausmann@mni.thm.de
- Update to version 1.3.2:
  This release provides fixes for the recently announced security issue
  CVE-2013-1982, as well as build configuration improvements, man page
  macro cleanups to work better with doclifter, and several other small
  fixes.
* Sun Feb 17 2013 jengelh@inai.de
- Use more robust make install call
- Avoid calling fdupes outside of /usr
* Thu Apr 12 2012 vuntz@opensuse.org
- Update to version 1.3.1:
  + Fixes for compiler warnings
  + Improvements to formattings for all the included extension API
    specs
  + Improvements to the documentation
- Changes from version 1.3.0:
  + New API functions to support the Fence Sync Objects added in
    Sync extension version 3.1
  + Redefine the return values of several MIT-SHM API calls from
    Status (#define Status int) to Bool (typedef int Bool) to
    clarify the expected interpretation of the return values
  + Fix build issues
  + Documentation improvements
  + Build system improvements
* Sat Feb 11 2012 jengelh@medozas.de
- Rename xorg-x11-libXext to libXext and utilize shlib policy
* Sat Feb  4 2012 jengelh@medozas.de
- Remove apparently unused (Build)Requires on Xdmcp, xtrans
- Remove redundant tags/sections like %%clean
  (see specfile guidelines)
- Parallel build with %%_smp_mflags
* Tue Dec 21 2010 sndirsch@novell.com
- bumped version number to 7.6_1.2.0
* Thu Oct 28 2010 sndirsch@novell.com
- libXext 1.2.0
  * This release of the catchall library for the X11 extensions
    without their own libraries adds documentation for many more
    of the extension API's, in the form of the documents formerly
    delivered in xorg-docs, now moved here and translated from a
    variety of formats to DocBook/XML.
* Sat Sep  4 2010 sndirsch@novell.com
- update to release 1.1.2
- bumped version number to 7.5_1.1.2
- make use of %%fdupes macro
- fixed Summary/Group entries in -devel package
* Fri Apr  2 2010 sndirsch@suse.de
- bumped version number to 7.5
* Thu Jan 14 2010 ro@suse.de
- update to 1.1.1 (needed for xserver 1.7)
* Fri Jan  1 2010 sndirsch@suse.de
- libXext-commit-8a91fc6.diff:
  * Silence "Generic Event Extension missing on display" warning
    (bnc #567828)
* Mon Dec 14 2009 jengelh@medozas.de
- add baselibs.conf as a source
* Fri May  1 2009 eich@suse.de
- revert static library and .la file removal
  for SUSE versions <= 11.1.
* Tue Apr 21 2009 crrodriguez@suse.de
- remove static libraries and "la" files
* Sun Mar  1 2009 sndirsch@suse.de
- libXext 1.0.5
* Thu Sep 11 2008 sndirsch@suse.de
- bumped release number to 7.4
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Fri Feb 29 2008 sndirsch@suse.de
- libXext 1.0.4
  * Coverity #467: security_error_list has fewer than
    XSecurityNumberErrors
* Wed Dec 26 2007 crrodriguez@suse.de
- fix library-without-ldconfig-postun warning
* Sat Sep 29 2007 sndirsch@suse.de
- bumped version to 7.3
* Fri Jan 26 2007 sndirsch@suse.de
- updated to release 1.0.3
  * Add XShm.man and aliases to Makefile.am
  * Man page spelling/typo fixes
  * Replace static ChangeLog with dist-hook to generate from git log
  * Sun bug 4985712: man pages needed for MIT-SHM extension functions
* Sat Oct 14 2006 sndirsch@suse.de
- updated to X.Org 7.2RC1
* Wed Aug  2 2006 sndirsch@suse.de
- fix setup line
* Fri Jul 28 2006 sndirsch@suse.de
- use "-fno-strict-aliasing"
* Thu Jul 27 2006 sndirsch@suse.de
- use $RPM_OPT_FLAGS
* Thu Jun 22 2006 sndirsch@suse.de
- created package