From a9cca739a7920de9fe54d5173be28ca2acc95905 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 05:27:55 +0100 Subject: [PATCH] posttrans: remove references to libpthread-stubs.la in %{_libdir}/*.la files [release 0.3-3mamba;Sun Jan 19 2014] --- README.md | 4 +++ libpthread-stubs.spec | 83 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 libpthread-stubs.spec diff --git a/README.md b/README.md index e88bfb6..a8d8f7f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # libpthread-stubs +This library provides weak aliases for pthread functions not provided in libc or otherwise available by default. +Libraries like libxcb rely on pthread stubs to use pthreads optionally, becoming thread-safe when linked to libpthread, while avoiding any performance hit when running single-threaded. libpthread-stubs supports this behavior even on platforms which do not supply all the necessary pthread stubs. +On platforms which already supply all the necessary pthread stubs, this package ships only the pkg-config file pthread-stubs.pc, to allow libraries to unconditionally express a dependency on pthread-stubs and still obtain correct behavior. + diff --git a/libpthread-stubs.spec b/libpthread-stubs.spec new file mode 100644 index 0000000..186ed74 --- /dev/null +++ b/libpthread-stubs.spec @@ -0,0 +1,83 @@ +Name: libpthread-stubs +Version: 0.3 +Release: 3mamba +Summary: This library provides weak aliases for pthread functions not provided in libc +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://xcb.freedesktop.org +Source: http://xcb.freedesktop.org/dist/libpthread-stubs-%{version}.tar.bz2 +License: MIT +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +This library provides weak aliases for pthread functions not provided in libc or otherwise available by default. +Libraries like libxcb rely on pthread stubs to use pthreads optionally, becoming thread-safe when linked to libpthread, while avoiding any performance hit when running single-threaded. libpthread-stubs supports this behavior even on platforms which do not supply all the necessary pthread stubs. +On platforms which already supply all the necessary pthread stubs, this package ships only the pkg-config file pthread-stubs.pc, to allow libraries to unconditionally express a dependency on pthread-stubs and still obtain correct behavior. + +%package devel +Summary: Devel package for %{name} +Group: Development/Libraries +Provides: %{name} +Obsoletes: %{name} + +%description devel +This library provides weak aliases for pthread functions not provided in libc or otherwise available by default. +Libraries like libxcb rely on pthread stubs to use pthreads optionally, becoming thread-safe when linked to libpthread, while avoiding any performance hit when running single-threaded. libpthread-stubs supports this behavior even on platforms which do not supply all the necessary pthread stubs. +On platforms which already supply all the necessary pthread stubs, this package ships only the pkg-config file pthread-stubs.pc, to allow libraries to unconditionally express a dependency on pthread-stubs and still obtain correct behavior. + +This package contains static libraries and header files need for development. + +%prep +%setup -q + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%posttrans devel +if [ $1 -ge 1 ]; then + sed -i "s|%{_libdir}/libpthread-stubs.la||" %{_libdir}/*.la +fi +: + +%files devel +%defattr(-,root,root) +%{_libdir}/pkgconfig/*.pc +%doc COPYING README + +%changelog +* Sun Jan 19 2014 Silvan Calarco 0.3-3mamba +- posttrans: remove references to libpthread-stubs.la in %{_libdir}/*.la files + +* Fri Jan 17 2014 Silvan Calarco 0.3-2mamba +- libpthread-strubs-devel: don't require libpthread-stubs + +* Sat May 08 2010 Automatic Build System 0.3-1mamba +- automatic update by autodist + +* Sat Oct 10 2009 Silvan Calarco 0.2-2mamba +- devel package: don't obsolete main package + +* Tue Sep 29 2009 Automatic Build System 0.2-1mamba +- automatic update by autodist + +* Sat Jun 21 2008 Silvan Calarco 0.1-3mamba +- correct obsolete for libpthread-stubs + +* Fri Jun 20 2008 Silvan Calarco 0.1-2mamba +- specfile updated +- removed libpthread-stubs package and obsoleted by libpthread-stubs-devel + +* Wed Feb 07 2007 Silvan Calarco 0.1-1qilnx +- package created by autospec