Skip to content

Commit

Permalink
Updated Libxml2 to provide a custom header directory
Browse files Browse the repository at this point in the history
  • Loading branch information
alalazo committed Feb 21, 2019
1 parent 7c2e5c9 commit 74852c4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions var/spack/repos/builtin/packages/libxml2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ class Libxml2(AutotoolsPackage):
resource(name='xmlts', url='http://www.w3.org/XML/Test/xmlts20080827.tar.gz',
sha256='96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7')

@property
def headers(self):
include_dir = self.spec.prefix.include.libxml2
hl = find_headers('*', root=include_dir, recursive=True)
hl.directories = include_dir
return hl

def configure_args(self):
spec = self.spec

Expand All @@ -51,10 +58,6 @@ def configure_args(self):

return args

def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
spack_env.prepend_path('CPATH', self.prefix.include.libxml2)
run_env.prepend_path('CPATH', self.prefix.include.libxml2)

@run_after('install')
@on_package_attributes(run_tests=True)
def import_module_test(self):
Expand Down

0 comments on commit 74852c4

Please sign in to comment.