diff --git a/externals/aamp.diff b/externals/aamp.diff new file mode 100644 index 0000000..6aa965c --- /dev/null +++ b/externals/aamp.diff @@ -0,0 +1,80 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 900f60b05..57ac3da3a 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -111,9 +111,10 @@ endif() + + if(CMAKE_WPEWEBKIT_JSBINDINGS) + message("CMAKE_WPEWEBKIT_JSBINDINGS is set, Finding JavaScriptCore") +- pkg_search_module(PC_WPE_WEBKIT wpe-webkit-deprecated-0.1 wpe-webkit-1.0 wpe-webkit-1.1) +- find_path (JSC_INCDIR JavaScriptCore/JavaScript.h HINTS ${PC_WPE_WEBKIT_INCLUDEDIR} ${PC_WPE_WEBKIT_INCLUDE_DIRS}) +- include_directories(${JSC_INCDIR}) ++# pkg_search_module(PC_WPE_WEBKIT wpe-webkit-deprecated-0.1 wpe-webkit-1.0 wpe-webkit-1.1) ++# find_path (JSC_INCDIR JavaScriptCore/JavaScript.h HINTS ${PC_WPE_WEBKIT_INCLUDEDIR} ${PC_WPE_WEBKIT_INCLUDE_DIRS}) ++# include_directories(${JSC_INCDIR}) ++ include_directories($ENV{EXT_INSTALL_PATH}) + else() + message("CMAKE_WPEWEBKIT_JSBINDINGS not set") + endif() +@@ -658,7 +659,7 @@ endif() + if(CMAKE_WPEWEBKIT_JSBINDINGS) + message("CMAKE_WPEWEBKIT_JSBINDINGS set, creating jsbinding library") + include_directories(${CMAKE_CURRENT_SOURCE_DIR} jsbindings jsbindings/PersistentWatermark) +- add_subdirectory(test) ++# add_subdirectory(test) + set(JSBINDINGS_STD_SOURCES jsbindings/jscontroller-jsbindings.cpp jsbindings/jsbindings.cpp jsbindings/jsutils.cpp jsbindings/jsmediaplayer.cpp jsbindings/jseventlistener.cpp jsbindings/jsevent.cpp jsbindings/PersistentWatermark/PersistentWatermark.cpp) + if(CMAKE_WPEWEBKIT_WATERMARK_JSBINDINGS) + add_library(aampjsbindings SHARED ${JSBINDINGS_STD_SOURCES} jsbindings/PersistentWatermark/PersistentWatermarkDisplaySequencer.cpp jsbindings/PersistentWatermark/PersistentWatermarkEventHandler.cpp jsbindings/PersistentWatermark/PersistentWatermarkPluginAccess.cpp jsbindings/PersistentWatermark/PersistentWatermarkStorage.cpp) +@@ -686,7 +687,8 @@ if(CMAKE_AUXILIARY_AUDIO_ENABLED) + endif() + + message("LIB_AAMP_DEPENDS is ${LIBAAMP_DEPENDS}") +-target_link_libraries(aamp ${LIBAAMP_DEPENDS} ${LIBAAMP_MOCK_DEPENDS}) ++#target_link_libraries(aamp ${LIBAAMP_DEPENDS} ${LIBAAMP_MOCK_DEPENDS}) ++target_link_libraries(aamp -L$ENV{EXT_INSTALL_PATH}/lib ${LIBAAMP_DEPENDS} ${LIBAAMP_MOCK_DEPENDS}) + + if (CMAKE_WPEFRAMEWORK_REQUIRED) + set(LIBAAMP_DEFINES "${LIBAAMP_DEFINES} -DUSE_CPP_THUNDER_PLUGIN_ACCESS") +@@ -728,7 +730,9 @@ set(GSTTESTHARNESS_SOURCES test/gstTestHarness/gst-port.cpp + test/gstTestHarness/string_utils.cpp) + + add_executable(gstTestHarness ${GSTTESTHARNESS_HEADERS} ${GSTTESTHARNESS_SOURCES}) +-target_link_libraries(gstTestHarness ${GSTTESTHARNESS_DEPENDS} "-lreadline") ++#target_link_libraries(gstTestHarness ${GSTTESTHARNESS_DEPENDS} "-lreadline") ++target_link_libraries(gstTestHarness ${GSTTESTHARNESS_DEPENDS} "-L$ENV{EXT_INSTALL_PATH}/lib -lreadline") ++ + # XCode schema target + xcode_define_schema(gstTestHarness) + +@@ -777,9 +781,9 @@ if (UTEST_ENABLED) + add_subdirectory(test/utests EXCLUDE_FROM_ALL) + endif() + +-if (CMAKE_PLATFORM_UBUNTU OR CMAKE_SYSTEM_NAME STREQUAL Darwin ) +- install(FILES build/aampcli-run-subtec.sh DESTINATION bin) +-endif() ++#if (CMAKE_PLATFORM_UBUNTU OR CMAKE_SYSTEM_NAME STREQUAL Darwin ) ++# install(FILES build/aampcli-run-subtec.sh DESTINATION bin) ++#endif() + + message("LIBAAMP_DEFINES is ${LIBAAMP_DEFINES}") + message("LIBAAMP_SOURCES is ${LIBAAMP_SOURCES}") diff --git a/externals/aampmetrics.diff b/externals/aampmetrics.diff new file mode 100644 index 0000000..35da9ef --- /dev/null +++ b/externals/aampmetrics.diff @@ -0,0 +1,32 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eaeec84..fbf1341 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,7 +52,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin) + link_directories(${LIBCJSON_LIBRARY_DIRS}) + endif(CMAKE_SYSTEM_NAME STREQUAL Darwin) + +-target_link_libraries(metrics "-lcjson") ++target_link_libraries(metrics "-L$ENV{EXT_INSTALL_PATH}/lib -lcjson") + + set_target_properties(metrics PROPERTIES PUBLIC_HEADER "IPVideoStat.h;CMCDHeaders.h;VideoCMCDHeaders.h;AudioCMCDHeaders.h;SubtitleCMCDHeaders.h;ManifestCMCDHeaders.h") + install(TARGETS metrics DESTINATION lib PUBLIC_HEADER DESTINATION include) diff --git a/externals/build.sh b/externals/build.sh new file mode 100644 index 0000000..b6b281f --- /dev/null +++ b/externals/build.sh @@ -0,0 +1,396 @@ +### +# If not stated otherwise in this file or this component's LICENSE +# file the following copyright and licenses apply: +# +# Copyright 2024 RDK Management +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +### + +##!/bin/bash +set -e +# Any subsequent(*) commands which fail will cause the shell script to exit immediately + +banner() { + msg="# $* #" + edge=$(echo "$msg" | sed 's/./#/g') + echo " " + echo "$edge" + echo "$msg" + echo "$edge" + echo " " +} + +#--------- Args + +PXCORE_VER="rdk" +#WPEWEBKIT_VER="583d02964d606c0f600ce5a3df98e017c8712931" +WPEWEBKIT_VER="44cb95d724470c1180d1f4942d49a0d3154a734e" +OPENSSL_VER="1.1.1g" +ZLIB_VER="1.2.11" +GLIB_VER="2.62.4" +CURL_VER="7.69.1" + +#Download files +wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz +wget https://sourceforge.net/projects/libpng/files/zlib/1.2.11/zlib-1.2.11.tar.xz +wget https://gitlab.gnome.org/GNOME/glib/-/archive/2.62.4/glib-2.62.4.tar.gz +wget https://curl.se/download/curl-7.69.1.tar.gz +git clone https://github.com/libuv/libuv.git +git clone https://github.com/Tencent/rapidjson.git + +git clone https://github.com/uNetworking/uWebSockets.git +cd uWebSockets +git checkout v0.14 +cd .. + +#extract files +tar -xzf openssl-1.1.1g.tar.gz +tar -xf zlib-1.2.11.tar.xz +tar -xzf glib-2.62.4.tar.gz +tar -xzf curl-7.69.1.tar.gz + +#remove the files +rm -rf openssl-1.1.1g.tar.gz +rm -rf zlib-1.2.11.tar.xz +rm -rf glib-2.62.4.tar.gz +rm -rf curl-7.69.1.tar.gz + +make_parallel=3 +if [ "$(uname)" = "Darwin" ]; then + make_parallel="$(sysctl -n hw.ncpu)" + LIBEXTN=dylib +elif [ "$(uname)" = "Linux" ]; then + make_parallel="$(cat /proc/cpuinfo | grep '^processor' | wc --lines)" + LIBEXTN=so +fi + +EXT_INSTALL_PATH=`pwd`/extlibs +EXT_DIR=`pwd` +export EXT_INSTALL_PATH=`pwd`/extlibs + +mkdir -p $EXT_INSTALL_PATH + +if [ "$(uname)" = "Darwin" ]; then + make_parallel="$(sysctl -n hw.ncpu)" + LIBEXTN=dylib +elif [ "$(uname)" = "Linux" ]; then + make_parallel="$(cat /proc/cpuinfo | grep '^processor' | wc --lines)" + LIBEXTN=so +fi + +cd ${EXT_DIR} +#--------- OPENSSL +OPENSSL_DIR="`pwd`/openssl-${OPENSSL_VER}" +if [ ! -e ${EXT_INSTALL_PATH}/lib/libcrypto.so.1.1 ] || [ ! -e ${EXT_INSTALL_PATH}/lib/libssl.so.1.1 ] +then + + cd ${OPENSSL_DIR} + + if [ "$(uname)" != "Darwin" ] + then + ./config -shared --prefix=${EXT_INSTALL_PATH} + else + ./Configure darwin64-x86_64-cc -shared --prefix=${EXT_INSTALL_PATH} + fi + + make clean + make "-j${make_parallel}" + make install -i + + rm -rf libcrypto.a + rm -rf libssl.a + rm -rf lib/libcrypto.a + rm -rf lib/libssl.a + cd .. +fi +# +##export LD_LIBRARY_PATH="${OPENSSL_DIR}/:$LD_LIBRARY_PATH" +##export DYLD_LIBRARY_PATH="${OPENSSL_DIR}/:$DYLD_LIBRARY_PATH" +export PKG_CONFIG_PATH=$EXT_INSTALL_PATH/lib/pkgconfig:$EXT_INSTALL_PATH/lib/x86_64-linux-gnu/pkgconfig +# +cd ${EXT_DIR} +#--------- GLIB + +GLIB_DIR="`pwd`/glib-${GLIB_VER}" +if [ ! -e ${EXT_INSTALL_PATH}/lib/x86_64-linux-gnu/libglib-2.0.so.0.6200.4 ] +then + + banner "GLIB" + + cd ${GLIB_DIR} + meson --prefix=${EXT_INSTALL_PATH} build + meson install -C build + cd .. + +fi +##--------- +# +cd ${EXT_DIR} +##--------- ZLIB + +ZLIB_DIR="`pwd`/zlib-${ZLIB_VER}" +if [ ! -e ${EXT_INSTALL_PATH}/lib/libz.so.1.2.11 ] +then + + banner "ZLIB" + + cd ${ZLIB_DIR} + ./configure --prefix=$EXT_INSTALL_PATH + make all "-j${make_parallel}" + make install + cd .. + +fi +#--------- + +cd ${EXT_DIR} +#--------- CURL +CURL_DIR="`pwd`/curl-${CURL_VER}" +if [ ! -e $EXT_INSTALL_PATH/lib/libcurl.so.4.6.0 ]; then + + banner "CURL" + + cd ${CURL_DIR} + + CPPFLAGS="-I${OPENSSL_DIR} -I${OPENSSL_DIR}/include" LDFLAGS="-L${OPENSSL_DIR}/lib -Wl,-rpath,${OPENSSL_DIR}/lib " LIBS="-ldl -lpthread" PKG_CONFIG_PATH=$EXT_INSTALL_PATH/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --with-ssl="${OPENSSL_DIR}" --prefix=$EXT_INSTALL_PATH + ./configure --prefix=$EXT_INSTALL_PATH --enable-versioned-symbols + + if [ "$(uname)" = "Darwin" ]; then + #Removing api definition for Yosemite compatibility. + sed -i '' '/#define HAVE_CLOCK_GETTIME_MONOTONIC 1/d' lib/curl_config.h + fi + + make all "-j${make_parallel}" + make install + cd .. + +fi +##--------- + +cd ${EXT_DIR} +#--------- libuv +LIBUV_DIR="`pwd`/libuv" +if [ ! -e "$EXT_INSTALL_PATH/lib/libuv.so.1.0.0" ] +then + + banner "libuv" + + cd "${LIBUV_DIR}" + mkdir -p build + cd build + cmake -DCMAKE_INSTALL_PREFIX=$EXT_INSTALL_PATH .. + + make "-j${make_parallel}" + make install + cd ../.. +fi +##--------- + +cd ${EXT_DIR} +if [ ! -e $EXT_INSTALL_PATH/lib/librtCoreExt.so ] +then + + banner "RDK NativeScript" + + git clone https://github.com/rdkcentral/pxCore.git + cd pxCore + git checkout ${PXCORE_VER} + mkdir -p build + cd build + cmake -DPREFER_SYSTEM_LIBRARIES=ON -DPREFER_PKGCONFIG=ON -DCMAKE_INSTALL_PREFIX=${EXT_INSTALL_PATH} -DBUILD_RTCORE_LIBS=OFF -DBUILD_PXCORE_LIBS=OFF -DBUILD_PXSCENE=OFF -DSUPPORT_NODE=OFF -DBUILD_RTCORE_EXT_LIBS=ON .. + make + mkdir -p ${EXT_INSTALL_PATH}/include/pxcore/ + mkdir -p ${EXT_INSTALL_PATH}/include/pxcore/unix + + cp -R ../src/*.h ${EXT_INSTALL_PATH}/include/pxcore/. + cp -R ../src/unix/*.h ${EXT_INSTALL_PATH}/include/pxcore/unix/. + + if [ "$(uname)" == "Darwin" ] + then + cp mac/librtCoreExt.dylib ${EXT_INSTALL_PATH}/lib/. + else + cp glut/librtCoreExt.so ${EXT_INSTALL_PATH}/lib/. + fi + cd ../../ + +fi +#-------- + +cd ${EXT_DIR} +# uWebSockets +if [ ! -e $EXT_INSTALL_PATH/lib/libuWS.so ] +then + banner "uWebSockets" + + cd uWebSockets + EXTERNALSPATH=`pwd`/../extlibs FILEPATH=`pwd` make -f Makefile Linux + mkdir ../extlibs/include/uwebsockets + cp src/*.h ../extlibs/include/uwebsockets/. + cp libuWS.so ../extlibs/lib/. +fi +#-------- + +cd ${EXT_DIR} +# WPEWebkit +if [ ! -e $EXT_INSTALL_PATH/lib/libJavaScriptCore.so.1.1.1 ] +then + banner "Javascriptcore" + git clone https://github.com/WebPlatformForEmbedded/WPEWebKit.git + #git clone git@github.com:WebPlatformForEmbedded/WPEWebKit.git + cd WPEWebKit + git checkout ${WPEWEBKIT_VER} + git apply --whitespace=fix ../jsconly_buildissues.diff + git apply --whitespace=fix ../es6support.diff + rm -rf build + mkdir build + + cd build + cmake -DCMAKE_INSTALL_PREFIX=${EXT_INSTALL_PATH} -DPORT="JSCOnly" -DUSE_CAPSTONE=OFF -DBUILD_SHARED_LIBS=OFF -DUSE_LD_GOLD=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -G Ninja -DDEVELOPER_MODE=ON -DENABLE_JIT=ON -DENABLE_FTL_JIT=ON -DENABLE_REMOTE_INSPECTOR=ON .. + cmake --build . + + cp -a lib/lib* ${EXT_INSTALL_PATH}/lib/. + + mkdir -p ${EXT_INSTALL_PATH}/include/JavaScriptCore + mkdir -p ${EXT_INSTALL_PATH}/include/wtf + echo "${EXT_INSTALL_PATH}/include/JavaScriptCore" + cp -R DerivedSources/ForwardingHeaders/JavaScriptCore/*.h ${EXT_INSTALL_PATH}/include/JavaScriptCore/. + cp -R DerivedSources/ForwardingHeaders/wtf/* ${EXT_INSTALL_PATH}/include/wtf/. + cp -R JavaScriptCore/PrivateHeaders/JavaScriptCore/*.h ${EXT_INSTALL_PATH}/include/JavaScriptCore/. + cp -R JavaScriptCore/Headers/JavaScriptCore/*.h ${EXT_INSTALL_PATH}/include/JavaScriptCore/. + cp -R WTF/Headers/wtf/* ${EXT_INSTALL_PATH}/include/wtf/. + cd ${EXT_DIR} +fi + +if [ "$(uname)" != "Darwin" ] +then + cd ${EXT_DIR} + if [ ! -e westeros/essos/.libs/libessos.so ] || + [ ! -e westeros/.libs/libwesteros_compositor.so.0.0.0 ] + then + banner "westeros & essos" + #rm -rf westeros + git clone https://github.com/rdkcmf/westeros.git + cd westeros + git checkout 84760abb6df0135de2a25eaf655cf1385a55a0f9 + export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/:$PKG_CONFIG_PATH + git apply ../westeros.diff + cd essos + autoreconf --install + autoconf + ./configure --enable-essoswesterosfree --enable-shared --prefix=$EXT_INSTALL_PATH + make + make install + cd .. + export LD_LIBRARY_PATH=`pwd`/../extlibs/lib:`pwd`/../extlibs/lib/x86_64-linux-gnu + unset PKG_CONFIG_PATH + make -f Makefile.ubuntu + fi +fi + +cd ${EXT_DIR} +# aamp +if [ ! -e $EXT_INSTALL_PATH/lib/libaampjsbindings.so ] +then + banner "aamp" + mkdir -p aamp + cd aamp + + git clone -b dev_sprint_24_2 https://code.rdkcentral.com/r/rdk/components/generic/aamp + git clone -b dev_sprint_24_2 https://code.rdkcentral.com/r/rdk/components/generic/aampabr + git clone -b dev_sprint_24_2 https://code.rdkcentral.com/r/rdk/components/generic/gst-plugins-rdk-aamp + git clone -b dev_sprint_24_2 https://code.rdkcentral.com/r/rdk/components/generic/aampmetrics + git clone https://github.com/DaveGamble/cJSON.git + git clone -b rdk-next "https://code.rdkcentral.com/r/rdk/components/generic/rdk-oe/meta-rdk-ext" + + cd aampabr + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$EXT_INSTALL_PATH .. + make + make install + cd ../.. + + cd cJSON + mkdir -p build + cd build + cmake -DCMAKE_INSTALL_PREFIX=$EXT_INSTALL_PATH .. + make + make install + cd ../.. + + cd aampmetrics + git apply ../../aampmetrics.diff + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$EXT_INSTALL_PATH .. + make + make install + cd ../.. + + git clone https://github.com/bitmovin/libdash.git + cd libdash/libdash + git checkout stable_3_0 + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0001-libdash-build.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0002-libdash-starttime-uint64.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0003-libdash-presentationTimeOffset-uint64.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0004-Support-of-EventStream.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0005-DELIA-39460-libdash-memleak.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0006-RDK-32003-LLD-Support.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0007-DELIA-51645-Event-Stream-RawAttributes-Support.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0008-DELIA-53263-Use-Label-TAG.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0009-RDK-35134-Support-for-FailoverContent.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0010-RDKAAMP-121-Failover-Tag-on-SegmentTemplate.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0011-RDKAAMP-61-AAMP-low-latency-dash-stream-evaluation.patch + patch -p1 < ../../meta-rdk-ext/recipes-multimedia/libdash/libdash/0012-To-retrieves-the-text-content-of-CDATA-section.patch + mkdir -p build + cd build + cmake -DCMAKE_INSTALL_PREFIX=$EXT_INSTALL_PATH .. + make + make install + cp bin/libdash.so $EXT_INSTALL_PATH/lib/ + ../../../../copydashheaders.sh + ../../../../preparedashpc.sh + cd ../../../ + + if [ ! -e $EXT_INSTALL_PATH/lib/libsystemd.so ] + then + ln -s /usr/lib/x86_64-linux-gnu/libsystemd.so.0 $EXT_INSTALL_PATH/lib/libsystemd.so + fi + + cd aamp + git apply ../../aamp.diff + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PLATFORM_UBUNTU=1 -DCMAKE_INSTALL_PREFIX=$EXT_INSTALL_PATH -DCMAKE_WPEWEBKIT_JSBINDINGS=ON .. + make + make install + cd ../../ + + cd gst-plugins-rdk-aamp + git apply ../../gstplugins.diff + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$EXT_INSTALL_PATH .. + make + make install + cd ../../ +fi +cd ${EXT_DIR} +#-------------------------------------------- +banner ">>>>> BUILD COMPLETE <<<<<" +#-------------------------------------------- + +#------- +exit 0 #success +#------- diff --git a/externals/copydashheaders.sh b/externals/copydashheaders.sh new file mode 100644 index 0000000..e1c7550 --- /dev/null +++ b/externals/copydashheaders.sh @@ -0,0 +1,36 @@ +### +# If not stated otherwise in this file or this component's LICENSE +# file the following copyright and licenses apply: +# +# Copyright 2024 RDK Management +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +### + +sudo cp bin/libdash.so ${EXT_INSTALL_PATH}/lib/ +sudo mkdir -p ${EXT_INSTALL_PATH}/include +sudo mkdir -p ${EXT_INSTALL_PATH}/include/libdash +sudo mkdir -p ${EXT_INSTALL_PATH}/include/libdash/xml +sudo mkdir -p ${EXT_INSTALL_PATH}/include/libdash/mpd +sudo mkdir -p ${EXT_INSTALL_PATH}/include/libdash/helpers +sudo mkdir -p ${EXT_INSTALL_PATH}/include/libdash/network +sudo mkdir -p ${EXT_INSTALL_PATH}/include/libdash/portable +sudo mkdir -p ${EXT_INSTALL_PATH}/include/libdash/metrics +sudo cp -pr ../libdash/include/*.h ${EXT_INSTALL_PATH}/include/libdash +sudo cp -pr ../libdash/source/xml/*.h ${EXT_INSTALL_PATH}/include/libdash/xml +sudo cp -pr ../libdash/source/mpd/*.h ${EXT_INSTALL_PATH}/include/libdash/mpd +sudo cp -pr ../libdash/source/network/*.h ${EXT_INSTALL_PATH}/include/libdash/network +sudo cp -pr ../libdash/source/portable/*.h ${EXT_INSTALL_PATH}/include/libdash/portable +sudo cp -pr ../libdash/source/helpers/*.h ${EXT_INSTALL_PATH}/include/libdash/helpers +sudo cp -pr ../libdash/source/metrics/*.h ${EXT_INSTALL_PATH}/include/libdash/metrics + diff --git a/externals/es6support.diff b/externals/es6support.diff new file mode 100644 index 0000000..6e4e8f4 --- /dev/null +++ b/externals/es6support.diff @@ -0,0 +1,83 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + +diff --git a/Source/JavaScriptCore/API/JSAPIGlobalObject.cpp b/Source/JavaScriptCore/API/JSAPIGlobalObject.cpp +index 125bc99a1d52..dfa63586231a 100644 +--- a/Source/JavaScriptCore/API/JSAPIGlobalObject.cpp ++++ b/Source/JavaScriptCore/API/JSAPIGlobalObject.cpp +@@ -32,6 +32,11 @@ + + namespace JSC { + ++extern JSInternalPromise* moduleLoaderImportModule(JSGlobalObject*, JSModuleLoader*, JSString* moduleNameValue, JSValue parameters, const SourceOrigin&); ++extern Identifier moduleLoaderResolve(JSGlobalObject*, JSModuleLoader*, JSValue keyValue, JSValue referrerValue, JSValue); ++extern JSInternalPromise* moduleLoaderFetch(JSGlobalObject*, JSModuleLoader*, JSValue, JSValue, JSValue); ++extern JSObject* moduleLoaderCreateImportMetaProperties(JSGlobalObject*, JSModuleLoader*, JSValue, JSModuleRecord*, JSValue); ++ + const ClassInfo JSAPIGlobalObject::s_info = { "GlobalObject"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSAPIGlobalObject) }; + + const GlobalObjectMethodTable JSAPIGlobalObject::s_globalObjectMethodTable = { +@@ -44,6 +49,10 @@ const GlobalObjectMethodTable JSAPIGlobalObject::s_globalObjectMethodTable = { + nullptr, // moduleLoaderResolve + nullptr, // moduleLoaderFetch + nullptr, // moduleLoaderCreateImportMetaProperties ++ &JSC::moduleLoaderImportModule, ++ &JSC::moduleLoaderResolve, ++ &JSC::moduleLoaderFetch, ++ &JSC::moduleLoaderCreateImportMetaProperties, + nullptr, // moduleLoaderEvaluate + nullptr, // promiseRejectionTracker + &reportUncaughtExceptionAtEventLoop, +diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp +index 516d8e5b7915..a5a1c3a6f160 100644 +--- a/Source/JavaScriptCore/jsc.cpp ++++ b/Source/JavaScriptCore/jsc.cpp +@@ -172,6 +172,14 @@ struct MemoryFootprint { + + using namespace JSC; + ++namespace JSC ++{ ++ JSInternalPromise* moduleLoaderImportModule(JSGlobalObject*, JSModuleLoader*, JSString*, JSValue, const SourceOrigin&) { return nullptr; } ++ Identifier moduleLoaderResolve(JSGlobalObject*, JSModuleLoader*, JSValue, JSValue, JSValue) { return { }; } ++ JSInternalPromise* moduleLoaderFetch(JSGlobalObject*, JSModuleLoader*, JSValue, JSValue, JSValue) { return nullptr; } ++ JSObject* moduleLoaderCreateImportMetaProperties(JSGlobalObject*, JSModuleLoader*, JSValue, JSModuleRecord*, JSValue) { return nullptr; } ++} ++ + namespace { + + #define EXIT_EXCEPTION 3 +diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake +index 62f69a9c4cd1..e847453e2232 100644 +--- a/Source/cmake/WebKitCompilerFlags.cmake ++++ b/Source/cmake/WebKitCompilerFlags.cmake +@@ -258,9 +258,9 @@ if (NOT MSVC) + string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS}) + endif () + +-if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS) +- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}") +-endif () ++#if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS) ++# set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}") ++#endif () + + + if (MSVC) + diff --git a/externals/gstplugins.diff b/externals/gstplugins.diff new file mode 100644 index 0000000..ab98918 --- /dev/null +++ b/externals/gstplugins.diff @@ -0,0 +1,48 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a1c972c..79338ad 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -168,7 +168,7 @@ else() + message("CMAKE_CDM_DRM not set") + endif() + +-target_link_libraries (gstaamp aamp ${AAMP_COMMON_DEPENDENCIES} ) ++target_link_libraries (gstaamp -L$ENV{EXT_INSTALL_PATH}/lib aamp ${AAMP_COMMON_DEPENDENCIES} ) + + set(LIBAAMP_DEFINES "${AAMP_DEFINES}") + +diff --git a/gst_subtec/CMakeLists.txt b/gst_subtec/CMakeLists.txt +index 4d08b0b..9a590f8 100644 +--- a/gst_subtec/CMakeLists.txt ++++ b/gst_subtec/CMakeLists.txt +@@ -44,9 +44,9 @@ set(GSTSUBTEC_DEPENDENCIES ${GSTREAMERBASE_LIBRARIES} ${GSTREAMER_LIBRARIES}) + add_library(gstsubtecsink SHARED gstsubtecsink.cpp) + + if(CMAKE_PLATFORM_UBUNTU) +- target_link_libraries(gstsubtecsink ${GSTSUBTEC_DEPENDENCIES} ${CMAKE_INSTALL_PREFIX}/lib/libsubtec.so) ++ target_link_libraries(gstsubtecsink -L$ENV{EXT_INSTALL_PATH}/lib ${GSTSUBTEC_DEPENDENCIES} ${CMAKE_INSTALL_PREFIX}/lib/libsubtec.so) + else() +- target_link_libraries(gstsubtecsink ${GSTSUBTEC_DEPENDENCIES} "-lsubtec") ++ target_link_libraries(gstsubtecsink -L$ENV{EXT_INSTALL_PATH}/lib ${GSTSUBTEC_DEPENDENCIES} "-lsubtec") + endif() + + add_library(gstsubtecbin SHARED gstsubtecbin.cpp) diff --git a/externals/jsconly_buildissues.diff b/externals/jsconly_buildissues.diff new file mode 100644 index 0000000..c19d0f7 --- /dev/null +++ b/externals/jsconly_buildissues.diff @@ -0,0 +1,233 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8bb7d65fb87f..c5a9351e4356 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,7 +17,7 @@ project(WebKit) + if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20") + cmake_policy(SET CMP0116 OLD) + endif () +- ++set(CMAKE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + # ----------------------------------------------------------------------------- + # Common configuration + #------------------------------------------------------------------------------ +diff --git a/Source/JavaScriptCore/API/WebKitAvailability.h b/Source/JavaScriptCore/API/WebKitAvailability.h +index 2a1ce7ce16f6..50bd7f1ebb2b 100644 +--- a/Source/JavaScriptCore/API/WebKitAvailability.h ++++ b/Source/JavaScriptCore/API/WebKitAvailability.h +@@ -31,10 +31,11 @@ + #include + #include + +-#if defined(BUILDING_GTK__) ++//#if defined(BUILDING_GTK__) + #undef JSC_API_AVAILABLE + #define JSC_API_AVAILABLE(...) +-#endif ++//#endif ++ + + #else + #define JSC_API_AVAILABLE(...) +diff --git a/Source/JavaScriptCore/PlatformJSCOnly.cmake b/Source/JavaScriptCore/PlatformJSCOnly.cmake +index 931ffcec61b7..de3847c70db3 100644 +--- a/Source/JavaScriptCore/PlatformJSCOnly.cmake ++++ b/Source/JavaScriptCore/PlatformJSCOnly.cmake +@@ -1,3 +1,46 @@ ++find_package(GLIB 2.36 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule) ++add_definitions(-DSTATICALLY_LINKED_WITH_WTF) ++ ++set(DERIVED_SOURCES_JAVASCRIPCORE_GLIB_API_DIR ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/javascriptcorewpe/jsc) ++set(JavaScriptCoreGLib_FRAMEWORK_HEADERS_DIR "${CMAKE_BINARY_DIR}/JavaScriptCoreGLib/Headers") ++set(JavaScriptCoreGLib_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/JavaScriptCoreGLib/DerivedSources") ++ ++include(GLib.cmake) ++ ++list(APPEND JavaScriptCore_LIBRARIES ++ ${GLIB_LIBRARIES} ++) ++ ++list(APPEND JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES ++ ${GLIB_INCLUDE_DIRS} ++) ++ ++list(APPEND JavaScriptCore_SOURCES ++ API/JSRemoteInspector.cpp ++ ++ inspector/remote/RemoteAutomationTarget.cpp ++ inspector/remote/RemoteConnectionToTarget.cpp ++ inspector/remote/RemoteControllableTarget.cpp ++ inspector/remote/RemoteInspectionTarget.cpp ++ inspector/remote/RemoteInspector.cpp ++ ++ inspector/remote/glib/RemoteInspectorGlib.cpp ++ inspector/remote/glib/RemoteInspectorServer.cpp ++ inspector/remote/glib/RemoteInspectorUtils.cpp ++) ++ ++list(APPEND JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS ++ inspector/remote/glib/RemoteInspectorServer.h ++ inspector/remote/glib/RemoteInspectorUtils.h ++) ++ ++if (APPLE) ++add_definitions(-DJSC_COMPILATION -D_LIBCPP_OPTIONAL) ++else () ++add_definitions(-DJSC_COMPILATION) ++endif (APPLE) ++ ++ add_definitions(-DSTATICALLY_LINKED_WITH_WTF) + if (ENABLE_REMOTE_INSPECTOR) + if (USE_GLIB) + include(inspector/remote/GLib.cmake) +diff --git a/Source/WTF/wtf/FileSystem.h b/Source/WTF/wtf/FileSystem.h +index 5e91ad48fcb1..170a61b7f245 100644 +--- a/Source/WTF/wtf/FileSystem.h ++++ b/Source/WTF/wtf/FileSystem.h +@@ -63,8 +63,10 @@ namespace FileSystemImpl { + + // PlatformFileHandle + #if USE(GLIB) && !OS(WINDOWS) +-typedef GFileIOStream* PlatformFileHandle; +-const PlatformFileHandle invalidPlatformFileHandle = 0; ++typedef GFileIOStream* PlatformFileHandle; ++const PlatformFileHandle invalidPlatformFileHandle = 0; ++//typedef int PlatformFileHandle; ++//const PlatformFileHandle invalidPlatformFileHandle = -1; + #elif OS(WINDOWS) + typedef HANDLE PlatformFileHandle; + // FIXME: -1 is INVALID_HANDLE_VALUE, defined in . Chromium tries to +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +index 629d8594b44f..6d4ef826b188 100644 +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -81,7 +81,7 @@ + are currently dependent on macros they should not be and need to be refined or do not + belong as part of Platform.h at all. */ + +- ++#define USE_GLIB 1 + #if PLATFORM(GTK) + #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_44 + #if USE(GTK4) +diff --git a/Source/WTF/wtf/PlatformJSCOnly.cmake b/Source/WTF/wtf/PlatformJSCOnly.cmake +index 2f4fc6b6b986..a7461d5afa2c 100644 +--- a/Source/WTF/wtf/PlatformJSCOnly.cmake ++++ b/Source/WTF/wtf/PlatformJSCOnly.cmake +@@ -120,10 +120,27 @@ else () + ) + endif () + ++list(APPEND WTF_PUBLIC_HEADERS ++ glib/GLibUtilities.h ++ glib/GMutexLocker.h ++ glib/GSocketMonitor.h ++ glib/GRefPtr.h ++ glib/GTypedefs.h ++ glib/GUniquePtr.h ++ glib/RunLoopSourcePriority.h ++ glib/WTFGType.h ++ glib/SocketConnection.h ++) ++ ++list(APPEND WTF_SOURCES ++ glib/GLibUtilities.cpp ++) + if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib") + list(APPEND WTF_SOURCES + glib/GRefPtr.cpp ++ glib/GSocketMonitor.cpp + glib/RunLoopGLib.cpp ++ glib/SocketConnection.cpp + ) + list(APPEND WTF_PUBLIC_HEADERS + glib/GRefPtr.h +diff --git a/Source/WTF/wtf/glib/GRefPtr.h b/Source/WTF/wtf/glib/GRefPtr.h +index afdc33d1e79a..3d8244ec6dec 100644 +--- a/Source/WTF/wtf/glib/GRefPtr.h ++++ b/Source/WTF/wtf/glib/GRefPtr.h +@@ -25,7 +25,7 @@ + #if USE(GLIB) + + #include +-#include ++#include + #include + + extern "C" { +diff --git a/Source/cmake/OptionsJSCOnly.cmake b/Source/cmake/OptionsJSCOnly.cmake +index e892b4274b19..425342bfaafa 100644 +--- a/Source/cmake/OptionsJSCOnly.cmake ++++ b/Source/cmake/OptionsJSCOnly.cmake +@@ -9,6 +9,11 @@ else () + endif () + + add_definitions(-DBUILDING_JSCONLY__) ++add_definitions(-DJSC_GLIB_API_ENABLED) ++ ++SET_AND_EXPOSE_TO_BUILD(LOG_DISABLED FALSE) ++SET_AND_EXPOSE_TO_BUILD(ERROR_DISABLED FALSE) ++SET_AND_EXPOSE_TO_BUILD(FATAL_DISABLED FALSE) + + set(PROJECT_VERSION_MAJOR 1) + set(PROJECT_VERSION_MINOR 0) +@@ -17,7 +22,7 @@ set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_ + + WEBKIT_OPTION_BEGIN() + WEBKIT_OPTION_DEFINE(ENABLE_STATIC_JSC "Whether to build JavaScriptCore as a static library." PUBLIC OFF) +-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REMOTE_INSPECTOR PRIVATE OFF) ++WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_REMOTE_INSPECTOR PRIVATE ON) + if (WIN32) + # FIXME: Enable FTL on Windows. https://bugs.webkit.org/show_bug.cgi?id=145366 + WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTL_JIT PRIVATE OFF) +@@ -34,7 +39,7 @@ set(ALL_EVENT_LOOP_TYPES + Generic + ) + +-set(DEFAULT_EVENT_LOOP_TYPE "Generic") ++set(DEFAULT_EVENT_LOOP_TYPE "Glib") + + set(EVENT_LOOP_TYPE ${DEFAULT_EVENT_LOOP_TYPE} CACHE STRING "Implementation of event loop to be used in JavaScriptCore (one of ${ALL_EVENT_LOOP_TYPES})") + +@@ -51,7 +56,7 @@ else () + endif () + + if (WTF_CPU_ARM OR WTF_CPU_MIPS) +- SET_AND_EXPOSE_TO_BUILD(USE_CAPSTONE TRUE) ++ SET_AND_EXPOSE_TO_BUILD(USE_CAPSTONE TRUE) + endif () + + # FIXME: JSCOnly on WIN32 seems to only work with fully static build +@@ -96,7 +101,7 @@ endif () + + string(TOLOWER ${EVENT_LOOP_TYPE} LOWERCASE_EVENT_LOOP_TYPE) + if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib") +- find_package(GLIB 2.36 REQUIRED COMPONENTS gio gio-unix gobject) ++ find_package(GLIB 2.36 REQUIRED COMPONENTS gio gobject gio-unix gthread gmodule) + SET_AND_EXPOSE_TO_BUILD(USE_GLIB 1) + SET_AND_EXPOSE_TO_BUILD(USE_GLIB_EVENT_LOOP 1) + SET_AND_EXPOSE_TO_BUILD(WTF_DEFAULT_EVENT_LOOP 0) +@@ -109,3 +114,4 @@ find_package(ICU 61.2 REQUIRED COMPONENTS data i18n uc) + if (APPLE) + add_definitions(-DU_DISABLE_RENAMING=1) + endif () ++add_definitions(-DGETTEXT_PACKAGE="JSCOnly") diff --git a/externals/preparedashpc.sh b/externals/preparedashpc.sh new file mode 100644 index 0000000..f3026f7 --- /dev/null +++ b/externals/preparedashpc.sh @@ -0,0 +1,23 @@ +### +# If not stated otherwise in this file or this component's LICENSE +# file the following copyright and licenses apply: +# +# Copyright 2024 RDK Management +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +### + +echo -e 'prefix=EXT_INSTALL_PATH \nexec_prefix=${prefix} \nlibdir=${exec_prefix}/lib \nincludedir=${prefix}/include/libdash \n \nName: libdash \nDescription: ISO/IEC MPEG-DASH library \nVersion: 3.0 \nRequires: libxml-2.0 \nLibs: -L${libdir} -ldash \nLibs.private: -lxml2 \nCflags: -I${includedir}' > libdash.pc +sed -i "s|EXT_INSTALL_PATH|$EXT_INSTALL_PATH|g" libdash.pc +cat libdash.pc +sudo mv libdash.pc ${EXT_INSTALL_PATH}/lib/pkgconfig/. diff --git a/externals/westeros.diff b/externals/westeros.diff new file mode 100644 index 0000000..615fbbb --- /dev/null +++ b/externals/westeros.diff @@ -0,0 +1,139 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + +diff --git a/Makefile.ubuntu b/Makefile.ubuntu +index 2e5f3cb..b0cee2b 100644 +--- a/Makefile.ubuntu ++++ b/Makefile.ubuntu +@@ -27,7 +27,7 @@ clean: init + cleanall: initall + + setenv= \ +- export PKG_CONFIG_PATH=$(WID)/lib/pkgconfig:$(WID)/share/pkgconfig && \ ++ export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):$(WID)/lib/pkgconfig:$(WID)/share/pkgconfig && \ + export ACLOCAL_PATH=$(WID)/share/aclocal && \ + export ACLOCAL="aclocal -I $ACLOCAL_PATH" + +@@ -57,7 +57,7 @@ external: + external/.proto: + $(call setenv) && \ + cd external && \ +- git clone git://anongit.freedesktop.org/xcb/proto && \ ++ git clone https://anongit.freedesktop.org/git/xcb/proto && \ + cd proto && \ + ./autogen.sh --prefix $(WID) && \ + make && make install && \ +@@ -67,7 +67,7 @@ external/.proto: + external/.macros: + $(call setenv) && \ + cd external && \ +- git clone git://anongit.freedesktop.org/xorg/util/macros && \ ++ git clone https://anongit.freedesktop.org/git/xorg/util/macros && \ + cd macros && \ + ./autogen.sh --prefix $(WID) && \ + make && make install && \ +@@ -77,7 +77,7 @@ external/.macros: + external/.libxcd: + $(call setenv) && \ + cd external && \ +- git clone git://anongit.freedesktop.org/xcb/libxcb && \ ++ git clone https://anongit.freedesktop.org/git/xcb/libxcb && \ + cd libxcb && \ + ./autogen.sh --prefix $(WID) && \ + make && make install && \ +@@ -87,10 +87,12 @@ external/.libxcd: + external/.libxkbcommon: + $(call setenv) && \ + cd external && \ +- git clone git://github.com/xkbcommon/libxkbcommon && \ ++ git clone https://github.com/xkbcommon/libxkbcommon && \ + cd libxkbcommon && \ +- ./autogen.sh --prefix $(WID) && \ +- make && make install && \ ++ git checkout 75ec764ceec9aacddfd34f6066f2d5e7cafc8c51 && \ ++ git apply ../../../westeros_libxkbcommon.diff && \ ++ ./autogen.sh --prefix $(WID) && \ ++ make && make install && \ + cd .. && \ + touch .libxkbcommon + +@@ -99,10 +101,10 @@ external/.wayland: + cd external && \ + mkdir wayland && \ + cd wayland && \ +- wget http://wayland.freedesktop.org/releases/wayland-1.6.0.tar.xz && \ ++ wget --no-check-certificate http://wayland.freedesktop.org/releases/wayland-1.6.0.tar.xz && \ + tar xf wayland-1.6.0.tar.xz && \ + cd wayland-1.6.0 && \ +- ./configure --prefix $(WID) && \ ++ ./configure --prefix $(WID) --disable-documentation && \ + make && make install && \ + cd ../.. && \ + touch .wayland +@@ -150,6 +152,7 @@ simpleshell/protocol/simpleshell-protocol.c: + westeros-simpleshell: + $(call setenv) && \ + cd simpleshell && \ ++ mkdir -p m4 && \ + aclocal -I cfg && \ + libtoolize --automake && \ + autoheader && \ +@@ -161,6 +164,7 @@ westeros-simpleshell: + + westeros-core: + $(call setenv) && \ ++ mkdir -p m4 && \ + aclocal -I cfg && \ + libtoolize --automake && \ + autoheader && \ +diff --git a/configure.ac b/configure.ac +index f6284f6..b3a7821 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -225,18 +225,18 @@ AM_CONDITIONAL([ENABLE_MODULES], [test x$ENABLE_MODULES = xtrue]) + + AM_COND_IF([ENABLE_MODULES], [AC_CONFIG_SUBDIRS([drm/modules])]) + +-GST_MAJORMINOR=1.0 +-PKG_CHECK_MODULES([GST], [gstreamer-1.0 >= 1.0], have_gst1="yes", have_gst1="no") +- +-AS_IF([test "x$have_gst1" = "xyes"], [ +- PKG_CHECK_MODULES([GSTBASE], [gstreamer-base-1.0 >= 1.0]) +- AC_DEFINE(USE_GST1, 1, [Build with GStreamer 1.x]) +-], []) +- +-AS_IF([test "x$enable_gstreamer0" != "xyes" -a "x$have_gst1" != "xyes"], [ +- AC_MSG_ERROR([Could not find GStreamer 1.x dependencies: +- +-$GST_PKG_ERRORS])], []) ++#GST_MAJORMINOR=1.0 ++#PKG_CHECK_MODULES([GST], [gstreamer-1.0 >= 1.0], have_gst1="yes", have_gst1="no") ++# ++#AS_IF([test "x$have_gst1" = "xyes"], [ ++# PKG_CHECK_MODULES([GSTBASE], [gstreamer-base-1.0 >= 1.0]) ++# AC_DEFINE(USE_GST1, 1, [Build with GStreamer 1.x]) ++#], []) ++# ++#AS_IF([test "x$enable_gstreamer0" != "xyes" -a "x$have_gst1" != "xyes"], [ ++# AC_MSG_ERROR([Could not find GStreamer 1.x dependencies: ++# ++#$GST_PKG_ERRORS])], []) + + WAYLANDLIB="-lwayland-server" + AC_SUBST(WAYLANDLIB) diff --git a/externals/westeros_libxkbcommon.diff b/externals/westeros_libxkbcommon.diff new file mode 100644 index 0000000..d33e50d --- /dev/null +++ b/externals/westeros_libxkbcommon.diff @@ -0,0 +1,59 @@ +/** +* If not stated otherwise in this file or this component's LICENSE +* file the following copyright and licenses apply: +* +* Copyright 2024 RDK Management +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +**/ + +diff --git a/src/xkbcomp/parser.y b/src/xkbcomp/parser.y +index ead20165..e12c41be 100644 +--- a/src/xkbcomp/parser.y ++++ b/src/xkbcomp/parser.y +@@ -215,15 +215,13 @@ resolve_keysym(const char *name, xkb_keysym_t *sym_rtrn) + %type DoodadDecl + %type XkbFile XkbMapConfigList XkbMapConfig + %type XkbCompositeMap +- ++/* + %destructor { FreeStmt((ParseCommon *) $$); } + + +-/* The destructor also runs on the start symbol when the parser *succeeds*. +- * The `if` here catches this case. */ + %destructor { if (!param->rtrn) FreeXkbFile($$); } + %destructor { free($$); } +- ++*/ + %% + + /* +@@ -778,7 +776,7 @@ parse(struct xkb_context *ctx, struct scanner *scanner, const char *map) + struct parser_param param = { + .scanner = scanner, + .ctx = ctx, +- .rtrn = NULL, ++ /*.rtrn = NULL,*/ + }; + + /* +@@ -808,7 +806,7 @@ parse(struct xkb_context *ctx, struct scanner *scanner, const char *map) + FreeXkbFile(param.rtrn); + } + } +- param.rtrn = NULL; ++ /*param.rtrn = NULL;*/ + } + + if (ret != 0) {