# Description: Garbage collection and memory leak detection for C and C++ # URL: https://hboehm.info/gc/ # Maintainer: Tim Biermann, tbier at posteo dot de name=boehm-gc version=8.2.10 release=2 _libatomic_ops=7.8.4 source=(https://github.com/ivmai/bdwgc/releases/download/v$version/gc-$version.tar.gz https://github.com/ivmai/libatomic_ops/releases/download/v$_libatomic_ops/libatomic_ops-$_libatomic_ops.tar.gz 2cd0f5e56.patch 74fc05d12.patch ) build () { patch -Rp1 -d gc-$version -i $SRC/2cd0f5e56.patch patch -Rp1 -d gc-$version -i $SRC/74fc05d12.patch PKGMK_GC_OPTIONS=( -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_INSTALL_LIBDIR=lib -D CMAKE_BUILD_TYPE=Release -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" -D BUILD_TESTING=OFF -D enable_docs=OFF -D enable_cplusplus=ON -Wno-dev ) ln -s libatomic_ops-$_libatomic_ops gc-$version/libatomic_ops cmake -S gc-$version -B build-shared -G Ninja \ "${PKGMK_GC_OPTIONS[@]}" \ -D BUILD_SHARED_LIBS=ON \ -D BUILD_STATIC_LIBS=OFF cmake --build build-shared DESTDIR=$PKG cmake --install build-shared cmake -S gc-$version -B build-static -G Ninja \ "${PKGMK_GC_OPTIONS[@]}" \ -D BUILD_STATIC_LIBS=ON \ -D BUILD_SHARED_LIBS=OFF cmake --build build-static DESTDIR=$PKG cmake --install build-static install -D -m 644 gc-$version/doc/gc.man $PKG/usr/share/man/man3/gc.3 }