-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathPKGBUILD
87 lines (74 loc) · 2.85 KB
/
PKGBUILD
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
86
87
# Maintainer: Alexey Pavlov <[email protected]>
_realname=libplacebo
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=7.349.0
pkgrel=1
pkgdesc="Reusable library for GPU-accelerated video/image rendering primitives (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://code.videolan.org/videolan/libplacebo"
depends=("${MINGW_PACKAGE_PREFIX}-lcms2"
"${MINGW_PACKAGE_PREFIX}-libdovi"
"${MINGW_PACKAGE_PREFIX}-shaderc"
"${MINGW_PACKAGE_PREFIX}-spirv-cross"
"${MINGW_PACKAGE_PREFIX}-vulkan")
makedepends=("git"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-pkgconf"
"${MINGW_PACKAGE_PREFIX}-python-glad"
"${MINGW_PACKAGE_PREFIX}-python-jinja"
"${MINGW_PACKAGE_PREFIX}-fast_float"
"${MINGW_PACKAGE_PREFIX}-xxhash"
"${MINGW_PACKAGE_PREFIX}-vulkan-headers")
license=('LGPL2.1')
source=(${url}/-/archive/v${pkgver}/${_realname}-v${pkgver}.tar.gz
"0001-add-cflags-private.patch")
sha256sums=('79120e685a1836344b51b13b6a5661622486a84e4d4a35f6c8d01679a20fbc86'
'bda9bed8b8fff7e69fe750b6f2caafde67f63343d05698a81fb1f7b27ac4cca3')
build() {
mkdir -p "${srcdir}"/build-shared-${MSYSTEM} && cd "${srcdir}"/build-shared-${MSYSTEM}
MSYS2_ARG_CONV_EXCL="--prefix=" \
meson setup \
--prefix="${MINGW_PREFIX}" \
--buildtype plain \
-Ddemos=false \
-Dtests=true \
-Dd3d11=enabled \
-Dlcms=enabled \
-Dlibdovi=enabled \
-Dshaderc=enabled \
-Dvulkan=enabled \
"../${_realname}-v${pkgver}"
meson compile
mkdir -p "${srcdir}"/build-static-${MSYSTEM} && cd "${srcdir}"/build-static-${MSYSTEM}
MSYS2_ARG_CONV_EXCL="--prefix=" \
meson setup \
--prefix="${MINGW_PREFIX}" \
--buildtype plain \
-Ddemos=false \
-Dtests=false \
-Dd3d11=enabled \
-Dlcms=enabled \
-Dlibdovi=enabled \
-Dshaderc=enabled \
-Dvulkan=enabled \
--default-library=static \
--prefer-static \
"../${_realname}-v${pkgver}"
meson compile
}
check() {
cd "${srcdir}"/build-shared-${MSYSTEM}
meson test
}
package() {
cd "${srcdir}"/build-static-${MSYSTEM}
DESTDIR="${pkgdir}" meson install
cd "${srcdir}"/build-shared-${MSYSTEM}
DESTDIR="${pkgdir}" meson install
cd "${pkgdir}${MINGW_PREFIX}"
patch -p0 -i "${srcdir}"/0001-add-cflags-private.patch
install -Dm644 "${srcdir}/${_realname}-v${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}