--- python/chemicalfun/CMakeLists.txt.orig	2023-03-01 15:14:05 UTC
+++ python/chemicalfun/CMakeLists.txt
@@ -31,7 +31,7 @@ add_custom_target(chemicalfun ALL
     COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:PyChemicalFun>
         ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:PyChemicalFun>
     #COMMAND ${PYTHON_EXECUTABLE} -m pip install ${_PIP_ARG} -e ${CMAKE_CURRENT_BINARY_DIR}
-    COMMAND ${PYTHON_EXECUTABLE} -m pip install --prefix ${CMAKE_BINARY_DIR} --ignore-installed .
+    COMMAND ${PYTHON_EXECUTABLE} -m pip install --root ${FREEBSD_STAGEDIR} --prefix ${FREEBSD_PREFIX} --ignore-installed .
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
 
 # Set dependencies of PyChemicalFun target
@@ -60,7 +60,7 @@ install(CODE
     endif()
 
     execute_process(
-        COMMAND ${PYTHON_EXECUTABLE} -m pip install --prefix \${CHEMICALFUN_PYTHON_INSTALL_PREFIX_NATIVE} ${CMAKE_CURRENT_BINARY_DIR}
+        COMMAND ${PYTHON_EXECUTABLE} -m pip install --root ${FREEBSD_STAGEDIR} --prefix ${FREEBSD_PREFIX} ${CMAKE_CURRENT_BINARY_DIR}
         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
 "
 )
