patch for salmonella freebsd, thoroughly untested added by teiresias on Fri Apr 1 14:12:22 2022

From 75c6dc343691f92c0055e405929fcc543f402bc9 Mon Sep 17 00:00:00 2001
From: Christopher Brannon <chris@the-brannons.com>
Date: Fri, 1 Apr 2022 05:05:44 -0700
Subject: [PATCH] For FreeBSD, skip kiwi, skip taglib for non-clang.

Kiwi doesn't build at all on FreeBSD.
Taglib is C++ built with clang.  The egg is fine in clang environments,
but it fails when built with gcc.
---
 conf/chicken-4-clang-no-cache.conf | 4 +---
 conf/chicken-4-clang.conf          | 4 +---
 conf/chicken-5-clang-no-cache.conf | 4 +---
 conf/chicken-5-clang-speed.conf    | 4 +---
 conf/chicken-5-clang.conf          | 4 +---
 conf/common/chicken-5.scm          | 2 +-
 conf/common/clang.scm              | 6 ++++++
 conf/prerelease-clang.conf         | 4 +---
 8 files changed, 13 insertions(+), 19 deletions(-)
 create mode 100644 conf/common/clang.scm

diff --git a/conf/chicken-4-clang-no-cache.conf b/conf/chicken-4-clang-no-cache.conf
index 4e5cde1..c5211d6 100644
--- a/conf/chicken-4-clang-no-cache.conf
+++ b/conf/chicken-4-clang-no-cache.conf
@@ -5,8 +5,6 @@
  (else))
 
 (load-relative "./common/chicken-4.scm")
-
-(c-compiler "clang")
-(c++-compiler "clang")
+(load-relative "./common/clang.scm")
 
 (keep-repo? #f)
diff --git a/conf/chicken-4-clang.conf b/conf/chicken-4-clang.conf
index 871949f..5f3bde5 100644
--- a/conf/chicken-4-clang.conf
+++ b/conf/chicken-4-clang.conf
@@ -5,6 +5,4 @@
  (else))
 
 (load-relative "./common/chicken-4.scm")
-
-(c-compiler "clang")
-(c++-compiler "clang++")
+(load-relative "./common/clang.scm")
diff --git a/conf/chicken-5-clang-no-cache.conf b/conf/chicken-5-clang-no-cache.conf
index a008fca..116f807 100644
--- a/conf/chicken-5-clang-no-cache.conf
+++ b/conf/chicken-5-clang-no-cache.conf
@@ -5,8 +5,6 @@
  (else))
 
 (load-relative "./common/chicken-5.scm")
-
-(c-compiler "clang")
-(c++-compiler "clang")
+(load-relative "./common/clang.scm")
 
 (keep-repo? #f)
diff --git a/conf/chicken-5-clang-speed.conf b/conf/chicken-5-clang-speed.conf
index e00cea0..b14d7b0 100644
--- a/conf/chicken-5-clang-speed.conf
+++ b/conf/chicken-5-clang-speed.conf
@@ -6,6 +6,4 @@
 
 (load-relative "./common/chicken-5.scm")
 (load-relative "./common/speed.scm")
-
-(c-compiler "clang")
-(c++-compiler "clang++")
+(load-relative "./common/clang.scm")
diff --git a/conf/chicken-5-clang.conf b/conf/chicken-5-clang.conf
index 82fc11f..86b0cc1 100644
--- a/conf/chicken-5-clang.conf
+++ b/conf/chicken-5-clang.conf
@@ -5,6 +5,4 @@
  (else))
 
 (load-relative "./common/chicken-5.scm")
-
-(c-compiler "clang")
-(c++-compiler "clang++")
+(load-relative "./common/clang.scm")
diff --git a/conf/common/chicken-5.scm b/conf/common/chicken-5.scm
index 0ca374b..cb6300d 100644
--- a/conf/common/chicken-5.scm
+++ b/conf/common/chicken-5.scm
@@ -24,7 +24,7 @@
  (append
   (case (software-version)
     ((openbsd) '(inotify))
-    ((freebsd) '(inotify pledge unveil))
+    ((freebsd) '(inotify kiwi pledge taglib unveil))
     ((linux) '(pledge unveil)))
   (skip-eggs)))
 
diff --git a/conf/common/clang.scm b/conf/common/clang.scm
new file mode 100644
index 0000000..4609271
--- /dev/null
+++ b/conf/common/clang.scm
@@ -0,0 +1,6 @@
+(c-compiler "clang")
+(c++-compiler "clang")
+
+;; On FreeBSD, taglib should work in clang-only environments.
+(case (software-version)
+  ((freebsd)   (skip-eggs (delete 'taglib (skip-eggs)))))
diff --git a/conf/prerelease-clang.conf b/conf/prerelease-clang.conf
index 061d300..ecbb124 100644
--- a/conf/prerelease-clang.conf
+++ b/conf/prerelease-clang.conf
@@ -5,8 +5,6 @@
  (else))
 
 (load-relative "./common/chicken-5.scm")
+(load-relative "./common/clang.scm")
 
 (chicken-core-branch "prerelease")
-
-(c-compiler "clang")
-(c++-compiler "clang++")
-- 
2.35.1