50 lines
1.2 KiB
Python
50 lines
1.2 KiB
Python
from lib.make import *
|
|
from lib import cpp, arch
|
|
|
|
|
|
version("1.17.0")
|
|
description("the WebM VP8/VP9 Codec SDK")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_managed("github://webmproject/libvpx#v1.17.0")
|
|
|
|
builddep("shortcut/c++")
|
|
builddep("shortcut/autotools")
|
|
builddep("perl")
|
|
|
|
|
|
def fix_pc():
|
|
with open('lib/pkgconfig/vpx.pc') as fd:
|
|
pc = fd.read()
|
|
pc = pc.replace("prefix=/usr/local", "prefix=/")
|
|
pc = pc.replace("libdir=${prefix}/lib", f"libdir={get_prefix('libvpx')}/lib")
|
|
pc = pc.replace("includedir=${prefix}/include", f"includedir={get_prefix('libvpx-dev')}/include")
|
|
with open('lib/pkgconfig/vpx.pc', 'wt+') as fd:
|
|
fd.write(pc)
|
|
|
|
def build():
|
|
libvpx_target = arch.get_target().replace("-semios-linux", "-linux-gcc")
|
|
libvpx_target = libvpx_target.replace("aarch64", "arm64")
|
|
cpp.configure([
|
|
f"--target={libvpx_target}",
|
|
"--enable-shared",
|
|
])
|
|
cpp.make(["HAVE_GNU_STRIP=no"])
|
|
cpp.make_install()
|
|
fix_pc()
|
|
|
|
on_build(build)
|
|
|
|
|
|
package("libvpx")
|
|
dep("semi-libc @same-arch")
|
|
cpp.use_auto_pack(["lib"])
|
|
|
|
package("libvpx-tools")
|
|
dep("libvpx (same)")
|
|
cpp.use_auto_pack(["bin"])
|
|
|
|
package("libvpx-dev")
|
|
dep("libvpx (same)")
|
|
dep("semi-libc-dev @same-arch")
|
|
cpp.use_auto_pack(["dev"])
|