diff --git a/config/arch.aarch64 b/config/arch.aarch64 index bf7b65aae..cd6eb3c19 100644 --- a/config/arch.aarch64 +++ b/config/arch.aarch64 @@ -1,5 +1,5 @@ # determines TARGET_CPU, if not forced by user - if [ -z "$TARGET_CPU" ]; then + if [ -z "${TARGET_CPU}" ]; then TARGET_CPU=cortex-a53 fi @@ -9,7 +9,7 @@ # cortex-a72.cortex-a53 # determine architecture's family - case $TARGET_CPU in + case ${TARGET_CPU} in generic|cortex-a35|cortex-a53|cortex-a57|cortex-a72|exynos-m1|qdf24xx|thunderx|xgene1|cortex-a57.cortex-a53|cortex-a72.cortex-a53|cortex-a55|cortex-a76.cortex-a55) TARGET_SUBARCH=aarch64 TARGET_VARIANT=armv8-a @@ -22,8 +22,8 @@ TARGET_KERNEL_ARCH=arm64 # setup ARCH specific *FLAGS - TARGET_CFLAGS="-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mabi=lp64 -Wno-psabi -mtune=$TARGET_CPU" + TARGET_CFLAGS="-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mabi=lp64 -Wno-psabi -mtune=${TARGET_CPU}" # Disable runtime checking support of ARMv8.0's optional LSE feature. Breaks gdb and mesa compile. TARGET_CFLAGS="${TARGET_CFLAGS} -mno-outline-atomics" - TARGET_LDFLAGS="-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mtune=$TARGET_CPU" - GCC_OPTS="--with-abi=lp64 --with-arch=$TARGET_VARIANT" + TARGET_LDFLAGS="-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mtune=${TARGET_CPU}" + GCC_OPTS="--with-abi=lp64 --with-arch=${TARGET_VARIANT}" diff --git a/config/arch.arm b/config/arch.arm index c143fab7c..68cacf9f9 100644 --- a/config/arch.arm +++ b/config/arch.arm @@ -1,5 +1,5 @@ # determines TARGET_CPU, if not forced by user - if [ -z "$TARGET_CPU" ]; then + if [ -z "${TARGET_CPU}" ]; then TARGET_CPU=cortex-a8 fi @@ -23,7 +23,7 @@ # neon-vfpv4. # determine architecture's family - case $TARGET_CPU in + case ${TARGET_CPU} in arm1176jzf-s) TARGET_SUBARCH=armv6zk TARGET_ABI=eabi @@ -58,7 +58,7 @@ TARGET_KERNEL_ARCH=${TARGET_KERNEL_ARCH:-arm} # setup ARCH specific *FLAGS - TARGET_CFLAGS="-march=$TARGET_VARIANT -mtune=$TARGET_CPU -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated" + TARGET_CFLAGS="-march=${TARGET_VARIANT} -mtune=${TARGET_CPU} -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated" [ -n "${TARGET_FPU}" ] && TARGET_CFLAGS="${TARGET_CFLAGS} ${TARGET_FPU_FLAGS}" - TARGET_LDFLAGS="-march=$TARGET_VARIANT -mtune=$TARGET_CPU" + TARGET_LDFLAGS="-march=${TARGET_VARIANT} -mtune=${TARGET_CPU}" GCC_OPTS="--with-abi=aapcs-linux --with-arch=${TARGET_SUBARCH} --with-float=${TARGET_FLOAT} --with-fpu=${TARGET_FPU}" diff --git a/config/arch.x86_64 b/config/arch.x86_64 index d4e246cea..238e640ed 100644 --- a/config/arch.x86_64 +++ b/config/arch.x86_64 @@ -1,5 +1,5 @@ # determines TARGET_CPU, if not forced by user - if [ -z "$TARGET_CPU" ]; then + if [ -z "${TARGET_CPU}" ]; then TARGET_CPU=core2 fi @@ -17,8 +17,8 @@ TARGET_KERNEL_ARCH=x86 # setup ARCH specific *FLAGS - TARGET_CFLAGS="-march=$TARGET_CPU" - TARGET_LDFLAGS="-march=$TARGET_CPU" + TARGET_CFLAGS="-march=${TARGET_CPU}" + TARGET_LDFLAGS="-march=${TARGET_CPU}" # build with SIMD support ( yes / no ) TARGET_FEATURES+=" mmx sse sse2" diff --git a/config/functions b/config/functions index 164b48aef..9d5a501ce 100644 --- a/config/functions +++ b/config/functions @@ -43,7 +43,7 @@ print_color() { [ -z "${clr_name}" ] && return 0 - if [ "$DISABLE_COLORS" = "yes" ]; then + if [ "${DISABLE_COLORS}" = "yes" ]; then [ $# -eq 2 ] && echo -en "${clr_text}" return 0 fi @@ -154,7 +154,7 @@ safe_remove() { flag_enabled() { # make flag name upper case and replace hyphen with underscore, to use as variable name local flag_name=${1^^} - [[ $flag_name =~ : ]] || flag_name+="_TARGET" + [[ ${flag_name} =~ : ]] || flag_name+="_TARGET" flag_name="PKG_${flag_name//[:-]/_}_ENABLED" # check flag @@ -244,17 +244,17 @@ setup_toolchain() { # parallel if flag_enabled "parallel" "yes"; then - NINJA_OPTS="$NINJA_OPTS -j$CONCURRENCY_MAKE_LEVEL" - export MAKEFLAGS="-j$CONCURRENCY_MAKE_LEVEL" + NINJA_OPTS="${NINJA_OPTS} -j${CONCURRENCY_MAKE_LEVEL}" + export MAKEFLAGS="-j${CONCURRENCY_MAKE_LEVEL}" else - NINJA_OPTS="$NINJA_OPTS -j1" + NINJA_OPTS="${NINJA_OPTS} -j1" export MAKEFLAGS="-j1" fi # verbose flag if flag_enabled "verbose" "no"; then - NINJA_OPTS="$NINJA_OPTS -v" - export MAKEFLAGS="$MAKEFLAGS V=1 VERBOSE=1" + NINJA_OPTS="${NINJA_OPTS} -v" + export MAKEFLAGS="${MAKEFLAGS} V=1 VERBOSE=1" fi case "$1:$2" in @@ -272,7 +272,7 @@ setup_toolchain() { export OBJCOPY="objcopy" export OBJDUMP="objdump" export STRIP="strip" - export CPPFLAGS="$HOST_CPPFLAGS" + export CPPFLAGS="${HOST_CPPFLAGS}" export CFLAGS="${HOST_CFLAGS}" export CXXFLAGS="${HOST_CXXFLAGS}" export LDFLAGS="${HOST_LDFLAGS}" @@ -381,7 +381,7 @@ setup_toolchain() { export OBJCOPY="objcopy" export OBJDUMP="objdump" export STRIP="strip" - export CPPFLAGS="$HOST_CPPFLAGS" + export CPPFLAGS="${HOST_CPPFLAGS}" export CFLAGS="${HOST_CFLAGS}" export CXXFLAGS="${HOST_CXXFLAGS}" export LDFLAGS="${HOST_LDFLAGS}" @@ -399,7 +399,7 @@ setup_toolchain() { echo "SET(CMAKE_ASM_FLAGS_RELEASE -DDUMMYOPT)" >> ${CMAKE_CONF} echo "SET(CMAKE_CXX_FLAGS_RELEASE -DDUMMYOPT)" >> ${CMAKE_CONF} echo "SET(CMAKE_C_FLAGS_RELEASE -DDUMMYOPT)" >> ${CMAKE_CONF} - echo "SET(CMAKE_AR $AR CACHE FILEPATH "Archiver")" >> ${CMAKE_CONF} # hum? + echo "SET(CMAKE_AR ${AR} CACHE FILEPATH "Archiver")" >> ${CMAKE_CONF} # hum? echo "SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN})" >> ${CMAKE_CONF} echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)" >> ${CMAKE_CONF} echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)" >> ${CMAKE_CONF} @@ -452,7 +452,7 @@ create_meson_conf() { [binaries] c = '${CC}' cpp = '${CXX}' -ar = '$AR' +ar = '${AR}' strip = '${STRIP}' pkgconfig = '${PKG_CONFIG}' llvm-config = '${TOOLCHAIN}/bin/llvm-config' @@ -464,7 +464,7 @@ cpu = '${TARGET_SUBARCH}' endian = 'little' [properties] -root = '$root' +root = '${root}' $(python -c "import os; print('c_args = {}'.format([x for x in os.getenv('CFLAGS').split()]))") $(python -c "import os; print('c_link_args = {}'.format([x for x in os.getenv('LDFLAGS').split()]))") $(python -c "import os; print('cpp_args = {}'.format([x for x in os.getenv('CXXFLAGS').split()]))") @@ -479,8 +479,8 @@ create_meson_conf_target() { cat > $2 </dev/null; then - arch_err_msg="\n $dashes$dashes$dashes" + if [ ! -e "${linux_config_dir}/linux.${TARGET_PATCH_ARCH:-${TARGET_ARCH}}.conf" ] && + ! ls "${linux_config_dir}/"*/linux.${TARGET_PATCH_ARCH:-${TARGET_ARCH}}.conf &>/dev/null; then + arch_err_msg="\n ${dashes}${dashes}${dashes}" arch_err_msg="${arch_err_msg}\n ERROR: Architecture not found, use a valid Architecture" arch_err_msg="${arch_err_msg}\n for your project or create a new config" - arch_err_msg="${arch_err_msg}\n $dashes$dashes$dashes" + arch_err_msg="${arch_err_msg}\n ${dashes}${dashes}${dashes}" arch_err_msg="${arch_err_msg}\n\n Valid Architectures for your project: ${PROJECT}" - for arch in $linux_config_dir/*.conf $linux_config_dir/*/linux.${TARGET_ARCH}.conf; do + for arch in ${linux_config_dir}/*.conf ${linux_config_dir}/*/linux.${TARGET_ARCH}.conf; do [[ ${arch} =~ .*\*.* ]] && continue #ignore unexpanded wildcard - arch_err_msg="${arch_err_msg}\n - $(basename $arch | cut -f2 -d".")" + arch_err_msg="${arch_err_msg}\n - $(basename ${arch} | cut -f2 -d".")" done die "${arch_err_msg}" fi @@ -821,12 +821,12 @@ do_autoreconf() { if [ -e "${TOOLCHAIN}/bin/autoreconf" -a -e "${INTLTOOLIZE}" ]; then mkdir -p ${ACLOCAL_DIR} - if [ -e "$LIBTOOLIZE" ]; then + if [ -e "${LIBTOOLIZE}" ]; then export AUTORECONF="${TOOLCHAIN}/bin/autoreconf --verbose --force --install -I ${ACLOCAL_DIR}" else export AUTORECONF="${TOOLCHAIN}/bin/autoreconf --verbose --force -I ${ACLOCAL_DIR}" fi - $AUTORECONF $@ + ${AUTORECONF} $@ fi } @@ -851,7 +851,7 @@ get_pkg_variable() { # get package's build dir get_build_dir() { local _PKG_NAME="${1%:*}" _PKG_VERSION="$(get_pkg_version "$1")" - if [ -n "$_PKG_NAME" -a -n "$_PKG_VERSION" ]; then + if [ -n "${_PKG_NAME}" -a -n "$_PKG_VERSION" ]; then echo $BUILD/${_PKG_NAME}-${_PKG_VERSION} fi } @@ -880,7 +880,7 @@ get_pkg_directory() { # Check for any available local package in preference to a global package for _DIR in $(grep -F "/${_PKG_ROOT_NAME}${_ANCHOR}" "${_CACHE_PACKAGE_LOCAL}"); do _DIR="${_DIR%${_ANCHOR}}" - # found first, set $_PKG_DIR + # found first, set ${_PKG_DIR} _PKG_DIR="$_DIR" # keep track of dirs with package.mk for detecting multiple folders _ALL_DIRS+="${_DIR}\n" @@ -888,10 +888,10 @@ get_pkg_directory() { done # If there's no local package available, use the global package - if [ $_FOUND -eq 0 ]; then + if [ ${_FOUND} -eq 0 ]; then for _DIR in $(grep -F "/${_PKG_ROOT_NAME}${_ANCHOR}" "${_CACHE_PACKAGE_GLOBAL}"); do _DIR="${_DIR%${_ANCHOR}}" - # found first, set $_PKG_DIR + # found first, set ${_PKG_DIR} _PKG_DIR="$_DIR" # keep track of dirs with package.mk for detecting multiple folders _ALL_DIRS+="${_DIR}\n" @@ -900,13 +900,13 @@ get_pkg_directory() { fi # _FOUND multiple packages? fail - if [ $_FOUND -gt 1 ]; then + if [ ${_FOUND} -gt 1 ]; then echo "Error - multiple package folders for package ${_PKG_ROOT_NAME}:" >&2 echo -e "$_ALL_DIRS" >&2 die fi - echo "$_PKG_DIR" + echo "${_PKG_DIR}" } calculate_stamp() { @@ -917,8 +917,8 @@ calculate_stamp() { [ -n "${PKG_NEED_UNPACK}" ] && stamp+=" ${PKG_NEED_UNPACK}" if [ -n "${PKG_STAMP_VAR}" ]; then local TMP_VAR="$(get_build_dir ${PKG_NAME})/.pkg_stamp_var" - echo "${PKG_STAMP_VAR}" > $TMP_VAR - stamp+=" $TMP_VAR" + echo "${PKG_STAMP_VAR}" > ${TMP_VAR} + stamp+=" ${TMP_VAR}" fi data="$(find ${stamp} -exec sha256sum {} \; 2>/dev/null | sed "s/ ${ROOT//\//\\/}\// /")" @@ -928,7 +928,7 @@ calculate_stamp() { } target_has_feature() { - listcontains "$TARGET_FEATURES" "$1" + listcontains "${TARGET_FEATURES}" "$1" } # configure variables for go @@ -979,45 +979,45 @@ find_path() { local dir match wildcard=0 ftype # support wildcard matches - [[ $search =~ \* || $search =~ \? ]] && wildcard=1 + [[ ${search} =~ \* || ${search} =~ \? ]] && wildcard=1 - [ "$test_func" = "-f" ] && ftype="file" || ftype="dir" + [ "${test_func}" = "-f" ] && ftype="file" || ftype="dir" for dir in ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/packages/${PKG_NAME} \ ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE} \ ${PROJECT_DIR}/${PROJECT}/packages/${PKG_NAME} \ ${PROJECT_DIR}/${PROJECT} \ - $DISTRO_DIR/$DISTRO/packages/${PKG_NAME} \ - $DISTRO_DIR/$DISTRO \ + ${DISTRO_DIR}/${DISTRO}/packages/${PKG_NAME} \ + ${DISTRO_DIR}/${DISTRO} \ ${PKG_DIR} \ ; do # ignore directories with missing DEVICE or PKG_NAME components - [[ $dir =~ /packages/$ ]] && continue - [[ $dir =~ /devices/$ ]] && continue - [[ $dir =~ /devices//packages/${PKG_NAME}$ ]] && continue + [[ ${dir} =~ /packages/$ ]] && continue + [[ ${dir} =~ /devices/$ ]] && continue + [[ ${dir} =~ /devices//packages/${PKG_NAME}$ ]] && continue - if [ $wildcard -eq 1 ]; then - ls $dir/$search 1>/dev/null 2>&1 && match="$dir/$search" && break + if [ ${wildcard} -eq 1 ]; then + ls ${dir}/${search} 1>/dev/null 2>&1 && match="${dir}/${search}" && break else - [ $test_func "$dir/$search" ] && match="$dir/$search" && break + [ ${test_func} "${dir}/${search}" ] && match="${dir}/${search}" && break fi done - if [ -z "$match" -a -n "$default" ]; then - if [[ $default =~ \* || $default =~ \? ]]; then - ls $default 1>/dev/null 2>&1 && match="$default" + if [ -z "${match}" -a -n "${default}" ]; then + if [[ ${default} =~ \* || ${default} =~ \? ]]; then + ls ${default} 1>/dev/null 2>&1 && match="${default}" else - [ $test_func "$default" ] && match="$default" + [ ${test_func} "${default}" ] && match="${default}" fi fi - if [ -n "$match" ]; then - FOUND_PATH="$match" - [ "${VERBOSE_FIND_PATH,,}" = "yes" ] && echo "find_path: Searching for $ftype: \"$search\", found: \"$FOUND_PATH\"" >&2 + if [ -n "${match}" ]; then + FOUND_PATH="${match}" + [ "${VERBOSE_FIND_PATH,,}" = "yes" ] && echo "find_path: Searching for ${ftype}: \"${search}\", found: \"$FOUND_PATH\"" >&2 return 0 else unset FOUND_PATH - [ "${VERBOSE_FIND_PATH,,}" = "yes" ] && echo "find_path: Searching for $ftype: \"$search\" - not found" >&2 + [ "${VERBOSE_FIND_PATH,,}" = "yes" ] && echo "find_path: Searching for ${ftype}: \"${search}\" - not found" >&2 return 1 fi } @@ -1090,9 +1090,9 @@ source_package() { PKG_SHORTDESC="${PKG_SHORTDESC:-${PKG_NAME} (autogenerated)}" PKG_LONGDESC="${PKG_LONGDESC:-${PKG_NAME} (autogenerated)}" - if [ "$PKG_IS_ADDON" = "yes" -o "$PKG_IS_ADDON" = "embedded" ] ; then + if [ "${PKG_IS_ADDON}" = "yes" -o "${PKG_IS_ADDON}" = "embedded" ] ; then [ -z $PKG_SECTION ] && PKG_ADDON_ID="${PKG_NAME}" || PKG_ADDON_ID="${PKG_SECTION//\//.}.${PKG_NAME}" - [ "$PKG_ADDON_IS_STANDALONE" != "yes" ] && PKG_NEED_UNPACK="${PKG_NEED_UNPACK} $(get_pkg_directory $MEDIACENTER)" + [ "${PKG_ADDON_IS_STANDALONE}" != "yes" ] && PKG_NEED_UNPACK="${PKG_NEED_UNPACK} $(get_pkg_directory ${MEDIACENTER})" fi if [ -n "${PKG_DEPENDS_UNPACK}" ]; then @@ -1105,12 +1105,12 @@ source_package() { # PKG_SOURCE_NAME will be automatically set to a name based on # the ${PKG_NAME}-${PKG_VERSION} convention. # - # Any $PKG_URL that references more than a single url will abort + # Any ${PKG_URL} that references more than a single url will abort # the build as these are no longer supported - use mkpkg instead. - if [ -n "$PKG_URL" -a -z "$PKG_SOURCE_NAME" ]; then - if [[ $PKG_URL =~ .*\ .* ]]; then + if [ -n "${PKG_URL}" -a -z "${PKG_SOURCE_NAME}" ]; then + if [[ ${PKG_URL} =~ .*\ .* ]]; then echo "Error - packages with multiple urls are no longer supported, use mkpkg." - echo "$PKG_URL" + echo "${PKG_URL}" die fi if [[ ${PKG_URL} =~ .git$ || ${PKG_URL} =~ ^git:// ]]; then @@ -1121,9 +1121,9 @@ source_package() { [ -z "${PKG_TAR_COPY_OPTS+x}" ] && PKG_TAR_COPY_OPTS="--exclude=.git --exclude=.svn" else PKG_SOURCE_NAME="${PKG_URL##*/}" - case $PKG_SOURCE_NAME in + case ${PKG_SOURCE_NAME} in ${PKG_NAME}-${PKG_VERSION}.*) - PKG_SOURCE_NAME=$PKG_SOURCE_NAME + PKG_SOURCE_NAME=${PKG_SOURCE_NAME} ;; *.tar | *.tbz | *.tgz | *.txz | *.7z | *.zip) PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.${PKG_SOURCE_NAME##*\.} @@ -1132,7 +1132,7 @@ source_package() { PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.tar.${PKG_SOURCE_NAME##*\.} ;; *.diff | *.patch | *.diff.bz2 | *.patch.bz2 | patch-*.bz2 | *.diff.gz | *.patch.gz | patch-*.gz) - PKG_SOURCE_NAME=$PKG_SOURCE_NAME + PKG_SOURCE_NAME=${PKG_SOURCE_NAME} ;; *) PKG_SOURCE_NAME=${PKG_NAME}-${PKG_VERSION}.${PKG_SOURCE_NAME##*\.} @@ -1204,18 +1204,18 @@ kernel_config_path() { config_name="linux.${TARGET_PATCH_ARCH:-${TARGET_ARCH}}.conf" - for cfg in ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/linux/$pkg_linux_version/$config_name \ - ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/linux/$LINUX/$config_name \ - ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/linux/$config_name \ - ${PROJECT_DIR}/${PROJECT}/linux/$pkg_linux_version/$config_name \ - ${PROJECT_DIR}/${PROJECT}/linux/$LINUX/$config_name \ - ${PROJECT_DIR}/${PROJECT}/linux/$config_name \ - $pkg_linux_dir/config/$pkg_linux_version/$config_name \ - $pkg_linux_dir/config/$LINUX/$config_name \ - $pkg_linux_dir/config/$config_name \ + for cfg in ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/linux/${pkg_linux_version}/${config_name} \ + ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/linux/$LINUX/${config_name} \ + ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/linux/${config_name} \ + ${PROJECT_DIR}/${PROJECT}/linux/${pkg_linux_version}/${config_name} \ + ${PROJECT_DIR}/${PROJECT}/linux/$LINUX/${config_name} \ + ${PROJECT_DIR}/${PROJECT}/linux/${config_name} \ + $pkg_linux_dir/config/${pkg_linux_version}/${config_name} \ + $pkg_linux_dir/config/$LINUX/${config_name} \ + $pkg_linux_dir/config/${config_name} \ ; do - [[ $cfg =~ /devices//linux/ ]] && continue - [ -f "$cfg" ] && echo "$cfg" && return + [[ ${cfg} =~ /devices//linux/ ]] && continue + [ -f "${cfg}" ] && echo "${cfg}" && return done die "ERROR: Unable to locate kernel config for ${LINUX} - looking for ${config_name}" @@ -1227,11 +1227,11 @@ kernel_initramfs_confs() { config_name="initramfs.${TARGET_KERNEL_PATCH_ARCH:-${TARGET_ARCH}}.conf" confs="$(get_pkg_directory initramfs)/config/initramfs.conf" - for cfg in ${PROJECT_DIR}/${PROJECT}/packages/initramfs/config/$config_name \ - ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/packages/initramfs/config/$config_name \ + for cfg in ${PROJECT_DIR}/${PROJECT}/packages/initramfs/config/${config_name} \ + ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/packages/initramfs/config/${config_name} \ ; do - [[ $cfg =~ /devices//packages/ ]] && continue - [ -f "$cfg" ] && confs+=" $cfg" + [[ ${cfg} =~ /devices//packages/ ]] && continue + [ -f "${cfg}" ] && confs+=" ${cfg}" done echo "$confs" @@ -1302,18 +1302,18 @@ fix_module_depends() { install_binary_addon() { local addon_id="$1" addon_so - mkdir -p $ADDON_BUILD/$addon_id/ - cp -R ${PKG_BUILD}/.install_pkg/usr/share/$MEDIACENTER/addons/$addon_id/* $ADDON_BUILD/$addon_id/ + mkdir -p ${ADDON_BUILD}/${addon_id}/ + cp -R ${PKG_BUILD}/.install_pkg/usr/share/${MEDIACENTER}/addons/${addon_id}/* ${ADDON_BUILD}/${addon_id}/ - addon_so=$(xmlstarlet sel -t -v "/addon/extension/@library_linux" $ADDON_BUILD/$addon_id/addon.xml || :) + addon_so=$(xmlstarlet sel -t -v "/addon/extension/@library_linux" ${ADDON_BUILD}/${addon_id}/addon.xml || :) if [ -n "$addon_so" ]; then - cp -L ${PKG_BUILD}/.install_pkg/usr/lib/$MEDIACENTER/addons/$addon_id/$addon_so $ADDON_BUILD/$addon_id/ - chmod +x $ADDON_BUILD/$addon_id/$addon_so + cp -L ${PKG_BUILD}/.install_pkg/usr/lib/${MEDIACENTER}/addons/${addon_id}/$addon_so ${ADDON_BUILD}/${addon_id}/ + chmod +x ${ADDON_BUILD}/${addon_id}/$addon_so fi - if [ -d ${PKG_BUILD}/.install_pkg/usr/lib/kernel-overlays/$addon_id ] ; then - mkdir -p $ADDON_BUILD/$addon_id/kernel-overlay - cp -PR ${PKG_BUILD}/.install_pkg/usr/lib/kernel-overlays/$addon_id/* $ADDON_BUILD/$addon_id/kernel-overlay + if [ -d ${PKG_BUILD}/.install_pkg/usr/lib/kernel-overlays/${addon_id} ] ; then + mkdir -p ${ADDON_BUILD}/${addon_id}/kernel-overlay + cp -PR ${PKG_BUILD}/.install_pkg/usr/lib/kernel-overlays/${addon_id}/* ${ADDON_BUILD}/${addon_id}/kernel-overlay fi } @@ -1327,13 +1327,13 @@ install_addon_images() { local dest_dir="$1" if [ -f "${PKG_DIR}/icon/icon.png" ]; then - mkdir -p "$dest_dir/resources" - cp "${PKG_DIR}/icon/icon.png" "$dest_dir/resources" + mkdir -p "${dest_dir}/resources" + cp "${PKG_DIR}/icon/icon.png" "${dest_dir}/resources" fi - if [ -f "$DISTRO_DIR/$DISTRO/addons/fanart.png" ]; then - mkdir -p "$dest_dir/resources" - cp "$DISTRO_DIR/$DISTRO/addons/fanart.png" "$dest_dir/resources" + if [ -f "${DISTRO_DIR}/${DISTRO}/addons/fanart.png" ]; then + mkdir -p "${dest_dir}/resources" + cp "${DISTRO_DIR}/${DISTRO}/addons/fanart.png" "${dest_dir}/resources" fi } @@ -1347,19 +1347,19 @@ create_addon_xml() { for i in $PKG_ADDON_REQUIRES; do requires_addonname=`echo $i | cut -f1 -d ":"` requires_addonversion=`echo $i | cut -f2 -d ":"` - requires="$requires\n " + requires="${requires}\n " done unset IFS - if [ ! -f "$addon_xml" ] ; then - cp ${ROOT}/config/addon/${PKG_ADDON_TYPE}.xml "$addon_xml" + if [ ! -f "${addon_xml}" ] ; then + cp ${ROOT}/config/addon/${PKG_ADDON_TYPE}.xml "${addon_xml}" addon_version=${PKG_ADDON_VERSION:-${ADDON_VERSION}.${PKG_REV}} else if ! command -v xmlstarlet >/dev/null ; then die "*** ERROR: $ADDON has addon.xml shipped, you need 'xmlstarlet' ***" "255" fi - addon_version="${PKG_ADDON_VERSION:-$(xmlstarlet sel -t -v "/addon/@version" "$addon_xml").$PKG_REV}" - xmlstarlet ed --inplace -u "/addon[@version]/@version" -v "$addon_version" "$addon_xml" + addon_version="${PKG_ADDON_VERSION:-$(xmlstarlet sel -t -v "/addon/@version" "${addon_xml}").$PKG_REV}" + xmlstarlet ed --inplace -u "/addon[@version]/@version" -v "$addon_version" "${addon_xml}" fi if [ -f ${PKG_DIR}/changelog.txt ]; then @@ -1369,10 +1369,10 @@ done { r ${tmp_changelog} d - }" -i "$addon_xml" + }" -i "${addon_xml}" rm -f "${tmp_changelog}" else - sed -e "s|@PKG_ADDON_NEWS@||g" -i "$addon_xml" + sed -e "s|@PKG_ADDON_NEWS@||g" -i "${addon_xml}" fi provider_name=${PKG_MAINTAINER:-"Team CoreELEC"} @@ -1384,19 +1384,19 @@ done fi done - sed -e "s|@PKG_ADDON_ID@|$PKG_ADDON_ID|g" \ - -e "s|@ADDON_NAME@|$addon_name|g" \ + sed -e "s|@PKG_ADDON_ID@|${PKG_ADDON_ID}|g" \ + -e "s|@ADDON_NAME@|${addon_name}|g" \ -e "s|@ADDON_VERSION@|$addon_version|g" \ - -e "s|@REQUIRES@|$requires|g" \ - -e "s|@PKG_SHORTDESC@|$PKG_SHORTDESC|g" \ - -e "s|@OS_VERSION@|$OS_VERSION|g" \ - -e "s|@PKG_LONGDESC@|$PKG_LONGDESC|g" \ + -e "s|@REQUIRES@|${requires}|g" \ + -e "s|@PKG_SHORTDESC@|${PKG_SHORTDESC}|g" \ + -e "s|@OS_VERSION@|${OS_VERSION}|g" \ + -e "s|@PKG_LONGDESC@|${PKG_LONGDESC}|g" \ -e "s|@PKG_DISCLAIMER@|$PKG_DISCLAIMER|g" \ - -e "s|@PROVIDER_NAME@|$provider_name|g" \ - -e "s|@PKG_ADDON_PROVIDES@|$PKG_ADDON_PROVIDES|g" \ - -e "s|@PKG_ADDON_SCREENSHOT@|$screenshots|g" \ - -e "s|@PKG_ADDON_BROKEN@|$PKG_ADDON_BROKEN|g" \ - -i "$addon_xml" + -e "s|@PROVIDER_NAME@|${provider_name}|g" \ + -e "s|@PKG_ADDON_PROVIDES@|${PKG_ADDON_PROVIDES}|g" \ + -e "s|@PKG_ADDON_SCREENSHOT@|${screenshots}|g" \ + -e "s|@PKG_ADDON_BROKEN@|${PKG_ADDON_BROKEN}|g" \ + -i "${addon_xml}" } install_addon_files() { @@ -1412,8 +1412,8 @@ install_driver_addon_files() { die "$(print_color CLR_ERROR "no module search path defined")" fi - PKG_MODULE_DIR="${INSTALL}/$(get_full_module_dir $PKG_ADDON_ID)/updates/$PKG_ADDON_ID" - PKG_ADDON_DIR="${INSTALL}/usr/share/$MEDIACENTER/addons/$PKG_ADDON_ID" + PKG_MODULE_DIR="${INSTALL}/$(get_full_module_dir ${PKG_ADDON_ID})/updates/${PKG_ADDON_ID}" + PKG_ADDON_DIR="${INSTALL}/usr/share/${MEDIACENTER}/addons/${PKG_ADDON_ID}" mkdir -p $PKG_MODULE_DIR find $@ -name \*.ko -exec cp {} $PKG_MODULE_DIR \; @@ -1651,6 +1651,6 @@ exec_thread_safe() { } # Use distribution functions if any -if [ -f "distributions/$DISTRO/config/functions" ]; then - . distributions/$DISTRO/config/functions +if [ -f "distributions/${DISTRO}/config/functions" ]; then + . distributions/${DISTRO}/config/functions fi diff --git a/config/show_config b/config/show_config index c81255918..40f08dbc7 100644 --- a/config/show_config +++ b/config/show_config @@ -3,19 +3,19 @@ show_config() { get_graphicdrivers dashes="===========================" - config_message="${config_message}\n $dashes$dashes$dashes" - config_message="${config_message}\n Configuration for $DISTRONAME ($([ "$OFFICIAL" = "yes" ] && echo "official" || echo "community"))" - config_message="${config_message}\n $dashes$dashes$dashes" + config_message="${config_message}\n ${dashes}${dashes}${dashes}" + config_message="${config_message}\n Configuration for ${DISTRO}NAME ($([ "$OFFICIAL" = "yes" ] && echo "official" || echo "community"))" + config_message="${config_message}\n ${dashes}${dashes}${dashes}" # Build options config_message="${config_message}\n\n Buildoptions:" - config_message="${config_message}\n $dashes$dashes" + config_message="${config_message}\n ${dashes}${dashes}" - config_message="${config_message}\n - CPU (ARCH):\t\t\t\t $TARGET_CPU (${TARGET_ARCH})" + config_message="${config_message}\n - CPU (ARCH):\t\t\t\t ${TARGET_CPU} (${TARGET_ARCH})" config_message="${config_message}\n - FLOAT:\t\t\t\t ${TARGET_FLOAT}" config_message="${config_message}\n - FPU:\t\t\t\t\t ${TARGET_FPU}" - config_message="${config_message}\n - CPU features:\t\t\t $TARGET_FEATURES" + config_message="${config_message}\n - CPU features:\t\t\t ${TARGET_FEATURES}" config_message="${config_message}\n - LTO (Link Time Optimization) support: $LTO_SUPPORT" config_message="${config_message}\n - GOLD (Google Linker) Support:\t ${GOLD_SUPPORT}" config_message="${config_message}\n - LLVM support:\t\t\t $LLVM_SUPPORT" @@ -56,12 +56,12 @@ show_config() { # Input device configuration config_message="${config_message}\n\n Input device configuration:" - config_message="${config_message}\n $dashes$dashes" + config_message="${config_message}\n ${dashes}${dashes}" # Misc. hardware configuration config_message="${config_message}\n\n Misc. hardware configuration:" - config_message="${config_message}\n $dashes$dashes" + config_message="${config_message}\n ${dashes}${dashes}" config_message="${config_message}\n - ALSA support:\t\t\t $ALSA_SUPPORT" config_message="${config_message}\n - Pulseaudio support:\t\t\t $PULSEAUDIO_SUPPORT" @@ -88,7 +88,7 @@ show_config() { # Network service configuration config_message="${config_message}\n\n Network service configuration:" - config_message="${config_message}\n $dashes$dashes" + config_message="${config_message}\n ${dashes}${dashes}" config_message="${config_message}\n - Avahi (Zeroconf) support:\t\t $AVAHI_DAEMON" config_message="${config_message}\n - NFS mounting support:\t\t $NFS_SUPPORT" @@ -101,7 +101,7 @@ show_config() { # OS configuration config_message="${config_message}\n\n OS configuration:" - config_message="${config_message}\n $dashes$dashes" + config_message="${config_message}\n ${dashes}${dashes}" config_message="${config_message}\n - OEM Support:\t\t\t\t $OEM_SUPPORT" config_message="${config_message}\n - Default ROOT Password:\t\t ${ROOT_PASSWORD}" @@ -115,7 +115,7 @@ show_config() { # Misc. Filesystems config_message="${config_message}\n\n Misc. Filesystems:" - config_message="${config_message}\n $dashes$dashes" + config_message="${config_message}\n ${dashes}${dashes}" config_message="${config_message}\n - Swap Support:\t\t\t $SWAP_SUPPORT" if [ "$SWAP_SUPPORT" = "yes" ]; then @@ -130,9 +130,9 @@ show_config() { fi config_message="${config_message}\n" - config_message="${config_message}\n $dashes$dashes$dashes" - config_message="${config_message}\n End Configuration for $DISTRONAME" - config_message="${config_message}\n $dashes$dashes$dashes" + config_message="${config_message}\n ${dashes}${dashes}${dashes}" + config_message="${config_message}\n End Configuration for ${DISTRO}NAME" + config_message="${config_message}\n ${dashes}${dashes}${dashes}" config_message="${config_message}\n\n\n" echo -e "${config_message}" diff --git a/packages/compress/unzip/package.mk b/packages/compress/unzip/package.mk index 1d06ef223..2112d9ec9 100644 --- a/packages/compress/unzip/package.mk +++ b/packages/compress/unzip/package.mk @@ -12,7 +12,7 @@ PKG_LONGDESC="UnZip is an extraction utility for archives compressed in .zip for PKG_TOOLCHAIN="manual" make_target() { - make CC=${CC} RANLIB=$RANLIB AR=$AR STRIP=${STRIP} \ + make CC=${CC} RANLIB=$RANLIB AR=${AR} STRIP=${STRIP} \ -f unix/Makefile generic LOCAL_UNZIP="${CFLAGS}" } diff --git a/packages/devel/gobject-introspection/package.mk b/packages/devel/gobject-introspection/package.mk index 2d3b6b098..8a7c5f10a 100644 --- a/packages/devel/gobject-introspection/package.mk +++ b/packages/devel/gobject-introspection/package.mk @@ -9,7 +9,7 @@ PKG_SHA256="79ed5d764d288f046b027ff064be174d7904904565de150a94841740a2a0455d" PKG_ARCH="any" PKG_LICENSE="LGPL" PKG_SITE="http://www.gtk.org/" -PKG_URL="https://github.com/GNOME/$PKG_NAME/archive/$PKG_VERSION.tar.gz" +PKG_URL="https://github.com/GNOME/${PKG_NAME}/archive/${PKG_VERSION}.tar.gz" PKG_DEPENDS_TARGET="toolchain libffi glib Python3 qemu:host gobject-introspection:host" PKG_DEPENDS_HOST="libffi:host glib:host" PKG_SECTION="devel" diff --git a/packages/games/emulators/PPSSPPSDL/sources/start_PPSSPPSDL.sh b/packages/games/emulators/PPSSPPSDL/sources/start_PPSSPPSDL.sh index cb76fac77..795b5b10f 100755 --- a/packages/games/emulators/PPSSPPSDL/sources/start_PPSSPPSDL.sh +++ b/packages/games/emulators/PPSSPPSDL/sources/start_PPSSPPSDL.sh @@ -6,4 +6,4 @@ ARG=${1//[\\]/} export SDL_AUDIODRIVER=alsa -PPSSPPSDL "$ARG" +PPSSPPSDL "${AR}G" diff --git a/packages/games/emulators/hatarisa/scripts/start_hatarisa.sh b/packages/games/emulators/hatarisa/scripts/start_hatarisa.sh index 3212a4032..c5f5fc4aa 100755 --- a/packages/games/emulators/hatarisa/scripts/start_hatarisa.sh +++ b/packages/games/emulators/hatarisa/scripts/start_hatarisa.sh @@ -50,7 +50,7 @@ if [ `echo $1 | grep -i .zip | wc -l` -eq 1 ]; then ARGS="\nszDiskAFileName = "$FILE"" ;; 2) - ARGS="$ARGS\nszDiskBFileName = "$FILE"" + ARGS="${AR}GS\nszDiskBFileName = "$FILE"" ;; esac @@ -61,8 +61,8 @@ if [ `echo $1 | grep -i .zip | wc -l` -eq 1 ]; then done # Add game files as floppy 1 & 2 to .hatari-temp.cfg & start hatari - echo -e $ARGS >> "$HATARI_TMP_CONFIG" - echo -e "\nAssigned floppy drives:" $ARGS "\n" >> "$HATARI_LOG" + echo -e ${AR}GS >> "$HATARI_TMP_CONFIG" + echo -e "\nAssigned floppy drives:" ${AR}GS "\n" >> "$HATARI_LOG" nice -n -19 hatarisa --configfile "$HATARI_TMP_CONFIG" >> $HATARI_LOG 2>&1 # Check for .cfg config file diff --git a/packages/games/emulators/pcsx2sa/sources/start_pcsx2.sh b/packages/games/emulators/pcsx2sa/sources/start_pcsx2.sh index 4b1f310e0..8a31205bb 100755 --- a/packages/games/emulators/pcsx2sa/sources/start_pcsx2.sh +++ b/packages/games/emulators/pcsx2sa/sources/start_pcsx2.sh @@ -10,5 +10,5 @@ if [ ! -d "/storage/.config/PCSX2" ] then cp -rf /usr/config/PCSX2 /storage/.config fi -@APPIMAGE@ -fastboot -- "$ARG" +@APPIMAGE@ -fastboot -- "${AR}G" set_audio alsa diff --git a/packages/games/emulators/vicesa/sources/start_x128.sh b/packages/games/emulators/vicesa/sources/start_x128.sh index 6b044d06a..c554e35a0 100644 --- a/packages/games/emulators/vicesa/sources/start_x128.sh +++ b/packages/games/emulators/vicesa/sources/start_x128.sh @@ -11,4 +11,4 @@ fi ARG=${1//[\\]/} export SDL_AUDIODRIVER=alsa -x128 -sounddev alsa -sdl2renderer opengles2 "$ARG" +x128 -sounddev alsa -sdl2renderer opengles2 "${AR}G" diff --git a/packages/games/emulators/vicesa/sources/start_x64sc.sh b/packages/games/emulators/vicesa/sources/start_x64sc.sh index 986dc42b5..9480412c2 100644 --- a/packages/games/emulators/vicesa/sources/start_x64sc.sh +++ b/packages/games/emulators/vicesa/sources/start_x64sc.sh @@ -12,4 +12,4 @@ fi ARG=${1//[\\]/} export SDL_AUDIODRIVER=alsa echo "[${ARG}]" -x64sc -sounddev alsa -sdl2renderer opengles2 "$ARG" +x64sc -sounddev alsa -sdl2renderer opengles2 "${AR}G" diff --git a/packages/games/emulators/vicesa/sources/start_xplus4.sh b/packages/games/emulators/vicesa/sources/start_xplus4.sh index 37013c759..633d19141 100644 --- a/packages/games/emulators/vicesa/sources/start_xplus4.sh +++ b/packages/games/emulators/vicesa/sources/start_xplus4.sh @@ -12,4 +12,4 @@ fi ARG=${1//[\\]/} export SDL_AUDIODRIVER=alsa echo "[${ARG}]" -xplus4 -sounddev alsa -sdl2renderer opengles2 "$ARG" +xplus4 -sounddev alsa -sdl2renderer opengles2 "${AR}G" diff --git a/packages/games/emulators/vicesa/sources/start_xvic.sh b/packages/games/emulators/vicesa/sources/start_xvic.sh index a427996b3..85daf2e0c 100644 --- a/packages/games/emulators/vicesa/sources/start_xvic.sh +++ b/packages/games/emulators/vicesa/sources/start_xvic.sh @@ -12,4 +12,4 @@ fi ARG=${1//[\\]/} export SDL_AUDIODRIVER=alsa echo "[${ARG}]" -xvic -sounddev alsa -sdl2renderer opengles2 "$ARG" +xvic -sounddev alsa -sdl2renderer opengles2 "${AR}G" diff --git a/packages/games/libretro/beetle-pcfx/package.mk b/packages/games/libretro/beetle-pcfx/package.mk index 74ddd355d..8df419420 100644 --- a/packages/games/libretro/beetle-pcfx/package.mk +++ b/packages/games/libretro/beetle-pcfx/package.mk @@ -38,9 +38,9 @@ PKG_AUTORECONF="no" make_target() { if [ "${ARCH}" == "i386" -o "${ARCH}" == "x86_64" ]; then - make platform=unix CC=${CC} CXX=${CXX} AR=$AR + make platform=unix CC=${CC} CXX=${CXX} AR=${AR} else - make platform=armv CC=${CC} CXX=${CXX} AR=$AR + make platform=armv CC=${CC} CXX=${CXX} AR=${AR} fi } diff --git a/packages/games/libretro/beetle-saturn/package.mk b/packages/games/libretro/beetle-saturn/package.mk index b4c68be7b..867d275d7 100644 --- a/packages/games/libretro/beetle-saturn/package.mk +++ b/packages/games/libretro/beetle-saturn/package.mk @@ -21,9 +21,9 @@ fi make_target() { if [ "${ARCH}" == "i386" -o "${ARCH}" == "x86_64" ]; then - make platform=unix CC=${CC} CXX=${CXX} AR=$AR + make platform=unix CC=${CC} CXX=${CXX} AR=${AR} else - make platform=armv CC=${CC} CXX=${CXX} AR=$AR + make platform=armv CC=${CC} CXX=${CXX} AR=${AR} fi } diff --git a/packages/games/libretro/mame/package.mk b/packages/games/libretro/mame/package.mk index e1b4934f2..395c91c80 100644 --- a/packages/games/libretro/mame/package.mk +++ b/packages/games/libretro/mame/package.mk @@ -60,7 +60,7 @@ make_target() { then export ARCHOPTS="-D__aarch64__ -DASMJIT_BUILD_X86" fi - make ${PKG_MAKE_OPTS_TARGET} OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=$LD AR=$AR $MAKEFLAGS + make ${PKG_MAKE_OPTS_TARGET} OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=$LD AR=${AR} ${MAKEFLAGS} } makeinstall_target() { diff --git a/packages/games/libretro/mame2016/package.mk b/packages/games/libretro/mame2016/package.mk index 6d7ef8d55..fa3f99c63 100644 --- a/packages/games/libretro/mame2016/package.mk +++ b/packages/games/libretro/mame2016/package.mk @@ -48,7 +48,7 @@ PKG_MAKE_OPTS_TARGET="REGENIE=1 \ make_target() { unset DISTRO - make ${PKG_MAKE_OPTS_TARGET} OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=$LD AR=$AR $MAKEFLAGS + make ${PKG_MAKE_OPTS_TARGET} OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=$LD AR=${AR} ${MAKEFLAGS} } makeinstall_target() { diff --git a/packages/games/libretro/neocd_libretro/package.mk b/packages/games/libretro/neocd_libretro/package.mk index a91f413ef..316cd996e 100644 --- a/packages/games/libretro/neocd_libretro/package.mk +++ b/packages/games/libretro/neocd_libretro/package.mk @@ -20,7 +20,7 @@ GET_HANDLER_SUPPORT="git" make_target() { cd ${PKG_BUILD} -CFLAGS=${CFLAGS} CXXFLAGS="${CXXFLAGS}" CXX="${CXX}" CC="${CC}" LD="$LD" RANLIB="$RANLIB" AR="$AR" make +CFLAGS=${CFLAGS} CXXFLAGS="${CXXFLAGS}" CXX="${CXX}" CC="${CC}" LD="$LD" RANLIB="$RANLIB" AR="${AR}" make } makeinstall_target() { diff --git a/packages/games/libretro/opera/package.mk b/packages/games/libretro/opera/package.mk index 35d6124d0..58e47d990 100644 --- a/packages/games/libretro/opera/package.mk +++ b/packages/games/libretro/opera/package.mk @@ -34,7 +34,7 @@ PKG_TOOLCHAIN="make" make_target() { - make CC=${CC} CXX=${CXX} AR=$AR + make CC=${CC} CXX=${CXX} AR=${AR} } makeinstall_target() { diff --git a/packages/graphics/ftgl/package.mk b/packages/graphics/ftgl/package.mk index 4f5c7e10f..e1b0b94e2 100644 --- a/packages/graphics/ftgl/package.mk +++ b/packages/graphics/ftgl/package.mk @@ -6,7 +6,7 @@ PKG_VERSION="2.1.2" PKG_SHA256="0f61d978c28cd5d78daded591f5b03f71248c0a51c7965733e8729c874265f50" PKG_LICENSE="GPL" PKG_SITE="http://sourceforge.net/projects/ftgl/" -PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz" +PKG_URL="${DISTRO}_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz" PKG_DEPENDS_TARGET="toolchain freetype" PKG_LONGDESC="a free cross-platform Open Source C++ library that uses Freetype2 to simplify rendering fonts in OpenGL applications" diff --git a/packages/graphics/opengl-meson/package.mk b/packages/graphics/opengl-meson/package.mk index da50eb3e6..9cc6b81a8 100644 --- a/packages/graphics/opengl-meson/package.mk +++ b/packages/graphics/opengl-meson/package.mk @@ -7,7 +7,7 @@ PKG_VERSION="8-r5p1-01rel0-armhf" PKG_SHA256="b2ad356f0f8c06c8bca077fe2dd5568b83e1879d32bea20c551ab1bf72402c29" PKG_LICENSE="nonfree" PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/filesystem/" -PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.xz" +PKG_URL="${DISTRO}_SRC/${PKG_NAME}-${PKG_VERSION}.tar.xz" PKG_DEPENDS_TARGET="toolchain" PKG_LONGDESC="OpenGL ES pre-compiled libraries for Mali GPUs found in Amlogic Meson SoCs." PKG_TOOLCHAIN="manual" diff --git a/packages/graphics/soil/package.mk b/packages/graphics/soil/package.mk index ee4304846..7e2c60219 100644 --- a/packages/graphics/soil/package.mk +++ b/packages/graphics/soil/package.mk @@ -6,7 +6,7 @@ PKG_VERSION="1.16" PKG_SHA256="5f2d8a8c78e81d29df07f0f97c34fa2f75187bcadfdc7222cbd026859acaff2f" PKG_LICENSE="CCPL" PKG_SITE="http://www.lonesock.net/soil.html" -PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.xz" +PKG_URL="${DISTRO}_SRC/${PKG_NAME}-${PKG_VERSION}.tar.xz" PKG_DEPENDS_TARGET="toolchain mesa" PKG_LONGDESC="A tiny C lib primarily for loading textures into OpenGL" PKG_BUILD_FLAGS="+pic" diff --git a/packages/graphics/vsxu/package.mk b/packages/graphics/vsxu/package.mk index 2553d0514..df8464049 100644 --- a/packages/graphics/vsxu/package.mk +++ b/packages/graphics/vsxu/package.mk @@ -9,7 +9,7 @@ PKG_ARCH="i386 x86_64" PKG_LICENSE="GPL" PKG_SITE="http://www.vsxu.com" # repackaged from https://github.com/vovoid/vsxu/archive/${PKG_VERSION}.tar.gz -PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz" +PKG_URL="${DISTRO}_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz" PKG_DEPENDS_TARGET="toolchain $OPENGL libX11 glew glfw zlib libpng libjpeg-turbo freetype" PKG_LONGDESC="an OpenGL-based programming environment to visualize music and create graphic effects" diff --git a/packages/jelos/sources/scripts/bezels.sh b/packages/jelos/sources/scripts/bezels.sh index 0d4d8329c..963c9496f 100755 --- a/packages/jelos/sources/scripts/bezels.sh +++ b/packages/jelos/sources/scripts/bezels.sh @@ -68,7 +68,7 @@ clear_bezel() { set_bezel() { # $OPACITY: input_overlay_opacity -# $AR_INDEX: aspect_ratio_index +# ${AR}_INDEX: aspect_ratio_index # $1: custom_viewport_width # $2: custom_viewport_height # $3: ustom_viewport_x @@ -79,7 +79,7 @@ set_bezel() { clear_bezel sed -i '/input_overlay_opacity = "/d' $RACONFIG sed -i "1i input_overlay_opacity = \"$OPACITY\"" $RACONFIG - sed -i "2i aspect_ratio_index = \"$AR_INDEX\"" $RACONFIG + sed -i "2i aspect_ratio_index = \"${AR}_INDEX\"" $RACONFIG sed -i "3i custom_viewport_width = \"$1\"" $RACONFIG sed -i "4i custom_viewport_height = \"$2\"" $RACONFIG sed -i "5i custom_viewport_x = \"$3\"" $RACONFIG diff --git a/packages/kernel/linux-firmware/brcmfmac_sdio-firmware-imx/package.mk b/packages/kernel/linux-firmware/brcmfmac_sdio-firmware-imx/package.mk index ab070e999..ec36dddd4 100644 --- a/packages/kernel/linux-firmware/brcmfmac_sdio-firmware-imx/package.mk +++ b/packages/kernel/linux-firmware/brcmfmac_sdio-firmware-imx/package.mk @@ -6,7 +6,7 @@ PKG_VERSION="0.1" PKG_SHA256="4c8ed8ae39ecd05d7e3aeebc98cf230912cdcc887fa78d5112f981b6f9358b6e" PKG_LICENSE="GPL" PKG_SITE="https://github.com/LibreELEC/LibreELEC.tv" -PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.xz" +PKG_URL="${DISTRO}_SRC/${PKG_NAME}-${PKG_VERSION}.tar.xz" PKG_DEPENDS_TARGET="toolchain kernel-firmware" PKG_LONGDESC="Firmware for brcm bluetooth chips used in some Freescale iMX based devices." diff --git a/packages/lang/Python3/package.mk b/packages/lang/Python3/package.mk index db590cfb1..54d455ccf 100644 --- a/packages/lang/Python3/package.mk +++ b/packages/lang/Python3/package.mk @@ -3,7 +3,7 @@ PKG_NAME="Python3" # When changing PKG_VERSION remember to sync PKG_PYTHON_VERSION! -PKG_VERSION="3.11.1" +PKG_VERSION="3.11.2" PKG_LICENSE="OSS" PKG_SITE="https://www.python.org/" PKG_URL="https://www.python.org/ftp/python/${PKG_VERSION}/${PKG_NAME::-1}-${PKG_VERSION}.tar.xz" diff --git a/packages/python/devel/setuptools/package.mk b/packages/python/devel/setuptools/package.mk index f91679b31..4822c76fd 100644 --- a/packages/python/devel/setuptools/package.mk +++ b/packages/python/devel/setuptools/package.mk @@ -3,8 +3,7 @@ # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) PKG_NAME="setuptools" -PKG_VERSION="52.0.0" -PKG_SHA256="ff0c74d1b905a224d647f99c6135eacbec2620219992186b81aa20012bc7f882" +PKG_VERSION="67.4.0" PKG_LICENSE="OSS" PKG_SITE="https://pypi.org/project/setuptools" PKG_URL="https://github.com/pypa/setuptools/archive/v${PKG_VERSION}.tar.gz" diff --git a/packages/sysutils/libhid/package.mk b/packages/sysutils/libhid/package.mk index 9e3ee30ec..a266da2f6 100644 --- a/packages/sysutils/libhid/package.mk +++ b/packages/sysutils/libhid/package.mk @@ -6,7 +6,7 @@ PKG_VERSION="0.2.16" PKG_SHA256="f6809ab3b9c907cbb05ceba9ee6ca23a705f85fd71588518e14b3a7d9f2550e5" PKG_LICENSE="GPL" PKG_SITE="http://libhid.alioth.debian.org/" -PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz" +PKG_URL="${DISTRO}_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz" PKG_DEPENDS_TARGET="toolchain libusb-compat libusb" PKG_LONGDESC="libhid provides a generic and flexible way to access and interact with USB HID devices." PKG_TOOLCHAIN="autotools" diff --git a/packages/sysutils/lm_sensors/package.mk b/packages/sysutils/lm_sensors/package.mk index 7f8800d1c..05efb7e6b 100644 --- a/packages/sysutils/lm_sensors/package.mk +++ b/packages/sysutils/lm_sensors/package.mk @@ -13,7 +13,7 @@ PKG_LONGDESC="Provides user-space support for the hardware monitoring drivers." PKG_MAKEINSTALL_OPTS_TARGET="PREFIX=/usr" pre_make_target() { - PKG_MAKE_OPTS_TARGET="PREFIX=/usr CC=${CC} AR=$AR" + PKG_MAKE_OPTS_TARGET="PREFIX=/usr CC=${CC} AR=${AR}" export CFLAGS="${TARGET_CFLAGS}" export CPPFLAGS="${TARGET_CPPFLAGS}" diff --git a/packages/sysutils/nmon/package.mk b/packages/sysutils/nmon/package.mk index c33a7b03d..0c7f313f5 100644 --- a/packages/sysutils/nmon/package.mk +++ b/packages/sysutils/nmon/package.mk @@ -22,5 +22,5 @@ make_target() { esac CFLAGS="${CFLAGS} -g -O3 -Wall -D JFS -D GETUSER -D LARGEMEM" LDFLAGS="${LDFLAGS} -lncurses -lm -g" - ${CC} -o nmon lmon*.c ${CFLAGS} ${LDFLAGS} -D $arch -D KERNEL_2_6_18 + ${CC} -o nmon lmon*.c ${CFLAGS} ${LDFLAGS} -D ${arch} -D KERNEL_2_6_18 } diff --git a/packages/sysutils/unrar/package.mk b/packages/sysutils/unrar/package.mk index ce87570ce..a4a202fa9 100644 --- a/packages/sysutils/unrar/package.mk +++ b/packages/sysutils/unrar/package.mk @@ -16,7 +16,7 @@ make_target() { make CXX="${CXX}" \ CXXFLAGS="${TARGET_CXXFLAGS}" \ RANLIB="$RANLIB" \ - AR="$AR" \ + AR="${AR}" \ STRIP="${STRIP}" \ -f makefile unrar @@ -25,7 +25,7 @@ make_target() { make CXX="${CXX}" \ CXXFLAGS="${TARGET_CXXFLAGS}" \ RANLIB="$RANLIB" \ - AR="$AR" \ + AR="${AR}" \ -f makefile lib } diff --git a/packages/sysutils/v86d/package.mk b/packages/sysutils/v86d/package.mk index 6d9dd9d54..efcdaed2b 100644 --- a/packages/sysutils/v86d/package.mk +++ b/packages/sysutils/v86d/package.mk @@ -8,7 +8,7 @@ PKG_SHA256="634964ae18ef68c8493add2ce150e3b4502badeb0d9194b4bd81241d25e6735c" PKG_ARCH="x86_64" PKG_LICENSE="GPL" PKG_SITE="http://dev.gentoo.org/~spock/projects/uvesafb/" -PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.bz2" +PKG_URL="${DISTRO}_SRC/${PKG_NAME}-${PKG_VERSION}.tar.bz2" PKG_DEPENDS_INIT="toolchain gcc:init" PKG_LONGDESC="v86d is the userspace helper that runs x86 code in an emulated environment." diff --git a/packages/textproc/tinyxml2/package.mk b/packages/textproc/tinyxml2/package.mk index 45b8a9f5b..bf52fbbb8 100644 --- a/packages/textproc/tinyxml2/package.mk +++ b/packages/textproc/tinyxml2/package.mk @@ -6,7 +6,7 @@ PKG_VERSION="1.0.12" PKG_SHA256="53a4dd1b3aed4aa05b18782e303646669d2d3b2de3c1919fe21aea319b44de7f" PKG_LICENSE="zlib" PKG_SITE="http://www.grinninglizard.com/tinyxml2/index.html" -PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz" +PKG_URL="${DISTRO}_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz" PKG_DEPENDS_TARGET="toolchain" PKG_LONGDESC="TinyXML2 is a simple, small, C++ XML parser." PKG_BUILD_FLAGS="+pic" diff --git a/packages/tools/installer/scripts/installer b/packages/tools/installer/scripts/installer index 4563794d4..299e20490 100755 --- a/packages/tools/installer/scripts/installer +++ b/packages/tools/installer/scripts/installer @@ -456,7 +456,7 @@ do_poweroff() { # setup needed variables OS_VERSION=$(lsb_release) -BACKTITLE="@DISTRONAME@ Installer - $OS_VERSION" +BACKTITLE="@DISTRONAME@ Installer - ${OS_VERSION}" TMPDIR="/tmp/installer" LOGFILE="$TMPDIR/install.log" @@ -485,7 +485,7 @@ rm -rf $TMPDIR mkdir -p $TMPDIR #create log file -echo "@DISTRONAME@ Installer - $OS_VERSION started at:" > $LOGFILE +echo "@DISTRONAME@ Installer - ${OS_VERSION} started at:" > $LOGFILE date >> $LOGFILE dbglg "System status" diff --git a/packages/tools/sysutils/MC/etc/mcedit.menu b/packages/tools/sysutils/MC/etc/mcedit.menu index 62c5d21b1..eae309a93 100644 --- a/packages/tools/sysutils/MC/etc/mcedit.menu +++ b/packages/tools/sysutils/MC/etc/mcedit.menu @@ -108,7 +108,7 @@ shell_patterns=0 # expression type + y Perl\ Program | f \.pl$ 9 opendir () cat < %b - %iopendir(DIR, \$dir) || die("\$0: can't open \$dir\n"); + %iopendir(DIR, \${dir}) || die("\$0: can't open \${dir}\n"); EOF + y Perl\ Program | f \.pl$ diff --git a/packages/x11/util/xorg-launch-helper/scripts/xorg-launch b/packages/x11/util/xorg-launch-helper/scripts/xorg-launch index 9e6c71978..f9e765503 100755 --- a/packages/x11/util/xorg-launch-helper/scripts/xorg-launch +++ b/packages/x11/util/xorg-launch-helper/scripts/xorg-launch @@ -7,13 +7,13 @@ # max 10 seconds ARGS_FILE="/run/libreelec/xorg-settings.conf" for i in $(seq 1 40) ; do - if [ -e "$ARGS_FILE" ] ; then + if [ -e "${AR}GS_FILE" ] ; then break fi usleep 250000 done -if [ -e "$ARGS_FILE" ] ; then +if [ -e "${AR}GS_FILE" ] ; then . /run/libreelec/xorg-settings.conf exec xorg-launch-helper $@ $XORG_ARGS else diff --git a/scripts/build b/scripts/build index 00d4f9a15..3eb003e2e 100755 --- a/scripts/build +++ b/scripts/build @@ -241,6 +241,7 @@ EOF export CXX=$(pwd)/libreelec-local-cxx fi + # configure if [ -n "${PKG_DEPENDS_CONFIG}" -a -n "${PKG_INSTALL}" ]; then for pkg in ${PKG_DEPENDS_CONFIG}; do @@ -266,24 +267,24 @@ else case "${PKG_TOOLCHAIN}:${TARGET}" in # meson builds "meson:target") - create_meson_conf_target ${TARGET} ${MESON_CONF} - echo "Executing (target): meson setup ${TARGET_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_TARGET} ${PKG_MESON_SCRIPT%/*}" | tr -s " " - CC="${HOST_CC}" CXX="${HOST_CXX}" meson setup ${TARGET_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_TARGET} ${PKG_MESON_SCRIPT%/*} + create_meson_conf ${TARGET} ${MESON_CONF} + echo "Executing (target): meson ${TARGET_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_TARGET} $(dirname ${PKG_MESON_SCRIPT})" | tr -s " " + CC="${HOST_CC}" CXX="${HOST_CXX}" meson ${TARGET_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_TARGET} $(dirname ${PKG_MESON_SCRIPT}) ;; "meson:host") - create_meson_conf_host ${TARGET} ${MESON_CONF} - echo "Executing (host): meson setup ${HOST_MESON_OPTS} --native-file=${MESON_CONF} ${PKG_MESON_OPTS_HOST} ${PKG_MESON_SCRIPT%/*}" | tr -s " " - meson setup ${HOST_MESON_OPTS} --native-file=${MESON_CONF} ${PKG_MESON_OPTS_HOST} ${PKG_MESON_SCRIPT%/*} + create_meson_conf ${TARGET} ${MESON_CONF} + echo "Executing (host): meson ${HOST_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_HOST} $(dirname ${PKG_MESON_SCRIPT})" | tr -s " " + meson ${HOST_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_HOST} $(dirname ${PKG_MESON_SCRIPT}) ;; "meson:init") - create_meson_conf_target ${TARGET} ${MESON_CONF} - echo "Executing (init): meson setup ${INIT_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_INIT} ${PKG_MESON_SCRIPT%/*}" | tr -s " " - meson setup ${INIT_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_INIT} ${PKG_MESON_SCRIPT%/*} + create_meson_conf ${TARGET} ${MESON_CONF} + echo "Executing (init): meson ${INIT_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_INIT} $(dirname ${PKG_MESON_SCRIPT})" | tr -s " " + meson ${INIT_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_INIT} $(dirname ${PKG_MESON_SCRIPT}) ;; "meson:bootstrap") - create_meson_conf_host ${TARGET} ${MESON_CONF} - echo "Executing (bootstrap): meson setup ${BOOTSTRAP_MESON_OPTS} ----native-file=${MESON_CONF} ${PKG_MESON_OPTS_BOOTSTRAP} ${PKG_MESON_SCRIPT%/*}" | tr -s " " - meson setup ${BOOTSTRAP_MESON_OPTS} --native-file=${MESON_CONF} ${PKG_MESON_OPTS_BOOTSTRAP} ${PKG_MESON_SCRIPT%/*} + create_meson_conf ${TARGET} ${MESON_CONF} + echo "Executing (bootstrap): meson ${BOOTSTRAP_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_BOOTSTRAP} $(dirname ${PKG_MESON_SCRIPT})" | tr -s " " + meson ${BOOTSTRAP_MESON_OPTS} --cross-file=${MESON_CONF} ${PKG_MESON_OPTS_BOOTSTRAP} $(dirname ${PKG_MESON_SCRIPT}) ;; # cmake builds with ninja