diff options
author | obache <obache> | 2013-04-17 11:53:44 +0000 |
---|---|---|
committer | obache <obache> | 2013-04-17 11:53:44 +0000 |
commit | cc9ac4ba1f5ed898ec8239c720b0ed22f19d69b7 (patch) | |
tree | c075ff4391c7d8d6c1f2d39b973d31d015ea18bc | |
parent | 3bf679659bd46231d01254d69848c9519cc92e50 (diff) | |
download | pkgsrc-cc9ac4ba1f5ed898ec8239c720b0ed22f19d69b7.tar.gz |
* try to replace .so with .dll without `lib' prefix, like a plugins.
* also try to register DLL import library (.dll.a) from static library (.a).
-rw-r--r-- | mk/plist/shlib-pe.awk | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/mk/plist/shlib-pe.awk b/mk/plist/shlib-pe.awk index 8bdc4c74cc5..de779c906ec 100644 --- a/mk/plist/shlib-pe.awk +++ b/mk/plist/shlib-pe.awk @@ -1,4 +1,4 @@ -# $NetBSD: shlib-pe.awk,v 1.2 2013/03/03 11:53:58 obache Exp $ +# $NetBSD: shlib-pe.awk,v 1.3 2013/04/17 11:53:44 obache Exp $ # # Copyright (c) 2006,2013 The NetBSD Foundation, Inc. # All rights reserved. @@ -115,7 +115,7 @@ function add_dll(lib) { ### module, so the entry should stay. Convert it into a dll name as ### well and record it as a dll. ### -/.*\/lib[^\/]+\.so$/ { +/.*\/[^\/]+\.so$/ { cmd = TEST " -f " PREFIX "/" $0 if (system(cmd) == 0) { entries[++nentries] = $0 @@ -131,6 +131,22 @@ function add_dll(lib) { } ### +### If the ".a" file actually exists, then it's a library archive, +### so the entry should stay. Convert it into a DLL import library name as +### well and record it as a DLL. +### +/.*\/lib[^\/]+\.a$/ { + cmd = TEST " -f " PREFIX "/" $0 + if (system(cmd) == 0) { + entries[++nentries] = $0 + } + lib = $0; sub("\\.a$", "", lib) + lib = lib ".dll.a" + add_dll(lib) + next +} + +### ### All other entries are stored verbatim in the entries array. ### { |