28 echo "gtk-bundle-from-msys2.sh [-c] [-z] [-2 | -3]"
29 echo " -c Use pacman cache. Otherwise pacman will download"
31 echo " -z Create a zip afterwards"
32 echo " -2 Prefer gtk2"
33 echo " -3 Prefer gtk3"
42 if [ -z "$cachedir" ]; then
43 cachedir
="/var/cache/pacman/pkg"
46 if [ "$use_cache" = "yes" ] && ! [ -d "$cachedir" ]; then
47 echo "Cache dir \"$cachedir\" not a directory"
54 if [ "$use_cache" = "yes" ]; then
55 ls $cachedir/mingw-w64-
$ABI-$1-* |
sort -V |
tail -n 1
57 pacman
-Sp mingw-w64-
$ABI-$1
65 ADW
=$
(getpkg adwaita-icon-theme
)
79 for i
in $GLIB $ATK $PANGO $CAURIO $ADW $GTK; do
80 if [ "$use_cache" = "yes" -a -e "$i" ]; then
81 echo "Extracting $i from cache"
84 echo "Download $i using curl"
85 curl
-L "$i" |
tar -x --xz
87 echo "Running post_install script"
88 test -f .INSTALL
&& /bin
/bash
-c ". .INSTALL; post_install"
89 if [ "$make_zip" = "yes" -a "$i" = "$GTK" ]; then
90 VERSION
=$
(grep ^pkgver .PKGINFO |
sed -e 's,^pkgver = ,,' -e 's,-.*$,,')
92 rm -f .INSTALL .MTREE .PKGINFO
95 if [ -d mingw32
]; then
96 for d
in bin etc include lib locale share
; do
103 if [ "$make_zip" = "yes" ]; then
104 if [ -z "$VERSION" ]; then
105 VERSION
="unknown-version"
107 echo "Packing the bundle"
108 zip -r gtk-
$VERSION.
zip bin etc include lib locale share