blob: 881ecaaf87a105a6cbbac66f8b4b1e0b50d9c663 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# Maintainer: lantw44 (at) gmail (dot) com
pkgname=mingw-w64-gtk4
pkgver=4.14.1
pkgrel=1
pkgdesc='GObject-based multi-platform GUI toolkit (mingw-w64)'
arch=('any')
url='https://www.gtk.org'
install="${pkgname}.install"
license=('LGPL')
makedepends=(
'mingw-w64-gcc'
'mingw-w64-pkg-config'
'mingw-w64-meson'
'mingw-w64-vulkan-headers'
'python-packaging'
'sassc'
'shaderc')
depends=(
'mingw-w64-crt'
'mingw-w64-adwaita-icon-theme'
'mingw-w64-cairo>=1.14.2-3'
'mingw-w64-fribidi>=1.0.6'
'mingw-w64-gdk-pixbuf2>=2.30.0'
'mingw-w64-glib2>=2.76.0'
'mingw-w64-graphene>=1.10.0'
'mingw-w64-gst-plugins-bad>=1.12.3'
'mingw-w64-harfbuzz>=2.6.0'
'mingw-w64-libepoxy>=1.4'
'mingw-w64-libjpeg-turbo'
'mingw-w64-libpng'
'mingw-w64-librsvg>=2.52.0'
'mingw-w64-libtiff'
'mingw-w64-pango>=1.50.0'
'mingw-w64-vulkan-icd-loader>=1.3')
options=('!strip' '!buildflags' 'staticlibs')
source=(
"https://download.gnome.org/sources/gtk/${pkgver%.*}/gtk-${pkgver}.tar.xz")
sha256sums=(
'fcefb3f132f8cc4711a9efa5b353c9ae9bb5eeff0246fa74dbc2f2f839b9e308')
_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')
prepare() {
cd "${srcdir}/gtk-${pkgver}"
local source_file
for source_file in "${source[@]}"; do
case "${source_file}" in
*.patch)
patch -p1 < "${srcdir}/${source_file}"
;;
esac
done
}
build() {
cd "${srcdir}/gtk-${pkgver}"
for _arch in "${_architectures[@]}"; do
mkdir -p "build-${_arch}"
cd "build-${_arch}"
"${_arch}-meson" \
--default-library both \
-Dbroadway-backend=false \
-Dwin32-backend=true \
-Dmedia-gstreamer=enabled \
-Dprint-cups=disabled \
-Ddocumentation=false \
-Dman-pages=false \
-Dintrospection=disabled
ninja
cd ..
done
}
package() {
cd "${srcdir}/gtk-${pkgver}"
for _arch in "${_architectures[@]}"; do
cd "build-${_arch}"
DESTDIR="${pkgdir}" ninja install
find "${pkgdir}/usr/${_arch}" -name '*.exe' -exec "${_arch}-strip" '{}' ';'
find "${pkgdir}/usr/${_arch}" -name '*.dll' -exec "${_arch}-strip" --strip-unneeded '{}' ';'
find "${pkgdir}/usr/${_arch}" '(' -name '*.a' -o -name '*.dll' ')' -exec "${_arch}-strip" -g '{}' ';'
cd ..
done
}
|