summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2013-04-17 11:53:44 +0000
committerobache <obache@pkgsrc.org>2013-04-17 11:53:44 +0000
commit96cd8e6f0aa75c058cbfc9a7bd3eb106f80b376e (patch)
treec075ff4391c7d8d6c1f2d39b973d31d015ea18bc /mk
parent593d4151191d9320a7754250c06fb5fb004002e5 (diff)
downloadpkgsrc-96cd8e6f0aa75c058cbfc9a7bd3eb106f80b376e.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).
Diffstat (limited to 'mk')
-rw-r--r--mk/plist/shlib-pe.awk20
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.
###
{