diff --git a/mac/gramps.bundle b/mac/gramps.bundle
index 214a967b0..7edaffa16 100644
--- a/mac/gramps.bundle
+++ b/mac/gramps.bundle
@@ -13,7 +13,7 @@
${project}/Info.plist
-
- ${prefix}/lib/libgtkmacintegration-gtk3.2.dylib
+ ${prefix}/lib/libgtkmacintegration-gtk3.4.dylib
@@ -65,7 +61,7 @@
- ${prefix}/lib/enchant
+ ${prefix}/lib/enchant-2
@@ -77,7 +73,7 @@
- ${prefix}/lib/libhunspell-1.6.0.dylib
+ ${prefix}/lib/libhunspell-1.7.0.dylib
@@ -148,19 +144,19 @@
- ${prefix}/lib/python3.8/*.py
+ ${prefix}/lib/python3.9/*.py
- ${prefix}/lib/python3.8/config-3.8-darwin/
+ ${prefix}/lib/python3.9/config-3.9-darwin/
- ${prefix}/lib/python3.8/site-packages/gramps/gen/utils/resource-path
+ ${prefix}/lib/python3.9/site-packages/gramps/gen/utils/resource-path
- ${prefix}/include/python3.8/pyconfig.h
+ ${prefix}/include/python3.9/pyconfig.h
@@ -177,7 +173,7 @@
- ${prefix}/lib/python3.8/site-packages/gramps/*.glade
+ ${prefix}/lib/python3.9/site-packages/gramps/*.glade
diff --git a/mac/gramps.modules b/mac/gramps.modules
index ec6e66b26..3b2b60d4d 100644
--- a/mac/gramps.modules
+++ b/mac/gramps.modules
@@ -9,22 +9,12 @@
href="http://pywebkitgtk.googlecode.com/files/"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -128,46 +93,33 @@ gtk-mac-bundler gtk-osx-build/projects/gramps/gramps.bundle
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
+
+ hash="sha256:a787ab10d7bb5494e5f76536ac460741788f1fbce851068d73a87ca7c35fc3e1">
@@ -175,13 +127,58 @@ gtk-mac-bundler gtk-osx-build/projects/gramps/gramps.bundle
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -202,7 +199,7 @@ gtk-mac-bundler gtk-osx-build/projects/gramps/gramps.bundle
-
+
diff --git a/mac/patches/berkeleydb-4.8-atomic.patch b/mac/patches/berkeleydb-4.8-atomic.patch
new file mode 100644
index 000000000..3e74c558b
--- /dev/null
+++ b/mac/patches/berkeleydb-4.8-atomic.patch
@@ -0,0 +1,40 @@
+--- a/dist/configure 2010-04-12 13:25:23.000000000 -0700
++++ b/dist/configure 2021-04-11 11:27:32.000000000 -0700
+@@ -19158,7 +19158,7 @@
+ # x86_64/gcc: FreeBSD, NetBSD, BSD/OS, Linux
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-
++#include
+ int
+ main ()
+ {
+@@ -20197,7 +20197,7 @@
+ if test "$db_cv_atomic" = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-
++#include
+ int
+ main ()
+ {
+--- a/dbinc/atomic.h 2013-03-12 14:07:22.000000000 -0400
++++ b/dbinc/atomic.h 2013-03-12 14:06:35.000000000 -0400
+@@ -144,7 +144,7 @@
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
++ __atomic_compare_exchange_db((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+@@ -176,7 +176,7 @@
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int __atomic_compare_exchange_db(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;