Skip to content
Snippets Groups Projects
Commit 673d5171 authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Add libxml2 dependency to dwd-icon-tools.

parent dbcbd9d1
No related branches found
No related tags found
No related merge requests found
Pipeline #18938 failed
...@@ -46,27 +46,28 @@ class DwdIconTools(Package): ...@@ -46,27 +46,28 @@ class DwdIconTools(Package):
depends_on("netcdf-c") depends_on("netcdf-c")
depends_on("eccodes") depends_on("eccodes")
depends_on("libxml2")
def patch(self): #
""" # def patch(self):
Because of the lack of access rights to the original submodule repositories, # """
we patch the gitmodules file to point to a different mirror. # Because of the lack of access rights to the original submodule repositories,
""" # we patch the gitmodules file to point to a different mirror.
git_submodules_file = Path().cwd() / ".gitmodules" # """
git_mirror = "git@gitlab.lrz.de:dkrz-mirror" # git_submodules_file = Path().cwd() / ".gitmodules"
git_modules_patch = f""" # git_mirror = "git@gitlab.lrz.de:dkrz-mirror"
[submodule "externals/libcdi"] # git_modules_patch = f"""
path = externals/libcdi # [submodule "externals/libcdi"]
url = {git_mirror}/libcdi.git # path = externals/libcdi
""" # url = {git_mirror}/libcdi.git
# """
# Replace the content of the original file with the patch #
with git_submodules_file.open("w") as out_f: # # Replace the content of the original file with the patch
out_f.write(git_modules_patch) # with git_submodules_file.open("w") as out_f:
# out_f.write(git_modules_patch)
# Run git submodule update #
git = which("git") # # Run git submodule update
git("submodule", "update", "--init", "--recursive") # git = which("git")
# git("submodule", "update", "--init", "--recursive")
def setup_build_environment(self, env): def setup_build_environment(self, env):
...@@ -78,7 +79,7 @@ class DwdIconTools(Package): ...@@ -78,7 +79,7 @@ class DwdIconTools(Package):
# "F77": spec["mpi"].mpif77, # "F77": spec["mpi"].mpif77,
"CXXFLAGS": "-O2 -g -fopenmp -Wunused -DNOMPI", "CXXFLAGS": "-O2 -g -fopenmp -Wunused -DNOMPI",
"FCFLAGS": "-I/usr/include --std=f2008 -O2 -g -cpp -fopenmp -fbounds-check -Wunused -DNOMPI", "FCFLAGS": "-I/usr/include --std=f2008 -O2 -g -cpp -fopenmp -fbounds-check -Wunused -DNOMPI",
"LIBS": "-leccodes -lgfortran -lhdf5 -lxml2", "LIBS": f"-L{spec['libxml2'].prefix.lib} -leccodes -lgfortran -lhdf5 -lxml2",
} }
for variable, value in env_variables_to_set.items(): for variable, value in env_variables_to_set.items():
env.set(variable, value) env.set(variable, value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment