summaryrefslogtreecommitdiff
path: root/recipes/gstreamer-1.0.recipe
blob: c2dd4eaec5cfd1d978381e2e899d3d645917687a (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
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
import shutil

class Recipe(custom.GStreamer):
    name = 'gstreamer-1.0'
    btype = BuildType.MESON
    tarball_checksum = '02211c3447c4daa55919c5c0f43a82a6fbb51740d57fc3af0639d46f1cf4377d'
    deps = ['glib']

    files_bins = ['gst-inspect-1.0',
                  'gst-typefind-1.0',
                  'gst-launch-1.0']

    files_libs = ['libgstbase-1.0', 'libgstcontroller-1.0',
                  'libgstnet-1.0', 'libgstreamer-1.0']

    platform_files_libs = {
        Platform.LINUX: ['libgstcheck-1.0'],
        Platform.ANDROID: ['libgstcheck-1.0'],
        Platform.DARWIN: ['libgstcheck-1.0'],
        Platform.WINDOWS: ['libgstcheck-1.0'],
    }

    files_plugins_core = [
        'lib/gstreamer-1.0/libgstcoreelements%(mext)s',
        'lib/gstreamer-1.0/libgstcoretracers%(mext)s'
    ]
    files_plugins_core_devel = [
        'lib/gstreamer-1.0/libgstcoreelements.a', 'lib/gstreamer-1.0/libgstcoreelements.la',
        'lib/gstreamer-1.0/libgstcoretracers.a', 'lib/gstreamer-1.0/libgstcoretracers.la',
    ]

    files_misc = ['libexec/gstreamer-1.0/gst-plugin-scanner%(bext)s']

    platform_files_misc = {
        Platform.LINUX: ['libexec/gstreamer-1.0/gst-ptp-helper%(bext)s'],
        Platform.DARWIN: ['libexec/gstreamer-1.0/gst-ptp-helper%(bext)s'],
    }

    files_devel = [
            'include/gstreamer-1.0/gst/*.h',
            'include/gstreamer-1.0/gst/base',
            'include/gstreamer-1.0/gst/controller',
            'include/gstreamer-1.0/gst/net',
            'lib/pkgconfig/gstreamer-1.0.pc',
            'lib/pkgconfig/gstreamer-base-1.0.pc',
            'lib/pkgconfig/gstreamer-controller-1.0.pc',
            'lib/pkgconfig/gstreamer-net-1.0.pc',
    ]

    platform_files_devel = {
        Platform.LINUX: ['include/gstreamer-1.0/gst/check', 'lib/pkgconfig/gstreamer-check-1.0.pc', 'share/aclocal/gst-element-check-1.0.m4'],
        Platform.ANDROID: ['include/gstreamer-1.0/gst/check', 'lib/pkgconfig/gstreamer-check-1.0.pc', 'share/aclocal/gst-element-check-1.0.m4'],
        Platform.DARWIN: ['include/gstreamer-1.0/gst/check', 'lib/pkgconfig/gstreamer-check-1.0.pc', 'share/aclocal/gst-element-check-1.0.m4'],
        Platform.WINDOWS: ['include/gstreamer-1.0/gst/check', 'lib/pkgconfig/gstreamer-check-1.0.pc', 'share/aclocal/gst-element-check-1.0.m4'],
    }

    files_lang = ['gstreamer-1.0']

    files_typelibs = [
        'Gst-1.0',
        'GstBase-1.0',
        'GstCheck-1.0',
        'GstController-1.0',
        'GstNet-1.0'
        ]


    def prepare(self):
        if self.config.target_platform == Platform.IOS:
            # iOS only supports static builds so plugins must be linked
            # and registered statically.
            self.meson_options['registry'] = 'false'

        if self.config.variants.nodebug:
            self.append_env('CFLAGS', '-DGST_LEVEL_MAX=GST_LEVEL_FIXME')

        if self.config.variants.unwind:
            self.deps += ['libunwind']
            self.meson_options['libunwind'] = 'enabled'
        else:
            self.meson_options['libunwind'] = 'disabled'

        if self.using_msvc():
            self.meson_options['dbghlp'] = 'enabled'