freetype: Add custom headers property (#18440)
freetype's headers are installed in the `freetype2` subdirectory, use a custom headers property to fix this in dependent packages.
This commit is contained in:
parent
84381fbc80
commit
8c264a9f26
4 changed files with 13 additions and 6 deletions
|
@ -32,6 +32,12 @@ class Freetype(AutotoolsPackage):
|
||||||
|
|
||||||
patch('windows.patch', when='@2.9.1')
|
patch('windows.patch', when='@2.9.1')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def headers(self):
|
||||||
|
headers = find_headers('*', self.prefix.include, recursive=True)
|
||||||
|
headers.directories = [self.prefix.include.freetype2]
|
||||||
|
return headers
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
args = ['--with-harfbuzz=no']
|
args = ['--with-harfbuzz=no']
|
||||||
if self.spec.satisfies('@2.9.1:'):
|
if self.spec.satisfies('@2.9.1:'):
|
||||||
|
|
|
@ -114,8 +114,8 @@ def yes_no(s):
|
||||||
args.append('USE_FREETYPE={0}'.format(yes_no('+fonts')))
|
args.append('USE_FREETYPE={0}'.format(yes_no('+fonts')))
|
||||||
if '+fonts' in spec:
|
if '+fonts' in spec:
|
||||||
args += [
|
args += [
|
||||||
'FT_OPTS=-DGLVIS_USE_FREETYPE -I{0} -I{1}'.format(
|
'FT_OPTS=-DGLVIS_USE_FREETYPE {0} -I{1}'.format(
|
||||||
spec['freetype'].prefix.include.freetype2,
|
spec['freetype'].headers.include_flags,
|
||||||
spec['fontconfig'].prefix.include),
|
spec['fontconfig'].prefix.include),
|
||||||
'FT_LIBS={0} {1}'.format(
|
'FT_LIBS={0} {1}'.format(
|
||||||
spec['freetype'].libs.ld_flags,
|
spec['freetype'].libs.ld_flags,
|
||||||
|
|
|
@ -239,8 +239,7 @@ def prepare_install_config(self):
|
||||||
self.spec['bzip2'].prefix.lib + '\n',
|
self.spec['bzip2'].prefix.lib + '\n',
|
||||||
# Enter local include search path(s) :
|
# Enter local include search path(s) :
|
||||||
# All other paths will be passed by the Spack wrapper.
|
# All other paths will be passed by the Spack wrapper.
|
||||||
join_path(self.spec['freetype'].prefix.include, 'freetype2') +
|
self.spec['freetype'].headers.directories[0] + '\n',
|
||||||
'\n',
|
|
||||||
# Go back and make more changes or review?
|
# Go back and make more changes or review?
|
||||||
'n\n',
|
'n\n',
|
||||||
# Save current configuration?
|
# Save current configuration?
|
||||||
|
|
|
@ -376,9 +376,11 @@ def common_config_args(self):
|
||||||
|
|
||||||
if self.spec.variants['freetype'].value == 'spack':
|
if self.spec.variants['freetype'].value == 'spack':
|
||||||
config_args.extend([
|
config_args.extend([
|
||||||
'-system-freetype',
|
'-system-freetype'
|
||||||
'-I{0}/freetype2'.format(self.spec['freetype'].prefix.include)
|
|
||||||
])
|
])
|
||||||
|
config_args.extend(
|
||||||
|
self.spec['freetype'].headers.include_flags.split()
|
||||||
|
)
|
||||||
if not MACOS_VERSION:
|
if not MACOS_VERSION:
|
||||||
config_args.append('-fontconfig')
|
config_args.append('-fontconfig')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue