diff --git a/packages/apbs/package.py b/packages/apbs/package.py
index f53769a3f2e5b2ce8008067ce7e79bd1493a6d74..5cae20099c56c7263fe06ec5d1b8847964a43bbb 100644
--- a/packages/apbs/package.py
+++ b/packages/apbs/package.py
@@ -57,6 +57,9 @@ class Apbs(CMakePackage):
         # add suite-sparse libs to path because tests can't find them
         env.prepend_path("LD_LIBRARY_PATH", self.spec['suite-sparse'].prefix.lib)
 
+    def setup_dependent_build_environment(self, env, dependent_spec):
+        self.setup_build_environment(env)
+
     @run_after('install')
     @on_package_attributes(run_tests=True)
     def install_test(self):
diff --git a/packages/sda/package.py b/packages/sda/package.py
index b5c5c606fc0250688ef5e7d0e9da726f450a6233..8ff8aa207313200c866a4375ee7e3f6ff761d415 100644
--- a/packages/sda/package.py
+++ b/packages/sda/package.py
@@ -1,4 +1,4 @@
-# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
 # Spack Project Developers. See the top-level COPYRIGHT file for details.
 #
 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
@@ -27,8 +27,9 @@ class Sda(MakefilePackage):
     version('7.3.3d', sha256='295ca0142532759a43375422a4ebc050e15b1c248e45493f5864765a9fe8076f')
 
     # Dependencies.
+    depends_on('apbs', type=('build','run'))
     depends_on('python@3.8:', type=('build','run'))
-    conflicts('%gcc@:9.3.999', when='@7.3.3d')
+    conflicts('%gcc@:9.3', when='@7.3.3d')
     conflicts('%intel')
 
     build_directory = 'src'
@@ -42,9 +43,21 @@ class Sda(MakefilePackage):
         makefile.filter(r'\${CC_plus}', '${CXX}')
         makefile.filter(r'^\s*CC_moins\s*=.*', 'CC = ' + spack_cc)
         makefile.filter(r'\${CC_moins}', '${CC}')
-
-    @property
-    def install_targets(self):
-        build_directory = 'sda_flex-7.3.3d/src/'
-        targets = ['init libsda sda_flex tools auxi clust test_module']
-        return ['prefix={0}'.format(self.prefix), 'install']
+    
+    def install(self, spec, prefix):
+        install_tree('auxi', prefix.auxi)
+        install_tree('bin', prefix.bin)
+        install_tree('examples', prefix.examples)
+        install_tree('lib', prefix.lib)
+        install_tree('src', prefix.src)
+
+    @run_after('install')
+    def test_install(self):
+        # prepare grid
+        with working_dir(self.prefix.examples + '/lysozymes/prepare_grids_and_ecm'):
+            run_script = Executable('bash')
+            run_script('./run_ed_hd_ecm.sh')
+        # run random test
+        with working_dir(self.prefix.examples + '/lysozymes/unit_test'):
+            test = Executable(self.prefix.bin.test_force_energy2)
+            test('128_lysph6_2interactions.in')