summaryrefslogtreecommitdiff
path: root/mk/plist
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-03-08 08:52:25 +0000
committerobache <obache@pkgsrc.org>2014-03-08 08:52:25 +0000
commit62070113a482a50671b1442a295ae94b9338cde1 (patch)
tree28f88ce39b144b9827bc0828c6585913cbdde8c0 /mk/plist
parentf2ef690a9d04e0796df71a5e2ed809008ff28b89 (diff)
downloadpkgsrc-62070113a482a50671b1442a295ae94b9338cde1.tar.gz
Improve shlib name conversion for Cygwin.
* dll may be in ${PREFIX}/bin instead of ${PREFIX}/lib. * dll name may be cygXXX.dll instead of libXXX.dll. * versioning name may be foo-X.Y.Z.dll instead of foo.X.Y.Z.dll.
Diffstat (limited to 'mk/plist')
-rw-r--r--mk/plist/shlib-pe.awk22
1 files changed, 17 insertions, 5 deletions
diff --git a/mk/plist/shlib-pe.awk b/mk/plist/shlib-pe.awk
index de779c906ec..778a2dd540d 100644
--- a/mk/plist/shlib-pe.awk
+++ b/mk/plist/shlib-pe.awk
@@ -1,4 +1,4 @@
-# $NetBSD: shlib-pe.awk,v 1.3 2013/04/17 11:53:44 obache Exp $
+# $NetBSD: shlib-pe.awk,v 1.4 2014/03/08 08:52:25 obache Exp $
#
# Copyright (c) 2006,2013 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -50,12 +50,18 @@ BEGIN {
###
### add_dll(lib) adds the named "lib" to the PLIST entries list and
-### to the dlls list if we haven't already seen it.
+### to the dlls list if we haven't already seen it.
+### dll may be in "bin" or its name may be cygXXX.dll instead of libXXX.dll.
###
function add_dll(lib) {
if (dlls[lib] == "") {
dlls[lib] = lib
entries[++nentries] = lib
+ if (sub("^lib/lib", "bin/lib", lib)) {
+ add_dll(lib)
+ sub("^bin/lib", "bin/cyg", lib)
+ add_dll(lib)
+ }
}
}
@@ -94,10 +100,14 @@ function add_dll(lib) {
lib = $0; sub("\\.so\\.", ".", lib); sub("\\.so$", "", lib)
lib = lib ".dll"
add_dll(lib)
+ sub("\\.", "-", lib)
+ add_dll(lib)
while (sub("\\.[0-9]+$", "")) {
lib = $0; sub("\\.so\\.", ".", lib); sub("\\.so$", "", lib)
lib = lib ".dll"
add_dll(lib)
+ sub("\\.", "-", lib)
+ add_dll(lib)
}
if (sub("\\.so$", "")) {
lib = $0 ".dll"
@@ -140,9 +150,11 @@ function add_dll(lib) {
if (system(cmd) == 0) {
entries[++nentries] = $0
}
- lib = $0; sub("\\.a$", "", lib)
- lib = lib ".dll.a"
- add_dll(lib)
+ lib = $0; sub("\\.a$", ".dll.a", lib)
+ cmd = TEST " -f " PREFIX "/" lib
+ if (system(cmd) == 0) {
+ entries[++nentries] = lib
+ }
next
}