зеркало из https://github.com/github/ruby-gpgme.git
build: Replace -lLIB with LIB.a for locally built libraries
LIBPATH in the generated Makefile may contain -L$(archlibdir) before the ports' lib directories. Disable path searching by resolving absolute paths of locally built libraries. Fixes issue #50.
This commit is contained in:
Родитель
fc299c9c1f
Коммит
325e772ff5
|
@ -133,8 +133,20 @@ EOS
|
|||
else
|
||||
$LIBPATH = $LIBPATH | [lpath]
|
||||
end
|
||||
when /\A-l./
|
||||
libs.push(arg)
|
||||
when /\A-l(.+)\z/
|
||||
# Resolve absolute paths of local static libraries to avoid
|
||||
# linking with system libraries.
|
||||
libname_to_recipe = {
|
||||
'gpgme' => gpgme_recipe,
|
||||
'assuan' => libassuan_recipe,
|
||||
'gpg-error' => libgpg_error_recipe
|
||||
}
|
||||
recipe = libname_to_recipe[$1]
|
||||
if recipe
|
||||
libs.push(File.join(recipe.path, 'lib', "lib#{$1}.#{$LIBEXT}"))
|
||||
else
|
||||
libs.push(arg)
|
||||
end
|
||||
else
|
||||
$LDFLAGS << ' ' << arg.shellescape
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче