distribution/packages/multimedia/libvpx/package.mk

76 lines
2.3 KiB
Makefile
Raw Normal View History

2022-04-14 19:25:58 +00:00
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021-present 351ELEC (https://github.com/351ELEC)
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
2022-04-14 19:25:58 +00:00
2022-02-05 14:23:32 +00:00
PKG_NAME="libvpx"
2023-12-15 16:33:23 +00:00
PKG_VERSION="df655cf4fb6c2a23b964544acd015cc715752830" # 1.13.1
2022-02-05 14:23:32 +00:00
PKG_LICENSE="BSD"
2022-04-14 19:25:58 +00:00
PKG_SITE="https://github.com/webmproject/libvpx"
PKG_URL="${PKG_SITE}.git"
2023-12-27 12:07:37 +00:00
PKG_DEPENDS_HOST="toolchain nasm:host"
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="WebM VP8/VP9 Codec"
2023-12-27 11:42:35 +00:00
configure_host() {
2023-12-27 12:07:37 +00:00
HOST_ARCH=$(uname -m)
case ${HOST_ARCH} in
2023-12-27 11:42:35 +00:00
aarch64)
PKG_HOST_NAME_LIBVPX="arm64-linux-gcc"
;;
arm)
PKG_HOST_NAME_LIBVPX="armv7-linux-gcc"
;;
x86_64)
PKG_HOST_NAME_LIBVPX="x86_64-linux-gcc"
;;
esac
${PKG_CONFIGURE_SCRIPT} --prefix=${TOOLCHAIN} \
--extra-cflags="${CFLAGS}" \
--as=nasm \
--target=${PKG_HOST_NAME_LIBVPX} \
--disable-docs \
--disable-examples \
--disable-shared \
--disable-tools \
--disable-unit-tests \
--disable-vp8-decoder \
--disable-vp9-decoder \
--enable-ccache \
--enable-pic \
--enable-static \
--enable-vp8 \
--enable-vp9
}
2022-02-05 14:23:32 +00:00
configure_target() {
2022-04-14 19:25:58 +00:00
case ${ARCH} in
2022-02-05 14:23:32 +00:00
aarch64)
PKG_TARGET_NAME_LIBVPX="arm64-linux-gcc"
;;
arm)
PKG_TARGET_NAME_LIBVPX="armv7-linux-gcc"
;;
x86_64)
PKG_TARGET_NAME_LIBVPX="x86_64-linux-gcc"
;;
esac
2023-02-24 13:53:43 +00:00
${PKG_CONFIGURE_SCRIPT} --prefix=/usr \
2022-04-14 19:25:58 +00:00
--extra-cflags="${CFLAGS}" \
2022-02-05 14:23:32 +00:00
--as=nasm \
2022-04-14 19:25:58 +00:00
--target=${PKG_TARGET_NAME_LIBVPX} \
2022-02-05 14:23:32 +00:00
--disable-docs \
--disable-examples \
--disable-shared \
--disable-tools \
--disable-unit-tests \
--disable-vp8-decoder \
--disable-vp9-decoder \
--enable-ccache \
--enable-pic \
--enable-static \
--enable-vp8 \
--enable-vp9
}