git: dcfbd9271e2d - main - devel/boehm-gc: Update to 8.2.2

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Mon, 29 Aug 2022 01:13:32 UTC
The branch main has been updated by yasu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dcfbd9271e2dba498058ccaa4f340d3962e3d279

commit dcfbd9271e2dba498058ccaa4f340d3962e3d279
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2022-08-27 09:11:51 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2022-08-29 01:12:27 +0000

    devel/boehm-gc: Update to 8.2.2
    
    * Add --enable-mmap option to CONFIGURE_ARGS. It replaces
      patch-configure.
    * Changes to fix build error on riscv64 is upstreamed. So remove them
      from patch-include_private_gcconfig.h.
    * Since 8.2.2 gc_pthread_redirects.h is necessary and installed only
      if thread support is enabled. It means there isn't the header file
      in boehm-gc package and boehm-gc-threaded one needs to include it.
      But INSTALL_TARGET for the latter doesn't install it. So install it
      at post-install target.
    * Strip shared libraries when GC_VARIANT is defined.
    * Switch to DISTVERSION.
    * Pet portclippy.
    * Tidy up Makefile with portfmt.
    
    ChangeLog:      https://github.com/ivmai/bdwgc/releases/tag/v8.2.2
---
 devel/boehm-gc/Makefile                            | 86 ++++++++++++++--------
 devel/boehm-gc/distinfo                            |  6 +-
 devel/boehm-gc/files/patch-configure               | 12 ---
 .../files/patch-include_private_gcconfig.h         | 33 +--------
 devel/boehm-gc/pkg-plist                           | 11 ++-
 5 files changed, 66 insertions(+), 82 deletions(-)

diff --git a/devel/boehm-gc/Makefile b/devel/boehm-gc/Makefile
index 248b7d6a2923..86444937a8c7 100644
--- a/devel/boehm-gc/Makefile
+++ b/devel/boehm-gc/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	gc
-PORTVERSION=	8.0.6
+DISTVERSION=	8.2.2
 CATEGORIES=	devel
 MASTER_SITES=	http://www.hboehm.info/gc/gc_source/ \
 		https://github.com/ivmai/bdwgc/releases/download/v${PORTVERSION}/
@@ -19,54 +19,66 @@ LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 BUILD_DEPENDS=	${LOCALBASE}/lib/libatomic_ops.a:devel/libatomic_ops
 
 USES=		cpe libtool pathfix pkgconfig
-USE_LDCONFIG=	yes
-
 CPE_VENDOR=	boehm-demers-weiser
 CPE_PRODUCT=	garbage_collector
+USE_LDCONFIG=	yes
+
 GNU_CONFIGURE=	yes
-INSTALL_TARGET=	install-strip
-TEST_TARGET=	check
 # NOTE: do not --disable-static, static is useful for e.g. lang/crystal
-CONFIGURE_ARGS=	--enable-cplusplus --enable-static
+CONFIGURE_ARGS=	--enable-cplusplus \
+		--enable-mmap \
+		--enable-static
+
 MAKE_JOBS_UNSAFE=	yes
+INSTALL_TARGET=	install-strip
+TEST_TARGET=	check
 
 WRKSRC=		${WRKDIR}/${DISTNAME:C/[a-z]$//}
 
 OPTIONS_DEFINE=	DEBUG
 
 .ifdef GC_VARIANT
-INSTALL_TARGET=	install-exec install-pkgconfigDATA
-CORDLIBS=	cord
-GCLIBS=		gc
-GCCPPLIBS=	gccpp
-PLIST=		${NONEXISTENT}
-PLIST_FILES=	${CORDLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.a,} \
-		${CORDLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so,} \
-		${CORDLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1,} \
-		${CORDLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1.4.0,} \
-		${GCLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.a,} \
-		${GCLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so,} \
-		${GCLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1,} \
-		${GCLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1.4.4,} \
-		${GCCPPLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.a,} \
-		${GCCPPLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so,} \
-		${GCCPPLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1,} \
-		${GCCPPLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1.4.1,} \
-		libdata/pkgconfig/bdw-gc-${GC_VARIANT}.pc
-RUN_DEPENDS+=	${LOCALBASE}/include/gc/gc.h:devel/boehm-gc
+INSTALL_TARGET=		install-exec install-pkgconfigDATA
+CORDLIBS=		cord
+GCCPPLIBS=		gccpp
+GCLIBS=			gc
+GCTBALIBS=		gctba
+PLIST=			${NONEXISTENT}
+PLIST_FILES=		${CORDLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.a,} \
+			${CORDLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so,} \
+			${CORDLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1,} \
+			${CORDLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1.5.0,} \
+			${GCCPPLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.a,} \
+			${GCCPPLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so,} \
+			${GCCPPLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1,} \
+			${GCCPPLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1.5.0,} \
+			${GCLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.a,} \
+			${GCLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so,} \
+			${GCLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1,} \
+			${GCLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1.5.1,} \
+			${GCTBALIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.a,} \
+			${GCTBALIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so,} \
+			${GCTBALIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1,} \
+			${GCTBALIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1.5.0,} \
+			libdata/pkgconfig/bdw-gc-${GC_VARIANT}.pc
+RUN_DEPENDS+=		${LOCALBASE}/include/gc/gc.h:devel/boehm-gc
 . if ${GC_VARIANT} == "redirect"
-CONFIGURE_ARGS+=	--disable-threads --enable-redirect-malloc
+CONFIGURE_ARGS+=	--disable-threads \
+			--enable-redirect-malloc
 . endif
 . if ${GC_VARIANT} == "threaded"
-CONFIGURE_ARGS+=	--enable-threads=posix --disable-redirect-malloc
+CONFIGURE_ARGS+=	--disable-redirect-malloc \
+			--enable-threads=posix
 OPTIONS_DEFINE+=	PARALLEL_MARK
 PARALLEL_MARK_DESC=	Parallel-thread marking (faster for SMP)
-USES+=		compiler:c11
+USES+=			compiler:c11
+PLIST_FILES+=		include/gc/gc_pthread_redirects.h
 . endif
 .else
-CONFIGURE_ARGS+=	--disable-threads --disable-redirect-malloc
+CONFIGURE_ARGS+=	--disable-redirect-malloc \
+			--disable-threads
 OPTIONS_DEFINE+=	DOCS
-PORTDOCS=	*
+PORTDOCS=		*
 .endif
 
 DEBUG_CONFIGURE_WITH=	--enable-gc-debug
@@ -78,15 +90,25 @@ PARALLEL_MARK_CONFIGURE_WITH=	--enable-parallel-mark
 .ifdef GC_VARIANT
 post-patch:
 	@${REINPLACE_CMD} -e \
-		's,libgc\.la,libgc-${GC_VARIANT}.la,g ; \
+		's,libcord\.la,libcord-${GC_VARIANT}.la,g ; \
+		s,libgc\.la,libgc-${GC_VARIANT}.la,g ; \
 		s,libgccpp\.la,libgccpp-${GC_VARIANT}.la,g ; \
-		s,libcord\.la,libcord-${GC_VARIANT}.la,g' ${WRKSRC}/Makefile.in
+		s,libgctba\.la,libgctba-${GC_VARIANT}.la,g' ${WRKSRC}/Makefile.in
 	@${REINPLACE_CMD} -e \
 		's,-lgc,-lgc-${GC_VARIANT},' ${WRKSRC}/bdw-gc.pc.in
 
 post-install:
 	${MV} ${STAGEDIR}${PREFIX}/libdata/pkgconfig/bdw-gc.pc \
 		${STAGEDIR}${PREFIX}/libdata/pkgconfig/bdw-gc-${GC_VARIANT}.pc
+. if ${GC_VARIANT} == "threaded"
+	${MKDIR} ${STAGEDIR}${PREFIX}/include/gc
+	${INSTALL_DATA} ${WRKSRC}/include/gc_pthread_redirects.h \
+		${STAGEDIR}${PREFIX}/include/gc
+.endif
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libcord-${GC_VARIANT}.so.1.5.0
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgc-${GC_VARIANT}.so.1.5.1
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgccpp-${GC_VARIANT}.so.1.5.0
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgctba-${GC_VARIANT}.so.1.5.0
 
 .else # ! GC_VARIANT
 post-patch:
diff --git a/devel/boehm-gc/distinfo b/devel/boehm-gc/distinfo
index 2aa230148df9..aacc3b11eabe 100644
--- a/devel/boehm-gc/distinfo
+++ b/devel/boehm-gc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1632865018
-SHA256 (gc-8.0.6.tar.gz) = 3b4914abc9fa76593596773e4da671d7ed4d5390e3d46fbf2e5f155e121bea11
-SIZE (gc-8.0.6.tar.gz) = 1168660
+TIMESTAMP = 1661591575
+SHA256 (gc-8.2.2.tar.gz) = f30107bcb062e0920a790ffffa56d9512348546859364c23a14be264b38836a0
+SIZE (gc-8.2.2.tar.gz) = 1200115
diff --git a/devel/boehm-gc/files/patch-configure b/devel/boehm-gc/files/patch-configure
deleted file mode 100644
index 9848faeedf84..000000000000
--- a/devel/boehm-gc/files/patch-configure
+++ /dev/null
@@ -1,12 +0,0 @@
---- configure.orig	2014-06-03 20:08:54 UTC
-+++ configure
-@@ -15639,6 +15639,9 @@ else
- fi
- 
- case "${host}" in
-+  *-freebsd*)
-+    gc_use_mmap=yes
-+    ;;
-   *-linux*)
-     # FIXME: This seems to be no longer needed as configured in gcconfig.h
-     #gc_use_mmap=yes
diff --git a/devel/boehm-gc/files/patch-include_private_gcconfig.h b/devel/boehm-gc/files/patch-include_private_gcconfig.h
index 738f7cee7161..c3191a098bf3 100644
--- a/devel/boehm-gc/files/patch-include_private_gcconfig.h
+++ b/devel/boehm-gc/files/patch-include_private_gcconfig.h
@@ -1,6 +1,6 @@
---- include/private/gcconfig.h.orig	2020-11-21 06:02:51 UTC
+--- include/private/gcconfig.h.orig	2017-12-23 08:46:29 UTC
 +++ include/private/gcconfig.h
-@@ -239,7 +239,7 @@ EXTERN_C_BEGIN
+@@ -188,7 +188,7 @@
  #      define EWS4800
  #    endif
  #    if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD) \
@@ -9,32 +9,3 @@
  #      if defined(ultrix) || defined(__ultrix)
  #        define ULTRIX
  #      else
-@@ -670,7 +670,7 @@ EXTERN_C_BEGIN
- #   endif
- #   define mach_type_known
- # endif
--# if defined(__riscv) && defined(LINUX)
-+# if defined(__riscv)
- #   define RISCV
- #   define mach_type_known
- # endif
-@@ -2883,6 +2883,19 @@ EXTERN_C_BEGIN
- #     define DATASTART ((ptr_t)__data_start)
- #     define LINUX_STACKBOTTOM
- #     define DYNAMIC_LOADING
-+#   endif
-+#   ifdef FREEBSD
-+#     define OS_TYPE "FREEBSD"
-+#     ifndef GC_FREEBSD_THREADS
-+#       define MPROTECT_VDB
-+#     endif
-+#     define SIG_SUSPEND SIGUSR1
-+#     define SIG_THR_RESTART SIGUSR2
-+#     define FREEBSD_STACKBOTTOM
-+#     define DYNAMIC_LOADING
-+      extern char etext[];
-+#     define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext)
-+#     define DATASTART_USES_BSDGETDATASTART
- #   endif
- # endif /* RISCV */
- 
diff --git a/devel/boehm-gc/pkg-plist b/devel/boehm-gc/pkg-plist
index 614442794972..f3cf7d9d12f0 100644
--- a/devel/boehm-gc/pkg-plist
+++ b/devel/boehm-gc/pkg-plist
@@ -11,7 +11,6 @@ include/gc/gc_disclaim.h
 include/gc/gc_gcj.h
 include/gc/gc_inline.h
 include/gc/gc_mark.h
-include/gc/gc_pthread_redirects.h
 include/gc/gc_tiny_fl.h
 include/gc/gc_typed.h
 include/gc/gc_version.h
@@ -21,14 +20,18 @@ include/gc_cpp.h
 lib/libcord.a
 lib/libcord.so
 lib/libcord.so.1
-lib/libcord.so.1.4.0
+lib/libcord.so.1.5.0
 lib/libgc.a
 lib/libgc.so
 lib/libgc.so.1
-lib/libgc.so.1.4.4
+lib/libgc.so.1.5.1
 lib/libgccpp.a
 lib/libgccpp.so
 lib/libgccpp.so.1
-lib/libgccpp.so.1.4.1
+lib/libgccpp.so.1.5.0
+lib/libgctba.a
+lib/libgctba.so
+lib/libgctba.so.1
+lib/libgctba.so.1.5.0
 libdata/pkgconfig/bdw-gc.pc
 man/man3/gc.3.gz