@@ -3,19 +3,27 @@ from cerbero.tools.libtool import LibtoolLibrary
3
3
4
4
5
5
class Recipe (recipe .Recipe ):
6
- version = '20191217-2245 '
6
+ version = '0.164.3108+git31e19f9 '
7
7
name = 'x264'
8
- licenses = [License .GPLv2Plus ]
9
8
stype = SourceType .TARBALL
10
- configure_tpl = "%(config-sh)s --prefix=%(prefix)s " \
11
- "--libdir=%(libdir)s"
12
- configure_options = '--enable-shared --enable-static --enable-pic ' \
13
- '--disable-strip --disable-lavf'
14
- url = 'https://download.videolan.org/pub/x264/snapshots/x264-snapshot-%(version)s-stable.tar.bz2'
15
- tarball_dirname = 'x264-snapshot-%(version)s-stable'
16
- tarball_checksum = 'b2495c8f2930167d470994b1ce02b0f4bfb24b3317ba36ba7f112e9809264160'
9
+ btype = BuildType .MESON
10
+ # The snapshotting service is discontinued.
11
+ # However, there's no pinned tag for each stable commit.
12
+ # See https://download.videolan.org/pub/x264/snapshots/x264-snapshot-20191218-README.txt
13
+ # Patch and tarball must match the below port (keeping it for reference)
14
+ # remotes = {'origin': 'https://gitlab.freedesktop.org/gstreamer/meson-ports/%(name)s.git'}
15
+ # commit = 'origin/164.3108-meson'
16
+ # Source url = 'https://deb.debian.org/debian/pool/main/x/x264/x264_%(version)s.orig.tar.gz'
17
+ url = 'https://gstreamer.freedesktop.org/src/mirror/%(name)s_%(version)s.orig.tar.gz'
18
+ tarball_checksum = '41606cb8e788a7f8c4514290646d4ba5c7bc68d9e1ccd1a73f446a90546913eb'
19
+
20
+ licenses = [License .GPLv2Plus ]
21
+
22
+ patches = [
23
+ f'{ name } /0001-Add-Meson-build.patch' ,
24
+ ]
17
25
18
- patches = [ 'x264/0001-configure-Force-pkgconfig-file-to-have-relative-valu.patch' ]
26
+ meson_options = {}
19
27
20
28
files_libs = ['libx264' ]
21
29
files_bins = ['x264' ]
@@ -25,48 +33,11 @@ class Recipe(recipe.Recipe):
25
33
allow_parallel_build = False
26
34
27
35
def prepare (self ):
28
- # clang x86-32 fails at generating proper asm PIC code
29
- # See bug https://bugzilla.gnome.org/show_bug.cgi?id=727079
30
- enable_asm = True
31
- AS = ['nasm' ]
32
-
33
- arch = self .config .target_arch
34
- if self .config .target_arch == Architecture .X86 :
35
- arch = 'i686'
36
- if Architecture .is_arm (self .config .target_arch ):
37
- cc = self .get_env ('CC' )
38
- if cc :
39
- AS = [cc ]
40
- else :
41
- AS = []
42
- if self .config .target_platform in [Platform .IOS , Platform .DARWIN ]:
43
- if Architecture .is_arm (self .config .target_arch ):
44
- # x264 ships its own gas-preprocessor.pl
45
- AS = ['tools/' + self .get_env ('GAS' )]
46
- elif self .config .target_arch == Architecture .X86 :
47
- enable_asm = False
48
-
49
36
if self .config .target_platform == Platform .ANDROID :
50
- v = DistroVersion .get_android_api_version (self .config .target_distro_version )
51
- # Don't build the cli on Android, it fails with NDK 16
52
- self .configure_options += ' --disable-cli'
37
+ self .meson_options ['cli' ] = 'false'
53
38
self .files_bins .remove ('x264' )
54
- if self .config .target_arch in [Architecture .X86_64 ]:
55
- # Fails linking into an android application
56
- enable_asm = False
57
- elif self .config .target_arch in [Architecture .X86 ] and v < 24 :
58
- # passing -mstackrealign consumes an extra register and will
59
- # fail compliation.
60
- # https://github.com/android-ndk/ndk/issues/690
61
- # https://github.com/android-ndk/ndk/issues/693
62
- enable_asm = False
63
-
64
- self .set_env ('AS' , * AS )
65
- if enable_asm is False :
66
- self .configure_options += ' --disable-asm '
67
39
68
40
def post_install (self ):
69
- libtool_la = LibtoolLibrary ('x264' , 148 , None , None , self .config .libdir ,
70
- self .config .target_platform )
71
- libtool_la .save ()
41
+ LibtoolLibrary ('x264' , 164 , None , None , self .config .libdir ,
42
+ self .config .target_platform ).save ()
72
43
super ().post_install ()
0 commit comments