lua package: fix build with ncurses~termlib (#27863)

Get link flags directly from dependencies rather than hardcoding
This commit is contained in:
Peter Brady 2021-12-10 21:24:33 -07:00 committed by GitHub
parent e4da7db567
commit 27ba835236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,10 +63,10 @@ def install(self, spec, prefix):
else: else:
target = 'linux' target = 'linux'
make('INSTALL_TOP=%s' % prefix, make('INSTALL_TOP=%s' % prefix,
'MYLDFLAGS=-L%s -L%s' % ( 'MYLDFLAGS=' + ' '.join((
spec['readline'].prefix.lib, spec['readline'].libs.search_flags,
spec['ncurses'].prefix.lib), spec['ncurses'].libs.search_flags)),
'MYLIBS=-lncursesw -ltinfow', 'MYLIBS=%s' % spec['ncurses'].libs.link_flags,
'CC=%s -std=gnu99 %s' % (spack_cc, 'CC=%s -std=gnu99 %s' % (spack_cc,
self.compiler.cc_pic_flag), self.compiler.cc_pic_flag),
target) target)