summaryrefslogtreecommitdiff
path: root/mk/plist
diff options
context:
space:
mode:
authorobache <obache>2013-04-17 11:53:44 +0000
committerobache <obache>2013-04-17 11:53:44 +0000
commit6fb2158f0a82cc2aaaa6db2d50c3d9113031a206 (patch)
treec075ff4391c7d8d6c1f2d39b973d31d015ea18bc /mk/plist
parent074d69cf3713ea4444460f34c38143c229e9fd2b (diff)
downloadpkgsrc-6fb2158f0a82cc2aaaa6db2d50c3d9113031a206.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/plist')
-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.
###
{