diff options
Diffstat (limited to 'Win64Depends.sh')
-rw-r--r-- | Win64Depends.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Win64Depends.sh b/Win64Depends.sh index 0a1dd89..bff86eb 100644 --- a/Win64Depends.sh +++ b/Win64Depends.sh @@ -1,5 +1,5 @@ #!/bin/sh -e -# Win64Depends.sh: download dependencies from MSYS2 for cross-compilation +# Win64Depends.sh: download dependencies from MSYS2 for cross-compilation. # Dependencies: AWK, sed, sha256sum, cURL, bsdtar, wine64 repository=https://repo.msys2.org/mingw/mingw64/ @@ -27,7 +27,8 @@ fetch() { } BEGIN { while ((getline < "db.tsv") > 0) { filenames[$1] = $2; deps[$1] = ""; for (i = 3; i <= NF; i++) { gsub(/[<=>].*/, "", $i); deps[$1] = deps[$1] $i FS } - } for (i = 0; i < ARGC; i++) get(ARGV[i]) }' "$@" | while IFS= read -r name + } for (i = 0; i < ARGC; i++) get(ARGV[i]) }' "$@" | tee db.want | \ + while IFS= read -r name do status Fetching "$name" [ -f "packages/$name" ] || curl -#o "packages/$name" "$repository/$name" @@ -44,9 +45,9 @@ extract() { for subdir in * do [ -d "$subdir" -a "$subdir" != packages ] && rm -rf -- "$subdir" done - for i in packages/* - do bsdtar -xf "$i" --strip-components 1 mingw64 - done + while IFS= read -r name + do bsdtar -xf "packages/$name" --strip-components 1 + done < db.want } configure() { @@ -55,15 +56,16 @@ configure() { wine64 bin/gdk-pixbuf-query-loaders.exe \ > lib/gdk-pixbuf-2.0/2.10.0/loaders.cache - # pkgconf has a command line option for this, but CMake can't pass it - sed -i "s|^prefix=/mingw64|prefix=$(pwd)|" {share,lib}/pkgconfig/*.pc + # pkgconf has a command line option for this, but CMake can't pass it. + sed -i "s|^prefix=/mingw64|prefix=$(pwd)|" \ + share/pkgconfig/*.pc lib/pkgconfig/*.pc } mkdir -p win32-depends cd win32-depends dbsync fetch mingw-w64-x86_64-gtk3 mingw-w64-x86_64-lua \ - mingw-w64-x86_64-libwinpthread-git # because we don't do "provides"? + mingw-w64-x86_64-libwinpthread-git # Because we don't do "provides"? verify extract configure |