a23134
Summary:        The GNU Portable Threads library
a23134
Name:           pth
a23134
Version:        2.0.7
80a6d3
Release:        23%{?dist}
a23134
License:        LGPLv2+
a23134
Group:          System Environment/Libraries
a23134
URL:            http://www.gnu.org/software/pth/
a23134
Source:         ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz
a23134
Source1:        ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz.sig
a23134
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a23134
a23134
# Fedora customization, keep -g in the compiler options
a23134
Patch1:         pth-2.0.7-dont-remove-gcc-g.patch
a23134
# Fedora customization, fix arch-dependent conflicts in pth-config script
a23134
Patch2:         pth-2.0.7-config-script.patch
a23134
# Fedora customization, let build fail if running test_std fails
a23134
Patch3:         pth-2.0.7-test_std.patch
a23134
# bz 744740 / patch from Mikael Pettersson
a23134
Patch4: pth-2.0.7-linux3.patch
a23134
a23134
%description
a23134
Pth is a very portable POSIX/ANSI-C based library for Unix platforms
a23134
which provides non-preemptive priority-based scheduling for multiple
a23134
threads of execution ("multithreading") inside server applications.
a23134
All threads run in the same address space of the server application,
a23134
but each thread has it's own individual program-counter, run-time
a23134
stack, signal mask and errno variable.
a23134
a23134
%package devel
a23134
Summary:        Development headers and libraries for GNU Pth
a23134
Group:          Development/Libraries
a23134
Requires:       %{name}%{?_isa} = %{version}-%{release}
a23134
a23134
%description devel
a23134
Development headers and libraries for GNU Pth.
a23134
a23134
a23134
%prep
a23134
%setup -q
a23134
%patch1 -p1 -b .dont-remove-gcc-g
a23134
%patch2 -p1 -b .config-script
a23134
%patch3 -p1 -b .test_std
a23134
%patch4 -p1 -b .no-linux3
a23134
a23134
a23134
%build
a23134
OUR_CFLAGS="${RPM_OPT_FLAGS} -D_FILE_OFFSET_BITS=64"
a23134
a23134
%ifarch %{arm}
a23134
OUR_CFLAGS=$(echo "${OUR_CFLAGS}" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=0/g')
a23134
# guard
a23134
echo "${OUR_CFLAGS}" | grep FORTIFY_SOURCE=0
a23134
%endif
a23134
a23134
CFLAGS="${OUR_CFLAGS}"
a23134
%configure --disable-static ac_cv_func_sigstack='no'
a23134
a23134
# Work around multiarch conflicts in the pth-config script in order
a23134
# to complete patch2. Make the script choose between /usr/lib and
a23134
# /usr/lib64 at run-time.
a23134
if [ "%_libdir" == "/usr/lib64" ] ; then
a23134
    if grep -e '^pth_libdir="/usr/lib64"' pth-config ; then
a23134
        sed -i -e 's!^pth_libdir="/usr/lib64"!pth_libdir="/usr/lib"!' pth-config
a23134
    else
a23134
        echo "ERROR: Revisit the multiarch pth_libdir fixes for pth-config!"
a23134
        exit 1
a23134
    fi
a23134
fi
a23134
if [ -v OUR_CFLAGS ] && grep -e "${OUR_CFLAGS}" pth-config ; then
a23134
    # Remove our extra CFLAGS from the pth-config script, since they
a23134
    # don't belong in there.
a23134
    [ -n "${OUR_CFLAGS}" ] && sed -i -e "s!${OUR_CFLAGS}!!g" pth-config
a23134
else
a23134
    echo "ERROR: Revisit the multiarch CFLAGS fix for pth-config!"
a23134
    exit 1
a23134
fi
a23134
a23134
# this is necessary; without it make -j fails
a23134
make pth_p.h
a23134
make %{?_smp_mflags}
a23134
a23134
a23134
%check
a23134
make test
a23134
l=$($(pwd)/pth-config --libdir)
a23134
if [ "%{_libdir}" == "/usr/lib64" ]; then
a23134
    [ "$l" == "/usr/lib64" ]
a23134
fi
a23134
a23134
a23134
%install
a23134
rm -rf $RPM_BUILD_ROOT
a23134
make DESTDIR=${RPM_BUILD_ROOT} install
a23134
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
a23134
a23134
a23134
%clean
a23134
rm -rf $RPM_BUILD_ROOT
a23134
a23134
a23134
%post -p /sbin/ldconfig
a23134
a23134
%postun -p /sbin/ldconfig
a23134
a23134
a23134
%files
a23134
%defattr(-,root,root,-)
a23134
%doc ANNOUNCE AUTHORS COPYING ChangeLog HISTORY NEWS PORTING README
a23134
%doc SUPPORT TESTS THANKS USERS
a23134
%{_libdir}/*.so.*
a23134
a23134
%files devel
a23134
%defattr(-,root,root,-)
a23134
%doc HACKING
a23134
%{_bindir}/*
a23134
%{_includedir}/*
a23134
%{_libdir}/*.so
a23134
%{_mandir}/*/*
a23134
%{_datadir}/aclocal/*
a23134
a23134
a23134
%changelog
80a6d3
* Fri Aug 1 2014 Jeff Law <law@redhat.com>  - 2.0.7-23
80a6d3
- update pth-config for ppc64le
80a6d3
da7678
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.0.7-22
da7678
- Mass rebuild 2014-01-24
da7678
da7678
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.0.7-21
da7678
- Mass rebuild 2013-12-27
da7678
da7678
* Thu Nov 14 2013 Jeff Law <law@redhat.com>  - 2.0.7-20
da7678
- update pth-config for Aarch64
da7678
a23134
* Wed Feb 20 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-19
a23134
- Build with -D_FILE_OFFSET_BITS=64 to get stat64 in pth_high.c
a23134
- Guard the ARM CFLAGS sed substitution.
a23134
a23134
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-18
a23134
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a23134
a23134
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-17
a23134
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a23134
a23134
* Sat Jun 16 2012 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-16
a23134
- Apply Linux 3 configure check patch from Mikael Pettersson (#744740).
a23134
a23134
* Wed Jan  4 2012 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-15
a23134
- rebuild for GCC 4.7 as requested
a23134
a23134
* Wed Nov 16 2011 Dan Horák <dan[at]danny.cz> - 2.0.7-14
a23134
- update pth-config for s390x and sparc64
a23134
a23134
* Mon Oct 31 2011 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-13
a23134
- Let build fail if test_std fails.
a23134
- Fix previous commit, so pth-config CFLAGS check passes again.
a23134
a23134
* Mon Oct 31 2011 Chris Tyler <chris@tylers.info> - 2.0.7-12
a23134
- Removed FORTIFY_SOURCE for %%{arm} archs per Ajay Ramaswamy <ajayr@krithika.net>
a23134
- See https://bugzilla.redhat.com/show_bug.cgi?id=750243
a23134
a23134
* Fri Sep 16 2011 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-11
a23134
- Use %%_isa in -devel package dependency.
a23134
- Use %%_libdir not %%ifarch in %%check section.
a23134
a23134
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-10
a23134
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a23134
a23134
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-9
a23134
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a23134
a23134
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-8
a23134
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a23134
a23134
* Sat May 31 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-7
a23134
- Drop "|| :" from check section. It failed to build for mdomsch
a23134
  in Rawhide today.
a23134
a23134
* Fri Feb 08 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-6
a23134
- rebuilt for GCC 4.3 as requested by Fedora Release Engineering
a23134
a23134
* Sun Oct 21 2007 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-5
a23134
- Patch pth-config.
a23134
  This shall fix the multiarch conflict in pth-devel (#342961).
a23134
  It must not return -I/usr/include and -L/usr/{lib,lib64} either,
a23134
  since these are default search paths already.
a23134
- Replace the config.status CFLAGS sed expr with a patch.
a23134
a23134
* Tue Aug 21 2007 Michael Schwendt <mschwendt@fedoraproject.org>
a23134
- rebuilt
a23134
a23134
* Thu Aug  2 2007 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-2
a23134
- Clarify licence (LGPLv2+).
a23134
a23134
* Sat Nov 25 2006 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.7-1
a23134
- Update to 2.0.7 (very minor maintenance updates only).
a23134
a23134
* Mon Aug 28 2006 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.6-3
a23134
- rebuilt
a23134
a23134
* Mon May 22 2006 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.6-2
a23134
- Insert -g into CFLAGS after configure script removes it.
a23134
- Disable configure check for obsolete sigstack(), which segfaults.
a23134
a23134
* Thu Feb 16 2006 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.6-1
a23134
- Update to 2.0.6.
a23134
a23134
* Fri Oct  7 2005 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.5-1
a23134
- Update to 2.0.5.
a23134
- Don't build static archive.
a23134
a23134
* Fri May 13 2005 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.4-3
a23134
- rebuilt
a23134
a23134
* Thu Apr  7 2005 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.4-2
a23134
- rebuilt
a23134
a23134
* Thu Feb 24 2005 Michael Schwendt <mschwendt@fedoraproject.org> - 0:2.0.4-1
a23134
- Update to 2.0.4.
a23134
- Remove ancient changelog entries which even pre-date Fedora.
a23134
a23134
* Tue Dec 14 2004 Michael Schwendt <mschwendt@fedoraproject.org> - 0:2.0.3-1
a23134
- Update to 2.0.3, minor and common spec adjustments + LGPL, %%check,
a23134
  use URLs for official GNU companion sites.
a23134
a23134
* Thu Oct 07 2004 Adrian Reber <adrian@lisas.de> - 0:2.0.2-0.fdr.2
a23134
- iconv-ing spec to utf8
a23134
a23134
* Wed Oct 06 2004 Adrian Reber <adrian@lisas.de> - 0:2.0.2-0.fdr.1
a23134
- Update to 2.0.2 and current Fedora guidelines.
a23134
- added workaround for make -j problem
a23134
a23134
* Sat Mar 22 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0.0-0.fdr.1
a23134
- Update to 2.0.0 and current Fedora guidelines.
a23134
- Exclude %%{_libdir}/*.la
a23134
a23134
* Fri Feb  7 2003 Ville Skyttä <ville.skytta at iki.fi> - 1.4.1-1.fedora.1
a23134
- First Fedora release, based on Ryan Weaver's work.
a23134
- Move (most of) docs to main package.
a23134