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:
target = 'linux'
make('INSTALL_TOP=%s' % prefix,
'MYLDFLAGS=-L%s -L%s' % (
spec['readline'].prefix.lib,
spec['ncurses'].prefix.lib),
'MYLIBS=-lncursesw -ltinfow',
'MYLDFLAGS=' + ' '.join((
spec['readline'].libs.search_flags,
spec['ncurses'].libs.search_flags)),
'MYLIBS=%s' % spec['ncurses'].libs.link_flags,
'CC=%s -std=gnu99 %s' % (spack_cc,
self.compiler.cc_pic_flag),
target)