summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 09119e921f0488af6d33416eeac84c5062eccaff (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
# Maintainer: Iaroslav Sorokin <iaroslav.sorokin@gmail.com>

pkgname=mingw-w64-libadwaita
pkgver=1.3.4
pkgrel=1
pkgdesc='Building blocks for modern GNOME applications.'
arch=('any')
url='https://gitlab.gnome.org/GNOME/libadwaita/-/tree/libadwaita-1-3/'
license=('LGPL-2.1+')
makedepends=(
  'git'
  'mingw-w64-gcc'
  'mingw-w64-pkg-config'
  'mingw-w64-meson'
)
depends=(
  'mingw-w64-glib2>=2.72.0'
  'mingw-w64-gtk4>=4.9.5'
)
options=('!strip' '!buildflags' 'staticlibs')
source=("$pkgname-$pkgver::git+https://gitlab.gnome.org/GNOME/libadwaita.git#tag=1.3.4")
sha256sums=('SKIP')

_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')

build() {
    cd "${srcdir}/${pkgname}-$pkgver"

    # Removing lines with stack protector flags (does not link)
    # sed -i '88,94d' meson.build

    for _arch in "${_architectures[@]}"; do
        mkdir -p "build-${_arch}"
        cd "build-${_arch}"
        "${_arch}-meson" \
            --default-library both \
            -Dintrospection=disabled
        ninja
        cd ..
    done
}

package() {
    cd "${srcdir}/${pkgname}-$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
}