From ba2ac2c212b70377d72801ad196bd5691b31f73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 12 Mar 2024 11:16:29 +0100 Subject: [PATCH] do not build libheif --- manifest.toml | 3 +++ scripts/_common.sh | 15 +++++++++------ scripts/install | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/manifest.toml b/manifest.toml index fff4f6f..423ded9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -87,6 +87,9 @@ ram.runtime = "200M" [resources.apt] packages = [ + # "cmake", + # "ninja", + "curl", "gpg", "ffmpeg", diff --git a/scripts/_common.sh b/scripts/_common.sh index 1ce2711..0f972f0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -19,15 +19,18 @@ function set_go_vars { go_shims_path=$goenv_install_dir/shims go_path_full="$go_shims_path":"$(sudo -u $app bash -c 'echo $PATH')" - heif_lib_path="$install_dir/local/lib":"$(sudo -u $app bash -c 'echo $LIBRARY_PATH')" - heif_ld_lib_path="$install_dir/local/lib":"$(sudo -u $app bash -c 'echo $LD_LIBRARY_PATH')" - heif_cgo_cflags="-I$install_dir/local/include" + # heif_lib_path="$install_dir/local/lib":"$(sudo -u $app bash -c 'echo $LIBRARY_PATH')" + # heif_ld_lib_path="$install_dir/local/lib":"$(sudo -u $app bash -c 'echo $LD_LIBRARY_PATH')" + # heif_cgo_cflags="-I$install_dir/local/include" } function build_libheif { export GOPATH="$install_dir/build/go" export GOCACHE="$install_dir/build/.cache" + cmake -S "$install_dir/libheif" -B "$install_dir/libheif/build" -DCMAKE_BUILD_TYPE=RELEASE -GNinja + cmake --build "$install_dir/libheif/build" + pushd "$install_dir/libheif" || ynh_die # mkdir -p "$install_dir/local" # chown -R $app:$app "$install_dir/local" @@ -45,9 +48,9 @@ function build_api { gobuild_env=( "PATH=$go_path_full" - "LIBRARY_PATH=$heif_lib_path" - "LD_LIBRARY_PATH=$heif_ld_lib_path" - "CGO_CFLAGS=$heif_cgo_cflags" + # "LIBRARY_PATH=$heif_lib_path" + # "LD_LIBRARY_PATH=$heif_ld_lib_path" + # "CGO_CFLAGS=$heif_cgo_cflags" "GOENV_VERSION=$go_version" CGO_ENABLED=1 ) diff --git a/scripts/install b/scripts/install index 0db6ebf..0209700 100755 --- a/scripts/install +++ b/scripts/install @@ -37,8 +37,8 @@ chown -R "$app:$app" "$data_dir" #================================================= # BUILD APP #================================================= -ynh_script_progression --message="Compiling libheif..." --weight=10 -build_libheif +# ynh_script_progression --message="Compiling libheif..." --weight=10 +# build_libheif ynh_script_progression --message="Compiling Go API..." --weight=10 build_api