I'm trying to create chromaprint recipe, I reached a successful build with apk which ships libchromaprint.so inside apk lib directory, the issue is that pyacoustid searches for libchromaprint.so.0 or .1 to detect libchromaprint presence (https://github.com/beetbox/pyacoustid/blob/master/chromaprint.py) if it fails it searches for fpcalc which is not available. No matter what I do, in lib there is only .so file.
from pythonforandroid.toolchain import Recipe, shprint, current_directory
from os.path import exists, join
import sh
import glob
import shutil
import os
class ChromaPrintRecipe(Recipe):
# This could also inherit from PythonRecipe etc. if you want to
# use their pre-written build processes
version = '1.5.1'
url = 'https://github.com/acoustid/chromaprint/releases/download/v{version}/chromaprint-{version}.tar.gz'
# {version} will be replaced with self.version when downloading
depends = ['ffmpeg', 'cmake'] # A list of any other recipe names
# that must be built before this
# one
conflicts = [] # A list of any recipe names that cannot be built
# alongside this one
def get_recipe_env(self, arch):
env = super().get_recipe_env(arch)
# Manipulate the env here if you want
return env
def should_build(self, arch):
# Add a check for whether the recipe is already built if you
# want, and return False if it is.
return True
def prebuild_arch(self, arch):
# super().prebuild_arch(self)
# Do any extra prebuilding you want, e.g.:
# self.apply_patch('path/to/patch.patch')
pass
def build_arch(self, arch):
# super().build_arch(self)
# Build the code. Make sure to use the right build dir, e.g.
with current_directory(self.get_build_dir(arch.arch)):
sh.ls('-lathr') # Or run some commands that actually do
# something
cmake = sh.Command('cmake')
shprint(cmake, '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_TOOLS=OFF')
shprint(sh.make, '-j4')
shprint(sh.make, 'install')
sh.cp('-a', sh.glob('src/*.so*'),
self.ctx.get_libs_dir(arch.arch))
def postbuild_arch(self, arch):
# Do anything you want after the build, e.g. deleting
# unnecessary files such as documentation
pass
recipe = ChromaPrintRecipe()
Checklist
p4a.branch = develop)Versions
Description
I'm trying to create chromaprint recipe, I reached a successful build with apk which ships
libchromaprint.soinside apk lib directory, the issue is that pyacoustid searches forlibchromaprint.so.0or .1 to detect libchromaprint presence (https://github.com/beetbox/pyacoustid/blob/master/chromaprint.py) if it fails it searches forfpcalcwhich is not available. No matter what I do, in lib there is only .so file.How can I complete this recipe to make also
libchromaprint.so.1be present in apk? I can see it gets created insrcfolder like the so without number.This is the recipe I wrote