1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/photoview_ynh.git synced 2024-09-03 20:05:55 +02:00

do not build libheif

This commit is contained in:
Félix Piédallu 2024-03-12 11:16:29 +01:00 committed by Félix Piédallu
parent bbbd36dccb
commit ba2ac2c212
3 changed files with 14 additions and 8 deletions

View file

@ -87,6 +87,9 @@ ram.runtime = "200M"
[resources.apt] [resources.apt]
packages = [ packages = [
# "cmake",
# "ninja",
"curl", "curl",
"gpg", "gpg",
"ffmpeg", "ffmpeg",

View file

@ -19,15 +19,18 @@ function set_go_vars {
go_shims_path=$goenv_install_dir/shims go_shims_path=$goenv_install_dir/shims
go_path_full="$go_shims_path":"$(sudo -u $app bash -c 'echo $PATH')" 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_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_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_cgo_cflags="-I$install_dir/local/include"
} }
function build_libheif { function build_libheif {
export GOPATH="$install_dir/build/go" export GOPATH="$install_dir/build/go"
export GOCACHE="$install_dir/build/.cache" 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 pushd "$install_dir/libheif" || ynh_die
# mkdir -p "$install_dir/local" # mkdir -p "$install_dir/local"
# chown -R $app:$app "$install_dir/local" # chown -R $app:$app "$install_dir/local"
@ -45,9 +48,9 @@ function build_api {
gobuild_env=( gobuild_env=(
"PATH=$go_path_full" "PATH=$go_path_full"
"LIBRARY_PATH=$heif_lib_path" # "LIBRARY_PATH=$heif_lib_path"
"LD_LIBRARY_PATH=$heif_ld_lib_path" # "LD_LIBRARY_PATH=$heif_ld_lib_path"
"CGO_CFLAGS=$heif_cgo_cflags" # "CGO_CFLAGS=$heif_cgo_cflags"
"GOENV_VERSION=$go_version" "GOENV_VERSION=$go_version"
CGO_ENABLED=1 CGO_ENABLED=1
) )

View file

@ -37,8 +37,8 @@ chown -R "$app:$app" "$data_dir"
#================================================= #=================================================
# BUILD APP # BUILD APP
#================================================= #=================================================
ynh_script_progression --message="Compiling libheif..." --weight=10 # ynh_script_progression --message="Compiling libheif..." --weight=10
build_libheif # build_libheif
ynh_script_progression --message="Compiling Go API..." --weight=10 ynh_script_progression --message="Compiling Go API..." --weight=10
build_api build_api