Sideband/recipes/opusfile/__init__.py
regulad cb8bb758aa
Commit working progress thus far
Ubuntu documentation

docker attempt

perfect 4-architecture building

dist_archive building

Test GitHub actions

Test GitHub actions

Test GitHub actions

Test GitHub actions

Test GitHub actions

Test GitHub actions

Test GitHub actions

properly implemented caching
2025-03-13 21:51:04 -04:00

44 lines
1.4 KiB
Python

from pythonforandroid.recipe import Recipe
from pythonforandroid.toolchain import current_directory, shprint
import sh
import os
import time
class OpusFileRecipe(Recipe):
version = "0.12"
url = "https://downloads.xiph.org/releases/opus/opusfile-{version}.tar.gz"
depends = ['libogg']
built_libraries = {'libopusfile.so': '.libs'}
def build_arch(self, arch):
with current_directory(self.get_build_dir(arch.arch)):
env = self.get_recipe_env(arch)
flags = [
"--host=" + arch.command_prefix,
"--disable-http",
"--disable-examples",
"--disable-doc",
"--disable-largefile",
]
cwd = os.getcwd()
ogg_include_path = cwd.replace("opusfile", "libogg")
env["CPPFLAGS"] += f" -I{ogg_include_path}/include"
# libogg_recipe = Recipe.get_recipe('libogg', self.ctx)
# env['CFLAGS'] += libogg_recipe.include_flags(arch)
# openssl_recipe = Recipe.get_recipe('openssl', self.ctx)
# env['CFLAGS'] += openssl_recipe.include_flags(arch)
# env['LDFLAGS'] += openssl_recipe.link_dirs_flags(arch)
# env['LIBS'] = openssl_recipe.link_libs_flags()
time.sleep(5)
configure = sh.Command('./configure')
shprint(configure, *flags, _env=env)
shprint(sh.make, _env=env)
recipe = OpusFileRecipe()