aboutsummaryrefslogtreecommitdiff
path: root/extra/gst-plugins/build
blob: e3f185700be18cd74a22037608e8cd651870f8af (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
#!/bin/sh -e

check_option() {
    # Meson >=0.60.0 fails when an option used is unspecified in the project.
    # Meson also fails when supplied with empty arguments, so we set the return
    # value to something that the project provides
    grep -q "^option('$1'," meson_options.txt || set -- localedir share/locale
    # We are not trying to pass an option to printf here.
    # shellcheck disable=3045
    printf '-D%s=%s' "$@"
}

export DESTDIR="$1"

[ "$CPT_TEST" ] && test=enabled

for plugin in libav good bad ugly; do (
    cd "$plugin"

    # Enable auto-features in gst-plugins
    cl-meson \
        --auto-features=auto \
        "$(check_option examples      disabled)" \
        "$(check_option nls           disabled)" \
        "$(check_option introspection disabled)" \
        "$(check_option tests ${test:-disabled})" \
        "$(check_option qt5           disabled)" \
        . output

    ninja -C output
    ninja -C output install
) done