summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c2f2d3ed74a92fc41fcecadda2157483f998081c (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
# Maintainer: Karl-Felix Glatzer <karl.glatzer@gmx.de>
pkgname=mingw-w64-orc
pkgver=0.4.31
pkgrel=1
pkgdesc="Optimized Inner Loop Runtime Compiler (mingw-w64)"
arch=('any')
license=('custom')
url="https://gitlab.freedesktop.org/gstreamer/orc"
depends=('mingw-w64-crt')
makedepends=('mingw-w64-gcc' 'mingw-w64-meson' 'wine' 'git')
options=('!strip' '!buildflags' '!libtool' 'staticlibs')
#source=(https://gstreamer.freedesktop.org/data/src/orc/orc-${pkgver}.tar.xz{,.asc}
_commit=9901a96eaff271c2d3b595214213f6805ff803c8  # tags/0.4.31^0
source=("git+https://gitlab.freedesktop.org/gstreamer/orc.git#commit=$_commit"
        meson_i686-w64-mingw32
        meson_x86_64-w64-mingw32)
validpgpkeys=('7F4BC7CC3CA06F97336BBFEB0668CC1486C2D7B5') #Sebastian Dröge
sha256sums=('SKIP'
            '3eed78156a85a6b8238cd9b64d37df1a0dd8ec9816e71c2ed7a70874289f8e2e'
            'a07b08deafafabf9196dbc0583093fff8be9c45e29f73f7c286d5fc99492434d')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

build() {
  for _arch in ${_architectures}; do
    #mkdir -p "${srcdir}/orc-$pkgver/build-${_arch}" && cd "${srcdir}/orc-$pkgver/build-${_arch}"
    mkdir -p "${srcdir}/orc/build-${_arch}" && cd "${srcdir}/orc/build-${_arch}"

    ${_arch}-meson \
          "${srcdir}/orc"
    ninja
  done
}

check() {
  for _arch in ${_architectures}; do
    #cd "${srcdir}/orc-$pkgver/build-${_arch}"
    cd "${srcdir}/orc/build-${_arch}"

    # Copy dlls necessary to run most tests
    cp "${srcdir}/orc/build-${_arch}/orc/liborc"*.dll .
    cp "${srcdir}/orc/build-${_arch}/orc-test/liborc-test"*.dll .

    meson test --print-errorlogs
  done
}

package() {
  for _arch in ${_architectures}; do
    #cd "${srcdir}/orc-$pkgver/build-${_arch}"
    cd "${srcdir}/orc/build-${_arch}"
    DESTDIR="$pkgdir" ninja -C . install
    #install -Dm644 "${srcdir}/orc-$pkgver/COPYING" "$pkgdir/usr/${_arch}/share/licenses/orc/COPYING"
    install -Dm644 "${srcdir}/orc/COPYING" "$pkgdir/usr/${_arch}/share/licenses/orc/COPYING"

    #${_arch}-strip -s ${pkgdir}/usr/${_arch}/bin/*.exe
    #${_arch}-strip -x -g ${pkgdir}/usr/${_arch}/bin/*.dll
    #${_arch}-strip -g ${pkgdir}/usr/${_arch}/lib/*.a
  done
}