Browse Source

bin/build-packages: allow to pin different versions for different qt5-* dependencies (some have really funny values)

Erich Eckner 3 months ago
parent
commit
393b0f7361
1 changed files with 16 additions and 16 deletions
  1. 16
    16
      bin/build-packages

+ 16
- 16
bin/build-packages View File

@@ -778,23 +778,23 @@ while [ "${count}" -ne 0 ] && \
778 778
                     D
779 779
                   }
780 780
                 ' "${pkgfile}.so.needs"
781
-                qt_version=$(
782
-                  sed '
783
-                    s/^installed = qt[0-9]\+-\S\+-\([0-9.]\+\)\(-[^-]\+\)\{2\}$/\1/
784
-                    t
785
-                    d
786
-                  ' "${package_content_dir}/${pkgfile##*/}/.BUILDINFO" | \
787
-                    sort -u
788
-                )
789
-                if [ -n "${qt_version}" ] && \
790
-                  [ "$(printf '%s\n' "${qt_version}" | wc -l)" -eq 1 ]; then
791
-                  sed '
792
-                    s/^depend = \(qt5-\S\+\)$/\1='"${qt_version}"'/
793
-                    t
794
-                    d
795
-                  ' "${package_content_dir}/${pkgfile##*/}/.PKGINFO" >> \
781
+                sed '
782
+                  s/^installed = \(qt[0-9]\+-\S\+\)-\([0-9.]\+\)\(-[^-]\+\)\{2\}$/\1 \2/
783
+                  t
784
+                  d
785
+                ' "${package_content_dir}/${pkgfile##*/}/.BUILDINFO" | \
786
+                  sort -u | \
787
+                  sort -k1,1 > \
788
+                  "${tmp_dir}/installed-qt-versions"
789
+                sed '
790
+                  s/^depend = \(qt[0-9]\+-\S\+\)$/\1/
791
+                  t
792
+                  d
793
+                ' "${package_content_dir}/${pkgfile##*/}/.PKGINFO" | \
794
+                  sort -u | \
795
+                  join -1 1 -2 1 -o 2.1,2.2 - "${tmp_dir}/installed-qt-versions" | \
796
+                  tr ' ' '=' >> \
796 797
                   "${pkgfile}.so.needs"
797
-                fi
798 798
                 find "${package_content_dir}/${pkgfile##*/}" \
799 799
                   -name 'opt' -prune , \
800 800
                   \( -type f -o -type l \) \