|
| 1 | +# SPDX-License-Identifier: GPL-2.0-only |
| 2 | +# Copyright (C) 2025-present Team LibreELEC (https://libreelec.tv) |
| 3 | + |
| 4 | +PKG_NAME="glycin" |
| 5 | +PKG_VERSION="2.0.beta.3" |
| 6 | +PKG_SHA256="52a45b324b65939096f73cfbea9709ee2a3590e1c833edb46628583cd1d2c033" |
| 7 | +PKG_LICENSE="OSS" |
| 8 | +PKG_SITE="http://www.gtk.org/" |
| 9 | +PKG_URL="https://gitlab.gnome.org/GNOME/glycin/-/archive/${PKG_VERSION}/glycin-${PKG_VERSION}.tar.bz2" |
| 10 | +PKG_DEPENDS_TARGET="toolchain cargo:host fontconfig libseccomp lcms2 glib" |
| 11 | +PKG_LONGDESC="Sandboxed and extendable image loading" |
| 12 | +PKG_BUILD_FLAGS="-sysroot" |
| 13 | + |
| 14 | +PKG_MESON_PROPERTIES_TARGET="skip_sanity_check = true" |
| 15 | + |
| 16 | +PKG_MESON_OPTS_TARGET="--wrap-mode=nodownload \ |
| 17 | + -Dglycin-loaders=false \ |
| 18 | + -Dlibglycin-gtk4=false \ |
| 19 | + -Dintrospection=false \ |
| 20 | + -Dtests=false \ |
| 21 | + -Dglycin-thumbnailer=false \ |
| 22 | + -Dvapi=false" |
| 23 | + |
| 24 | +if [ "${DISPLAYSERVER}" = "x11" ]; then |
| 25 | + PKG_DEPENDS_TARGET+=" libX11" |
| 26 | +fi |
| 27 | + |
| 28 | +pre_configure_target() { |
| 29 | + export PKG_CONFIG_PATH="$(get_install_dir libseccomp)/usr/lib/pkgconfig:${PKG_CONFIG_PATH}" |
| 30 | + #export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=${TARGET_CC} |
| 31 | + #export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=${TARGET_CC} |
| 32 | + |
| 33 | + case "${ARCH}" in |
| 34 | + "aarch64") |
| 35 | + RUST_TARGET="aarch64-libreelec-linux-gnu.json" |
| 36 | + ;; |
| 37 | + "arm") |
| 38 | + RUST_TARGET="armv7ve-libreelec-linux-gnueabihf.json" |
| 39 | + ;; |
| 40 | + "x86_64") |
| 41 | + RUST_TARGET="x86_64-libreelec-linux-gnu.json" |
| 42 | + ;; |
| 43 | + esac |
| 44 | + |
| 45 | + mkdir cargo-home |
| 46 | + cat > cargo-home/config.toml <<EOF |
| 47 | +[build] |
| 48 | +target="${TOOLCHAIN}/lib/rustlib/${RUST_TARGET}" |
| 49 | +EOF |
| 50 | +} |
0 commit comments