mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
73 lines
2.9 KiB
Makefile
73 lines
2.9 KiB
Makefile
################################################################################
|
|
# This file is part of OpenELEC - http://www.openelec.tv
|
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
|
#
|
|
# OpenELEC is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# OpenELEC is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
|
################################################################################
|
|
|
|
PKG_NAME="libcec"
|
|
PKG_VERSION="5250931"
|
|
PKG_SHA256="22c746602e85ea575bd247adfb17181849fb54d97428a25ccd29a064e43e6cde"
|
|
PKG_ARCH="any"
|
|
PKG_LICENSE="GPL"
|
|
PKG_SITE="http://libcec.pulse-eight.com/"
|
|
PKG_URL="https://github.com/Pulse-Eight/libcec/archive/$PKG_VERSION.tar.gz"
|
|
PKG_DEPENDS_TARGET="toolchain systemd lockdev p8-platform swig:host"
|
|
PKG_SECTION="system"
|
|
PKG_SHORTDESC="libCEC is an open-source dual licensed library designed for communicating with the Pulse-Eight USB - CEC Adaptor"
|
|
PKG_LONGDESC="libCEC is an open-source dual licensed library designed for communicating with the Pulse-Eight USB - CEC Adaptor."
|
|
|
|
PKG_CMAKE_OPTS_TARGET="-DBUILD_SHARED_LIBS=1 \
|
|
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
|
|
-DCMAKE_INSTALL_LIBDIR_NOARCH:STRING=lib \
|
|
-DHAVE_IMX_API=0 \
|
|
-DHAVE_GIT_BIN=0"
|
|
|
|
if [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
|
|
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bcm2835-driver"
|
|
fi
|
|
|
|
if [ "$KODIPLAYER_DRIVER" = "libamcodec" ]; then
|
|
if [ "$TARGET_KERNEL_ARCH" = "arm64" ]; then
|
|
PKG_CMAKE_OPTS_TARGET="$PKG_CMAKE_OPTS_TARGET -DHAVE_AOCEC_API=1"
|
|
else
|
|
PKG_CMAKE_OPTS_TARGET="$PKG_CMAKE_OPTS_TARGET -DHAVE_AMLOGIC_API=1"
|
|
fi
|
|
else
|
|
PKG_CMAKE_OPTS_TARGET="$PKG_CMAKE_OPTS_TARGET -DHAVE_AOCEC_API=0 -DHAVE_AMLOGIC_API=0"
|
|
fi
|
|
|
|
if [ "$CEC_FRAMEWORK_SUPPORT" = "yes" ]; then
|
|
PKG_PATCH_DIRS="cec-framework"
|
|
PKG_CMAKE_OPTS_TARGET="$PKG_CMAKE_OPTS_TARGET -DHAVE_LINUX_API=1"
|
|
fi
|
|
|
|
pre_configure_target() {
|
|
if [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
|
|
export CXXFLAGS="$CXXFLAGS \
|
|
-I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads/ \
|
|
-I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux"
|
|
|
|
# detecting RPi support fails without -lvchiq_arm
|
|
export LDFLAGS="$LDFLAGS -lvchiq_arm"
|
|
fi
|
|
}
|
|
|
|
post_makeinstall_target() {
|
|
PYTHON_DIR=$INSTALL/usr/lib/$PKG_PYTHON_VERSION
|
|
if [ -d $PYTHON_DIR/dist-packages ]; then
|
|
mv $PYTHON_DIR/dist-packages $PYTHON_DIR/site-packages
|
|
fi
|
|
}
|