SHA256
2
0

Accepting request 176614 from home:jengelh:branches:devel:libraries:c_c++

Make use of external libatomic_ops -- openSUSE has it in a separate source package

OBS-URL: https://build.opensuse.org/request/show/176614
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gc?expand=0&rev=27
This commit is contained in:
Dr. Werner Fink 2013-05-27 07:35:17 +00:00 committed by Git OBS Bridge
parent 7b748db8a3
commit 38cf4ad225
3 changed files with 26 additions and 1424 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sun May 26 20:09:26 UTC 2013 - jengelh@inai.de
- Make use of external libatomic_ops --
openSUSE has it in a separate source package
- Fix version: 7.2d is not a prerelease, so there is no need to
call it 7.1*
- More portable make install call; more robust file list
------------------------------------------------------------------- -------------------------------------------------------------------
Sat May 25 19:16:48 UTC 2013 - root@localhost Sat May 25 19:16:48 UTC 2013 - root@localhost

66
gc.spec
View File

@ -17,21 +17,21 @@
Name: gc Name: gc
Version: 7.1.9.6 Version: 7.2d
Release: 0 Release: 0
%define src_ver 7.2d
Url: http://www.hpl.hp.com/personal/Hans_Boehm/gc/ Url: http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Summary: A garbage collector for C and C++ Summary: A garbage collector for C and C++
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Source: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/%{name}-%{src_ver}.tar.gz
Source: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/%name-%version.tar.gz
Patch1: aarch64-support.patch Patch1: aarch64-support.patch
Patch2: libatomic_ops-aarch64.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf >= 2.64 BuildRequires: autoconf >= 2.64
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libtool BuildRequires: libtool
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: pkgconfig(atomic_ops)
%description %description
The Boehm-Demers-Weiser conservative garbage collector can be used as a The Boehm-Demers-Weiser conservative garbage collector can be used as a
@ -73,24 +73,9 @@ deallocating memory that is no longer useful. The collector
automatically recycles memory when it determines that it can no longer automatically recycles memory when it determines that it can no longer
be otherwise accessed. 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 %prep
%setup -q -n %{name}-7.2 %setup -q -n %{name}-7.2
%patch1 -p1 %patch1 -p1
%patch2
%build %build
# refresh auto*/libtool to purge rpaths # refresh auto*/libtool to purge rpaths
@ -107,25 +92,18 @@ CPPFLAGS="-DUSE_GET_STACKBASE_FOR_MAIN"; export CPPFLAGS
--enable-large-config \ --enable-large-config \
--enable-threads=posix \ --enable-threads=posix \
--enable-parallel-mark \ --enable-parallel-mark \
--with-libatomic-ops=no --with-libatomic-ops=yes
# --with-libatomic-ops=yes means to use the system library
make %{?_smp_mflags} make %{?_smp_mflags}
make %{?_smp_mflags} -C libatomic_ops
%install %install
make install DESTDIR="%buildroot"
%makeinstall rm -Rf "%buildroot/%_datadir/gc" "%buildroot/%_libdir"/*.la
%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 %check
%if ! 0%{?qemu_user_space_build} %if !0%{?qemu_user_space_build}
make check make check
# fails on i586
make check -C libatomic_ops ||:
%endif %endif
%post -n libgc1 -p /sbin/ldconfig %post -n libgc1 -p /sbin/ldconfig
@ -135,27 +113,17 @@ make check -C libatomic_ops ||:
%files -n libgc1 %files -n libgc1
%defattr(-, root, root) %defattr(-, root, root)
%doc README.QUICK doc/README.* %doc README.QUICK doc/README.*
%{_libdir}/lib*.so.* %_libdir/libcord.so.1*
%_libdir/libgc*.so.1*
%files devel %files devel
%defattr(-, root, root) %defattr(-, root, root)
%doc doc/[a-z]* %doc doc/[a-z]*
%{_libdir}/lib*.so %_libdir/libcord.so
%{_libdir}/pkgconfig/bdw-gc.pc %_libdir/libgc*.so
%{_includedir}/gc.h %_libdir/pkgconfig/bdw-gc.pc
%{_includedir}/gc_cpp.h %_includedir/gc.h
%{_includedir}/gc %_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 %changelog

File diff suppressed because it is too large Load Diff