head 1.5; access; symbols pkgsrc-2023Q4:1.5.0.44 pkgsrc-2023Q4-base:1.5 pkgsrc-2023Q3:1.5.0.42 pkgsrc-2023Q3-base:1.5 pkgsrc-2023Q2:1.5.0.40 pkgsrc-2023Q2-base:1.5 pkgsrc-2023Q1:1.5.0.38 pkgsrc-2023Q1-base:1.5 pkgsrc-2022Q4:1.5.0.36 pkgsrc-2022Q4-base:1.5 pkgsrc-2022Q3:1.5.0.34 pkgsrc-2022Q3-base:1.5 pkgsrc-2022Q2:1.5.0.32 pkgsrc-2022Q2-base:1.5 pkgsrc-2022Q1:1.5.0.30 pkgsrc-2022Q1-base:1.5 pkgsrc-2021Q4:1.5.0.28 pkgsrc-2021Q4-base:1.5 pkgsrc-2021Q3:1.5.0.26 pkgsrc-2021Q3-base:1.5 pkgsrc-2021Q2:1.5.0.24 pkgsrc-2021Q2-base:1.5 pkgsrc-2021Q1:1.5.0.22 pkgsrc-2021Q1-base:1.5 pkgsrc-2020Q4:1.5.0.20 pkgsrc-2020Q4-base:1.5 pkgsrc-2020Q3:1.5.0.18 pkgsrc-2020Q3-base:1.5 pkgsrc-2020Q2:1.5.0.16 pkgsrc-2020Q2-base:1.5 pkgsrc-2020Q1:1.5.0.12 pkgsrc-2020Q1-base:1.5 pkgsrc-2019Q4:1.5.0.14 pkgsrc-2019Q4-base:1.5 pkgsrc-2019Q3:1.5.0.10 pkgsrc-2019Q3-base:1.5 pkgsrc-2019Q2:1.5.0.8 pkgsrc-2019Q2-base:1.5 pkgsrc-2019Q1:1.5.0.6 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.4 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.2 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.4.0.38 pkgsrc-2018Q2-base:1.4 pkgsrc-2018Q1:1.4.0.36 pkgsrc-2018Q1-base:1.4 pkgsrc-2017Q4:1.4.0.34 pkgsrc-2017Q4-base:1.4 pkgsrc-2017Q3:1.4.0.32 pkgsrc-2017Q3-base:1.4 pkgsrc-2017Q2:1.4.0.28 pkgsrc-2017Q2-base:1.4 pkgsrc-2017Q1:1.4.0.26 pkgsrc-2017Q1-base:1.4 pkgsrc-2016Q4:1.4.0.24 pkgsrc-2016Q4-base:1.4 pkgsrc-2016Q3:1.4.0.22 pkgsrc-2016Q3-base:1.4 pkgsrc-2016Q2:1.4.0.20 pkgsrc-2016Q2-base:1.4 pkgsrc-2016Q1:1.4.0.18 pkgsrc-2016Q1-base:1.4 pkgsrc-2015Q4:1.4.0.16 pkgsrc-2015Q4-base:1.4 pkgsrc-2015Q3:1.4.0.14 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.12 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.10 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.4.0.8 pkgsrc-2014Q4-base:1.4 pkgsrc-2014Q3:1.4.0.6 pkgsrc-2014Q3-base:1.4 pkgsrc-2014Q2:1.4.0.4 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.4.0.2 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.3.0.6 pkgsrc-2013Q4-base:1.3 pkgsrc-2013Q3:1.3.0.4 pkgsrc-2013Q3-base:1.3 pkgsrc-2013Q2:1.3.0.2 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.2.0.2 pkgsrc-2013Q1-base:1.2; locks; strict; comment @# @; 1.5 date 2018.08.22.20.48.37; author maya; state Exp; branches; next 1.4; commitid FMEpDDTKwDQBR9PA; 1.4 date 2014.03.08.08.52.25; author obache; state Exp; branches; next 1.3; commitid ZpTXW6xEzPJQdSrx; 1.3 date 2013.04.17.11.53.44; author obache; state Exp; branches; next 1.2; 1.2 date 2013.03.03.11.53.58; author obache; state Exp; branches; next 1.1; 1.1 date 2013.02.10.12.03.00; author obache; state Exp; branches; next ; desc @@ 1.5 log @Remove clauses 3,4 from TNF-only copyright blocks. This is based on the decision The NetBSD Foundation made in 2008 to do so, which was already applied to src. This change has been applied to code which is likely not in other repositories. ok board@@, reviewed by riastradh@@ @ text @# $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. # # This code is derived from software contributed to The NetBSD Foundation # by Johnny C. Lam. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # This awk script is a filter that reads PLIST entries and transforms # and expands entries that match ELF library into the appropriate Portable # Executable format, PE on Cygwin dll names. # BEGIN { LIBTOOL_EXPAND = ENVIRON["LIBTOOL_EXPAND"] ? ENVIRON["LIBTOOL_EXPAND"] : "/usr/pkgsrc/mk/plist/libtool-expand" LIBTOOLIZE_PLIST = ENVIRON["LIBTOOLIZE_PLIST"] ? ENVIRON["LIBTOOLIZE_PLIST"] : "yes" PREFIX = ENVIRON["PREFIX"] ? ENVIRON["PREFIX"] : "/usr/pkg" TEST = ENVIRON["TEST"] ? ENVIRON["TEST"] : "test" nentries = 0 } ### ### add_dll(lib) adds the named "lib" to the PLIST entries list and ### 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) } } } ### ### Stored special PLIST commands, e.g. @@comment, @@exec, etc., verbatim ### in the entries array. ### /^@@/ { entries[++nentries] = $0 next } ### ### Record all of the library names associated with a libtool archive ### in the "ltnames" array. Also, record the libtool archive in the ### "entries" array. ### (LIBTOOLIZE_PLIST ~ /[yY][eE][sS]/) && /.*\/[^\/]+\.la$/ { entries[++nentries] = $0 cmd = TEST " -f " PREFIX "/" $0 if (system(cmd) == 0) { cmd = "cd " PREFIX " && " LIBTOOL_EXPAND " " $0 while (cmd | getline) { ltnames[$0] = $0 } close(cmd) } next } ### ### Convert each ELF shlib entry into a dll entry. Also, record all ### dll names that can be derived from this entry as dlls. ### /.*\/lib[^\/]+\.so(\.[0-9]+)+$/ { 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" add_dll(lib) } if (sub("-([0-9.]+)$", "")) { lib = $0 ".dll" add_dll(lib) } next } ### ### If the ".so" file actually exists, then it's a dynamically loadable ### module, so the entry should stay. Convert it into a dll name as ### well and record it as a dll. ### /.*\/[^\/]+\.so$/ { cmd = TEST " -f " PREFIX "/" $0 if (system(cmd) == 0) { entries[++nentries] = $0 } lib = $0; sub("\\.so$", "", lib) lib = lib ".dll" add_dll(lib) if (sub("-([0-9.]+)$", "")) { lib = $0 ".dll" add_dll(lib) } next } ### ### 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$", ".dll.a", lib) cmd = TEST " -f " PREFIX "/" lib if (system(cmd) == 0) { entries[++nentries] = lib } next } ### ### All other entries are stored verbatim in the entries array. ### { entries[++nentries] = $0 } ### ### Print out the PLIST entries to standard output. ### END { # Drop valid library names associated with a libtool archive from # the list of dlls that will be removed from the PLIST. # for (j in dlls) { for (k in ltnames) { if (dlls[j] == ltnames[k]) { delete dlls[j] break } } } # Remove dll entries that *do* exist on the filesystem from the # list of dlls that will be removed from the PLIST. # for (j in dlls) { cmd = TEST " -f " PREFIX "/" dlls[j] if (system(cmd) == 0) { delete dlls[j] } } # Remove PLIST entries that match a non-existent dll. for (i in entries) { for (j in dlls) { if (entries[i] == dlls[j]) { delete entries[i] break } } } # Output the PLIST entries in order. for (i = 1; i <= nentries; i++) { if (entries[i]) { print entries[i] } } } @ 1.4 log @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. @ text @d1 1 a1 1 # $NetBSD: shlib-pe.awk,v 1.3 2013/04/17 11:53:44 obache Exp $ a16 7 # 3. All advertising materials mentioning features or use of this software # must display the following acknowledgement: # This product includes software developed by the NetBSD # Foundation, Inc. and its contributors. # 4. Neither the name of The NetBSD Foundation nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. @ 1.3 log @* 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). @ text @d1 1 a1 1 # $NetBSD: shlib-pe.awk,v 1.2 2013/03/03 11:53:58 obache Exp $ d53 2 a54 1 ### to the dlls list if we haven't already seen it. d60 5 d103 2 d109 2 d153 5 a157 3 lib = $0; sub("\\.a$", "", lib) lib = lib ".dll.a" add_dll(lib) @ 1.2 log @switch to based on shlib-dylib.awk @ text @d1 1 a1 1 # $NetBSD$ d118 1 a118 1 /.*\/lib[^\/]+\.so$/ { d134 16 @ 1.1 log @Improve PLIST handling for Cygwin (SHLIB_TYPE=PEwin) * also expand `dlname' in libtool archive * executable binary files may have .exe extension * rename shlib extension .so with .dll @ text @d3 62 a64 2 ### ### PLIST shlib filter for Portable Executable format, PE on Cygwin. d66 4 d71 17 a87 2 # Libtoolized packages don't need any special attention, but for others we need # to manually deal with the .dll library suffix. d89 22 a110 3 # Match shared libs /.*\/lib[^\/]+\.so(\.[0-9]+)*$/ { sub("\.so\.", ".dll."); d112 19 a130 3 # Match dynamically loaded modules /.*\.so$/ { sub("\.so$", ".dll"); d132 4 d137 45 a181 1 print @