forked from vcmi/vcmi-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfix_ffmpeg_confs.py
22 lines (16 loc) · 978 Bytes
/
fix_ffmpeg_confs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
import vcmiutil
# fixes ffmpeg library naming, so that they're built as libXXX.so, instead of libXXX.so.version (android cannot load libraries like that)
def fixFFConf():
replacements = [
vcmiutil.ReplacementEntry("SLIBNAME_WITH_VERSION=$(SLIBNAME).$(LIBVERSION)", "SLIBNAME_WITH_VERSION=$(SLIBNAME)"),
vcmiutil.ReplacementEntry("SLIBNAME_WITH_MAJOR=$(SLIBNAME).$(LIBMAJOR)", "SLIBNAME_WITH_MAJOR=$(SLIBNAME)"),
vcmiutil.ReplacementEntry("SLIB_INSTALL_NAME=$(SLIBNAME_WITH_VERSION) ", "SLIB_INSTALL_NAME=$(SLIBNAME)"),
vcmiutil.ReplacementEntry("SLIB_INSTALL_LINKS=$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)", "SLIB_INSTALL_LINKS=")
]
vcmiutil.fixFile("./ext/ff/ffmpeg/configure", replacements)
def fixX264Conf():
replacements = [ vcmiutil.ReplacementEntry("echo \"SONAME=libx264.so.$API\" >> config.mak", "echo \"SONAME=libx264.so\" >> config.mak") ]
vcmiutil.fixFile("./ext/ff/x264/configure", replacements)
fixFFConf()
fixX264Conf()