pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/plist Improve shlib name conversion for Cygwin.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4c59e756fa1f
branches:  trunk
changeset: 631496:4c59e756fa1f
user:      obache <obache%pkgsrc.org@localhost>
date:      Sat Mar 08 08:52:25 2014 +0000

description:
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:

 mk/plist/shlib-pe.awk |  22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diffs (59 lines):

diff -r 8bc218d6318a -r 4c59e756fa1f mk/plist/shlib-pe.awk
--- a/mk/plist/shlib-pe.awk     Sat Mar 08 07:19:51 2014 +0000
+++ b/mk/plist/shlib-pe.awk     Sat Mar 08 08:52:25 2014 +0000
@@ -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 @@
 
 ###
 ### 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 @@
        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 @@
        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
 }
 



Home | Main Index | Thread Index | Old Index