vcpkg/ports/botan/fix-objectfile-list.patch
Kai Pastor abce84432c
[botan] Update, higher level maintainer functions (#27750)
* Use higher level maintainer functions, cleanup

* Update

* Check vcpkg version

* Only static linkage on mingw

* Fix zlib linkage

* Patch for command line lenght issue
2022-11-17 23:22:14 -08:00

24 lines
932 B
Diff

diff --git a/configure.py b/configure.py
index 2474860a5..7d320d470 100755
--- a/configure.py
+++ b/configure.py
@@ -1821,13 +1821,12 @@ def yield_objectfile_list(sources, obj_dir, obj_suffix, options):
for src in sources:
(directory, filename) = os.path.split(os.path.normpath(src))
- parts = directory.split(os.sep)
+ parts_in_src = directory.split(os.sep + 'src' + os.sep)
+ parts = []
- if 'src' in parts:
- parts = parts[parts.index('src')+2:]
- elif options.amalgamation and filename.find(options.name_amalgamation) != -1:
- parts = []
- else:
+ if len(parts_in_src) > 1:
+ parts = [ 'src' ] + parts_in_src[-1].split(os.sep)
+ elif not options.amalgamation or filename.find(options.name_amalgamation) == -1:
raise InternalError("Unexpected file '%s/%s'" % (directory, filename))
if parts != []: