blob: aacb9b2a308c24b8a7d4d8715f0d461591421bb2 (
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
|
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
from cerbero.tools.libtool import LibtoolLibrary
class Recipe(recipe.Recipe):
name = 'openh264'
version = '2.0.0'
url = 'https://github.com/cisco/%(name)s/archive/v%(version)s.tar.gz'
tarball_checksum = '73c35f80cc487560d11ecabb6d31ad828bd2f59d412f9cd726cc26bfaf4561fd'
stype = SourceType.TARBALL
btype = BuildType.MESON
licenses = [{License.BSD: ['LICENSE']}]
files_libs = ['libopenh264']
files_devel = ['include/wels', 'lib/pkgconfig/openh264.pc']
patches = [
# https://github.com/cisco/openh264/commit/d4518b3f184d538c03c3c15d3b64b5a41ebfa529
name + "/0001-meson-build-Bump-soname-version-to-5.patch",
# https://github.com/cisco/openh264/pull/3247
name + "/0001-meson-add-support-for-android-ios-macos.patch",
name + "/0001-depend-on-gnustl-for-android.patch",
]
def post_install(self):
# XXX: Don't forget to keep this in sync with the library version!
dependency_libs=[]
if self.config.target_platform == Platform.IOS:
dependency_libs += ['-lc++']
elif self.config.target_platform == Platform.DARWIN:
dependency_libs += ['-lc++']
elif self.config.target_platform == Platform.ANDROID:
dependency_libs += ['gnustl', '-lm']
elif self.config.target_platform in [Platform.WINDOWS, Platform.LINUX]:
dependency_libs += ['-lstdc++', '-lm']
else:
raise NotImplementedError
libtool_la = LibtoolLibrary('openh264', 0, None, None, self.config.libdir,
self.config.target_platform,
deps=dependency_libs)
libtool_la.save()
super().post_install()
|