mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
packages: use target_has_feature
This commit is contained in:
parent
bae5a9d317
commit
c863ecc017
@ -32,14 +32,12 @@ PKG_AUTORECONF="yes"
|
|||||||
|
|
||||||
PKG_CONFIGURE_OPTS_TARGET="--disable-shared --enable-static --with-sysroot=$SYSROOT_PREFIX"
|
PKG_CONFIGURE_OPTS_TARGET="--disable-shared --enable-static --with-sysroot=$SYSROOT_PREFIX"
|
||||||
|
|
||||||
if echo "$TARGET_FPU" | grep -q '^neon'; then
|
if target_has_feature neon; then
|
||||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-neon"
|
|
||||||
elif [ "$TARGET_ARCH" = aarch64 ]; then
|
|
||||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-neon"
|
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-neon"
|
||||||
elif [ "$TARGET_ARCH" = x86_64 ]; then
|
elif [ "$TARGET_ARCH" = x86_64 ]; then
|
||||||
if echo "$PROJECT_CFLAGS" | grep -q '\-mssse3'; then
|
if target_has_feature ssse3; then
|
||||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-ssse3"
|
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-ssse3"
|
||||||
elif echo "$PROJECT_CFLAGS" | grep -q '\-msse2'; then
|
elif target_has_feature sse2; then
|
||||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-sse2"
|
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-sse2"
|
||||||
else
|
else
|
||||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-uint64"
|
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-uint64"
|
||||||
|
@ -42,7 +42,7 @@ PKG_CONFIGURE_OPTS_TARGET="--enable-static \
|
|||||||
--with-ogg=$SYSROOT_PREFIX/usr \
|
--with-ogg=$SYSROOT_PREFIX/usr \
|
||||||
--with-gnu-ld"
|
--with-gnu-ld"
|
||||||
|
|
||||||
if [ $TARGET_ARCH = "x86_64" ]; then
|
if target_has_feature sse; then
|
||||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-sse"
|
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-sse"
|
||||||
else
|
else
|
||||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --disable-sse"
|
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --disable-sse"
|
||||||
|
@ -44,7 +44,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# PulseAudio fails to build on aarch64 when NEON is enabled, so don't enable NEON for aarch64 until upstream supports it
|
# PulseAudio fails to build on aarch64 when NEON is enabled, so don't enable NEON for aarch64 until upstream supports it
|
||||||
if echo "$TARGET_FPU" | grep -q '^neon'; then
|
if [ "$TARGET_ARCH" = "arm" ] && target_has_feature neon; then
|
||||||
PULSEAUDIO_NEON="--enable-neon-opt"
|
PULSEAUDIO_NEON="--enable-neon-opt"
|
||||||
else
|
else
|
||||||
PULSEAUDIO_NEON="--disable-neon-opt"
|
PULSEAUDIO_NEON="--disable-neon-opt"
|
||||||
|
@ -36,7 +36,7 @@ PKG_LIBPATH="$PKG_LIBNAME"
|
|||||||
PKG_LIBVAR="DINOTHAWR_LIB"
|
PKG_LIBVAR="DINOTHAWR_LIB"
|
||||||
|
|
||||||
pre_make_target() {
|
pre_make_target() {
|
||||||
if echo "$TARGET_FPU" | grep -q '^neon'; then
|
if target_has_feature neon; then
|
||||||
export HAVE_NEON=1
|
export HAVE_NEON=1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ PKG_AUTORECONF="no"
|
|||||||
PKG_IS_ADDON="yes"
|
PKG_IS_ADDON="yes"
|
||||||
PKG_ADDON_TYPE="kodi.gameclient"
|
PKG_ADDON_TYPE="kodi.gameclient"
|
||||||
|
|
||||||
if [ "$DEVICE" == "RPi" ]; then
|
if ! target_has_feature neon; then
|
||||||
echo "RPi doesn't support neon"
|
echo "${DEVICE:-${PROJECT}} doesn't support neon"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -154,7 +154,7 @@ else
|
|||||||
KODI_SSH="-DENABLE_SSH=OFF"
|
KODI_SSH="-DENABLE_SSH=OFF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if echo "$TARGET_FPU" | grep -q '^neon' || [[ "$TARGET_ARCH" = "aarch64" ]]; then
|
if target_has_feature neon; then
|
||||||
KODI_NEON="-DENABLE_NEON=ON"
|
KODI_NEON="-DENABLE_NEON=ON"
|
||||||
else
|
else
|
||||||
KODI_NEON="-DENABLE_NEON=OFF"
|
KODI_NEON="-DENABLE_NEON=OFF"
|
||||||
|
@ -67,7 +67,7 @@ case "$TARGET_ARCH" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if echo "$TARGET_FPU" | grep -q '^neon' || [[ "$TARGET_ARCH" = "aarch64" ]]; then
|
if target_has_feature neon; then
|
||||||
FFMPEG_FPU="--enable-neon"
|
FFMPEG_FPU="--enable-neon"
|
||||||
else
|
else
|
||||||
FFMPEG_FPU="--disable-neon"
|
FFMPEG_FPU="--disable-neon"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user