void-packages/srcpkgs/gc/template

39 lines
1.1 KiB
Bash

# Template file for 'gc'
pkgname=gc
version=8.0.4
revision=1
build_style=gnu-configure
configure_args="--enable-static --enable-mmap"
hostmakedepends="pkg-config"
makedepends="libatomic_ops-devel"
short_desc="Garbage collector for C and C++"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://www.hboehm.info/gc/"
distfiles="https://github.com/ivmai/bdwgc/releases/download/v${version}/gc-${version}.tar.gz"
checksum=436a0ddc67b1ac0b0405b61a9675bca9e075c8156f4debd1d06f3a56c7cd289d
case "$XBPS_TARGET_MACHINE" in
*-musl)
CFLAGS='-D_GNU_SOURCE -DNO_GETCONTEXT -DSEARCH_FOR_DATA_START -DUSE_MMAP -DHAVE_DL_ITERATE_PHDR'
esac
post_install() {
mkdir -p ${DESTDIR}/usr/include/gc/
mv ${wrksrc}/include/* ${DESTDIR}/usr/include/gc/
mv ${DESTDIR}/usr/include/gc/extra/* ${DESTDIR}/usr/include/
rmdir ${DESTDIR}/usr/include/gc/extra
}
gc-devel_package() {
depends="gc>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/share
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}