aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/buildsteps/defaultenv6
-rw-r--r--tools/buildsteps/linux-arm-gbm/configure-depends9
-rw-r--r--[-rwxr-xr-x]tools/buildsteps/linux-arm-gbm/configure-xbmc (renamed from tools/buildsteps/rbpi/configure-xbmc)2
-rw-r--r--[-rwxr-xr-x]tools/buildsteps/linux-arm-gbm/make-binary-addons (renamed from tools/buildsteps/rbpi/make-binary-addons)2
-rw-r--r--[-rwxr-xr-x]tools/buildsteps/linux-arm-gbm/make-depends (renamed from tools/buildsteps/rbpi/make-depends)3
-rw-r--r--[-rwxr-xr-x]tools/buildsteps/linux-arm-gbm/make-native-depends (renamed from tools/buildsteps/rbpi/make-native-depends)4
-rw-r--r--[-rwxr-xr-x]tools/buildsteps/linux-arm-gbm/make-xbmc (renamed from tools/buildsteps/rbpi/make-xbmc)2
-rw-r--r--[-rwxr-xr-x]tools/buildsteps/linux-arm-gbm/package (renamed from tools/buildsteps/rbpi/package)4
-rw-r--r--[-rwxr-xr-x]tools/buildsteps/linux-arm-gbm/prepare-depends (renamed from tools/buildsteps/rbpi/prepare-depends)11
-rw-r--r--[-rwxr-xr-x]tools/buildsteps/linux-arm-gbm/prepare-xbmc (renamed from tools/buildsteps/rbpi/prepare-xbmc)4
-rw-r--r--tools/buildsteps/linux-arm-gbm/run-tests14
-rwxr-xr-xtools/buildsteps/rbpi/configure-depends12
-rw-r--r--tools/buildsteps/windows/BuildSetup.bat41
-rw-r--r--tools/buildsteps/windows/vswhere.bat2
-rwxr-xr-xtools/darwin/Support/Codesign-topshelf.command17
-rwxr-xr-xtools/darwin/Support/Codesign.command61
-rw-r--r--tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in1
-rw-r--r--tools/depends/README.md21
-rw-r--r--tools/depends/configure.ac72
-rw-r--r--tools/depends/m4/ax_cxx_compile_stdcxx.m4951
-rw-r--r--tools/depends/m4/ax_cxx_compile_stdcxx_14.m4146
-rw-r--r--tools/depends/m4/xbmc_arch.m43
-rw-r--r--tools/depends/native/Makefile14
-rw-r--r--tools/depends/native/Mako/Makefile29
-rw-r--r--tools/depends/native/MarkupSafe/Makefile29
-rw-r--r--tools/depends/native/gen_entitlements/Makefile14
-rwxr-xr-xtools/depends/native/gen_entitlements/gen_entitlements.py36
-rw-r--r--tools/depends/native/meson/Makefile2
-rw-r--r--tools/depends/target/Makefile33
-rw-r--r--tools/depends/target/Toolchain.cmake.in16
-rw-r--r--tools/depends/target/Toolchain_binaddons.cmake.in17
-rw-r--r--tools/depends/target/dav1d/Makefile2
-rw-r--r--tools/depends/target/ffmpeg/CMakeLists.txt37
-rw-r--r--tools/depends/target/ffmpeg/FFMPEG-VERSION2
-rw-r--r--tools/depends/target/libandroidjni/Makefile2
-rw-r--r--tools/depends/target/libdrm/Makefile76
-rw-r--r--tools/depends/target/libfmt/Makefile2
-rw-r--r--tools/depends/target/libinput/Makefile2
-rw-r--r--tools/depends/target/libspdlog/Makefile2
-rw-r--r--tools/depends/target/libva/Makefile64
-rw-r--r--tools/depends/target/mesa/Makefile93
-rwxr-xr-xtools/depends/target/meson-cross-setup.sh10
-rw-r--r--tools/depends/target/nettle/02-conftest_exit.patch21
-rw-r--r--tools/depends/target/nettle/Makefile4
-rw-r--r--tools/depends/target/p8-platform/0001-fix-c++17-support.patch22
-rw-r--r--tools/depends/target/p8-platform/Makefile4
-rw-r--r--tools/depends/xbmc-addons.include5
47 files changed, 1484 insertions, 442 deletions
diff --git a/tools/buildsteps/defaultenv b/tools/buildsteps/defaultenv
index becf6ae8f8..66f0777fb0 100644
--- a/tools/buildsteps/defaultenv
+++ b/tools/buildsteps/defaultenv
@@ -50,12 +50,6 @@ case $XBMC_PLATFORM_DIR in
DEFAULT_CONFIGURATION="Debug"
;;
- rbpi)
- JENKINS_RBPI_DEVENV=${JENKINS_RBPI_DEVENV:-"/home/jenkins/rbpi-dev"}
- DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
- DEFAULT_CONFIGURATION="Debug"
- ;;
-
freebsd)
DEFAULT_CONFIGURATION="Debug"
;;
diff --git a/tools/buildsteps/linux-arm-gbm/configure-depends b/tools/buildsteps/linux-arm-gbm/configure-depends
new file mode 100644
index 0000000000..8ffc695d80
--- /dev/null
+++ b/tools/buildsteps/linux-arm-gbm/configure-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux-arm-gbm
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-toolchain=/usr --prefix=$XBMC_DEPENDS_ROOT --host=arm-linux-gnueabihf --with-platform=gbm --with-tarballs=$TARBALLS $DEBUG_SWITCH
+fi
diff --git a/tools/buildsteps/rbpi/configure-xbmc b/tools/buildsteps/linux-arm-gbm/configure-xbmc
index 6dd54bf845..72f3c3a7dc 100755..100644
--- a/tools/buildsteps/rbpi/configure-xbmc
+++ b/tools/buildsteps/linux-arm-gbm/configure-xbmc
@@ -1,5 +1,5 @@
WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
-XBMC_PLATFORM_DIR=rbpi
+XBMC_PLATFORM_DIR=linux-arm-gbm
. $WORKSPACE/tools/buildsteps/defaultenv
make -C $WORKSPACE/tools/depends/target/cmakebuildsys
diff --git a/tools/buildsteps/rbpi/make-binary-addons b/tools/buildsteps/linux-arm-gbm/make-binary-addons
index 862e7d79e9..fbc9822d53 100755..100644
--- a/tools/buildsteps/rbpi/make-binary-addons
+++ b/tools/buildsteps/linux-arm-gbm/make-binary-addons
@@ -1,5 +1,5 @@
WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
-XBMC_PLATFORM_DIR=rbpi
+XBMC_PLATFORM_DIR=linux-arm-gbm
. $WORKSPACE/tools/buildsteps/defaultenv
. $WORKSPACE/tools/buildsteps/$XBMC_PLATFORM_DIR/make-native-depends
diff --git a/tools/buildsteps/rbpi/make-depends b/tools/buildsteps/linux-arm-gbm/make-depends
index ceeee09234..004eed0738 100755..100644
--- a/tools/buildsteps/rbpi/make-depends
+++ b/tools/buildsteps/linux-arm-gbm/make-depends
@@ -1,9 +1,8 @@
WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
-XBMC_PLATFORM_DIR=rbpi
+XBMC_PLATFORM_DIR=linux-arm-gbm
. $WORKSPACE/tools/buildsteps/defaultenv
if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
then
cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS || make && tagSuccessFulBuild $WORKSPACE/tools/depends
fi
-
diff --git a/tools/buildsteps/rbpi/make-native-depends b/tools/buildsteps/linux-arm-gbm/make-native-depends
index d4d9e7dbe1..d15bfd4f8b 100755..100644
--- a/tools/buildsteps/rbpi/make-native-depends
+++ b/tools/buildsteps/linux-arm-gbm/make-native-depends
@@ -1,9 +1,9 @@
WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
-XBMC_PLATFORM_DIR=rbpi
+XBMC_PLATFORM_DIR=linux-arm-gbm
. $WORKSPACE/tools/buildsteps/defaultenv
if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ] && [ "$BINARY_ADDONS_CLEAN_NATIVETOOLS" != "0" ]
then
git clean -xffd $WORKSPACE/tools/depends/native
cd $WORKSPACE/tools/depends/native;make -j $BUILDTHREADS && tagSuccessFulBuild $WORKSPACE/tools/depends
-fi \ No newline at end of file
+fi
diff --git a/tools/buildsteps/rbpi/make-xbmc b/tools/buildsteps/linux-arm-gbm/make-xbmc
index 07cfae21c7..089d88d026 100755..100644
--- a/tools/buildsteps/rbpi/make-xbmc
+++ b/tools/buildsteps/linux-arm-gbm/make-xbmc
@@ -1,5 +1,5 @@
WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
-XBMC_PLATFORM_DIR=rbpi
+XBMC_PLATFORM_DIR=linux-arm-gbm
. $WORKSPACE/tools/buildsteps/defaultenv
cd $WORKSPACE/build;make -j$BUILDTHREADS || make
diff --git a/tools/buildsteps/rbpi/package b/tools/buildsteps/linux-arm-gbm/package
index f3c41a5c96..5032c912e0 100755..100644
--- a/tools/buildsteps/rbpi/package
+++ b/tools/buildsteps/linux-arm-gbm/package
@@ -1,5 +1,5 @@
WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
-XBMC_PLATFORM_DIR=rbpi
+XBMC_PLATFORM_DIR=linux-arm-gbm
. $WORKSPACE/tools/buildsteps/defaultenv
-#nothing for rbpi atm
+#nothing for linux atm
diff --git a/tools/buildsteps/rbpi/prepare-depends b/tools/buildsteps/linux-arm-gbm/prepare-depends
index c38eb77901..dc62bbe2a5 100755..100644
--- a/tools/buildsteps/rbpi/prepare-depends
+++ b/tools/buildsteps/linux-arm-gbm/prepare-depends
@@ -1,20 +1,11 @@
WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
-XBMC_PLATFORM_DIR=rbpi
+XBMC_PLATFORM_DIR=linux-arm-gbm
. $WORKSPACE/tools/buildsteps/defaultenv
#clean without depends for skipping depends build if possible
#also skip binary addons (pvr, audioencoder) as long as they are deployed in tree
cd $WORKSPACE;git clean -xfd -e "cmake/.last_success_revision" -e "tools/depends" ${DEPLOYED_BINARY_ADDONS}
-if [ -d $JENKINS_RBPI_DEVENV/firmware ]
-then
- cd $JENKINS_RBPI_DEVENV/firmware;git pull origin master
-else
- cd $JENKINS_RBPI_DEVENV;git clone git://github.com/raspberrypi/firmware.git --depth=1 -b master
-fi
-
-cd $WORKSPACE
-
# if depends path has changed - cleanout everything and do a full rebuild
if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
then
diff --git a/tools/buildsteps/rbpi/prepare-xbmc b/tools/buildsteps/linux-arm-gbm/prepare-xbmc
index 3957f5aab7..73c1b53056 100755..100644
--- a/tools/buildsteps/rbpi/prepare-xbmc
+++ b/tools/buildsteps/linux-arm-gbm/prepare-xbmc
@@ -1,9 +1,7 @@
WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
-XBMC_PLATFORM_DIR=rbpi
+XBMC_PLATFORM_DIR=linux-arm-gbm
. $WORKSPACE/tools/buildsteps/defaultenv
-cd $WORKSPACE
-
#build binary addons before building xbmc...
#make sure that binary_addons don't clean the native tools
#here
diff --git a/tools/buildsteps/linux-arm-gbm/run-tests b/tools/buildsteps/linux-arm-gbm/run-tests
new file mode 100644
index 0000000000..b76ec0e0fb
--- /dev/null
+++ b/tools/buildsteps/linux-arm-gbm/run-tests
@@ -0,0 +1,14 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux-arm-gbm
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/build;make -j$BUILDTHREADS kodi-test
+if [ "$Configuration" != "Coverage" ]; then
+ cd $WORKSPACE;build/kodi-test --gtest_output=xml:gtestresults.xml
+else
+ cd $WORKSPACE/build;GTEST_OUTPUT="xml:$WORKSPACE/gtestresults.xml" make coverage
+fi
+
+awk '{ if ($1 == "<testcase" && match($0, "notrun")) print substr($0,0,length($0)-2) "><skipped/></testcase>"; else print $0;}' gtestresults.xml > gtestresults-skipped.xml
+rm gtestresults.xml
+mv gtestresults-skipped.xml gtestresults.xml
diff --git a/tools/buildsteps/rbpi/configure-depends b/tools/buildsteps/rbpi/configure-depends
deleted file mode 100755
index 13d5ca27cb..0000000000
--- a/tools/buildsteps/rbpi/configure-depends
+++ /dev/null
@@ -1,12 +0,0 @@
-WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
-XBMC_PLATFORM_DIR=rbpi
-. $WORKSPACE/tools/buildsteps/defaultenv
-
-if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
-then
- cd $WORKSPACE/tools/depends;
-
- ./configure --with-platform=raspberry-pi2 --host=arm-linux-gnueabihf --prefix=$XBMC_DEPENDS_ROOT --with-tarballs=$TARBALLS \
- --with-firmware=$JENKINS_RBPI_DEVENV/firmware --build=i686-linux $DEBUG_SWITCH \
- --with-toolchain=$JENKINS_RBPI_DEVENV/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf
-fi
diff --git a/tools/buildsteps/windows/BuildSetup.bat b/tools/buildsteps/windows/BuildSetup.bat
index 0c4487c9e3..6e1aca3e86 100644
--- a/tools/buildsteps/windows/BuildSetup.bat
+++ b/tools/buildsteps/windows/BuildSetup.bat
@@ -266,39 +266,48 @@ set WORKSPACE=%base_dir%\kodi-build.%TARGET_PLATFORM%
:MAKE_APPX
set app_ext=msix
+ set app_path=%base_dir%\project\UWPBuildSetup
+ if not exist "%app_path%" mkdir %app_path%
call %base_dir%\project\Win32BuildSetup\extract_git_rev.bat > NUL
for /F %%a IN ('dir /B /S %WORKSPACE%\AppPackages ^| findstr /I /R "%APP_NAME%_.*_%TARGET_ARCHITECTURE%_%buildconfig%\.%app_ext%$"') DO (
- copy /Y %%a %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.%app_ext%
- copy /Y %%~dpna.cer %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.cer
- copy /Y %%~dpna.appxsym %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.appxsym
- goto END
+ copy /Y %%a %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.%app_ext%
+ copy /Y %%~dpna.cer %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.cer
+ copy /Y %%~dpna.appxsym %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.appxsym
+ goto END_APPX
)
rem Release builds don't have Release in it's name
for /F %%a IN ('dir /B /S %WORKSPACE%\AppPackages ^| findstr /I /R "%APP_NAME%_.*_%TARGET_ARCHITECTURE%\.%app_ext%$"') DO (
- copy /Y %%a %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.%app_ext%
- copy /Y %%~dpna.cer %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.cer
- copy /Y %%~dpna.appxsym %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.appxsym
- goto END
+ copy /Y %%a %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.%app_ext%
+ copy /Y %%~dpna.cer %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.cer
+ copy /Y %%~dpna.appxsym %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.appxsym
+ goto END_APPX
)
rem apxx file has win32 instead of x86 in it's name
if %TARGET_ARCHITECTURE%==x86 (
for /F %%a IN ('dir /B /S %WORKSPACE%\AppPackages ^| findstr /I /R "%APP_NAME%_.*_win32_%buildconfig%\.%app_ext%$"') DO (
- copy /Y %%a %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.%app_ext%
- copy /Y %%~dpna.cer %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.cer
- copy /Y %%~dpna.appxsym %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.appxsym
- goto END
+ copy /Y %%a %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.%app_ext%
+ copy /Y %%~dpna.cer %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.cer
+ copy /Y %%~dpna.appxsym %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.appxsym
+ goto END_APPX
)
rem Release builds don't have Release in it's name
for /F %%a IN ('dir /B /S %WORKSPACE%\AppPackages ^| findstr /I /R "%APP_NAME%_.*_win32\.%app_ext%$"') DO (
- copy /Y %%a %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.%app_ext%
- copy /Y %%~dpna.cer %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.cer
- copy /Y %%~dpna.appxsym %base_dir%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.appxsym
- goto END
+ copy /Y %%a %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.%app_ext%
+ copy /Y %%~dpna.cer %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.cer
+ copy /Y %%~dpna.appxsym %app_path%\%APP_NAME%-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.appxsym
+ goto END_APPX
)
)
+:END_APPX
+ ECHO ------------------------------------------------------------
+ ECHO Done!
+ ECHO Setup is located at %app_path%
+ ECHO ------------------------------------------------------------
+ GOTO END
+
:DIE
ECHO ------------------------------------------------------------
ECHO !-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-
diff --git a/tools/buildsteps/windows/vswhere.bat b/tools/buildsteps/windows/vswhere.bat
index 999afb4466..f7b132bb37 100644
--- a/tools/buildsteps/windows/vswhere.bat
+++ b/tools/buildsteps/windows/vswhere.bat
@@ -38,7 +38,7 @@ IF "%arch%"=="x86" (
)
IF "%vcstore%"=="store" (
- SET sdkver=10.0.17763.0
+ SET sdkver=10.0.18362.0
SET toolsdir="win10-%toolsdir%"
)
diff --git a/tools/darwin/Support/Codesign-topshelf.command b/tools/darwin/Support/Codesign-topshelf.command
new file mode 100755
index 0000000000..8b9a3ffe83
--- /dev/null
+++ b/tools/darwin/Support/Codesign-topshelf.command
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -x
+
+LDID="$NATIVEPREFIX/bin/ldid"
+
+# Delete existing codesign and provisioning file
+rm -f "${CODESIGNING_FOLDER_PATH}/embedded.mobileprovision"
+rm -rf "${CODESIGNING_FOLDER_PATH}/_CodeSignature"
+
+# If user has not set a code_sign_identity we do a fake sign
+if [ -z "${CODE_SIGN_IDENTITY}" ]; then
+ # Do fake sign - needed for iOS >=5.1 and tvOS >=10.2 jailbroken devices
+ # See http://www.saurik.com/id/8
+ echo "Doing a fake sign of Top Shelf binary using ldid for jailbroken devices"
+ "${LDID}" -S "${CODESIGNING_FOLDER_PATH}/${EXECUTABLE_NAME}"
+fi
diff --git a/tools/darwin/Support/Codesign.command b/tools/darwin/Support/Codesign.command
index 44486e6956..e75410d4ef 100755
--- a/tools/darwin/Support/Codesign.command
+++ b/tools/darwin/Support/Codesign.command
@@ -2,10 +2,9 @@
set -x
-#this is the list of binaries we have to sign for being able to run un-jailbroken
+# This is the list of binaries we have to sign for being able to run un-jailbroken
LIST_BINARY_EXTENSIONS="dylib so app"
-GEN_ENTITLEMENTS="$NATIVEPREFIX/bin/gen_entitlements.py"
DARWIN_EMBEDDED_ENTITLEMENTS="$XBMC_DEPENDS/share/darwin_embedded_entitlements.xml"
LDID="$NATIVEPREFIX/bin/ldid"
@@ -13,26 +12,15 @@ if [ "${PLATFORM_NAME}" == "macosx" ]; then
MACOS=1
fi
-if [[ ! "$MACOS" && ! -f ${GEN_ENTITLEMENTS} ]]; then
- echo "error: $GEN_ENTITLEMENTS not found. Codesign won't work."
- exit -1
-fi
-
if [ "$MACOS" ]; then
CONTENTS_PATH="${CODESIGNING_FOLDER_PATH}/Contents"
else
CONTENTS_PATH="${CODESIGNING_FOLDER_PATH}"
fi
-if [ ! "$MACOS" ]; then
- # do fake sign - needed for iOS >=5.1 and tvOS >=10.2 jailbroken devices
- # see http://www.saurik.com/id/8
- "${LDID}" -S"${DARWIN_EMBEDDED_ENTITLEMENTS}" "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/${EXECUTABLE_NAME}"
-fi
-
-# pull the CFBundleIdentifier out of the built xxx.app
+# Pull the CFBundleIdentifier out of the built xxx.app
BUNDLEID=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "${CONTENTS_PATH}/Info.plist")
-echo "CFBundleIdentifier is ${BUNDLEID}"
+echo "CFBundleIdentifier is '${BUNDLEID}'"
# Prefer the expanded name, if available.
CODE_SIGN_IDENTITY_FOR_ITEMS="${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
@@ -40,28 +28,21 @@ if [ "${CODE_SIGN_IDENTITY_FOR_ITEMS}" = "" ] ; then
# Fall back to old behavior.
CODE_SIGN_IDENTITY_FOR_ITEMS="${CODE_SIGN_IDENTITY}"
fi
-echo "${CODE_SIGN_IDENTITY_FOR_ITEMS}"
-
-if [ ! "$MACOS" ]; then
- ${GEN_ENTITLEMENTS} "${BUNDLEID}" "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}/${EXECUTABLE_NAME}.xcent"
- if [ -f "${CONTENTS_PATH}/embedded.mobileprovision" ]; then
- rm -f "${CONTENTS_PATH}/embedded.mobileprovision"
- fi
-fi
+echo "Code sign identity is '${CODE_SIGN_IDENTITY_FOR_ITEMS}'"
-# delete existing codesigning
-if [ -d "${CONTENTS_PATH}/_CodeSignature" ]; then
- rm -r "${CONTENTS_PATH}/_CodeSignature"
-fi
+# Delete existing codesign and provisioning file
+rm -f "${CONTENTS_PATH}/embedded.mobileprovision"
+rm -rf "${CONTENTS_PATH}/_CodeSignature"
-#if user has set a code_sign_identity different from iPhone Developer we do a real codesign (for deployment on non-jailbroken devices)
+# If user has set a code_sign_identity we do a real codesign (for deployment on non-jailbroken devices)
if ! [ -z "${CODE_SIGN_IDENTITY_FOR_ITEMS}" ]; then
if egrep -q --max-count=1 -e '^iPhone (Developer|Distribution): ' -e '^Apple (Development|Distribution): ' -e '^[[:xdigit:]]+$' -e '^Developer ID Application: ' <<<"${CODE_SIGN_IDENTITY_FOR_ITEMS}"; then
- echo "Doing a full bundle sign using genuine identity ${CODE_SIGN_IDENTITY_FOR_ITEMS}"
+ echo "Doing a full bundle sign using genuine identity '${CODE_SIGN_IDENTITY_FOR_ITEMS}'"
+
for binext in $LIST_BINARY_EXTENSIONS
do
- echo "Signing binary: $binext"
- # check if at least 1 file with the extension exists to sign, otherwise do nothing
+ echo "Signing binaries with '$binext' extension"
+ # Check if at least 1 file with the extension exists to sign, otherwise do nothing
FINDOUTPUT=$(find "${CONTENTS_PATH}" -iname "*.$binext" -type f)
if [ `echo $FINDOUTPUT | wc -l` != 0 ]; then
for singlefile in $FINDOUTPUT; do
@@ -80,7 +61,7 @@ if ! [ -z "${CODE_SIGN_IDENTITY_FOR_ITEMS}" ]; then
done
if [ "$MACOS" ]; then
- #sign and repackage python eggs for osx
+ # Sign and repackage python eggs for osx
EGGS=$(find "${CONTENTS_PATH}" -iname "*.egg" -type f)
echo "Signing Eggs"
for i in $EGGS; do
@@ -89,7 +70,7 @@ if ! [ -z "${CODE_SIGN_IDENTITY_FOR_ITEMS}" ]; then
unzip -q $i -d del
for binext in $LIST_BINARY_EXTENSIONS
do
- # check if at least 1 file with the extension exists to sign, otherwise do nothing
+ # Check if at least 1 file with the extension exists to sign, otherwise do nothing
FINDOUTPUT=$(find ./del/ -iname "*.$binext" -type f)
if [ `echo $FINDOUTPUT | wc -l` != 0 ]; then
for singlefile in $FINDOUTPUT; do
@@ -103,4 +84,18 @@ if ! [ -z "${CODE_SIGN_IDENTITY_FOR_ITEMS}" ]; then
done
fi
fi
+elif [ ! "$MACOS" ]; then
+ # Do fake sign - needed for iOS >=5.1 and tvOS >=10.2 jailbroken devices
+ # See http://www.saurik.com/id/8
+ echo "Doing a fake sign using ldid for jailbroken devices (main kodi binary and all Mach-O files)"
+
+ # Main 'kodi' binary
+ "${LDID}" -S"${DARWIN_EMBEDDED_ENTITLEMENTS}" "${CONTENTS_PATH}/${EXECUTABLE_NAME}"
+
+ # All Mach-O files (except TopShelf)
+ for f in $(find "${CONTENTS_PATH}/AppData" "${CONTENTS_PATH}/Frameworks" -type f); do
+ if [[ $(file ${f}) == *"Mach-O"* ]]; then
+ "${LDID}" -S "${f}"
+ fi
+ done
fi
diff --git a/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in b/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in
index a1d1121199..78cb87aada 100644
--- a/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in
+++ b/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in
@@ -109,7 +109,6 @@ cp -r $APP $DIRNAME/$PACKAGE/Applications/
find $DIRNAME/$PACKAGE/Applications/ -name '.svn' -exec rm -rf {} \;
find $DIRNAME/$PACKAGE/Applications/ -name '.git*' -exec rm -rf {} \;
find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store' -exec rm -rf {} \;
-find $DIRNAME/$PACKAGE/Applications/ -name '*.xcent' -exec rm -rf {} \;
echo Packaging $PACKAGE
# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
diff --git a/tools/depends/README.md b/tools/depends/README.md
index b4bc0587dd..2e5db17886 100644
--- a/tools/depends/README.md
+++ b/tools/depends/README.md
@@ -20,25 +20,25 @@ Paths below are examples. If you want to build Kodi, follow our **[build guides]
### All platforms
`./bootstrap`
### Darwin
-**macOS (x86_64)**
+**macOS (x86_64)**
`./configure --host=x86_64-apple-darwin`
-**iOS (arm64)**
+**iOS (arm64)**
`./configure --host=aarch64-apple-darwin`
-**tvOS**
+**tvOS**
`./configure --host=aarch64-apple-darwin --with-platform=tvos`
**NOTE:** You can target the same `--prefix=` path. Each setup will be done in an isolated directory. The last configure/make you do is the one used for Kodi/Xcode.
-
+
### Android
-**arm**
+**arm**
`./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends`
-**aarch64**
+**aarch64**
`./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends`
-**x86**
+**x86**
`./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r20 --prefix=$HOME/android-tools/xbmc-depends`
**x86_64**
@@ -47,13 +47,10 @@ Paths below are examples. If you want to build Kodi, follow our **[build guides]
> **Note:** Android x86 and x86_64 are not maintained and are not 100% sure that everything works correctly!
### Linux
-**ARM (codesourcery/lenaro/etc)**
+**ARM (codesourcery/lenaro/etc)**
`./configure --with-toolchain=/opt/toolchains/my-example-toolchain/ --prefix=/opt/xbmc-deps --host=arm-linux-gnueabi`
-**Raspberry Pi**
-`./configure --with-platform=raspberry-pi --host=arm-linux-gnueabihf --prefix=/opt/xbmc-deps --with-tarballs=/opt/xbmc-tarballs --with-toolchain=/opt/rbp-dev/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf --with-firmware=/opt/rbp-dev/firmware --build=i686-linux`
-
-**Native**
+**Native**
`./configure --with-toolchain=/usr --prefix=/opt/xbmc-deps --host=x86_64-linux-gnu`
Cross compiling is a PITA.
diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac
index 3ab992a34e..83389ee165 100644
--- a/tools/depends/configure.ac
+++ b/tools/depends/configure.ac
@@ -7,7 +7,7 @@ AC_CONFIG_FILES([target/config.site native/config.site.native Makefile.include t
AC_CANONICAL_HOST
m4_include([m4/xbmc_arch.m4])
-m4_include([m4/ax_cxx_compile_stdcxx_14.m4])
+m4_include([m4/ax_cxx_compile_stdcxx.m4])
# check for not same cpu value
AC_DEFUN([MC_CHECK_NOT_CPU],
@@ -232,11 +232,6 @@ AC_PATH_TOOL([CC],[$platform_cc],,$PATH_FOR_HOST)
AC_PATH_TOOL([CXX],[$platform_cxx],,$PATH_FOR_HOST)
AC_PROG_CPP
-AX_CXX_COMPILE_STDCXX_14([noext],[mandatory])
-c14_flags=$(echo "$CFLAGS" | sed 's/-O@<:@123@:>@//g;s/-g //g;s/ //g')
-cxx14_flags=$(echo "$CXXFLAGS" | sed 's/-O@<:@123@:>@//g;s/-g //g;s/ //g')
-
-
case $host in
*-*linux-android*)
deps_dir="$use_host-$use_ndk_api-$build_type"
@@ -262,7 +257,7 @@ case $host in
if test "x$use_cpu" = "xarm64-v8a"; then
platform_cflags+=" -march=armv8-a -mtune=cortex-a53"
fi
- meson_cpu="arch64"
+ meson_cpu="aarch64"
;;
i*86*-linux-android*|x86_64*-linux-android*)
if test "x$use_cpu" = "xauto"; then
@@ -397,6 +392,7 @@ case $host in
11.*);;
12.*);;
13.*);;
+ 14.*);;
*)
AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk)
;;
@@ -431,30 +427,6 @@ case $use_platform in
fi
target_platform=$use_platform
;;
- raspberry-pi)
- target_platform=raspberry-pi
- use_cpu=arm1176jzf-s
- ffmpeg_options_default="--cpu=arm1176jzf-s"
- platform_cflags="-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp"
- platform_cxxflags="-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp"
- platform_ldflags=""
- ;;
- raspberry-pi2)
- target_platform=raspberry-pi
- use_cpu=cortex-a7
- ffmpeg_options_default="--cpu=cortex-a7"
- platform_cflags="-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad"
- platform_cxxflags="-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad"
- platform_ldflags="-lpthread"
- ;;
- raspberry-pi3)
- target_platform=raspberry-pi
- use_cpu=cortex-a53
- ffmpeg_options_default="--cpu=cortex-a53"
- platform_cflags="-fPIC -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mvectorize-with-neon-quad"
- platform_cxxflags="-fPIC -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mvectorize-with-neon-quad"
- platform_ldflags="-lpthread"
- ;;
tvos)
platform_cflags+=" -fembed-bitcode"
platform_cxxflags+=" -fembed-bitcode"
@@ -468,32 +440,6 @@ case $use_platform in
AC_MSG_ERROR(unsupported platform ($use_platform))
esac
-if test "$target_platform" = "raspberry-pi" ; then
- if test -d "${use_firmware}/opt/vc/include"; then
- :
- else
- AC_MSG_ERROR([Raspberry Pi firmware not found])
- fi
- use_arch="arm"
- use_hardcoded_tables="yes"
- ARCH="arm"
- cross_compiling="yes"
- use_host="arm-linux-gnueabihf"
- deps_dir="$use_platform-$build_type"
- platform_cflags+=" -pipe -mabi=aapcs-linux -Wno-psabi \
- -Wa,-mno-warn-deprecated -Wno-deprecated-declarations \
- -isystem${use_firmware}/opt/vc/include \
- -isystem${use_firmware}/opt/vc/include/interface/vcos/pthreads \
- -isystem${use_firmware}/opt/vc/include/interface/vmcs_host/linux"
- platform_cxxflags+=" -pipe -mabi=aapcs-linux -Wno-psabi \
- -Wa,-mno-warn-deprecated -Wno-deprecated-declarations \
- -isystem${use_firmware}/opt/vc/include \
- -isystem${use_firmware}/opt/vc/include/interface/vcos/pthreads \
- -isystem${use_firmware}/opt/vc/include/interface/vmcs_host/linux"
- platform_ldflags+=" -L${use_firmware}/opt/vc/lib -lEGL -lGLESv2 -lbcm_host -lvcos \
- -lvchiq_arm"
-fi
-
XBMC_SETUP_ARCH_DEFINES()
@@ -611,8 +557,8 @@ if [ ! `mkdir -p $use_tarballs` ]; then
fi
# remove unwanted optimization flags
-tmp_cflags=$(echo $c14_flags $platform_cflags | sed 's/-O@<:@123@:>@//g;s/-g //g;s/ \{2,\}//g')
-tmp_cxxflags=$(echo $cxx14_flags $platform_cxxflags | sed 's/-O@<:@123@:>@//g;s/-g //g;s/ \{2,\}//g')
+tmp_cflags=$(echo $CFLAGS $platform_cflags | sed 's/-O@<:@123@:>@//g;s/-g //g;s/ \{2,\}//g')
+tmp_cxxflags=$(echo $CXXFLAGS $platform_cxxflags | sed 's/-O@<:@123@:>@//g;s/-g //g;s/ \{2,\}//g')
release_cflags="-DNDEBUG=1"
@@ -642,6 +588,12 @@ else
platform_cxxflags="$platform_cxxflags_release"
fi
+CXXFLAGS="$platform_cxxflags $platform_includes"
+CXX_CACHED="$CXX"
+AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
+CXX="$CXX_CACHED"
+platform_cxxflags+=" -std=c++17"
+
if test "$ffmpeg_options" == "default"; then
ffmpeg_options="$ffmpeg_options_default"
fi
@@ -708,6 +660,8 @@ echo -e "build type:\t $build_type"
echo -e "toolchain:\t $use_toolchain"
echo -e "cpu:\t\t $use_cpu"
echo -e "host:\t\t $use_host"
+echo -e "CC:\t\t $CC"
+echo -e "CXX:\t\t $CXX"
echo -e "cflags:\t\t $platform_cflags"
echo -e "cxxflags:\t $platform_cxxflags"
echo -e "ldflags:\t $platform_ldflags"
diff --git a/tools/depends/m4/ax_cxx_compile_stdcxx.m4 b/tools/depends/m4/ax_cxx_compile_stdcxx.m4
new file mode 100644
index 0000000000..43087b2e68
--- /dev/null
+++ b/tools/depends/m4/ax_cxx_compile_stdcxx.m4
@@ -0,0 +1,951 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
+#
+# DESCRIPTION
+#
+# Check for baseline language coverage in the compiler for the specified
+# version of the C++ standard. If necessary, add switches to CXX and
+# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
+# or '14' (for the C++14 standard).
+#
+# The second argument, if specified, indicates whether you insist on an
+# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
+# -std=c++11). If neither is specified, you get whatever works, with
+# preference for an extended mode.
+#
+# The third argument, if specified 'mandatory' or if left unspecified,
+# indicates that baseline support for the specified C++ standard is
+# required and that the macro should error out if no mode with that
+# support is found. If specified 'optional', then configuration proceeds
+# regardless, after defining HAVE_CXX${VERSION} if and only if a
+# supporting mode is found.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
+# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
+# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
+# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
+# Copyright (c) 2015 Paul Norman <penorman@mac.com>
+# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
+# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
+# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 11
+
+dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
+dnl (serial version number 13).
+
+AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
+ m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
+ [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
+ [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
+ [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
+ m4_if([$2], [], [],
+ [$2], [ext], [],
+ [$2], [noext], [],
+ [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
+ m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
+ [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
+ [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
+ [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
+ AC_LANG_PUSH([C++])dnl
+ ac_success=no
+
+ m4_if([$2], [noext], [], [dnl
+ if test x$ac_success = xno; then
+ for alternative in ${ax_cxx_compile_alternatives}; do
+ switch="-std=gnu++${alternative}"
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
+ if eval test x\$$cachevar = xyes; then
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
+ done
+ fi])
+
+ m4_if([$2], [ext], [], [dnl
+ if test x$ac_success = xno; then
+ dnl HP's aCC needs +std=c++11 according to:
+ dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
+ dnl Cray's crayCC needs "-h std=c++11"
+ for alternative in ${ax_cxx_compile_alternatives}; do
+ for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
+ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+ $cachevar,
+ [ac_save_CXX="$CXX"
+ CXX="$CXX $switch"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+ [eval $cachevar=yes],
+ [eval $cachevar=no])
+ CXX="$ac_save_CXX"])
+ if eval test x\$$cachevar = xyes; then
+ CXX="$CXX $switch"
+ if test -n "$CXXCPP" ; then
+ CXXCPP="$CXXCPP $switch"
+ fi
+ ac_success=yes
+ break
+ fi
+ done
+ if test x$ac_success = xyes; then
+ break
+ fi
+ done
+ fi])
+ AC_LANG_POP([C++])
+ if test x$ax_cxx_compile_cxx$1_required = xtrue; then
+ if test x$ac_success = xno; then
+ AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
+ fi
+ fi
+ if test x$ac_success = xno; then
+ HAVE_CXX$1=0
+ AC_MSG_NOTICE([No compiler with C++$1 support was found])
+ else
+ HAVE_CXX$1=1
+ AC_DEFINE(HAVE_CXX$1,1,
+ [define if the compiler supports basic C++$1 syntax])
+ fi
+ AC_SUBST(HAVE_CXX$1)
+])
+
+
+dnl Test body for checking C++11 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+)
+
+
+dnl Test body for checking C++14 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+)
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+ _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
+)
+
+dnl Tests for new features in C++11
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
+
+// If the compiler admits that it is not ready for C++11, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201103L
+
+#error "This is not a C++11 compiler"
+
+#else
+
+namespace cxx11
+{
+
+ namespace test_static_assert
+ {
+
+ template <typename T>
+ struct check
+ {
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
+ };
+
+ }
+
+ namespace test_final_override
+ {
+
+ struct Base
+ {
+ virtual ~Base() {}
+ virtual void f() {}
+ };
+
+ struct Derived : public Base
+ {
+ virtual ~Derived() override {}
+ virtual void f() override {}
+ };
+
+ }
+
+ namespace test_double_right_angle_brackets
+ {
+
+ template < typename T >
+ struct check {};
+
+ typedef check<void> single_type;
+ typedef check<check<void>> double_type;
+ typedef check<check<check<void>>> triple_type;
+ typedef check<check<check<check<void>>>> quadruple_type;
+
+ }
+
+ namespace test_decltype
+ {
+
+ int
+ f()
+ {
+ int a = 1;
+ decltype(a) b = 2;
+ return a + b;
+ }
+
+ }
+
+ namespace test_type_deduction
+ {
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static const bool value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static const bool value = true;
+ };
+
+ template < typename T1, typename T2 >
+ auto
+ add(T1 a1, T2 a2) -> decltype(a1 + a2)
+ {
+ return a1 + a2;
+ }
+
+ int
+ test(const int c, volatile int v)
+ {
+ static_assert(is_same<int, decltype(0)>::value == true, "");
+ static_assert(is_same<int, decltype(c)>::value == false, "");
+ static_assert(is_same<int, decltype(v)>::value == false, "");
+ auto ac = c;
+ auto av = v;
+ auto sumi = ac + av + 'x';
+ auto sumf = ac + av + 1.0;
+ static_assert(is_same<int, decltype(ac)>::value == true, "");
+ static_assert(is_same<int, decltype(av)>::value == true, "");
+ static_assert(is_same<int, decltype(sumi)>::value == true, "");
+ static_assert(is_same<int, decltype(sumf)>::value == false, "");
+ static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+ return (sumf > 0.0) ? sumi : add(c, v);
+ }
+
+ }
+
+ namespace test_noexcept
+ {
+
+ int f() { return 0; }
+ int g() noexcept { return 0; }
+
+ static_assert(noexcept(f()) == false, "");
+ static_assert(noexcept(g()) == true, "");
+
+ }
+
+ namespace test_constexpr
+ {
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+ {
+ return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+ }
+
+ template < typename CharT >
+ unsigned long constexpr
+ strlen_c(const CharT *const s) noexcept
+ {
+ return strlen_c_r(s, 0UL);
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("1") == 1UL, "");
+ static_assert(strlen_c("example") == 7UL, "");
+ static_assert(strlen_c("another\0example") == 7UL, "");
+
+ }
+
+ namespace test_rvalue_references
+ {
+
+ template < int N >
+ struct answer
+ {
+ static constexpr int value = N;
+ };
+
+ answer<1> f(int&) { return answer<1>(); }
+ answer<2> f(const int&) { return answer<2>(); }
+ answer<3> f(int&&) { return answer<3>(); }
+
+ void
+ test()
+ {
+ int i = 0;
+ const int c = 0;
+ static_assert(decltype(f(i))::value == 1, "");
+ static_assert(decltype(f(c))::value == 2, "");
+ static_assert(decltype(f(0))::value == 3, "");
+ }
+
+ }
+
+ namespace test_uniform_initialization
+ {
+
+ struct test
+ {
+ static const int zero {};
+ static const int one {1};
+ };
+
+ static_assert(test::zero == 0, "");
+ static_assert(test::one == 1, "");
+
+ }
+
+ namespace test_lambdas
+ {
+
+ void
+ test1()
+ {
+ auto lambda1 = [](){};
+ auto lambda2 = lambda1;
+ lambda1();
+ lambda2();
+ }
+
+ int
+ test2()
+ {
+ auto a = [](int i, int j){ return i + j; }(1, 2);
+ auto b = []() -> int { return '0'; }();
+ auto c = [=](){ return a + b; }();
+ auto d = [&](){ return c; }();
+ auto e = [a, &b](int x) mutable {
+ const auto identity = [](int y){ return y; };
+ for (auto i = 0; i < a; ++i)
+ a += b--;
+ return x + identity(a + b);
+ }(0);
+ return a + b + c + d + e;
+ }
+
+ int
+ test3()
+ {
+ const auto nullary = [](){ return 0; };
+ const auto unary = [](int x){ return x; };
+ using nullary_t = decltype(nullary);
+ using unary_t = decltype(unary);
+ const auto higher1st = [](nullary_t f){ return f(); };
+ const auto higher2nd = [unary](nullary_t f1){
+ return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+ };
+ return higher1st(nullary) + higher2nd(nullary)(unary);
+ }
+
+ }
+
+ namespace test_variadic_templates
+ {
+
+ template <int...>
+ struct sum;
+
+ template <int N0, int... N1toN>
+ struct sum<N0, N1toN...>
+ {
+ static constexpr auto value = N0 + sum<N1toN...>::value;
+ };
+
+ template <>
+ struct sum<>
+ {
+ static constexpr auto value = 0;
+ };
+
+ static_assert(sum<>::value == 0, "");
+ static_assert(sum<1>::value == 1, "");
+ static_assert(sum<23>::value == 23, "");
+ static_assert(sum<1, 2>::value == 3, "");
+ static_assert(sum<5, 5, 11>::value == 21, "");
+ static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+ }
+
+ // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+ // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+ // because of this.
+ namespace test_template_alias_sfinae
+ {
+
+ struct foo {};
+
+ template<typename T>
+ using member = typename T::member_type;
+
+ template<typename T>
+ void func(...) {}
+
+ template<typename T>
+ void func(member<T>*) {}
+
+ void test();
+
+ void test() { func<foo>(0); }
+
+ }
+
+} // namespace cxx11
+
+#endif // __cplusplus >= 201103L
+
+]])
+
+
+dnl Tests for new features in C++14
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
+
+// If the compiler admits that it is not ready for C++14, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201402L
+
+#error "This is not a C++14 compiler"
+
+#else
+
+namespace cxx14
+{
+
+ namespace test_polymorphic_lambdas
+ {
+
+ int
+ test()
+ {
+ const auto lambda = [](auto&&... args){
+ const auto istiny = [](auto x){
+ return (sizeof(x) == 1UL) ? 1 : 0;
+ };
+ const int aretiny[] = { istiny(args)... };
+ return aretiny[0];
+ };
+ return lambda(1, 1L, 1.0f, '1');
+ }
+
+ }
+
+ namespace test_binary_literals
+ {
+
+ constexpr auto ivii = 0b0000000000101010;
+ static_assert(ivii == 42, "wrong value");
+
+ }
+
+ namespace test_generalized_constexpr
+ {
+
+ template < typename CharT >
+ constexpr unsigned long
+ strlen_c(const CharT *const s) noexcept
+ {
+ auto length = 0UL;
+ for (auto p = s; *p; ++p)
+ ++length;
+ return length;
+ }
+
+ static_assert(strlen_c("") == 0UL, "");
+ static_assert(strlen_c("x") == 1UL, "");
+ static_assert(strlen_c("test") == 4UL, "");
+ static_assert(strlen_c("another\0test") == 7UL, "");
+
+ }
+
+ namespace test_lambda_init_capture
+ {
+
+ int
+ test()
+ {
+ auto x = 0;
+ const auto lambda1 = [a = x](int b){ return a + b; };
+ const auto lambda2 = [a = lambda1(x)](){ return a; };
+ return lambda2();
+ }
+
+ }
+
+ namespace test_digit_separators
+ {
+
+ constexpr auto ten_million = 100'000'000;
+ static_assert(ten_million == 100000000, "");
+
+ }
+
+ namespace test_return_type_deduction
+ {
+
+ auto f(int& x) { return x; }
+ decltype(auto) g(int& x) { return x; }
+
+ template < typename T1, typename T2 >
+ struct is_same
+ {
+ static constexpr auto value = false;
+ };
+
+ template < typename T >
+ struct is_same<T, T>
+ {
+ static constexpr auto value = true;
+ };
+
+ int
+ test()
+ {
+ auto x = 0;
+ static_assert(is_same<int, decltype(f(x))>::value, "");
+ static_assert(is_same<int&, decltype(g(x))>::value, "");
+ return x;
+ }
+
+ }
+
+} // namespace cxx14
+
+#endif // __cplusplus >= 201402L
+
+]])
+
+
+dnl Tests for new features in C++17
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
+
+// If the compiler admits that it is not ready for C++17, why torture it?
+// Hopefully, this will speed up the test.
+
+#ifndef __cplusplus
+
+#error "This is not a C++ compiler"
+
+#elif __cplusplus < 201703L
+
+#error "This is not a C++17 compiler"
+
+#else
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+ namespace test_constexpr_lambdas
+ {
+
+ constexpr int foo = [](){return 42;}();
+
+ }
+
+ namespace test::nested_namespace::definitions
+ {
+
+ }
+
+ namespace test_fold_expression
+ {
+
+ template<typename... Args>
+ int multiply(Args... args)
+ {
+ return (args * ... * 1);
+ }
+
+ template<typename... Args>
+ bool all(Args... args)
+ {
+ return (args && ...);
+ }
+
+ }
+
+ namespace test_extended_static_assert
+ {
+
+ static_assert (true);
+
+ }
+
+ namespace test_auto_brace_init_list
+ {
+
+ auto foo = {5};
+ auto bar {5};
+
+ static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+ static_assert(std::is_same<int, decltype(bar)>::value);
+ }
+
+ namespace test_typename_in_template_template_parameter
+ {
+
+ template<template<typename> typename X> struct D;
+
+ }
+
+ namespace test_fallthrough_nodiscard_maybe_unused_attributes
+ {
+
+ int f1()
+ {
+ return 42;
+ }
+
+ [[nodiscard]] int f2()
+ {
+ [[maybe_unused]] auto unused = f1();
+
+ switch (f1())
+ {
+ case 17:
+ f1();
+ [[fallthrough]];
+ case 42:
+ f1();
+ }
+ return f1();
+ }
+
+ }
+
+ namespace test_extended_aggregate_initialization
+ {
+
+ struct base1
+ {
+ int b1, b2 = 42;
+ };
+
+ struct base2
+ {
+ base2() {
+ b3 = 42;
+ }
+ int b3;
+ };
+
+ struct derived : base1, base2
+ {
+ int d;
+ };
+
+ derived d1 {{1, 2}, {}, 4}; // full initialization
+ derived d2 {{}, {}, 4}; // value-initialized bases
+
+ }
+
+ namespace test_general_range_based_for_loop
+ {
+
+ struct iter
+ {
+ int i;
+
+ int& operator* ()
+ {
+ return i;
+ }
+
+ const int& operator* () const
+ {
+ return i;
+ }
+
+ iter& operator++()
+ {
+ ++i;
+ return *this;
+ }
+ };
+
+ struct sentinel
+ {
+ int i;
+ };
+
+ bool operator== (const iter& i, const sentinel& s)
+ {
+ return i.i == s.i;
+ }
+
+ bool operator!= (const iter& i, const sentinel& s)
+ {
+ return !(i == s);
+ }
+
+ struct range
+ {
+ iter begin() const
+ {
+ return {0};
+ }
+
+ sentinel end() const
+ {
+ return {5};
+ }
+ };
+
+ void f()
+ {
+ range r {};
+
+ for (auto i : r)
+ {
+ [[maybe_unused]] auto v = i;
+ }
+ }
+
+ }
+
+ namespace test_lambda_capture_asterisk_this_by_value
+ {
+
+ struct t
+ {
+ int i;
+ int foo()
+ {
+ return [*this]()
+ {
+ return i;
+ }();
+ }
+ };
+
+ }
+
+ namespace test_enum_class_construction
+ {
+
+ enum class byte : unsigned char
+ {};
+
+ byte foo {42};
+
+ }
+
+ namespace test_constexpr_if
+ {
+
+ template <bool cond>
+ int f ()
+ {
+ if constexpr(cond)
+ {
+ return 13;
+ }
+ else
+ {
+ return 42;
+ }
+ }
+
+ }
+
+ namespace test_selection_statement_with_initializer
+ {
+
+ int f()
+ {
+ return 13;
+ }
+
+ int f2()
+ {
+ if (auto i = f(); i > 0)
+ {
+ return 3;
+ }
+
+ switch (auto i = f(); i + 4)
+ {
+ case 17:
+ return 2;
+
+ default:
+ return 1;
+ }
+ }
+
+ }
+
+ namespace test_template_argument_deduction_for_class_templates
+ {
+
+ template <typename T1, typename T2>
+ struct pair
+ {
+ pair (T1 p1, T2 p2)
+ : m1 {p1},
+ m2 {p2}
+ {}
+
+ T1 m1;
+ T2 m2;
+ };
+
+ void f()
+ {
+ [[maybe_unused]] auto p = pair{13, 42u};
+ }
+
+ }
+
+ namespace test_non_type_auto_template_parameters
+ {
+
+ template <auto n>
+ struct B
+ {};
+
+ B<5> b1;
+ B<'a'> b2;
+
+ }
+
+ namespace test_structured_bindings
+ {
+
+ int arr[2] = { 1, 2 };
+ std::pair<int, int> pr = { 1, 2 };
+
+ auto f1() -> int(&)[2]
+ {
+ return arr;
+ }
+
+ auto f2() -> std::pair<int, int>&
+ {
+ return pr;
+ }
+
+ struct S
+ {
+ int x1 : 2;
+ volatile double y1;
+ };
+
+ S f3()
+ {
+ return {};
+ }
+
+ auto [ x1, y1 ] = f1();
+ auto& [ xr1, yr1 ] = f1();
+ auto [ x2, y2 ] = f2();
+ auto& [ xr2, yr2 ] = f2();
+ const auto [ x3, y3 ] = f3();
+
+ }
+
+ namespace test_exception_spec_type_system
+ {
+
+ struct Good {};
+ struct Bad {};
+
+ void g1() noexcept;
+ void g2();
+
+ template<typename T>
+ Bad
+ f(T*, T*);
+
+ template<typename T1, typename T2>
+ Good
+ f(T1*, T2*);
+
+ static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+ }
+
+ namespace test_inline_variables
+ {
+
+ template<class T> void f(T)
+ {}
+
+ template<class T> inline T g(T)
+ {
+ return T{};
+ }
+
+ template<> inline void f<>(int)
+ {}
+
+ template<> int g<>(int)
+ {
+ return 5;
+ }
+
+ }
+
+} // namespace cxx17
+
+#endif // __cplusplus < 201703L
+
+]])
diff --git a/tools/depends/m4/ax_cxx_compile_stdcxx_14.m4 b/tools/depends/m4/ax_cxx_compile_stdcxx_14.m4
deleted file mode 100644
index 3a46bf7e61..0000000000
--- a/tools/depends/m4/ax_cxx_compile_stdcxx_14.m4
+++ /dev/null
@@ -1,146 +0,0 @@
-# ============================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_14.html
-# ============================================================================
-#
-# SYNOPSIS
-#
-# AX_CXX_COMPILE_STDCXX_14([ext|noext],[mandatory|optional])
-#
-# DESCRIPTION
-#
-# Check for baseline language coverage in the compiler for the C++14
-# standard; if necessary, add switches to CXXFLAGS to enable support.
-#
-# The first argument, if specified, indicates whether you insist on an
-# extended mode (e.g. -std=gnu++14) or a strict conformance mode (e.g.
-# -std=c++14). If neither is specified, you get whatever works, with
-# preference for an extended mode.
-#
-# The second argument, if specified 'mandatory' or if left unspecified,
-# indicates that baseline C++14 support is required and that the macro
-# should error out if no mode with that support is found. If specified
-# 'optional', then configuration proceeds regardless, after defining
-# HAVE_CXX14 if and only if a supporting mode is found.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
-# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
-# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
-# Copyright (c) 2014 Alexey Sokolov <sokolov@google.com>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 4
-
-m4_define([_AX_CXX_COMPILE_STDCXX_14_testbody], [[
- template <typename T>
- struct check
- {
- static_assert(sizeof(int) <= sizeof(T), "not big enough");
- };
-
- struct Base {
- virtual void f() {}
- };
- struct Child : public Base {
- virtual void f() {}
- };
-
- typedef check<check<bool>> right_angle_brackets;
-
- int a;
- decltype(a) b;
-
- typedef check<int> check_type;
- check_type c;
- check_type&& cr = static_cast<check_type&&>(c);
-
- auto d = a;
- auto l = [](){};
-]])
-
-AC_DEFUN([AX_CXX_COMPILE_STDCXX_14], [dnl
- m4_if([$1], [], [],
- [$1], [ext], [],
- [$1], [noext], [],
- [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_14])])dnl
- m4_if([$2], [], [ax_cxx_compile_cxx14_required=true],
- [$2], [mandatory], [ax_cxx_compile_cxx14_required=true],
- [$2], [optional], [ax_cxx_compile_cxx14_required=false],
- [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_14])])
- AC_LANG_PUSH([C++])dnl
- ac_success=no
- AC_CACHE_CHECK(whether $CXX supports C++14 features by default,
- ax_cv_cxx_compile_cxx14,
- [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_14_testbody])],
- [ax_cv_cxx_compile_cxx14=yes],
- [ax_cv_cxx_compile_cxx14=no])])
- if test x$ax_cv_cxx_compile_cxx14 = xyes; then
- ac_success=yes
- fi
-
- m4_if([$1], [noext], [], [dnl
- if test x$ac_success = xno; then
- for switch in -std=gnu++14 -std=gnu++0x; do
- cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx14_$switch])
- AC_CACHE_CHECK(whether $CXX supports C++14 features with $switch,
- $cachevar,
- [ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS $switch"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_14_testbody])],
- [eval $cachevar=yes],
- [eval $cachevar=no])
- CXXFLAGS="$ac_save_CXXFLAGS"])
- if eval test x\$$cachevar = xyes; then
- CXXFLAGS="$CXXFLAGS $switch"
- CXX14_SWITCH="$switch"
- AC_SUBST(CXX14_SWITCH)
- ac_success=yes
- break
- fi
- done
- fi])
-
- m4_if([$1], [ext], [], [dnl
- if test x$ac_success = xno; then
- for switch in -std=c++14 -std=c++0x; do
- cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx14_$switch])
- AC_CACHE_CHECK(whether $CXX supports C++14 features with $switch,
- $cachevar,
- [ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS $switch"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_14_testbody])],
- [eval $cachevar=yes],
- [eval $cachevar=no])
- CXXFLAGS="$ac_save_CXXFLAGS"])
- if eval test x\$$cachevar = xyes; then
- CXXFLAGS="$CXXFLAGS $switch"
- CXX14_SWITCH="$switch"
- AC_SUBST(CXX14_SWITCH)
- ac_success=yes
- break
- fi
- done
- fi])
- AC_LANG_POP([C++])
- if test x$ax_cxx_compile_cxx14_required = xtrue; then
- if test x$ac_success = xno; then
- AC_MSG_ERROR([*** A compiler with support for C++14 language features is required.])
- fi
- else
- if test x$ac_success = xno; then
- HAVE_CXX14=0
- AC_MSG_NOTICE([No compiler with C++14 support was found])
- else
- HAVE_CXX14=1
- AC_DEFINE(HAVE_CXX14,1,
- [define if the compiler supports basic C++14 syntax])
- fi
-
- AC_SUBST(HAVE_CXX14)
- fi
-])
diff --git a/tools/depends/m4/xbmc_arch.m4 b/tools/depends/m4/xbmc_arch.m4
index b4beef8f77..83e42552c7 100644
--- a/tools/depends/m4/xbmc_arch.m4
+++ b/tools/depends/m4/xbmc_arch.m4
@@ -74,7 +74,4 @@ if test "$target_platform" = "target_android" ; then
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -DTARGET_ANDROID")
fi
-if test "$target_platform" = "target_raspberry_pi" ; then
- AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_ARMEL -DTARGET_RASPBERRY_PI")
-fi
])
diff --git a/tools/depends/native/Makefile b/tools/depends/native/Makefile
index 4e012d9b22..e5aff1f9df 100644
--- a/tools/depends/native/Makefile
+++ b/tools/depends/native/Makefile
@@ -15,7 +15,7 @@ NATIVE= m4 gettext heimdal autoconf automake \
ifeq ($(OS),darwin_embedded)
- NATIVE += dpkg xz tar gen_entitlements ldid
+ NATIVE += dpkg xz tar ldid
endif
ifeq ($(TARGET_PLATFORM),wayland)
@@ -23,6 +23,10 @@ ifeq ($(TARGET_PLATFORM),wayland)
EXPAT = expat
endif
+ifeq ($(TARGET_PLATFORM),gbm)
+ NATIVE += MarkupSafe Mako
+endif
+
.PHONY: $(NATIVE) native
all: native
@@ -38,7 +42,7 @@ libtool: automake
libjpeg-turbo: cmake yasm
libpng: zlib
meson: python3 setuptools
-ninja: python3
+ninja: meson
swig: pcre
distutilscross: python3
tar: xz automake
@@ -47,6 +51,12 @@ setuptools: python3
wayland-scanner: expat
waylandpp-scanner: cmake
+# python installs are not thread safe when using easy_install method.
+# MarkupSafe doesn't really depend on ninja but we need to make the
+# build sequential
+MarkupSafe: ninja
+Mako: MarkupSafe
+
#liblzo2 has stale packaged automake files that cause borked host/build detection
liblzo2: automake
JsonSchemaBuilder: automake
diff --git a/tools/depends/native/Mako/Makefile b/tools/depends/native/Mako/Makefile
new file mode 100644
index 0000000000..6bb675f5ae
--- /dev/null
+++ b/tools/depends/native/Mako/Makefile
@@ -0,0 +1,29 @@
+include ../../Makefile.include
+PREFIX=$(NATIVEPREFIX)
+PLATFORM=$(NATIVEPLATFORM)
+DEPS= ../../Makefile.include Makefile
+
+# lib name, version
+LIBNAME=Mako
+VERSION=1.1.3
+ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
+
+all: .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+ cd $(TARBALLS_LOCATION); chmod +x $(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+
+.installed-$(PLATFORM): $(PLATFORM)
+ cd $(PLATFORM); $(PREFIX)/bin/python3 setup.py install --prefix=$(PREFIX)
+ touch $@
+
+clean:
+ rm -f .installed-$(PLATFORM)
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/depends/native/MarkupSafe/Makefile b/tools/depends/native/MarkupSafe/Makefile
new file mode 100644
index 0000000000..ef7b8cec1c
--- /dev/null
+++ b/tools/depends/native/MarkupSafe/Makefile
@@ -0,0 +1,29 @@
+include ../../Makefile.include
+PREFIX=$(NATIVEPREFIX)
+PLATFORM=$(NATIVEPLATFORM)
+DEPS= ../../Makefile.include Makefile
+
+# lib name, version
+LIBNAME=MarkupSafe
+VERSION=1.1.1
+ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
+
+all: .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+ cd $(TARBALLS_LOCATION); chmod +x $(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+
+.installed-$(PLATFORM): $(PLATFORM)
+ cd $(PLATFORM); $(PREFIX)/bin/python3 setup.py install --prefix=$(PREFIX)
+ touch $@
+
+clean:
+ rm -f .installed-$(PLATFORM)
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/depends/native/gen_entitlements/Makefile b/tools/depends/native/gen_entitlements/Makefile
deleted file mode 100644
index a16b4549f6..0000000000
--- a/tools/depends/native/gen_entitlements/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-include ../../Makefile.include
-
-GEBIN=$(NATIVEPREFIX)/bin/gen_entitlements.py
-
-all: $(GEBIN)
-
-$(GEBIN):
- mkdir -p $(NATIVEPREFIX)/bin
- cp gen_entitlements.py $(GEBIN)
- chmod 755 $(GEBIN)
-
-clean:
-distclean::
- rm -f $(GEBIN)
diff --git a/tools/depends/native/gen_entitlements/gen_entitlements.py b/tools/depends/native/gen_entitlements/gen_entitlements.py
deleted file mode 100755
index d8ae6af3ee..0000000000
--- a/tools/depends/native/gen_entitlements/gen_entitlements.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-import struct
-
-if len(sys.argv) != 3:
- print "Usage: %s appname dest_file.xcent" % sys.argv[0]
- sys.exit(-1)
-
-APPNAME = sys.argv[1]
-DEST = sys.argv[2]
-
-if not DEST.endswith('.xml') and not DEST.endswith('.xcent'):
- print "Dest must be .xml (for ldid) or .xcent (for codesign)"
- sys.exit(-1)
-
-entitlements = """
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>application-identifier</key>
- <string>%s</string>
- <key>get-task-allow</key>
- <true/>
-</dict>
-</plist>
-""" % APPNAME
-
-f = open(DEST,'w')
-if DEST.endswith('.xcent'):
- f.write("\xfa\xde\x71\x71")
- f.write(struct.pack('>L', len(entitlements) + 8))
-f.write(entitlements)
-f.close()
-
diff --git a/tools/depends/native/meson/Makefile b/tools/depends/native/meson/Makefile
index 832f1a9f43..842201c184 100644
--- a/tools/depends/native/meson/Makefile
+++ b/tools/depends/native/meson/Makefile
@@ -4,7 +4,7 @@ DEPS=../../Makefile.include Makefile
# lib name, version
LIBNAME=meson
-VERSION=0.51.0
+VERSION=0.55.1
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.gz
diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile
index 74734b3d83..6f6d32f2d6 100644
--- a/tools/depends/target/Makefile
+++ b/tools/depends/target/Makefile
@@ -12,7 +12,7 @@ DEPENDS = \
libxml2 rapidjson libmicrohttpd mariadb libffi \
python3 libshairplay libfmt libspdlog \
libplist libcec libbluray tinyxml \
- taglib libusb libnfs meson-cross-file \
+ taglib libusb libnfs \
pythonmodule-pil pythonmodule-pycryptodome pythonmodule-setuptools \
libxslt ffmpeg crossguid libudfread \
libdvdread libdvdnav libdvdcss p8-platform flatbuffers dav1d
@@ -61,17 +61,19 @@ endif
WAYLANDPP_DEPS=
ALSA_LIB=
ifeq ($(OS),linux)
- DEPENDS += dbus libuuid
- #not for raspberry pi
- ifneq ($(TARGET_PLATFORM),raspberry-pi)
- DEPENDS += linux-system-libs
- WAYLANDPP_DEPS += linux-system-libs
- endif
- DEPENDS += alsa-lib
+ DEPENDS += dbus libuuid alsa-lib
ALSA_LIB = alsa-lib
LIBUUID = libuuid
- ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),raspberry-pi gbm))
- DEPENDS += libxkbcommon libinput libudev libevdev mtdev
+
+ ifeq ($(TARGET_PLATFORM),gbm)
+ DEPENDS += libxkbcommon libinput libudev libevdev mtdev libdrm mesa
+ ifeq ($(CPU),x86_64)
+ DEPENDS += libva
+ LIBVA = libva
+ endif
+ else
+ DEPENDS += linux-system-libs
+ WAYLANDPP_DEPS += linux-system-libs
endif
endif
@@ -104,7 +106,7 @@ pythonmodule-pycryptodome: $(PYMODULE_DEPS) python3 pythonmodule-setuptools
pythonmodule-pil: bzip2 $(PYMODULE_DEPS) $(ZLIB) libjpeg-turbo libpng freetype2 python3 pythonmodule-setuptools
pythonmodule-setuptools: $(PYMODULE_DEPS) python3
libxslt: libgcrypt libxml2
-ffmpeg: $(ICONV) $(ZLIB) bzip2 gnutls dav1d
+ffmpeg: $(ICONV) $(ZLIB) bzip2 gnutls dav1d $(LIBVA)
libcec: p8-platform
crossguid: $(LIBUUID)
libdvdnav: libdvdread
@@ -119,6 +121,9 @@ taglib: $(ZLIB)
dav1d: meson-cross-file
fribidi: meson-cross-file
libspdlog: libfmt
+libdrm: meson-cross-file
+mesa: libdrm meson-cross-file
+libva: libdrm
.installed-$(PLATFORM): $(DEPENDS)
touch $@
@@ -186,7 +191,7 @@ linux-system-libs: linux-system-libs-egl
[ -f $(PREFIX)/lib/pkgconfig/xkbcommon.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/xkbcommon.pc $(PREFIX)/lib/pkgconfig/xkbcommon.pc
[ -f $(PREFIX)/lib/pkgconfig/libva.pc ] || ln -sf /usr/lib/$(HOST)/pkgconfig/libva.pc $(PREFIX)/lib/pkgconfig/libva.pc
-meson-cross-file:
+$(PREFIX)/share/cross-file.meson:
PREFIX="$(PREFIX)" \
NATIVEPREFIX="$(NATIVEPREFIX)" \
CC="$(CC)" \
@@ -199,5 +204,7 @@ meson-cross-file:
CFLAGS="$(CFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" \
LDFLAGS="$(LDFLAGS)" \
- ./meson-cross-setup.sh
+ ./meson-cross-setup.sh $@
+.PHONY: meson-cross-file
+meson-cross-file: $(PREFIX)/share/cross-file.meson
diff --git a/tools/depends/target/Toolchain.cmake.in b/tools/depends/target/Toolchain.cmake.in
index 7b5ea6ab0e..8786f52f7e 100644
--- a/tools/depends/target/Toolchain.cmake.in
+++ b/tools/depends/target/Toolchain.cmake.in
@@ -10,14 +10,7 @@ set(PLATFORM "@target_platform@")
if(OS STREQUAL linux)
set(CMAKE_SYSTEM_NAME Linux)
set(CORE_SYSTEM_NAME linux)
- if(PLATFORM STREQUAL raspberry-pi)
- set(CORE_PLATFORM_NAME rbpi)
- # wrapping libdvd fails with gold on rbpi
- # todo: revisit after toolchain bump
- set(ENABLE_LDGOLD OFF CACHE BOOL "Disabling Gnu Gold Linker" FORCE)
- elseif(NOT "@target_platform@" STREQUAL "")
- set(CORE_PLATFORM_NAME @target_platform@)
- endif()
+ set(CORE_PLATFORM_NAME @target_platform@)
if(NOT "@app_rendersystem@" STREQUAL "")
set(X11_RENDER_SYSTEM @app_rendersystem@ CACHE STRING "Render system to use with X11: \"gl\" or \"gles\"")
set(WAYLAND_RENDER_SYSTEM @app_rendersystem@ CACHE STRING "Render system to use with Wayland: \"gl\" or \"gles\"")
@@ -100,13 +93,6 @@ if(NOT "@use_sdk_path@" STREQUAL "")
list(APPEND CMAKE_FIND_ROOT_PATH @use_sdk_path@ @use_sdk_path@/usr)
endif()
-# add RBPI's firmware directories
-if(CORE_PLATFORM_NAME STREQUAL rbpi)
- list(APPEND CMAKE_FIND_ROOT_PATH @use_firmware@/opt/vc)
- list(APPEND CMAKE_LIBRARY_PATH @use_firmware@/opt/vc/lib)
- list(APPEND CMAKE_INCLUDE_PATH @use_firmware@/opt/vc/include)
-endif()
-
# add Android directories and tools
if(CORE_SYSTEM_NAME STREQUAL android)
set(NDKROOT @use_ndk_path@)
diff --git a/tools/depends/target/Toolchain_binaddons.cmake.in b/tools/depends/target/Toolchain_binaddons.cmake.in
index 30059d1c6d..27a6dbd3aa 100644
--- a/tools/depends/target/Toolchain_binaddons.cmake.in
+++ b/tools/depends/target/Toolchain_binaddons.cmake.in
@@ -10,15 +10,7 @@ set(CMAKE_FIND_ROOT_PATH @CMAKE_FIND_ROOT_PATH@)
if(OS STREQUAL linux)
set(CMAKE_SYSTEM_NAME Linux)
set(CORE_SYSTEM_NAME linux)
- if(PLATFORM STREQUAL raspberry-pi)
- set(CORE_PLATFORM_NAME rbpi)
- set(ENABLE_LDGOLD OFF CACHE BOOL "Disabling Gnu Gold Linker" FORCE)
- if(NOT APP_RENDER_SYSTEM)
- set(APP_RENDER_SYSTEM gles)
- endif()
- elseif(NOT "@target_platform@" STREQUAL "")
- set(CORE_PLATFORM_NAME @target_platform@)
- endif()
+ set(CORE_PLATFORM_NAME @target_platform@)
if(NOT APP_RENDER_SYSTEM)
set(APP_RENDER_SYSTEM gl)
endif()
@@ -73,13 +65,6 @@ if(NOT "@use_toolchain@" STREQUAL "")
list(APPEND CMAKE_FIND_ROOT_PATH @use_toolchain@/sysroot/usr)
endif()
-# add RBPI's firmware directories
-if(CORE_PLATFORM_NAME STREQUAL rbpi)
- list(APPEND CMAKE_FIND_ROOT_PATH @use_firmware@/opt/vc)
- list(APPEND CMAKE_LIBRARY_PATH @CMAKE_FIND_ROOT_PATH@/lib:@use_firmware@/opt/vc/lib)
- list(APPEND CMAKE_INCLUDE_PATH @CMAKE_FIND_ROOT_PATH@/include:@use_firmware@/opt/vc/include)
-endif()
-
# add Android directories and tools
if(CORE_SYSTEM_NAME STREQUAL android)
set(NDKROOT @use_ndk_path@)
diff --git a/tools/depends/target/dav1d/Makefile b/tools/depends/target/dav1d/Makefile
index be5f2fa835..6201255cfd 100644
--- a/tools/depends/target/dav1d/Makefile
+++ b/tools/depends/target/dav1d/Makefile
@@ -51,7 +51,7 @@ export CC CXX CFLAGS CXXFLAGS
endif
export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig
-LIBDYLIB=$(PLATFORM)/lib/lib$(LIBNAME).a
+LIBDYLIB=$(PLATFORM)/build/src/lib$(LIBNAME).a
all: .installed-$(PLATFORM)
diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt
index 3ebd65cf13..e358775911 100644
--- a/tools/depends/target/ffmpeg/CMakeLists.txt
+++ b/tools/depends/target/ffmpeg/CMakeLists.txt
@@ -39,20 +39,16 @@ if(CMAKE_BUILD_TYPE STREQUAL Release)
endif()
if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd)
- if(CORE_PLATFORM_NAME STREQUAL rbpi)
- list(APPEND ffmpeg_conf --cpu=${CPU} --disable-vaapi --disable-vdpau)
+ list(APPEND ffmpeg_conf --enable-pic)
+ if(ENABLE_VAAPI)
+ list(APPEND ffmpeg_conf --enable-vaapi)
else()
- list(APPEND ffmpeg_conf --enable-pic)
- if(ENABLE_VAAPI)
- list(APPEND ffmpeg_conf --enable-vaapi)
- else()
- list(APPEND ffmpeg_conf --disable-vaapi)
- endif()
- if(ENABLE_VDPAU)
- list(APPEND ffmpeg_conf --enable-vdpau)
- else()
- list(APPEND ffmpeg_conf --disable-vdpau)
- endif()
+ list(APPEND ffmpeg_conf --disable-vaapi)
+ endif()
+ if(ENABLE_VDPAU)
+ list(APPEND ffmpeg_conf --enable-vdpau)
+ else()
+ list(APPEND ffmpeg_conf --disable-vdpau)
endif()
elseif(CORE_SYSTEM_NAME STREQUAL android)
if(CPU MATCHES arm64)
@@ -75,7 +71,7 @@ elseif(CORE_SYSTEM_NAME STREQUAL osx)
--disable-securetransport)
endif()
-if(CPU MATCHES arm OR CORE_PLATFORM_NAME STREQUAL rbpi)
+if(CPU MATCHES arm)
list(APPEND ffmpeg_conf --enable-pic --disable-armv5te --disable-armv6t2)
elseif(CPU MATCHES mips)
list(APPEND ffmpeg_conf --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2)
@@ -99,6 +95,16 @@ endif()
message(STATUS "FFMPEG_CONF: ${ffmpeg_conf}")
+set(MAKE_COMMAND $(MAKE))
+if(CMAKE_GENERATOR STREQUAL Ninja)
+ set(MAKE_COMMAND make)
+ include(ProcessorCount)
+ ProcessorCount(N)
+ if(NOT N EQUAL 0)
+ set(MAKE_COMMAND make -j${N})
+ endif()
+endif()
+
include(ExternalProject)
externalproject_add(ffmpeg
SOURCE_DIR ${CMAKE_SOURCE_DIR}
@@ -124,7 +130,8 @@ externalproject_add(ffmpeg
--enable-protocol=http
--enable-encoder=png
--enable-encoder=mjpeg
- ${ffmpeg_conf})
+ ${ffmpeg_conf}
+ BUILD_COMMAND ${MAKE_COMMAND})
install(CODE "Message(Done)")
diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION
index cf780452fc..ae224efe31 100644
--- a/tools/depends/target/ffmpeg/FFMPEG-VERSION
+++ b/tools/depends/target/ffmpeg/FFMPEG-VERSION
@@ -1,4 +1,4 @@
LIBNAME=ffmpeg
BASE_URL=https://github.com/xbmc/FFmpeg
-VERSION=4.3.1-Matrix-Alpha1-1
+VERSION=4.3.1-Matrix-Alpha1-2
ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
diff --git a/tools/depends/target/libandroidjni/Makefile b/tools/depends/target/libandroidjni/Makefile
index 13f62b5493..b664e7243f 100644
--- a/tools/depends/target/libandroidjni/Makefile
+++ b/tools/depends/target/libandroidjni/Makefile
@@ -3,7 +3,7 @@ DEPS= ../../Makefile.include Makefile
# lib name, version
LIBNAME=libandroidjni
-VERSION=ee5cc102101d9cb04ab4dbfd7a65db1c52345faf
+VERSION=e00d271b5dbfa050fb9876df73b617cfe33326b1
SOURCE=archive
ARCHIVE=$(VERSION).tar.gz
GIT_BASE_URL=https://github.com/xbmc
diff --git a/tools/depends/target/libdrm/Makefile b/tools/depends/target/libdrm/Makefile
new file mode 100644
index 0000000000..7aa8d4120c
--- /dev/null
+++ b/tools/depends/target/libdrm/Makefile
@@ -0,0 +1,76 @@
+include ../../Makefile.include
+DEPS=../../Makefile.include Makefile
+
+LIBNAME=libdrm
+VERSION=2.4.102
+ARCHIVE=$(LIBNAME)-$(VERSION).tar.xz
+
+MESON_BUILD_TYPE=release
+
+ifeq ($(DEBUG_BUILD), yes)
+ MESON_BUILD_TYPE=debug
+endif
+
+# configuration settings
+CONFIGURE = $(NATIVEPREFIX)/bin/python3 $(NATIVEPREFIX)/bin/meson \
+ --prefix=$(PREFIX) \
+ --libdir=lib \
+ --buildtype=$(MESON_BUILD_TYPE) \
+ -Dlibkms=false \
+ -Dnouveau=false \
+ -Domap=false \
+ -Dexynos=false \
+ -Dtegra=false \
+ -Dintel=false \
+ -Dradeon=false \
+ -Damdgpu=false \
+ -Dvmwgfx=false \
+ -Dvc4=false \
+ -Dfreedreno=false \
+ -Detnaviv=false \
+ -Dcairo-tests=false \
+ -Dman-pages=false \
+ -Dvalgrind=false \
+ -Dfreedreno-kgsl=false \
+ -Dinstall-test-programs=false \
+ -Dudev=false
+
+ifeq ($(CROSS_COMPILING), yes)
+CONFIGURE += --cross-file $(PREFIX)/share/cross-file.meson
+export CC=$(CC_FOR_BUILD)
+export CXX=$(CXX_FOR_BUILD)
+export CFLAGS=$(CFLAGS_FOR_BUILD)
+export CXXFLAGS=$(CXXFLAGS_FOR_BUILD)
+else
+export CC CXX CFLAGS CXXFLAGS
+endif
+export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig
+
+LIBDYLIB=$(PLATFORM)/build/$(LIBNAME).so
+
+all: .installed-$(PLATFORM)
+
+download: $(TARBALLS_LOCATION)/$(ARCHIVE)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); rm -rf build; mkdir -p build
+ cd $(PLATFORM); $(CONFIGURE) . build
+
+$(LIBDYLIB): $(PLATFORM)
+ cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v
+
+.installed-$(PLATFORM): $(LIBDYLIB)
+ cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v install
+ touch $@
+
+clean:
+ $(MAKE) -C $(PLATFORM) clean
+ rm -f .installed-$(PLATFORM)
+
+distclean:
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/depends/target/libfmt/Makefile b/tools/depends/target/libfmt/Makefile
index 5bc7b7bc40..b10eb2ef99 100644
--- a/tools/depends/target/libfmt/Makefile
+++ b/tools/depends/target/libfmt/Makefile
@@ -7,7 +7,7 @@ VERSION=6.1.2
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.gz
-CMAKE_OPTIONS=-DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_EXTENSIONS:BOOL=OFF -DFMT_DOC=OFF -DFMT_INSTALL=ON -DFMT_TEST=OFF
+CMAKE_OPTIONS=-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_EXTENSIONS:BOOL=OFF -DFMT_DOC=OFF -DFMT_INSTALL=ON -DFMT_TEST=OFF
ifeq ($(CROSS_COMPILING), yes)
DEPS += ../../Makefile.include
diff --git a/tools/depends/target/libinput/Makefile b/tools/depends/target/libinput/Makefile
index ccf98657ff..3811495ea1 100644
--- a/tools/depends/target/libinput/Makefile
+++ b/tools/depends/target/libinput/Makefile
@@ -27,7 +27,7 @@ export CC CXX CFLAGS CXXFLAGS
endif
export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig
-LIBDYLIB=$(PLATFORM)/build/libinput.a
+LIBDYLIB=$(PLATFORM)/build/libinput.so
all: .installed-$(PLATFORM)
diff --git a/tools/depends/target/libspdlog/Makefile b/tools/depends/target/libspdlog/Makefile
index 9bbecbf461..aecb4dde6a 100644
--- a/tools/depends/target/libspdlog/Makefile
+++ b/tools/depends/target/libspdlog/Makefile
@@ -17,7 +17,7 @@ CMAKE_OPTIONS= \
ifeq ($(CROSS_COMPILING), yes)
DEPS += ../../Makefile.include
else
- CXXFLAGS += -std=c++14
+ CXXFLAGS += -std=c++17
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
ifeq ($(PLATFORM),)
diff --git a/tools/depends/target/libva/Makefile b/tools/depends/target/libva/Makefile
new file mode 100644
index 0000000000..dd1f586297
--- /dev/null
+++ b/tools/depends/target/libva/Makefile
@@ -0,0 +1,64 @@
+include ../../Makefile.include
+DEPS=../../Makefile.include Makefile
+
+LIBNAME=libva
+VERSION=2.8.0
+ARCHIVE=$(LIBNAME)-$(VERSION).tar.bz2
+
+MESON_BUILD_TYPE=release
+
+ifeq ($(DEBUG_BUILD), yes)
+ MESON_BUILD_TYPE=debug
+endif
+
+# configuration settings
+CONFIGURE = $(NATIVEPREFIX)/bin/python3 $(NATIVEPREFIX)/bin/meson \
+ --prefix=$(PREFIX) \
+ --libdir=lib \
+ --buildtype=$(MESON_BUILD_TYPE) \
+ -Ddisable_drm=false \
+ -Denable_docs=false \
+ -Denable_va_messaging=true \
+ -Dwith_x11=no \
+ -Dwith_glx=no \
+ -Dwith_wayland=no
+
+ifeq ($(CROSS_COMPILING), yes)
+CONFIGURE += --cross-file $(PREFIX)/share/cross-file.meson
+export CC=$(CC_FOR_BUILD)
+export CXX=$(CXX_FOR_BUILD)
+export CFLAGS=$(CFLAGS_FOR_BUILD)
+export CXXFLAGS=$(CXXFLAGS_FOR_BUILD)
+else
+export CC CXX CFLAGS CXXFLAGS
+endif
+export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig
+
+LIBDYLIB=$(PLATFORM)/build/$(LIBNAME).so
+
+all: .installed-$(PLATFORM)
+
+download: $(TARBALLS_LOCATION)/$(ARCHIVE)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); rm -rf build; mkdir -p build
+ cd $(PLATFORM); $(CONFIGURE) . build
+
+$(LIBDYLIB): $(PLATFORM)
+ cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v
+
+.installed-$(PLATFORM): $(LIBDYLIB)
+ cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v install
+ touch $@
+
+clean:
+ $(MAKE) -C $(PLATFORM) clean
+ rm -f .installed-$(PLATFORM)
+
+distclean:
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/depends/target/mesa/Makefile b/tools/depends/target/mesa/Makefile
new file mode 100644
index 0000000000..c9d3b72b81
--- /dev/null
+++ b/tools/depends/target/mesa/Makefile
@@ -0,0 +1,93 @@
+include ../../Makefile.include
+DEPS=../../Makefile.include Makefile
+
+LIBNAME=mesa
+VERSION=20.1.7
+ARCHIVE=$(LIBNAME)-$(VERSION).tar.xz
+
+MESON_BUILD_TYPE=release
+
+ifeq ($(DEBUG_BUILD), yes)
+ MESON_BUILD_TYPE=debug
+endif
+
+ifeq ($(CPU), x86_64)
+ MESA_GALLIUM_DRIVERS=iris
+else ifeq ($(CPU), arm)
+ MESA_GALLIUM_DRIVERS=kmsro,vc4
+endif
+
+# configuration settings
+CONFIGURE = $(NATIVEPREFIX)/bin/python3 $(NATIVEPREFIX)/bin/meson \
+ --prefix=$(PREFIX) \
+ --libdir=lib \
+ --buildtype=$(MESON_BUILD_TYPE) \
+ -Ddri-drivers= \
+ -Dgallium-drivers="$(MESA_GALLIUM_DRIVERS)" \
+ -Dgallium-extra-hud=false \
+ -Dgallium-xvmc=false \
+ -Dgallium-omx=disabled \
+ -Dgallium-nine=false \
+ -Dgallium-opencl=disabled \
+ -Dvulkan-drivers= \
+ -Dshader-cache=true \
+ -Dshared-glapi=true \
+ -Dopengl=true \
+ -Dgbm=true \
+ -Degl=true \
+ -Dvalgrind=false \
+ -Dlibunwind=false \
+ -Dlmsensors=false \
+ -Dbuild-tests=false \
+ -Dselinux=false \
+ -Dosmesa=none \
+ -Dplatforms="drm" \
+ -Ddri3=false \
+ -Dglx=disabled \
+ -Dglvnd=false \
+ -Dllvm=false \
+ -Dgallium-vdpau=false \
+ -Dgallium-va=false \
+ -Dgallium-xa=false \
+ -Dgles1=false \
+ -Dgles2=true
+
+ifeq ($(CROSS_COMPILING), yes)
+CONFIGURE += --cross-file $(PREFIX)/share/cross-file.meson
+export CC=$(CC_FOR_BUILD)
+export CXX=$(CXX_FOR_BUILD)
+export CFLAGS=$(CFLAGS_FOR_BUILD)
+export CXXFLAGS=$(CXXFLAGS_FOR_BUILD)
+else
+export CC CXX CFLAGS CXXFLAGS
+endif
+export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig
+
+LIBDYLIB=$(PLATFORM)/build/src/egl/libEGL.so
+
+all: .installed-$(PLATFORM)
+
+download: $(TARBALLS_LOCATION)/$(ARCHIVE)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); rm -rf build; mkdir -p build
+ cd $(PLATFORM); $(CONFIGURE) . build
+
+$(LIBDYLIB): $(PLATFORM)
+ cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v
+
+.installed-$(PLATFORM): $(LIBDYLIB)
+ cd $(PLATFORM)/build; $(NATIVEPREFIX)/bin/ninja -v install
+ touch $@
+
+clean:
+ $(MAKE) -C $(PLATFORM) clean
+ rm -f .installed-$(PLATFORM)
+
+distclean:
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/depends/target/meson-cross-setup.sh b/tools/depends/target/meson-cross-setup.sh
index dad98d24ae..9b5546200f 100755
--- a/tools/depends/target/meson-cross-setup.sh
+++ b/tools/depends/target/meson-cross-setup.sh
@@ -1,9 +1,9 @@
#!/bin/sh
-cat > $PREFIX/share/cross-file.meson << EOF
+cat > $1 << EOF
[binaries]
-$($NATIVEPREFIX/bin/python3 -c "print('c = \'{}\''.format('$CC'.split()[-1]))")
-$($NATIVEPREFIX/bin/python3 -c "print('cpp = \'{}\''.format('$CXX'.split()[-1]))")
+$($NATIVEPREFIX/bin/python3 -c "print('c = {}'.format('$CC'.split()))")
+$($NATIVEPREFIX/bin/python3 -c "print('cpp = {}'.format('$CXX'.split()))")
ar = '$AR'
strip = '$STRIP'
pkgconfig = '$NATIVEPREFIX/bin/pkg-config'
@@ -15,9 +15,9 @@ cpu = '$CPU'
endian = 'little'
[properties]
-$($NATIVEPREFIX/bin/python3 -c "print('c_args = {}'.format([x for x in '$CFLAGS'.split()]))")
+$($NATIVEPREFIX/bin/python3 -c "print('c_args = {}'.format([x for x in '$CFLAGS'.split() if x not in ['-g', '-gdwarf-2']]))")
$($NATIVEPREFIX/bin/python3 -c "print('c_link_args = {}'.format([x for x in '$LDFLAGS'.split()]))")
-$($NATIVEPREFIX/bin/python3 -c "print('cpp_args = {}'.format([x for x in '$CXXFLAGS'.split()]))")
+$($NATIVEPREFIX/bin/python3 -c "print('cpp_args = {}'.format([x for x in '$CXXFLAGS'.split() if x not in ['-g', '-gdwarf-2']]))")
$($NATIVEPREFIX/bin/python3 -c "print('cpp_link_args = {}'.format([x for x in '$LDFLAGS'.split()]))")
[paths]
diff --git a/tools/depends/target/nettle/02-conftest_exit.patch b/tools/depends/target/nettle/02-conftest_exit.patch
new file mode 100644
index 0000000000..bdc6c0400c
--- /dev/null
+++ b/tools/depends/target/nettle/02-conftest_exit.patch
@@ -0,0 +1,21 @@
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -369,7 +369,7 @@
+ int
+ main ()
+ {
+- exit(0);
++ return 0;
+ }
+ EOF
+ gmp_compile="$1 conftest.c"
+@@ -410,7 +410,7 @@
+ int
+ main ()
+ {
+- exit (0);
++ return 0;
+ }
+ EOF
+ for i in .exe ,ff8 ""; do
+
diff --git a/tools/depends/target/nettle/Makefile b/tools/depends/target/nettle/Makefile
index f184912e42..dbc0cc65c0 100644
--- a/tools/depends/target/nettle/Makefile
+++ b/tools/depends/target/nettle/Makefile
@@ -1,5 +1,5 @@
include ../../Makefile.include
-DEPS= ../../Makefile.include Makefile 01-disable_testsuite.patch
+DEPS= ../../Makefile.include Makefile 01-disable_testsuite.patch 02-conftest_exit.patch
# lib name, version
LIBNAME=nettle
@@ -22,6 +22,8 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); patch -p1 -i ../01-disable_testsuite.patch
+ cd $(PLATFORM); patch -p1 -i ../02-conftest_exit.patch
+ cd $(PLATFORM); $(AUTORECONF)
cd $(PLATFORM); $(CONFIGURE) CCPIC=" "
$(LIBDYLIB): $(PLATFORM)
diff --git a/tools/depends/target/p8-platform/0001-fix-c++17-support.patch b/tools/depends/target/p8-platform/0001-fix-c++17-support.patch
new file mode 100644
index 0000000000..25fbe483fe
--- /dev/null
+++ b/tools/depends/target/p8-platform/0001-fix-c++17-support.patch
@@ -0,0 +1,22 @@
+diff --git a/src/util/StringUtils.cpp b/src/util/StringUtils.cpp
+index 510e2d5..3d25ba7 100644
+--- a/src/util/StringUtils.cpp
++++ b/src/util/StringUtils.cpp
+@@ -453,7 +453,7 @@ static int isspace_c(char c)
+
+ std::string& StringUtils::TrimLeft(std::string &str)
+ {
+- str.erase(str.begin(), ::find_if(str.begin(), str.end(), ::not1(::ptr_fun(isspace_c))));
++ str.erase(str.begin(), ::find_if(str.begin(), str.end(), [](char s) { return isspace_c(s) == 0; }));
+ return str;
+ }
+
+@@ -466,7 +466,7 @@ std::string& StringUtils::TrimLeft(std::string &str, const char* const chars)
+
+ std::string& StringUtils::TrimRight(std::string &str)
+ {
+- str.erase(::find_if(str.rbegin(), str.rend(), ::not1(::ptr_fun(isspace_c))).base(), str.end());
++ str.erase(::find_if(str.rbegin(), str.rend(), [](char s) { return isspace_c(s) == 0; }).base(), str.end());
+ return str;
+ }
+
diff --git a/tools/depends/target/p8-platform/Makefile b/tools/depends/target/p8-platform/Makefile
index 257f7e0561..e473262862 100644
--- a/tools/depends/target/p8-platform/Makefile
+++ b/tools/depends/target/p8-platform/Makefile
@@ -1,5 +1,5 @@
include ../../Makefile.include
-DEPS= ../../Makefile.include Makefile
+DEPS= ../../Makefile.include Makefile 0001-fix-c++17-support.patch
# lib name, version
LIBNAME=p8-platform
@@ -17,6 +17,7 @@ $(TARBALLS_LOCATION)/$(ARCHIVE):
$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
rm -rf $(PLATFORM); mkdir -p $(PLATFORM)/build
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); patch -p1 -i ../0001-fix-c++17-support.patch
cd $(PLATFORM)/build; $(CMAKE) -DBUILD_SHARED_LIBS=0 -DCMAKE_INSTALL_LIBDIR=$(PREFIX)/lib ..
$(LIBDYLIB): $(PLATFORM)
@@ -31,4 +32,3 @@ clean:
distclean::
rm -rf $(PLATFORM) .installed-$(PLATFORM)
-
diff --git a/tools/depends/xbmc-addons.include b/tools/depends/xbmc-addons.include
index 35399f0e2f..79d7c069b4 100644
--- a/tools/depends/xbmc-addons.include
+++ b/tools/depends/xbmc-addons.include
@@ -6,11 +6,6 @@ export PKG_CONFIG_LIBDIR = $(ADDON_DEPS_DIR)/lib/pkgconfig
ifeq ($(CROSS_COMPILING),yes)
DEPS = $(TOOLCHAIN_FILE) $(abs_top_srcdir)/target/config-binaddons.site $(abs_top_srcdir)/target/Toolchain_binaddons.cmake $(CONFIG_SUB) $(CONFIG_GUESS)
TOOLCHAIN = -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE)
- ifeq ($(OS),linux)
- ifneq ($(TARGET_PLATFORM),raspberry-pi)
- DEPS += linux-system-libs
- endif
- endif
endif
ifeq ($(PLATFORM),)