mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #3294 from MilhouseVH/le10_mt_fixup
buildsystem: fixes as required
This commit is contained in:
commit
ab0e387bf4
@ -53,7 +53,7 @@ export -f json_worker
|
||||
package_worker() {
|
||||
local slot=$1 job=$2 jobs=$3 args="$4"
|
||||
local task pkgname result status
|
||||
local addon istarget
|
||||
local addon istarget isaddon
|
||||
|
||||
export MTJOBID=${slot} MTMAXJOBS=${jobs}
|
||||
|
||||
@ -67,7 +67,9 @@ package_worker() {
|
||||
|
||||
[[ ${pkgname} =~ :target$ || "${pkgname//:/}" = "${pkgname}" ]] && istarget="yes" || istarget="no"
|
||||
|
||||
if [ "${MTADDONBUILD}" = "yes" -a "${PKG_IS_ADDON}" = "yes" -a "${istarget}" = "yes" ]; then
|
||||
[[ "${MTADDONBUILD}" = "yes" && ( "${PKG_IS_ADDON}" = "yes" || "${PKG_IS_ADDON}" = "embedded" ) ]] && isaddon="yes" || isaddon="no"
|
||||
|
||||
if [ "${isaddon}" = "yes" -a "${istarget}" = "yes" ]; then
|
||||
if [ ${result} -eq 0 ]; then
|
||||
(
|
||||
pkg_lock "${pkgname}" "packadd"
|
||||
|
@ -10,6 +10,10 @@ PKG_URL="https://github.com/webmproject/libvpx/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="WebM VP8/VP9 Codec"
|
||||
|
||||
if [ "$TARGET_ARCH" = "x86_64" ]; then
|
||||
PKG_DEPENDS_TARGET+=" nasm:host"
|
||||
fi
|
||||
|
||||
configure_target() {
|
||||
|
||||
case $ARCH in
|
||||
@ -20,7 +24,6 @@ configure_target() {
|
||||
PKG_TARGET_NAME_LIBVPX="armv7-linux-gcc"
|
||||
;;
|
||||
x86_64)
|
||||
PKG_DEPENDS_TARGET+=" nasm:host"
|
||||
PKG_TARGET_NAME_LIBVPX="x86_64-linux-gcc"
|
||||
;;
|
||||
esac
|
||||
|
@ -7,7 +7,7 @@ PKG_SHA256="847b068955f792f4cc247593aca6dc3dc4aae12976169873247488de147a6e18"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://nmap.org/"
|
||||
PKG_URL="http://nmap.org/dist/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_DEPENDS_TARGET="toolchain openssl"
|
||||
PKG_LONGDESC="Free Security Scanned for Network."
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-static \
|
||||
|
@ -11,7 +11,7 @@ PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://www.musicpd.org"
|
||||
PKG_URL="http://www.musicpd.org/download/mpd/${PKG_VERSION%.*}/mpd-${PKG_VERSION}.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain alsa-lib avahi boost curl faad2 ffmpeg flac glib lame libcdio libiconv libid3tag \
|
||||
libmad libmpdclient libsamplerate libvorbis libnfs libogg mpd-mpc opus pulseaudio samba yajl"
|
||||
libmad libmpdclient libsamplerate libvorbis libnfs libogg mpd-mpc opus pulseaudio samba yajl libgcrypt"
|
||||
PKG_SECTION="service.multimedia"
|
||||
PKG_SHORTDESC="Music Player Daemon (MPD): a free and open Music Player Server"
|
||||
PKG_LONGDESC="Music Player Daemon ($PKG_VERSION) is a flexible and powerful server-side application for playing music"
|
||||
|
@ -19,6 +19,12 @@ PKG_ADDON_NAME="Slice"
|
||||
PKG_ADDON_PROJECTS="Slice Slice3"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
makeinstall_target() {
|
||||
PKG_ADDON_INSTALL_DIR="${INSTALL}/usr/share/kodi/addons/${PKG_SECTION}.${PKG_NAME}"
|
||||
mkdir -p "${PKG_ADDON_INSTALL_DIR}"
|
||||
install_addon_files "${PKG_ADDON_INSTALL_DIR}"
|
||||
}
|
||||
|
||||
addon() {
|
||||
:
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ PKG_SHA256="24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://flex.sourceforge.net/"
|
||||
PKG_URL="$SOURCEFORGE_SRC/flex/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS_HOST="ccache:host m4:host autotools:host"
|
||||
PKG_DEPENDS_HOST="ccache:host m4:host autotools:host bison:host"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="A tool for generating programs that perform pattern-matching on text."
|
||||
PKG_TOOLCHAIN="autotools"
|
||||
|
@ -1,5 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="libtool"
|
||||
PKG_VERSION="2.4.6"
|
||||
@ -7,7 +8,7 @@ PKG_SHA256="e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.gnu.org/software/libtool/"
|
||||
PKG_URL="http://ftpmirror.gnu.org/libtool/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_HOST="ccache:host autoconf:host automake:host"
|
||||
PKG_DEPENDS_HOST="ccache:host autoconf:host automake:host intltool:host"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="A generic library support script."
|
||||
PKG_TOOLCHAIN="autotools"
|
||||
|
@ -8,7 +8,7 @@ PKG_ARCH="arm"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/FiveNinjas/slice-firmware"
|
||||
PKG_URL="https://github.com/libreelec/slice-firmware/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain dtc:host"
|
||||
PKG_DEPENDS_TARGET="toolchain dtc:host linux"
|
||||
PKG_LONGDESC="BCM270x firmware related stuff for Slice"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
|
@ -16,6 +16,10 @@ PKG_CMAKE_OPTS_TARGET="-DENABLE_CCACHE=1 \
|
||||
-DENABLE_TESTS=0 \
|
||||
-DENABLE_TOOLS=0"
|
||||
|
||||
if [ "$TARGET_ARCH" = "x86_64" ]; then
|
||||
PKG_DEPENDS_TARGET+=" nasm:host"
|
||||
fi
|
||||
|
||||
if ! target_has_feature neon; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DENABLE_NEON=0 -DENABLE_NEON_ASM=0"
|
||||
fi
|
||||
|
@ -246,6 +246,7 @@ Issue | Level | Meaning |
|
||||
| bad func - missing brace | FAIL | Opening brace (`{`) for function definition should be on same line as the function def, ie. `pre_configure_target() {` |
|
||||
| intertwined vars & funcs | WARN | Variable assignments and logic is intertwined with functions - this is cosmetic, but variables and logic should be specified before all functions |
|
||||
| unknown function | WARN | Could be a misspelled function, ie. `per_configure_target() {` which might fail silently.|
|
||||
| ignored depends assign | WARN | Values assigned to `PKG_DEPENDS_*` outside of the global section or `configure_package()` will be ignored. |
|
||||
|
||||
|
||||
## Add a new package to the Image
|
||||
|
@ -1,5 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2014 Gordon Hollingworth (gordon@fiveninjas.com)
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="led_tools"
|
||||
PKG_VERSION="0.1"
|
||||
@ -7,7 +8,7 @@ PKG_SHA256="0484b4a2da9d586accef87ba7dd18595baae1d602c1b1bd9e0a8565ab50419a2"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.fiveninjas.com"
|
||||
PKG_URL="http://updates.fiveninjas.com/src/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain zlib libpng slice-addon"
|
||||
PKG_DEPENDS_TARGET="toolchain zlib libpng slice"
|
||||
PKG_DEPENDS_HOST="toolchain"
|
||||
PKG_LONGDESC="LED tools, these are a set of tools to control the LEDs on Slice"
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="slice-addon"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_REV="101"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE=""
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET=""
|
||||
PKG_LONGDESC="Controls the LED lights on the Slice box using Kodi actions"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
make_target() {
|
||||
(
|
||||
cd $ROOT
|
||||
scripts/create_addon slice
|
||||
)
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/usr/share/kodi/addons
|
||||
cp -R $BUILD/$ADDONS/slice/service.slice $INSTALL/usr/share/kodi/addons
|
||||
}
|
@ -429,7 +429,7 @@ for i in $(find $SYSROOT_PREFIX/usr/lib/ -name "*.la" 2>/dev/null); do
|
||||
sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" -i $i
|
||||
done
|
||||
|
||||
[ "${PKG_NEED_UNLOCK}" = "yes" ] && release_exclusive_lock "${PKG_NAME}:${TARGET}" "build" || true
|
||||
[ "${PKG_NEED_UNLOCK}" = "yes" ] && release_exclusive_lock "${PKG_NAME}:${TARGET}" "build"
|
||||
|
||||
if [ "$TARGET" = "target" -o "$TARGET" = "init" ]; then
|
||||
if [ -d $INSTALL ]; then
|
||||
|
@ -9,7 +9,7 @@
|
||||
usage() {
|
||||
cat - >&2 <<EOF
|
||||
SYNOPSIS
|
||||
./script/create_addon_mt [OPTION] [addons]...
|
||||
./script/create_addon [OPTION] [addons]...
|
||||
|
||||
DESCRIPTION
|
||||
create_addon builds one or more addons.
|
||||
@ -33,13 +33,13 @@ DESCRIPTION
|
||||
|
||||
EXAMPLE
|
||||
build all addons
|
||||
> ./script/create_addon_mt all
|
||||
> ./script/create_addon all
|
||||
|
||||
build audio encoders and decoders, only
|
||||
> ./script/create_addon_mt audioencoder.* audiodecoder.*
|
||||
> ./script/create_addon audioencoder.* audiodecoder.*
|
||||
|
||||
build all, but not binary
|
||||
> ./script/create_addon_mt all -binary
|
||||
> ./script/create_addon all -binary
|
||||
EOF
|
||||
exit ${1:-0}
|
||||
}
|
||||
@ -69,6 +69,7 @@ get_addons() {
|
||||
[ ${exited} -eq 1 ] && continue
|
||||
|
||||
validpkg="no"
|
||||
VERIFY_FAIL=
|
||||
# Should only build embedded addons when they are explictly specified in the addon list
|
||||
if [ "${PKG_IS_ADDON}" = "embedded" ]; then
|
||||
if [ -n "${filter}" ]; then
|
||||
@ -81,6 +82,8 @@ get_addons() {
|
||||
if [ "${validpkg}" = "yes" ]; then
|
||||
echo "${PKG_NAME}"
|
||||
count=$((count + 1))
|
||||
elif [ -n "${VERIFY_FAIL}" -a -n "${filter}" ]; then
|
||||
echo "$(print_color CLR_ERROR "${PKG_NAME}"): ${VERIFY_FAIL}" >&2
|
||||
fi
|
||||
done
|
||||
|
||||
@ -88,16 +91,15 @@ get_addons() {
|
||||
|
||||
if [ ${count} -eq 0 -a -n "${filter}" ]; then
|
||||
echo "$(print_color CLR_ERROR "ERROR: no addons matched for filter ${filter}")" >&2
|
||||
echo "For more information type: ./scripts/create_addon_mt --help" >&2
|
||||
echo "For more information type: ./scripts/create_addon --help" >&2
|
||||
die
|
||||
fi
|
||||
}
|
||||
|
||||
# Return 0 if package is a suitable addon, 1 otherwise
|
||||
verify_addon() {
|
||||
[ "${PKG_ADDON_TYPE}" = "xbmc.broken" ] && return 1
|
||||
|
||||
if [ -n "${PKG_ARCH}" ]; then
|
||||
VERIFY_FAIL="Incompatible arch: \"${TARGET_ARCH}\" not in [ ${PKG_ARCH} ]"
|
||||
listcontains "${PKG_ARCH}" "!${TARGET_ARCH}" && return 1
|
||||
listcontains "${PKG_ARCH}" "${TARGET_ARCH}" || listcontains "${PKG_ARCH}" "any" || return 1
|
||||
fi
|
||||
@ -105,6 +107,8 @@ verify_addon() {
|
||||
if [ -n "${PKG_ADDON_PROJECTS}" ]; then
|
||||
[ "${DEVICE}" = "RPi" ] && _DEVICE="RPi1" || _DEVICE="${DEVICE}"
|
||||
|
||||
VERIFY_FAIL="Incompatible project or device: \"${_DEVICE:-${PROJECT}}\" not in [ ${PKG_ADDON_PROJECTS} ]"
|
||||
|
||||
if listcontains "${PKG_ADDON_PROJECTS}" "!${_DEVICE:-$PROJECT}" ||
|
||||
listcontains "${PKG_ADDON_PROJECTS}" "!${PROJECT}"; then
|
||||
return 1
|
||||
|
@ -10,10 +10,10 @@
|
||||
usage() {
|
||||
cat - >&2 <<EOUSAGE
|
||||
SYNOPSIS
|
||||
./script/create_addon [OPTION] [addons]...
|
||||
./script/create_addon_st [OPTION] [addons]...
|
||||
|
||||
DESCRIPTION
|
||||
create_addon builds one or more addons.
|
||||
create_addon_st builds one or more addons.
|
||||
|
||||
--show-only
|
||||
output the list of packages, which are intented to build
|
||||
@ -44,13 +44,13 @@ DESCRIPTION
|
||||
|
||||
EXAMPLE
|
||||
build all addons
|
||||
> ./script/create_addon all
|
||||
> ./script/create_addon_st all
|
||||
|
||||
build audio encoders and decoders, only
|
||||
> ./script/create_addon audioencoder.* audiodecoder.*
|
||||
> ./script/create_addon_st audioencoder.* audiodecoder.*
|
||||
|
||||
build all, but not binary
|
||||
> ./script/create_addon all -binary
|
||||
> ./script/create_addon_st all -binary
|
||||
|
||||
EOUSAGE
|
||||
exit ${1:0}
|
||||
@ -94,7 +94,7 @@ function find_addons() {
|
||||
# abort when nothing found and not embedded
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$(print_color CLR_ERROR "ERROR: '$1' matches nothing...")" >&$SILENT_OUT
|
||||
echo "for more informations type: ./scripts/create_addon --help" >&$SILENT_OUT
|
||||
echo "for more informations type: ./scripts/create_addon_st --help" >&$SILENT_OUT
|
||||
die
|
||||
fi
|
||||
fi
|
||||
|
@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
unset _CACHE_PACKAGE_LOCAL _CACHE_PACKAGE_GLOBAL _DEBUG_DEPENDS_LIST _DEBUG_PACKAGE_LIST
|
||||
|
||||
|
@ -68,7 +68,7 @@ if [ -d "$SOURCES/${PKG_NAME}" -o -d "$PKG_DIR/sources" ]; then
|
||||
fi
|
||||
|
||||
_pkg_build="$(basename "${PKG_BUILD}")"
|
||||
[ -d "${PKG_UNPACK_DIR}/${_pkg_build}"* ] && mv "${PKG_UNPACK_DIR}/${_pkg_build}"* "${PKG_BUILD}"
|
||||
[ -z "${PKG_SOURCE_DIR}" -a -d "${PKG_UNPACK_DIR}/${_pkg_build}"* ] && mv "${PKG_UNPACK_DIR}/${_pkg_build}"* "${PKG_BUILD}"
|
||||
|
||||
if [ ! -d "${PKG_BUILD}" ]; then
|
||||
if [ -n "${PKG_SOURCE_DIR}" ]; then
|
||||
|
@ -3,17 +3,35 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
. config/options ""
|
||||
cd "$(readlink -f "$(dirname "$0")")/.."
|
||||
|
||||
if [ -n "${PROJECT}" -a "$1" != "auto" ]; then
|
||||
. config/options ""
|
||||
fi
|
||||
|
||||
_find_latest_tcdir() {
|
||||
if [ -n "${THREAD_CONTROL}" ]; then
|
||||
echo "${THREAD_CONTROL}"
|
||||
else
|
||||
ls -1tdr "${PWD}"/build.*/.threads 2>/dev/null | tail -1
|
||||
fi
|
||||
}
|
||||
|
||||
while [ : ]; do
|
||||
echo "Waiting for build to start..."
|
||||
|
||||
while [ : ]; do
|
||||
pid="$(cat "${THREAD_CONTROL}/pid" 2>/dev/null || true)"
|
||||
tcdir="$(_find_latest_tcdir)"
|
||||
|
||||
if [ -n "${tcdir}" ]; then
|
||||
pid="$(cat "${tcdir}/pid" 2>/dev/null || true)"
|
||||
[ -n "${pid}" ] && ps -p ${pid} &>/dev/null && break
|
||||
fi
|
||||
|
||||
sleep 1.0
|
||||
done
|
||||
|
||||
tail -Fn+0 --pid=${pid} ${THREAD_CONTROL}/status 2>/dev/null
|
||||
tail -Fn+0 --pid=${pid} "${tcdir}/status" 2>/dev/null
|
||||
|
||||
echo
|
||||
done
|
||||
|
@ -21,14 +21,20 @@ log() {
|
||||
[ ${lc} -eq 0 ] && flc="---" || flc="$(printf "%03d" ${lc})"
|
||||
[[ ${filename} =~ packages/addons/addon-depends ]] && colw=80 || colw=50
|
||||
|
||||
printf "[%s]: %3s: %-*s: %-25s: %s\n" "${txcolour}${level}${TXRESET}" "${flc}" ${colw} "${filename}" "${msg}" "${data}"
|
||||
printf "[%s] %3s: %-*s: %-25s: %s\n" "${txcolour}${level}${TXRESET}" "${flc}" ${colw} "${filename}" "${msg}" "${data}"
|
||||
}
|
||||
|
||||
process_line() {
|
||||
local filename="$1" lc="$2" line="$3" inassign="$4" infunc="$5"
|
||||
local filename="$1" lc="$2" line="$3" inassign="$4" funcname="$5"
|
||||
local var matches assignallowed=Y
|
||||
|
||||
[ "${infunc}" = "Y" ] && return 0
|
||||
if [ -n "${funcname}" -a "${funcname}" != "configure_package" -a "${inassign}" = "Y" ]; then
|
||||
if [[ ${line} =~ PKG_DEPENDS_.*= ]]; then
|
||||
log "${filename}" ${lc} "WARN" "ignored depends assign" "${funcname}() => ${line//[[:space:]]*PKG_DEPENDS_/PKG_DEPENDS_}"
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -n "${funcname}" ] && return 0
|
||||
|
||||
rightside="${line#*=}"
|
||||
|
||||
@ -104,7 +110,7 @@ check_func_name() {
|
||||
|
||||
process_pkg() {
|
||||
local filename="$1"
|
||||
local lc=0 isassign=N isfunc=N fc=0 intertwined=N
|
||||
local lc=0 isassign=N funcname= fc=0 intertwined=N
|
||||
|
||||
while IFS= read -r line; do
|
||||
lc=$((lc + 1))
|
||||
@ -116,22 +122,22 @@ process_pkg() {
|
||||
fi
|
||||
|
||||
if [[ "${line}" =~ \(\)[[:space:]]*\{ ]]; then
|
||||
isfunc=Y
|
||||
funcname="${line//(*/}"
|
||||
fc=$((fc+1))
|
||||
check_func_name "${filename}" "${lc}" "${line}"
|
||||
fi
|
||||
|
||||
if [ "${intertwined}" = "N" -a "${isfunc}" = "N" -a ${fc} -ge 1 ]; then
|
||||
if [ "${intertwined}" = "N" -a -z "${funcname}" -a ${fc} -ge 1 ]; then
|
||||
log "${filename}" ${lc} "WARN" "intertwined vars & funcs" "${line}"
|
||||
intertwined=Y
|
||||
fi
|
||||
|
||||
[[ "${line}" =~ ^[[:space:]]*PKG_.*=\" ]] && isassign=Y
|
||||
|
||||
process_line "$1" "${lc}" "${line}" "${isassign}" "${isfunc}"
|
||||
process_line "$1" "${lc}" "${line}" "${isassign}" "${funcname}"
|
||||
|
||||
[[ "${line}" =~ (\"$|\"[[:space:]]*$|\"[[:space:]]*#.*$) ]] && isassign=N
|
||||
[[ "${line}" =~ (^}|^[[:space:]]*}) ]] && isfunc=N
|
||||
[[ "${line}" =~ (^}|^[[:space:]]*}) ]] && funcname=
|
||||
done < "${filename}"
|
||||
|
||||
# Duplicate function check
|
||||
|
Loading…
x
Reference in New Issue
Block a user