File mingw64-gc.spec of Package mingw64-gc

%define __strip %{_mingw64_strip}
%define __objdump %{_mingw64_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_mingw64_findrequires}
%define __find_provides %{_mingw64_findprovides}
%define __os_install_post %{_mingw64_debug_install_post} \
                          %{_mingw64_install_post}

Name:           mingw64-gc
Version:        7.2alpha6
Release:        0
Summary:        GC garbage collector for C and C++

License:        BSD
Group:          Development/Libraries
Url:            http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Source:         http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-%{version}.tar.gz
Source1000:     %{name}-rpmlintrc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildArch:      noarch
#!BuildIgnore: post-build-checks

# To be more backward-compatible abi-wise, TODO: upstream ml reference
Patch1:         gc-7.2alpha6-gcinit.patch
Patch2:         gc-7.2alpha6-Makefile.patch

BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-pkg-config

%description
The Boehm-Demers-Weiser conservative garbage collector can be
used as a garbage collecting replacement for C malloc or C++ new.


%package -n mingw64-libgccpp
Summary:        GC garbage collector for C++
Group:          System/Libraries

%description -n mingw64-libgccpp
The Boehm-Demers-Weiser conservative garbage collector can be
used as a garbage collecting replacement for C malloc or C++ new.


%package devel
Summary:        GC garbage collector for C and C++
Group:          Development/Libraries

%description devel
The Boehm-Demers-Weiser conservative garbage collector can be
used as a garbage collecting replacement for C malloc or C++ new.


%package -n mingw64-libgccpp-devel
Summary:        GC garbage collector for C++ (development files)
Group:          Development/Libraries

%description -n mingw64-libgccpp-devel
The Boehm-Demers-Weiser conservative garbage collector can be
used as a garbage collecting replacement for C malloc or C++ new.


%package -n mingw64-libatomic_ops-devel
Summary:        Access to hardware provided atomic memory operations (development files)
Group:          System/Libraries

%description -n mingw64-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.


%{_mingw64_debug_package}

%prep
%setup -q -n gc-%{version}

%patch1 -p1 -b .gcinit
%patch2 -p0 -b .make


%build
MINGW64_CFLAGS="-DGC_BUILD=1 %{_mingw64_cflags}" \
%{_mingw64_configure} \
  --disable-dependency-tracking \
  --disable-static \
  --enable-cplusplus \
  --enable-large-config \
  --enable-parallel-mark \
  --enable-threads=win32
make %{?_smp_mflags} || make

cd libatomic_ops
%{_mingw64_configure}
%{_mingw64_make} %{?_smp_mflags}


%install
mkdir -p $RPM_BUILD_ROOT%{_mingw64_includedir}/gc
make DESTDIR=$RPM_BUILD_ROOT install

cd libatomic_ops
make DESTDIR=$RPM_BUILD_ROOT install


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%{_mingw64_bindir}/libcord-1.dll
%{_mingw64_bindir}/libgc-1.dll

%files -n mingw64-libgccpp
%defattr(-,root,root)
%{_mingw64_bindir}/libgccpp-1.dll

%files devel
%defattr(-,root,root)
%{_mingw64_libdir}/libcord.dll.a
%{_mingw64_libdir}/libgc.dll.a
%{_mingw64_libdir}/pkgconfig/bdw-gc.pc
%{_mingw64_includedir}/gc.h
%{_mingw64_includedir}/gc/
%{_mingw64_datadir}/gc/

%files -n mingw64-libgccpp-devel
%defattr(-, root, root)
%{_mingw64_libdir}/libgccpp.dll.a
%{_mingw64_includedir}/gc_cpp.h

%files -n mingw64-libatomic_ops-devel
%defattr(-, root, root)
%{_mingw64_libdir}/libatomic_ops.a
%{_mingw64_libdir}/libatomic_ops_gpl.a
%{_mingw64_includedir}/atomic_ops
%{_mingw64_includedir}/atomic_ops*.h
%{_mingw64_datadir}/libatomic_ops/


%changelog
openSUSE Build Service is sponsored by