# Buildsheet autogenerated by ravenadm tool -- Do not edit.

NAMEBASE=		boehm_garbage_collector
VERSION=		8.2.8
KEYWORDS=		devel
VARIANTS=		std threaded redirect
SDESC[std]=		Garbage collection and memory leak detection
SDESC[threaded]=	Garbage collection with posix thread support
SDESC[redirect]=	Garbage collection with redirected malloc
HOMEPAGE=		https://github.com/ivmai/bdwgc/
CONTACT=		nobody

DOWNLOAD_GROUPS=	main old
SITES[main]=		https://github.com/ivmai/bdwgc/releases/download/v8.2.8/
SITES[old]=		http://www.hboehm.info/gc/gc_source/
DISTFILE[1]=		gc-8.2.8.tar.gz:main
DF_INDEX=		1
SPKGS[std]=		set
			primary
			dev
			man
SPKGS[threaded]=	set
			primary
			dev
			man
SPKGS[redirect]=	set
			primary
			dev
			man

OPTIONS_AVAILABLE=	THREADED REDIRECT
OPTIONS_STANDARD=	none
VOPTS[threaded]=	THREADED=ON REDIRECT=OFF
VOPTS[redirect]=	THREADED=OFF REDIRECT=ON

BUILD_DEPENDS=		libatomic_ops:dev:std
BUILDRUN_DEPENDS=	libatomic_ops:primary:std

USES=			cpe cmake pkgconfig c++:primary

DISTNAME=		gc-8.2.8

LICENSE=		MIT:primary
LICENSE_FILE=		MIT:{{WRKSRC}}/LICENSE
LICENSE_SCHEME=		solo

CPE_PRODUCT=		garbage_collector
CPE_VENDOR=		boehm-demers-weiser
FPC_EQUIVALENT=		devel/boehm-gc

INSTALL_REQ_TOOLCHAIN=	yes
SOVERSION=		1.5.1
PLIST_SUB=		GCVERSION=1.5.4
			GCMAJOR=1
			CPPVERSION=1.5.0
			CPPMAJOR=1
			TBAVERSION=1.5.0
			TBAMAJOR=1

CMAKE_ARGS=		-Denable_docs:BOOL=OFF
			-Denable_cplusplus:BOOL=ON

[THREADED].DESCRIPTION=			Enable posix thread support
[THREADED].CMAKE_ARGS_OFF=		-Denable_threads:BOOL=OFF
[THREADED].CMAKE_ARGS_ON=		-Denable_threads:BOOL=ON
					-Denable_parallel_mark:BOOL=ON

[REDIRECT].DESCRIPTION=			Enable malloc redirection support
[REDIRECT].CMAKE_ARGS_OFF=		-Denable_redirect_malloc:BOOL=OFF
[REDIRECT].CMAKE_ARGS_ON=		-Denable_redirect_malloc:BOOL=ON

post-patch:
	${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/doc/gc.man

post-install:
	${INSTALL_MAN} ${WRKSRC}/doc/gc.man ${STAGEDIR}${MANPREFIX}/man/man3/gc.3
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib*.so

post-extract:
	cd ${WRKSRC} && awk 'x==1 {print} /Copyright &/ {x=1}' README.md > LICENSE

[FILE:741:descriptions/desc.primary]
The Boehm-Weiser garbage collection package, for C and C++ -
garbage collection and memory leak detection libraries.

A garbage collector is something which automatically frees malloc'd
memory for you by working out what parts of memory your program
no longer has pointers to.  As a result, garbage collectors can also
inform you of memory leaks (if they find memory they can free, it means
you have lost all of your pointers to it, but you didn't free it).

C programs may be linked against either of these, and should run (with
GC or leak detection) without change.  C++ programs must include a header
to use garbage collection, though leak detection should work without
such source code modifications.  See the man page and header files.


[FILE:94:distinfo]
7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160      1219553 gc-8.2.8.tar.gz


[FILE:209:manifests/plist.primary]
lib/
 libcord.so.%%SOMAJOR%%
 libcord.so.%%SOVERSION%%
 libgc.so.%%GCMAJOR%%
 libgc.so.%%GCVERSION%%
 libgccpp.so.%%CPPMAJOR%%
 libgccpp.so.%%CPPVERSION%%
 libgctba.so.%%TBAMAJOR%%
 libgctba.so.%%TBAVERSION%%


[FILE:482:manifests/plist.dev]
%%THREADED-ON%%include/gc/gc_pthread_redirects.h
include/
 gc.h
 gc_cpp.h
include/gc/
 cord.h
 cord_pos.h
 ec.h
 gc.h
 gc_allocator.h
 gc_backptr.h
 gc_config_macros.h
 gc_cpp.h
 gc_disclaim.h
 gc_gcj.h
 gc_inline.h
 gc_mark.h
 gc_tiny_fl.h
 gc_typed.h
 gc_version.h
 javaxfc.h
 leak_detector.h
lib/
 libcord.so
 libgc.so
 libgccpp.so
 libgctba.so
lib/cmake/bdwgc/
 BDWgcConfig.cmake
 BDWgcConfigVersion.cmake
 BDWgcTargets-release.cmake
 BDWgcTargets.cmake
lib/pkgconfig/bdw-gc.pc


[FILE:20:manifests/plist.man]
share/man/man3/gc.3


[FILE:478:patches/patch-configure]
--- configure.orig	2024-09-08 20:50:52 UTC
+++ configure
@@ -17925,7 +17925,7 @@ case "$host" in
   mips-sgi-irix6*) ;;
 # We never want libdl on darwin. It is a fake libdl that just ends up making
 # dyld calls anyway.  The same applies to Cygwin.
-  *-*-cygwin* | *-*-darwin* | *-*-msys*)
+  *-*-cygwin* | *-*-darwin* | *-*-msys* | *-*-netbsd* | *-*-dragonfly* | *-*-freebsd* )
     ;;
   *)
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5