--- CMakeLists.txt.orig	2025-09-30 06:13:45 UTC
+++ CMakeLists.txt
@@ -81,12 +81,12 @@ if(NOT MSVC)
 
 if(NOT MSVC)
   if(RDK_OPTIMIZE_POPCNT)
-    if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)")
-      message("RDK_OPTIMIZE_POPCNT is not available on aarch64 or arm64")
-    elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64|powerpc64)")
+    if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64|powerpc64)")
       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcntd")
-    else()
+    elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i386|amd64|x86_64)")
       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt")
+    else()
+      message("RDK_OPTIMIZE_POPCNT is not available on your architecture")
     endif()
   endif()
 endif()
@@ -179,15 +179,7 @@ endif()
   FetchContent_MakeAvailable(Catch2)
 endif()
 
-# make sure we have better_enums
-Include(FetchContent)
 
-FetchContent_Declare(
-  better_enums
-  GIT_REPOSITORY https://github.com/aantron/better-enums.git
-  GIT_TAG        c35576bed0295689540b39873126129adfa0b4c8 # 0.11.3
-)
-
 if(RDK_INSTALL_INTREE)
   set(RDKit_BinDir "${CMAKE_SOURCE_DIR}/bin")
   set(RDKit_LibDir "${CMAKE_SOURCE_DIR}/lib")
@@ -535,12 +527,14 @@ if(NOT RDK_INSTALL_INTREE)
       COMPONENT data
       PATTERN ".svn" EXCLUDE
       )
+  if (FREEBSD_INSTALL_DOCS)
   install(DIRECTORY Docs DESTINATION
-      ${RDKit_ShareDir}
+      ${FREEBSD_DOCSDIR}
       COMPONENT docs
       PATTERN ".svn" EXCLUDE
       PATTERN "_build" EXCLUDE
       )
+  endif()
   install(DIRECTORY Contrib DESTINATION
       ${RDKit_ShareDir}
       COMPONENT extras
