File libapr1.spec of Package libapr1

#
# spec file for package libapr1
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           libapr1
%if %{?suse_version:1}0
BuildRequires:  doxygen
%endif
Url:            http://apr.apache.org/
License:        Other uncritical OpenSource License; The Apache Software License
Group:          Development/Libraries/Other
AutoReqProv:    on
# bug437293
%ifarch ppc64
Obsoletes:      libapr1-64bit
%endif
%ifarch  %ix86 ppc
Obsoletes:      libapr1-32bit
%endif
#
Version:        1.3.8
Release:        1
Summary:        Apache Portable Runtime (APR) Library
Source:         http://www.apache.org/dist/apr/apr-%{version}.tar.bz2
Patch1:         string-compare.diff
Patch2:         apr-1.2.8-pool-cleanups.patch
Patch3:         apr-1.3.0-testshm-apr_shm_remove.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define maketest 0
%define aprver 1
%define installbuilddir %{_libdir}/apr-%{aprver}/build
%define includedir %{_includedir}/apr-%{aprver}

%description
The mission of the Apache Portable Runtime (APR) project is to create
and maintain software libraries that provide a predictable and
consistent interface to underlying platform-specific implementations.
The primary goal is to provide an API to which software developers may
code and be assured of predictable if not identical behaviour
regardless of the platform on which their software is built, relieving
them of the need to code special-case conditions to work around or take
advantage of platform-specific deficiencies or features.

The APR is used by both Open Source and Commercial projects, prominent
examples being the Apache HTTP server.



Authors:
--------
    Too many to list here -- see /usr/share/doc/packages/apache2/ABOUT_APACHE

%package devel
License:        Other uncritical OpenSource License; The Apache Software License
Summary:        Apache Portable Runtime (APR) Library
Group:          Development/Libraries/Other
Requires:       libapr1 = %{version} glibc-devel
AutoReqProv:    on
# bug437293
%ifarch ppc64
Obsoletes:      libapr1-devel-64bit
%endif
%ifarch  %ix86 ppc
Obsoletes:      libapr1-devel-32bit
%endif
#

%description devel
The mission of the Apache Portable Runtime (APR) project is to create
and maintain software libraries that provide a predictable and
consistent interface to underlying platform-specific implementations.
The primary goal is to provide an API to which software developers may
code and be assured of predictable if not identical behaviour
regardless of the platform on which their software is built, relieving
them of the need to code special-case conditions to work around or take
advantage of platform-specific deficiencies or features.

The APR is used by both Open Source and Commercial projects, prominent
examples being the Apache HTTP server.



Authors:
--------
    Too many to list here -- see /usr/share/doc/packages/apache2/ABOUT_APACHE

%prep
%setup -n apr-%{version}
#%patch1
%if %{?build_with_memory_pool_debug:1}0
#patch2 -p1
%endif
#%patch3 -p1
#
# workaround for ugly bug 400488
# Xen kernel on sles9 x86_64 is set up to behave different than all other kernels
# skip sockets test on that platform
ls -l /lib/modules/ ||:
%if 0%{?sles_version} == 9
%ifarch x86_64
sed -i '/testsockets/ d' test/abts_tests.h
#sed -i '/testatomic/ d' test/abts_tests.h
%endif
%endif
#
# this test fails on sles9-x86_64, not only in Xen though.
# disable it for a moment to get packages for testing at least...
%if 0%{?sles_version} == 9
%ifarch x86_64
sed -i '/testatomic/ d' test/abts_tests.h
%endif
%endif

%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DLDAP_DEPRECATED -fPIC"
#
rm -rf aclocal.m4 autom4te*.cache
autoheader
autoconf
#
# --enable-pool-debug[=yes|no|verbose|verbose-alloc|lifetime|owner|all]
%configure \
	--with-installbuilddir=%{installbuilddir} \
	--includedir=%{includedir} \
%if %{?build_with_memory_pool_debug:1}0
	--enable-debug --enable-pool-debug=verbose \
%endif
%ifarch %ix86
%ifnarch i386
	--enable-nonportable-atomics=yes \
%endif
%endif
	--with-devrandom=/dev/urandom \
    --disable-static \
    --with-pic 
%{__make} %{?jobs:-j%jobs}
%if %{?suse_version:1}0
make dox
%endif

%install
make install DESTDIR=$RPM_BUILD_ROOT
%if %{?suse_version:1}0
# Move docs to more convenient location
mv docs/dox/html html
%endif
# Unpackaged files:
%{__rm} -f $RPM_BUILD_ROOT/%{_libdir}/apr.exp
%{__rm} -f %{buildroot}%{_libdir}/libapr-%{aprver}.la

%check
%ifnarch %arm
%if %maketest
%{__make} check
%endif
%endif

%clean
if ! test -f /.buildenv; then
	rm -rf $RPM_BUILD_ROOT
fi

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc CHANGES
%doc LICENSE
%doc NOTICE
%{_libdir}/libapr-%{aprver}.so.*

%files devel
%defattr(-,root,root)
%doc docs/APRDesign.html
%doc docs/canonical_filenames.html
%doc docs/incomplete_types
%doc docs/non_apr_programs
%if %{?suse_version:1}0
%doc --parents html
%endif
%doc emacs-mode
%{includedir}
%{_libdir}/libapr-%{aprver}.so
%{_bindir}/apr-%{aprver}-config
%{_libdir}/pkgconfig/apr-%{aprver}.pc
%{_libdir}/apr-%{aprver}


%changelog
* Mon Apr 15 2013 Holger Manthey <holger.manthey@bertelsmann.de>
- fallback to 1.3.8
* Wed Aug 12 2009 Holger Manthey <holger.amnthey@bertelsmann.de>
- update to 1.3.8
* Mon Nov 17 2008 ro@suse.de
- SLE-11 uses PPC64 instead of PPC, adapt baselibs.conf
* Fri Nov 14 2008 poeml@suse.de
- simplify the usage of the sles_version macro
* Thu Oct 30 2008 skh@suse.de
- obsolete old -XXbit packages (bnc#437293) (olh@suse.de)
* Tue Aug 19 2008 poeml@suse.de
- update to 1.3.3 final
  (updating to the release tarball, which has all the patches.)
* Sat Aug  9 2008 poeml@suse.de
- add apr-1.3.2-r684091.patch
  Backport r683771 from the trunk.
  Fix APR_PID_T_FMT detection on Solaris.
- rename apr-1.3.3-patch to apr-1.3.3.patch
* Thu Aug  7 2008 poeml@suse.de
- add post-1.3.2 patches (backports from trunk committed to the
  1.3.x branch)
  * ) Rename apr_pool_create_core to apr_pool_create_unmanaged and
    deprecate the old API name. It better reflects the scope and usage
    of this function. [Mladen Turk]
  * ) Use proper return code for fcntl-based apr_proc_mutex_trylock()
    on platforms that return EACCES instead of EAGAIN when the lock
    is already held (AIX, HP-UX).  [Eric Covener]
* Thu Aug  7 2008 poeml@suse.de
- update to 1.3.2. Changes:
  * ) Fix getservbyname_r() detection.  [Ruediger Pluem]
  * ) Fix win32 apr.hw to pick up XP/2003 TCP/IP multicast constants and
    revert to IPV6 disabled-by-default (a change present only in 1.3.0).
    [William Rowe]
  * ) Fix autoconf cached detection of atomic builtins.  [Jim Jagielski]
  * ) Use thread safe versions of getservbyname().  [Bojan Smojver]
  * ) Use thread safe getpass_r on Netware.  [Guenter Knauf]
* Thu Jul 17 2008 poeml@suse.de
- skip testatomic testcase on sles9-x86_64 for now
* Thu Jul 17 2008 poeml@suse.de
- workaround for ugly bug [bnc#400488]
  Xen kernel on sles9 x86_64 is set up to behave different than all
  other kernels
* Sun Jun 15 2008 poeml@suse.de
- update to 1.3.0. Changes, with non-Linux relevant portions
  omitted (see http://www.apache.org/dist/apr/CHANGES-APR-1.3 for
  complete list):
  * ) apr_getservbyname(): Use proper method for converting port
    to host byte order.  PR 44903.
    [Chris Taylor <ctaylor wadeford.plus.com>]
  * ) Use /dev/urandom in preference to /dev/random as entropy source
    for apr_generate_random_bytes.  PR 44881.  [Bojan Smojver]
  * ) Introduce apr_pool_pre_cleanup_register() for registering
    a cleanup that is called before any subpool is destroyed
    within apr_pool_clear or apr_pool_destroy.
    This allows to register a cleanup that will notify subpools
    about its inevitable destruction.
    [Mladen Turk]
  * ) Introduce apr_pool_create_core_ex() for creation of standalone
    pools without parent. This function should be used for short
    living pools, usually ones that are created and destroyed
    either in a loop or inside function call. Since the pools
    created with this function doesn't have a parent they must
    be explicitly destroyed when done.
    [Mladen Turk]
  * ) Fix return value when apr_pollset_poll interrupted.
    PR 42580 [Basant Kumar Kukreja <basant.kukreja sun.com>]
  * ) Fix the make test target in the spec file. [Graham Leggett]
  * ) Introduce apr_file_pipe_create_ex() to portably permit one pipe
    end or another to be entirely blocking for non-APR applications
    (e.g. stdio streams) and the other (or both ends) non blocking,
    with a timeout of 0 by default.
    [William Rowe]
  * ) Introduce APR_NO_FILE as an option to apr_procattr_io_set() for any
    of the three stdio streams to cause the corresponding streams to be
    closed to the child process.  This becomes effective in 1.3.0 across
    platforms (equivilant to APR_NO_PIPE in 1.2.x except on Win32.)
    [William Rowe]
  * ) Add table cloning (deep copy) convenience function.
    [Davi Arnaut]
  * ) Stop invoking the testshm* helpers upon 'make test' invocation.
    [Kurt Miller <kurt intricatesoftware.com>]
  * ) Register a cleanup only if APR_FILE_NOCLEANUP was not flagged in
    apr_file_mktemp. [Brian J. France <list firehawksystems.com>]
  * ) Discard file buffers when running cleanups for exec.
    PR 41119.  [Davi Arnaut <davi haxent.com.br>, Bojan Smojver]
  * ) Improve thread safety of assorted file_io functions.
    PR 42400.  [Davi Arnaut <davi haxent.com.br>]
  * ) Add the apr_pollcb API as an alternative more efficient method
    of polling sockets, compared to apr_pollset. [Paul Querna]
  * ) Fix possible crash in apr_pool_initialize() when built with
    verbose pool debugging.  PR 41063.
    [Peter Steiner <peter.steiner+apache hugwi.ch>]
  * ) Fix --disable-ipv6 build on platforms with getifaddrs().
    PR 39199.  [Joe Orton]
  * ) Portably check for EEXIST in mktemp code.  PR 40818
    [Kenneth Golomb <KGolomb TradeCard.com>]
  * ) Fix apr_socket_recvfrom() to ensure the peer's address is returned
    through the "from" parameter.  [Joe Orton]
  * ) Fix error checking in kqueue, epoll and event port versions of
    apr_pollset_create.  PR 40660, 40661, 40662
    [Larry Cipriani <lvc lucent.com>]
  * ) Add some documentation on the format matched by apr_fnmatch.
    [David Glasser <glasser mit.edu>]
  * ) Add apr_hash_clear.  [Daniel L. Rall <dlr apache.org>]
  * ) Don't try to build apr_app.c on MinGW.
    [Matthias Miller <Blog outofhanwell.com>]
  * ) Fix the timeout converstion in apr_pollset with the KQueue
    backend. [Marco Molteni <mmolteni cisco.com>]
  * ) Support MinGW.  [John Vandenberg, Justin Erenkrantz]
  * ) Implement apr_thread_yield on Unix in terms of pthread_yield or
    sched_yield. [Keisuke Nishida <keisuke.nishida gmail.com>]
  * ) Make apr_socket_recvfrom initialize the port field in the from
    sockaddr.  PR 39325 [Anthony Minessale <anthmct yahoo.com>]
  * ) NetBSD: Avoid leaving zombie process when using apr_signal()
    to ignore SIGCHLD.  PR 36750.  [Todd Vierling <tv pobox.com>]
  * ) Implement support for apr_proc_mutex_trylock() on Unix platforms.
    PR 38785.  [Chris Darroch <chrisd pearsoncmg.com>]
  * ) APR_FIND_APR macro now supports customisable detailed checks on
    each installed apr. [Justin Erenkrantz, Colm MacCarthaigh]
  * ) APR_FIND_APR macro no longer checks /usr/local/apache2/
    [Colm MacCarthaigh]
  * ) Add APR_POLLSET_NOCOPY option to apr_pollset API to eliminate
    O(n)-time lookup in apr_pollset_remove() (currently implemented
    only for epoll).  [Brian Pane]
  * ) Add apr_file_buffer_set() and apr_file_buffer_size_get() functions
    to support variable buffer sizes with APR file handles.
    [Colm MacCarthaigh]
  * ) Add apr_file_open_flags_std[err|out|in]() functions.
    [Colm MacCarthaigh]
  * ) stdio: apr_file_open_std[err|out|in]() functions now set the APR_WRITE
    or APR_READ flag as appropriate. [Colm MacCarthaigh]
  * ) multicast: apr_mcast_*() no longer return APR_ENOTIMPL when invoked
    for non-UDP/RAW sockets. The caller is expected to ensure that the
    socket-type is suitable for multicast. [Colm MacCarthaigh]
  * ) Add apr_sockaddr_ip_getbuf() function.  [Joe Orton]
  * ) Fix handling of %%pI in apr_psprintf.  [Joe Orton]
  * ) Provide APR_VERSION_AT_LEAST() macro for applications which
    want to enable features based on a required level of APR.
    [Jeff Trawick]
  * ) jlibtool: Teach to use static libraries with -static.
    [Justin Erenkrantz]
  * ) Fix checks for alloca() support in configure.  PR 13037.
    [Noah Misch <noah cs.caltech.edu>]
  * ) Add %%pm support to apr_snprintf() for printing the error string
    corresponding to an apr_status_t value.  [Joe Orton]
  * ) Add APR_ARRAY_IDX() and APR_ARRAY_PUSH() convenience macros to
    apr_tables.h.  [Garrett Rooney]
- fix testshm testcase
- remove manual addition of -g, since the OBS takes care of it now.
* Mon Jun  9 2008 poeml@suse.de
- build service supports the debuginfo flag in metadata now; remove
  debug_package macro from the specfile therefore.
* Tue Apr 15 2008 schwab@suse.de
- Don't use autoreconf.
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Tue Nov 27 2007 poeml@suse.de
- update to 1.2.12 (only changes relevant on Linux listed here):
  * ) Numerous fixes to the test/ framework, including better handling of
    long size_t comparisons and more consistent Makefile.(in|win) setup
    for authoring new tests.  [William Rowe]
  * ) Fix --disable-ipv6 build on platforms with getifaddrs().
    PR 39199.  [Joe Orton]
  * ) Define apr_ino_t in such a way that it doesn't change definition
    based on the library consumer's -D'efines to the filesystem.
    [Lucian Adrian Grijincu <lucian.grijincu gmail.com>]
  * ) Fill in apr_fileinfo_t member st_csize on Netware and Unix (PR 41678),
    and refine the file times down to apr_time_t resolution if supported
    by a st_atimensec or st_atim.tv_nsec value by the OS.  Additional
    msec implementations are possible if exposed through autoconf.
    [William Rowe, Nicklas Edmundsson <nikke acc.umu.se>]
  * ) Fix apr_socket_recvfrom() to ensure the peer's port and address
    is returned through the "from" parameter on Unix and Win32.
    [Joe Orton, William Rowe]
* Wed Sep 12 2007 poeml@suse.de
- fix missing endif in build section, fixing build on Mandriva
  (went unnoticed on openSUSE)
- use debug_package macro only on suse, because it breaks the build
  on Mandriva
* Wed Sep 12 2007 poeml@suse.de
- don't run autoreconf -fi on build platforms older than 10.3. The
  'i' in that replaces config.guess, config.sub, ltmain.sh (dated
  2007) with versions from, say, 2005. This will lead to a
  miscompile on SLE10 for instance (segfault in apr_initialize())
- don't apply the cleanup apr-1.2.8-pool-cleanups.patch when built
  with build_with_memory_pool_debug for now
* Mon Sep 10 2007 poeml@suse.de
- update to 1.2.11:
  * ) Win32 apr_file_read; Correctly handle completion-based read-to-EOF.
    [Steven Naim <steven.naim googlemail.com>]
  * ) Fixed Win32 regression of stdout inheritance in apr_proc_create.
    [William Rowe]
  * ) Solve winNT inherited pipe leaks by mutexing apr_proc_create calls,
    on WinNT (not WinCE, nor 9x) so that we toggle the inherited state
    of the stdin/out/err pipes.  All other file handles are treated as
    not-inherited until apr_file_dup2'ed a std handle of this process,
    or while they are used by apr_proc_create.  [William Rowe]
  * ) Define the Mac OS/X filesystem_encoding as utf-8 (in previous
    releases the interpretation would vary).  [Erik Huelsmann
    <ehuels gmail.com>]
  * ) Fix day of year (tm_day) calculation for July. The bug only affects
    Windows builds.  PR 42953.  [Davi Arnaut]
  * ) Fix LFS detection when building over NFS. The mode must be
    specified when O_CREAT is in the flags to open().
    PR 42821.  [Rainer Jung <rainer.jung kippdata.de>]
  * ) Avoid overwriting the hash_mutex table for applications that
    incorrectly calls apr_atomic_init().  PR 42760.  [Davi Arnaut]
  * ) Allow IPv6 connectivity test to fail, avoiding a potentially fatal
    error.  [Davi Arnaut]
  * ) The MinGW Windows headers effectively redefines WINADVAPI from
    __stdcall to empty which results in a link failure when wincrypt.h
    is placed after an include to apr_private.h.
    PR 42293.  [Curt Arnold]
  * ) Define SEM_FAILED if it isn't already defined, as the proc mutex
    code already does it. Also search for the sem_open function in
    the realtime library. (This fixes HP-UX sem_open detection).
    [Davi Arnaut]
  * ) Define the _HPUX_SOURCE feature test macro to obtain maximum
    functionality. Fixes broken sendfile with LFS support on HP-UX.
    PR 42261.  [Davi Arnaut]
* Tue Aug 21 2007 crrodriguez@suse.de
- first attempt to remove static libraries and libtool crap.
* Mon Aug 20 2007 poeml@suse.de
- on SLES9, use 'autoheader; autoconf' to configure, as before,
  instead of autoreconf -fi, which won't work
* Mon Aug 13 2007 crrodriguez@suse.de
- apr 1.2.9
  * ) Stop invoking the testshm* helpers upon 'make test' invocation.
  * ) Register a cleanup only if APR_FILE_NOCLEANUP was not flagged in
    apr_file_mktemp.
  * ) Discard file buffers when running cleanups for exec.
    PR 41119.
  * ) If apr_proc_create() fails to exec in the fork()ed child, call
    _exit() not exit() to avoid running atexit()-registered functions
    in the child.
  * ) Improve thread safety of assorted file_io functions.
  * ) Fix file pointer position calculation in apr_file_writev() on
    buffered file.
  * ) Fix formatting of unsigned integers larger than 2^63 in the
    vformatter/apr_*printf.
  * ) Fix possible EFAULT failures in apr_socket_sendfile() on 32-bit
    Solaris with LFS enabled
  * ) Fix deadlock in apr_file_gets() for a file opened with both the
    APR_BUFFERED and APR_XTHREAD flags.
- run make ceck in the rpm check section
- add missing glibc-devel dependency to -devel package
* Wed Jul 18 2007 poeml@suse.de
- if the rpm macro build_with_memory_pool_debug is defined, build
  with --enable-pool-debug=verbose-alloc. (This is the case in the
  Apache-Pool-Debug buildservice project.)
- add apr-1.2.8-pool-cleanups.patch: don't run cleanup handlers
  _after_ destroying subpools
- add debug_package macro in buildservice (will soon be obsolete)
* Wed May  2 2007 dmueller@suse.de
- Fix comparison with string literal
* Mon Dec 11 2006 poeml@suse.de
- update to 1.2.8
  * ) Correctly retrieve 'empty' environment values with apr_env_get
    on Win32 (e.g. "VAR="), and added validation to testall suite.
  * ) APR_FIND_APR macro no longer checks /usr/local/apache2/.
  * ) Portably check for EEXIST in mktemp code.  PR 40818
  * ) Fix apr_snprintf/apr_vsnprintf return value to not count the
    NUL terminator in the overflow case.  PR 39996.
  * ) Fix detection of pthread cross-process robust mutexes.
  * ) NetBSD: Avoid leaving zombie process when using apr_signal()
    to ignore SIGCHLD.
  * ) Fix apr_socket_sendv() for platforms without writev.
  * ) Avoid issues using >2Gb of data per call with sendfile() on
    64-bit Linux platforms.
* Fri Oct 27 2006 poeml@suse.de
- replace wrong configure switch --with-includedir with the correct
  one: --includedir. This fixes installation of the header files to
  /usr/include/apr-1 instead of /usr/include. [#164770]
* Thu Jun 22 2006 schwab@suse.de
- Don't depend on configure args being preserved.
* Wed May 24 2006 poeml@suse.de
- update to 1.2.7
  * fixes for netware and win32
- update to 1.2.6
  * bugfixes for libuuid, mutex, kqueue, ...
- use %%suse_version to build doxygen documentation only on SUSE
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan  9 2006 poeml@suse.de
- don't use pthread_mutexattr_setrobust_np() unless
  pthread_mutexattr_setprotocol() is available as well (the former
  is in glibc since 2005-12-26, but the latter not)
* Wed Oct 12 2005 poeml@suse.de
- update to 1.2.2
* Thu Sep 29 2005 poeml@suse.de
- update to 1.2.1
- add -fno-strict-aliasing to CFLAGS
- add -DLDAP_DEPRECATED to CFLAGS
* Fri Apr  8 2005 uli@suse.de
- disabled test suite for ARM (may hang QEMU)
* Thu Mar 24 2005 poeml@suse.de
- update to 1.1.1
* Fri Feb 25 2005 poeml@suse.de
- package created (1.1.0)
openSUSE Build Service is sponsored by