Experimental package creation tool for MinGW.org
Revision | 62159e13ca41b691b8a09c027af242308d0632b3 (tree) |
---|---|
Time | 2022-03-09 23:43:21 |
Author | Keith Marshall <keith@user...> |
Commiter | Keith Marshall |
Honour "--identity" option for specification file name.
* src/modules/pkgspec.sh (pkgspec_from_srcdir): Prioritize over...
[-n PACKAGE_ABS_SRCDIR] (PACKAGE_ABS_SRCDIR): ...this, preferred to...
[-z PACKAGE_ABS_SRCDIR] (PACKAGE_SRCDIR): ...this; do NOT use this by
default, because it doesn't yield a valid specification file name, in
the common case where its basename is "..", or ".".
@@ -60,11 +60,13 @@ | ||
60 | 60 | # a suitable default from the name of the top-level source code directory. |
61 | 61 | # |
62 | 62 | pkgspec_from_srcdir() { |
63 | - pkgspec_request_class=pkgspec_$1 | |
63 | + local pkgspec_request_class=pkgspec_$1 | |
64 | 64 | # |
65 | 65 | # An optional second argument overrides the default derivation. |
66 | 66 | # |
67 | - IFS=-; set -- ${2-`basename "$PACKAGE_SRCDIR"`}; IFS= | |
67 | + local default_srcdir="$PACKAGE_ABS_SRCDIR" | |
68 | + test -n "$default_srcdir" || default_srcdir="$PACKAGE_SRCDIR" | |
69 | + IFS=-; set -- ${2-${PORTSPEC-`basename "$default_srcdir"`}}; IFS= | |
68 | 70 | value= fs=; $pkgspec_request_class "$@" |
69 | 71 | } |
70 | 72 | pkgspec_get_name() { |