SHA256
6
0
forked from pool/gc
gc/gc.spec
Dr. Werner Fink 57cce54a33 Accepting request 176069 from home:Andreas_Schwab:Factory
- aarch64-support.patch: aarch64 support for gc from upstream
- libatomic_ops-aarch64.patch: aarch64 support for libatomic_ops from
  upstream add-aarch64-support branch

OBS-URL: https://build.opensuse.org/request/show/176069
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gc?expand=0&rev=25
2013-05-18 22:07:04 +00:00

162 lines
5.0 KiB
RPMSpec

#
# spec file for package gc
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: gc
Version: 7.1.9.6
Release: 0
%define src_ver 7.2d
Url: http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Summary: A garbage collector for C and C++
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Source: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/%{name}-%{src_ver}.tar.gz
Patch1: aarch64-support.patch
Patch2: libatomic_ops-aarch64.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf >= 2.64
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
%description
The Boehm-Demers-Weiser conservative garbage collector can be used as a
garbage collecting replacement for C malloc or C++ new. It allows you
to allocate memory basically as you normally would, without explicitly
deallocating memory that is no longer useful. The collector
automatically recycles memory when it determines that it can no longer
be otherwise accessed.
%package -n libgc1
Summary: A garbage collector for C and C++
Group: System/Libraries
# bug437293
%ifarch ppc64
Obsoletes: boehm-gc-64bit
%endif
#
%description -n libgc1
The Boehm-Demers-Weiser conservative garbage collector can be used as a
garbage collecting replacement for C malloc or C++ new. It allows you
to allocate memory basically as you normally would, without explicitly
deallocating memory that is no longer useful. The collector
automatically recycles memory when it determines that it can no longer
be otherwise accessed.
%package devel
Summary: A garbage collector for C and C++
Group: Development/Libraries/C and C++
Provides: gc:/usr/include/gc/gc.h
Requires: glibc-devel
Requires: libgc1 = %version
%description devel
The Boehm-Demers-Weiser conservative garbage collector can be used as a
garbage collecting replacement for C malloc or C++ new. It allows you
to allocate memory basically as you normally would, without explicitly
deallocating memory that is no longer useful. The collector
automatically recycles memory when it determines that it can no longer
be otherwise accessed.
%package -n libatomic_ops-devel
Summary: Atomic memory update operations
Group: Development/Libraries/C and C++
Provides: libatomic_ops-static = %{version}-%{release}
Obsoletes: libatomic-ops-devel <= 1.2
Provides: libatomic-ops-devel = %{version}
%description -n libatomic_ops-devel
Provides implementations for atomic memory update operations on a
number of architectures. This allows direct use of these in reasonably
portable code. Unlike earlier similar packages, this one explicitly
considers memory barrier semantics, and allows the construction of code
that involves minimum overhead across a variety of architectures.
%prep
%setup -q -n %{name}-7.2
%patch1 -p1
%patch2
%build
# refresh auto*/libtool to purge rpaths
rm -f libtool libtool.m4
autoreconf -fi
# see bugzilla.redhat.com/689877
CPPFLAGS="-DUSE_GET_STACKBASE_FOR_MAIN"; export CPPFLAGS
%configure --disable-static \
--with-pic \
--with-gnu-ld \
--enable-cplusplus \
--enable-large-config \
--enable-threads=posix \
--enable-parallel-mark \
--with-libatomic-ops=no
make %{?_smp_mflags}
make %{?_smp_mflags} -C libatomic_ops
%install
%makeinstall
%makeinstall -C libatomic_ops
rm -rf $RPM_BUILD_ROOT/usr/share/gc # docs
rm -rf %{buildroot}%{_datadir}/libatomic_ops/{COPYING,*.txt}
rm -f %{buildroot}%{_libdir}/*.la
%check
%if ! 0%{?qemu_user_space_build}
make check
# fails on i586
make check -C libatomic_ops ||:
%endif
%post -n libgc1 -p /sbin/ldconfig
%postun -n libgc1 -p /sbin/ldconfig
%files -n libgc1
%defattr(-, root, root)
%doc README.QUICK doc/README.*
%{_libdir}/lib*.so.*
%files devel
%defattr(-, root, root)
%doc doc/[a-z]*
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/bdw-gc.pc
%{_includedir}/gc.h
%{_includedir}/gc_cpp.h
%{_includedir}/gc
%files -n libatomic_ops-devel
%defattr(-,root,root,-)
%doc libatomic_ops/AUTHORS libatomic_ops/ChangeLog libatomic_ops/COPYING libatomic_ops/NEWS libatomic_ops/README
%doc libatomic_ops/doc/*.txt
%{_libdir}/pkgconfig/atomic_ops.pc
%{_includedir}/atomic_ops.h
%{_includedir}/atomic_ops_malloc.h
%{_includedir}/atomic_ops_stack.h
%{_includedir}/atomic_ops/
%{_libdir}/libatomic_ops.a
%{_libdir}/libatomic_ops_gpl.a
%changelog