diff options
Diffstat (limited to 'external/meta-sdl')
23 files changed, 1473 insertions, 0 deletions
diff --git a/external/meta-sdl/COPYING.MIT b/external/meta-sdl/COPYING.MIT new file mode 100644 index 00000000..89de3547 --- /dev/null +++ b/external/meta-sdl/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/external/meta-sdl/README b/external/meta-sdl/README new file mode 100644 index 00000000..abfcac45 --- /dev/null +++ b/external/meta-sdl/README @@ -0,0 +1,57 @@ +This README file contains information on the contents of the +sdl layer. + +Please see the corresponding sections below for details. + +Dependencies +============ + +This layer depends on: + + URI: git://git.yoctoproject.org/poky + branch: thud + + URI: git://git.openembedded.org/meta-openembedded + branch: thud + +Patches +======= + +Please send the pull request via github + +Maintainer: Phong Tran <tranmanphong@gmail.com> + +Table of Contents +================= + + I. Adding the sdl layer to your build + II. Misc + + +I. Adding the sdl layer to your build +================================================= + +In order to use this layer, you need to make the build system aware of +it. + +Assuming the sdl layer exists at the top-level of your +yocto build tree, you can add it to the build system by adding the +location of the sdl layer to bblayers.conf, along with any +other layers needed. e.g.: + + $ source poky/oe-init-build-env build + $ bitbake-layers add-layer /path/to/meta-openembedded/meta-oe/ + $ bitbake-layers add-layer /path/to/meta-openembedded/meta-networking/ + $ bitbake-layers add-layer /path/to/meta-openembedded/meta-python/ + $ bitbake-layers add-layer /path/to/meta-sdl/ + + configure in local.conf for install sdl-core + IMAGE_INSTALL_append = " sdl-core" + Use the systemd init manager (this layer only support systemd currently) + DISTRO_FEATURES_append = " systemd" + VIRTUAL-RUNTIME_init_manager = "systemd" + +II. Misc +======== + +More reference AGL (Automotive Grade Linux) and GDP (GENIVI Development Platform) diff --git a/external/meta-sdl/conf/layer.conf b/external/meta-sdl/conf/layer.conf new file mode 100644 index 00000000..e53c542b --- /dev/null +++ b/external/meta-sdl/conf/layer.conf @@ -0,0 +1,11 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "sdl" +BBFILE_PATTERN_sdl = "^${LAYERDIR}/" +BBFILE_PRIORITY_sdl = "6" +LAYERSERIES_COMPAT_sdl = "thud" diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0001-add-the-default-cmake-cxx-flag-for-oe.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0001-add-the-default-cmake-cxx-flag-for-oe.patch new file mode 100644 index 00000000..0038ea00 --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0001-add-the-default-cmake-cxx-flag-for-oe.patch @@ -0,0 +1,53 @@ +From acc1b869e52e1c2e7dba0b534bca34a1e7da8404 Mon Sep 17 00:00:00 2001 +From: Phong Tran <tranmanphong@gmail.com> +Date: Tue, 19 Jul 2016 07:16:24 +0700 +Subject: [PATCH 01/10] add the default cmake cxx flag for oe + +Signed-off-by: Phong Tran <tranmanphong@gmail.com> + +%% original patch: 0001-add-the-default-cmake-cxx-flag-for-oe.patch +--- + CMakeLists.txt | 6 +++--- + src/components/functional_module/CMakeLists.txt | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 450a919..f1dc97a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -75,8 +75,8 @@ set(POLICY_OPTION "$ENV{POLICY_TYPE}") + set(SECURITY_OPTION "$ENV{SECURITY_MODE}") + set(COMPONENTS_DIR ${CMAKE_SOURCE_DIR}/src/components) + set(SNAPSHOT_TAG "$ENV{SNAPSHOT_TAG}") +-set(CMAKE_CXX_COMPILER $ENV{CMAKE_CXX_COMPILER}) +-set(CMAKE_C_COMPILER $ENV{CMAKE_C_COMPILER}) ++#set(CMAKE_CXX_COMPILER $ENV{CMAKE_CXX_COMPILER}) ++#set(CMAKE_C_COMPILER $ENV{CMAKE_C_COMPILER}) + set(BUILDDIR "$ENV{BUILDDIR}") + + if (ARCH_TYPE_OPTION) +@@ -192,7 +192,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") + set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}) + set(ARCHIVE_OUTPUT_DIRECTORY ./bin) + +-set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++0x -Wall -Werror -Wno-deprecated-declarations -Wuninitialized -Wvla") ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=gnu++0x -Wall -Werror -Wno-deprecated-declarations -Wuninitialized -Wvla") + + if (USE_GOLD_LD) + execute_process(COMMAND ld -v OUTPUT_VARIABLE result) +diff --git a/src/components/functional_module/CMakeLists.txt b/src/components/functional_module/CMakeLists.txt +index 07db91f..f5b89e0 100644 +--- a/src/components/functional_module/CMakeLists.txt ++++ b/src/components/functional_module/CMakeLists.txt +@@ -4,7 +4,7 @@ else() + set(GCOV_FLAGS "") + endif() + +-set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++0x -Wno-deprecated-declarations -Wall -Werror ${GCOV_FLAGS}") ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=gnu++0x -Wno-deprecated-declarations -Wall -Werror ${GCOV_FLAGS}") + + if (CMAKE_BUILD_TYPE) + if (${CMAKE_BUILD_TYPE} STREQUAL "Release") +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0002-Use-the-default-install-prefix-of-cmake.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0002-Use-the-default-install-prefix-of-cmake.patch new file mode 100644 index 00000000..6384ae1c --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0002-Use-the-default-install-prefix-of-cmake.patch @@ -0,0 +1,32 @@ +From 91d7636467b6bb73ed843c16c35da63455872446 Mon Sep 17 00:00:00 2001 +From: Phong Tran <tranmanphong@gmail.com> +Date: Sun, 17 Jul 2016 08:41:03 +0700 +Subject: [PATCH 02/10] Use the default install prefix of cmake + +It's better to use the oe cmake install prefix instead of +the current value. This is for avoiding the wrong +installation path while do_install(). + +Signed-off-by: Phong Tran <tranmanphong@gmail.com> + +%% original patch: 0002-Use-the-default-install-prefix-of-cmake.patch +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f1dc97a..732b601 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -189,7 +189,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") + + # Please do not change compiler/linker flags if You do not know how particular + # flag is handled by CMake +-set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}) ++# set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}) + set(ARCHIVE_OUTPUT_DIRECTORY ./bin) + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=gnu++0x -Wall -Werror -Wno-deprecated-declarations -Wuninitialized -Wvla") +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0003-disable-building-sdl-tools.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0003-disable-building-sdl-tools.patch new file mode 100644 index 00000000..b35ff2f4 --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0003-disable-building-sdl-tools.patch @@ -0,0 +1,32 @@ +From ee30bad65787f1e86f9cb83538ef2b85f2125de5 Mon Sep 17 00:00:00 2001 +From: Phong Tran <tranmanphong@gmail.com> +Date: Sun, 17 Jul 2016 12:25:52 +0700 +Subject: [PATCH 03/10] disable building sdl tools + +There is an issue of do_install(). The tools are shipped +to the wrong location.BTW There may not use of intergen now. + +Signed-off-by: Phong Tran <tranmanphong@gmail.com> + +%% original patch: 0003-disable-building-sdl-tools.patch +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 732b601..55cd32e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -408,7 +408,8 @@ endif() + add_subdirectory(./src/3rd_party-static) + + # --- Tools +-add_subdirectory(./tools) ++# inactive building tools now ++#add_subdirectory(./tools) + + # --- Components + add_subdirectory(./src/components) +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0004-Change-to-use-standard-libdir.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0004-Change-to-use-standard-libdir.patch new file mode 100644 index 00000000..0ec53702 --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0004-Change-to-use-standard-libdir.patch @@ -0,0 +1,93 @@ +From 855e1548269d830b07962a72fa17100193de35f3 Mon Sep 17 00:00:00 2001 +From: Phong Tran <tranmanphong@gmail.com> +Date: Sun, 17 Jul 2016 14:03:13 +0700 +Subject: [PATCH 04/10] Change to use standard libdir + +The lib*.so should be in /usr/lib path. + +Signed-off-by: Phong Tran <tranmanphong@gmail.com> + +%% original patch: 0004-Change-to-use-standard-libdir.patch +--- + src/components/policy/policy_external/CMakeLists.txt | 4 ++-- + src/components/policy/policy_regular/CMakeLists.txt | 2 +- + src/components/remote_control/CMakeLists.txt | 2 +- + src/components/utils/CMakeLists.txt | 2 +- + src/plugins/appenders/CMakeLists.txt | 2 +- + 5 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/components/policy/policy_external/CMakeLists.txt b/src/components/policy/policy_external/CMakeLists.txt +index 8d04f20..7a421be 100644 +--- a/src/components/policy/policy_external/CMakeLists.txt ++++ b/src/components/policy/policy_external/CMakeLists.txt +@@ -30,7 +30,7 @@ + + # --- Policy + set(target Policy) +-set(install_destination bin) ++set(install_destination ${CMAKE_INSTALL_LIBDIR}) + set(copy_destination ${CMAKE_BINARY_DIR}/src/appMain) + set(library_name ${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX}) + +@@ -92,7 +92,7 @@ add_custom_target(copy_library_${target} ALL + COMMENT "Copying library ${library_name}") + + install(TARGETS ${target} +- DESTINATION ${install_destination} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE +diff --git a/src/components/policy/policy_regular/CMakeLists.txt b/src/components/policy/policy_regular/CMakeLists.txt +index c7b9c06..61ddecb 100644 +--- a/src/components/policy/policy_regular/CMakeLists.txt ++++ b/src/components/policy/policy_regular/CMakeLists.txt +@@ -102,7 +102,7 @@ endif() + + set(LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}Policy${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(TARGET_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}) +-set(INSTALL_DESTINATION bin) ++set(INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}) + set(COPY_DESTINATION ${CMAKE_BINARY_DIR}/src/appMain) + + add_custom_target(copy_policy_library ALL +diff --git a/src/components/remote_control/CMakeLists.txt b/src/components/remote_control/CMakeLists.txt +index a320273..c1d2c51 100644 +--- a/src/components/remote_control/CMakeLists.txt ++++ b/src/components/remote_control/CMakeLists.txt +@@ -1,5 +1,5 @@ + set(target "RemoteControlModule") +-set(install_destination ${CMAKE_BINARY_DIR}/bin/plugins) ++set(install_destination ${CMAKE_INSTALL_LIBDIR}) + if (ENABLE_GCOV) + set(GCOV_FLAGS "-ftest-coverage -fprofile-arcs") + else() +diff --git a/src/components/utils/CMakeLists.txt b/src/components/utils/CMakeLists.txt +index 51835c1..abb4cd7 100644 +--- a/src/components/utils/CMakeLists.txt ++++ b/src/components/utils/CMakeLists.txt +@@ -124,7 +124,7 @@ if(BUILD_TESTS) + endif() + + install(TARGETS "Utils" +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} + PERMISSIONS + OWNER_READ OWNER_WRITE + GROUP_READ +diff --git a/src/plugins/appenders/CMakeLists.txt b/src/plugins/appenders/CMakeLists.txt +index 3d18e62..4c39f8b 100644 +--- a/src/plugins/appenders/CMakeLists.txt ++++ b/src/plugins/appenders/CMakeLists.txt +@@ -46,7 +46,7 @@ target_link_libraries(appenders ${LIBRARIES}) + add_dependencies(appenders install-3rd_party_logger) + + install(TARGETS appenders +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} + PERMISSIONS + OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch new file mode 100644 index 00000000..75d43906 --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch @@ -0,0 +1,36 @@ +From 570405af8e5c874db1852bdfb333ec0c941093ac Mon Sep 17 00:00:00 2001 +From: Phong Tran <tranmanphong@gmail.com> +Date: Sun, 12 Feb 2017 16:54:48 +0700 +Subject: [PATCH 05/10] add env for log4cxx properties path + +Add the env variable SDL_LOG4CXX_PROPERTIES_FILE +to indicate the path of log4cxx configure file. + +%% original patch: 0005-add-env-for-log4cxx-properties-path.patch +--- + src/appMain/main.cc | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/appMain/main.cc b/src/appMain/main.cc +index feb5b58..08e65f7 100644 +--- a/src/appMain/main.cc ++++ b/src/appMain/main.cc +@@ -112,8 +112,13 @@ int32_t main(int32_t argc, char** argv) { + + // -------------------------------------------------------------------------- + // Logger initialization +- INIT_LOGGER("log4cxx.properties", profile_instance.logs_enabled()); +- ++ const char* log4cxx_path = getenv("SDL_LOG4CXX_PROPERTIES_FILE"); ++ if (!log4cxx_path) { ++ INIT_LOGGER("log4cxx.properties", profile_instance.logs_enabled()); ++ } else { ++ std::string log4cxx_properties = std::string(log4cxx_path); ++ INIT_LOGGER(log4cxx_properties, profile_instance.logs_enabled()); ++ } + threads::Thread::SetNameForId(threads::Thread::CurrentId(), "MainThread"); + + if (!utils::appenders_loader.Loaded()) { +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0006-Install-the-configure-file-to-sysconf-dir.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0006-Install-the-configure-file-to-sysconf-dir.patch new file mode 100644 index 00000000..0dd00ebf --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0006-Install-the-configure-file-to-sysconf-dir.patch @@ -0,0 +1,59 @@ +From ca30ea45d91b9ec15ea456ce4492575bee571c56 Mon Sep 17 00:00:00 2001 +From: Phong Tran <tranmanphong@gmail.com> +Date: Tue, 19 Dec 2017 23:43:56 +0700 +Subject: [PATCH 06/10] Install the configure file to sysconf dir + +Use CMAKE_INSTALL_SYSCONFDIR for sdl configure files. + +%% original patch: 0006-Install-the-configure-file-to-sysconf-dir.patch +--- + src/appMain/CMakeLists.txt | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt +index 5148676..f6d8093 100644 +--- a/src/appMain/CMakeLists.txt ++++ b/src/appMain/CMakeLists.txt +@@ -155,15 +155,15 @@ target_link_libraries(${PROJECT} ${LIBRARIES}) + + add_dependencies(${PROJECT} Policy) + +-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/audio.8bit.wav DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/hmi_capabilities.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/sample_policy_manager.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/start.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/start_external_proprietary.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink COMPONENT config) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/audio.8bit.wav DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink COMPONENT config) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test.txt DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink COMPONENT config) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink COMPONENT config) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hmi_capabilities.json DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink COMPONENT config) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/sdl_preloaded_pt.json DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink COMPONENT config) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/sample_policy_manager.py DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink COMPONENT config) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/start.sh DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink COMPONENT config) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/start_external_proprietary.sh DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink COMPONENT config) + if (CMAKE_SYSTEM_NAME STREQUAL "QNX") + file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/init_policy.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + endif () +@@ -215,12 +215,12 @@ install( + FILES log4cxx.properties audio.8bit.wav test.txt smartDeviceLink.ini + hmi_capabilities.json sdl_preloaded_pt.json sample_policy_manager.py + ${CMAKE_SOURCE_DIR}/mycert.pem ${CMAKE_SOURCE_DIR}/mykey.pem +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink + ) + + install( + FILES sdl_preloaded_pt.json +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/smartdevicelink + ) + + if (${QT_HMI}) +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0007-Add-standard-usr-lib-path-to-rpath.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0007-Add-standard-usr-lib-path-to-rpath.patch new file mode 100644 index 00000000..38de64a6 --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0007-Add-standard-usr-lib-path-to-rpath.patch @@ -0,0 +1,27 @@ +From e25165f41748b2f05b2a28f4a64682ac71801c33 Mon Sep 17 00:00:00 2001 +From: Phong Tran <tranmanphong@gmail.com> +Date: Thu, 21 Dec 2017 23:49:53 +0700 +Subject: [PATCH 07/10] Add standard /usr/lib path to rpath + +Signed-off-by: Phong Tran <tranmanphong@gmail.com> + +%% original patch: 0007-Add-standard-usr-lib-path-to-rpath.patch +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55cd32e..e207923 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -383,6 +383,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "QNX") + endif() + + SET(RPATH_DIRECTORIES ++ ${CMAKE_INSTALL_LIBDIR} + ${CMAKE_INSTALL_PREFIX}/bin/plugins + /usr/local/lib + /usr/local +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0008-Unbreak-build-when-BUILD_BT_SUPPORT-OFF.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0008-Unbreak-build-when-BUILD_BT_SUPPORT-OFF.patch new file mode 100644 index 00000000..12267d60 --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0008-Unbreak-build-when-BUILD_BT_SUPPORT-OFF.patch @@ -0,0 +1,35 @@ +From 626676fab6a98041d1da32872df0fe79103705da Mon Sep 17 00:00:00 2001 +From: Matt Hoosier <matt.hoosier@garmin.com> +Date: Wed, 18 Apr 2018 11:48:30 -0500 +Subject: [PATCH 08/10] Unbreak build when BUILD_BT_SUPPORT=OFF + +Fixes a logic error in computing source-exclusion lists. + +%% original patch: 0001-Unbreak-build-when-BUILD_BT_SUPPORT-OFF.patch +--- + src/components/transport_manager/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/components/transport_manager/CMakeLists.txt b/src/components/transport_manager/CMakeLists.txt +index 4fa2243..c31cb2b 100644 +--- a/src/components/transport_manager/CMakeLists.txt ++++ b/src/components/transport_manager/CMakeLists.txt +@@ -68,13 +68,13 @@ endif() + + if(BUILD_USB_SUPPORT) + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") +- set(EXCLUDE_PATHS ++ list(APPEND EXCLUDE_PATHS + ${COMPONENTS_DIR}/transport_manager/include/transport_manager/usb/qnx + ${COMPONENTS_DIR}/transport_manager/src/usb/qnx + ) + + elseif(CMAKE_SYSTEM_NAME STREQUAL "QNX") +- set(EXCLUDE_PATHS ++ list(APPEND EXCLUDE_PATHS + ${COMPONENTS_DIR}/transport_manager/include/transport_manager/usb/libusb + ${COMPONENTS_DIR}/transport_manager/src/usb/libusb + ) +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0009-Function-GetDataOnSessionKey-cannot-be-overloade.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0009-Function-GetDataOnSessionKey-cannot-be-overloade.patch new file mode 100644 index 00000000..1876fe1a --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0009-Function-GetDataOnSessionKey-cannot-be-overloade.patch @@ -0,0 +1,119 @@ +From ca7f596bf905f491f4984ae9afc98da055eaa08f Mon Sep 17 00:00:00 2001 +From: Phong Tran <tranmanphong@gmail.com> +Date: Sat, 9 Jun 2018 23:09:28 +0700 +Subject: [PATCH 09/10] Function GetDataOnSessionKey cannot be overloade + +Temp solution for +https://github.com/smartdevicelink/sdl_core/issues/2137 +comment of @shoamano83 + +Signed-off-by: Phong Tran <tranmanphong@gmail.com> +--- + .../include/connection_handler/connection_handler_impl.h | 14 -------------- + .../connection_handler/src/connection_handler_impl.cc | 12 ------------ + .../include/connection_handler/connection_handler.h | 15 --------------- + .../include/protocol_handler/session_observer.h | 14 -------------- + 4 files changed, 55 deletions(-) + +diff --git a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h +index 66b2d7c..e270d9f 100644 +--- a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h ++++ b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h +@@ -503,20 +503,6 @@ class ConnectionHandlerImpl + std::list<int32_t>* sessions_list, + connection_handler::DeviceHandle* device_id) const OVERRIDE; + +- /** +- * DEPRECATED +- * \brief information about given Connection Key. +- * \param key Unique key used by other components as session identifier +- * \param app_id Returned: ApplicationID +- * \param sessions_list Returned: List of session keys +- * \param device_id Returned: DeviceID +- * \return int32_t -1 in case of error or 0 in case of success +- */ +- int32_t GetDataOnSessionKey(uint32_t key, +- uint32_t* app_id, +- std::list<int32_t>* sessions_list, +- uint32_t* device_id) const OVERRIDE; +- + const ConnectionHandlerSettings& get_settings() const OVERRIDE; + + const protocol_handler::SessionObserver& get_session_observer(); +diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc +index 5b26304..a9809c5 100644 +--- a/src/components/connection_handler/src/connection_handler_impl.cc ++++ b/src/components/connection_handler/src/connection_handler_impl.cc +@@ -716,18 +716,6 @@ int32_t ConnectionHandlerImpl::GetDataOnSessionKey( + return 0; + } + +-int32_t ConnectionHandlerImpl::GetDataOnSessionKey( +- uint32_t key, +- uint32_t* app_id, +- std::list<int32_t>* sessions_list, +- uint32_t* device_id) const { +- LOG4CXX_AUTO_TRACE(logger_); +- DeviceHandle handle; +- int32_t result = GetDataOnSessionKey(key, app_id, sessions_list, &handle); +- *device_id = static_cast<uint32_t>(handle); +- return result; +-} +- + const ConnectionHandlerSettings& ConnectionHandlerImpl::get_settings() const { + return settings_; + } +diff --git a/src/components/include/connection_handler/connection_handler.h b/src/components/include/connection_handler/connection_handler.h +index 1fcf5e4..352f886 100644 +--- a/src/components/include/connection_handler/connection_handler.h ++++ b/src/components/include/connection_handler/connection_handler.h +@@ -183,21 +183,6 @@ class ConnectionHandler { + connection_handler::DeviceHandle* device_id) const = 0; + + /** +- * DEPRECATED +- * \brief information about given Connection Key. +- * \param key Unique key used by other components as session identifier +- * \param app_id Returned: ApplicationID +- * \param sessions_list Returned: List of session keys +- * \param device_id Returned: DeviceID +- * \return int32_t -1 in case of error or 0 in case of success +- */ +- DEPRECATED virtual int32_t GetDataOnSessionKey( +- uint32_t key, +- uint32_t* app_id, +- std::list<int32_t>* sessions_list, +- uint32_t* device_id) const = 0; +- +- /** + * @brief GetConnectedDevicesMAC allows to obtain MAC adresses for all + * currently connected devices. + * +diff --git a/src/components/include/protocol_handler/session_observer.h b/src/components/include/protocol_handler/session_observer.h +index 3482c65..7e87b6f 100644 +--- a/src/components/include/protocol_handler/session_observer.h ++++ b/src/components/include/protocol_handler/session_observer.h +@@ -231,20 +231,6 @@ class SessionObserver { + uint8_t* sessionId) const = 0; + + /** +- * DEPRECATED +- * \brief information about given Connection Key. +- * \param key Unique key used by other components as session identifier +- * \param app_id Returned: ApplicationID +- * \param sessions_list Returned: List of session keys +- * \param device_id Returned: DeviceID +- * \return int32_t -1 in case of error or 0 in case of success +- */ +- virtual int32_t GetDataOnSessionKey(uint32_t key, +- uint32_t* app_id, +- std::list<int32_t>* sessions_list, +- uint32_t* device_id) const = 0; +- +- /** + * \brief information about given Connection Key. + * \param key Unique key used by other components as session identifier + * \param app_id Returned: ApplicationID +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0010-fix-error-of-WriteHandshakeData-return-value.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0010-fix-error-of-WriteHandshakeData-return-value.patch new file mode 100644 index 00000000..fbae8340 --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0010-fix-error-of-WriteHandshakeData-return-value.patch @@ -0,0 +1,26 @@ +From 085f26f304a0065ddeeb87b4b3ee977029c609b8 Mon Sep 17 00:00:00 2001 +From: Phong Tran <tranmanphong@gmail.com> +Date: Sat, 9 Jun 2018 23:29:26 +0700 +Subject: [PATCH 10/10] fix error of WriteHandshakeData return value + +Signed-off-by: Phong Tran <tranmanphong@gmail.com> +--- + src/components/security_manager/src/ssl_context_impl.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/components/security_manager/src/ssl_context_impl.cc b/src/components/security_manager/src/ssl_context_impl.cc +index 5be5ff8..0b30198 100644 +--- a/src/components/security_manager/src/ssl_context_impl.cc ++++ b/src/components/security_manager/src/ssl_context_impl.cc +@@ -280,7 +280,7 @@ bool CryptoManagerImpl::SSLContextImpl::WriteHandshakeData( + if (ret <= 0) { + is_handshake_pending_ = false; + ResetConnection(); +- return Handshake_Result_AbnormalFail; ++ return false; + } + } + return true; +-- +2.7.4 + diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/smartdevicelink.service b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/smartdevicelink.service new file mode 100644 index 00000000..40b308a4 --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/smartdevicelink.service @@ -0,0 +1,14 @@ +[Unit] +Description=Smart Device Link Core +After=bluetooth.service +Requires=bluetooth.service + +[Service] +Environment="SDL_LOG4CXX_PROPERTIES_FILE=/etc/smartdevicelink/log4cxx.properties" +StandardOutput=journal +StandardError=journal +ExecStart=/usr/bin/smartDeviceLinkCore /etc/smartdevicelink/smartDeviceLink.ini +ExecStop=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core_4.5.0.bb b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core_4.5.0.bb new file mode 100644 index 00000000..331e8917 --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core_4.5.0.bb @@ -0,0 +1,112 @@ +SUMMARY = "SmartDeviceLink In-Vehicle Software" +DESCRIPTION = "SmartDeviceLink (SDL) is a standard set of protocols and messages \ + that connect applications on a smartphone to a vehicle head unit." +HOMEPAGE = "https://www.smartdevicelink.com" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=ecc58617265863ee517caa91580a143d \ + file://src/3rd_party/expat-2.1.0/COPYING;md5=1b71f681713d1256e1c23b0890920874 \ + file://src/3rd_party/apr-1.5.0/LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \ + file://src/3rd_party/apr-util-1.5.3/LICENSE;md5=519e0a18e03f7c023070568c14b077bb \ + file://src/3rd_party/apr-util-1.5.3/xml/expat/COPYING;md5=7eface865f327188f814c549d44684ad \ + file://src/3rd_party/apache-log4cxx-0.10.0/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://src/3rd_party/apache-log4cxx-0.10.0/site/license.html;md5=09f755b54444a1e59e367ec2437c913c \ + file://src/3rd_party/apache-log4cxx-0.10.0/src/site/doxy/license_notice_footer.txt;md5=00fdad7c9ef761c3dc041b274b267018 \ + file://src/3rd_party-static/jsoncpp/LICENSE;md5=c56ee55c03a55f8105b969d8270632ce \ + file://src/3rd_party-static/jsoncpp/devtools/licenseupdater.py;md5=a85f07940cf61377c9a02202a0ec4480 \ + file://src/3rd_party-static/gmock-1.7.0/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ + file://src/3rd_party-static/gmock-1.7.0/scripts/generator/LICENSE;md5=2c0b90db7465231447cf2dd2e8163333 \ + file://src/3rd_party-static/gmock-1.7.0/gtest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a" + +SRC_URI = "git://github.com/smartdevicelink/sdl_core.git;branch=master" + +SRC_URI += " \ + file://0001-add-the-default-cmake-cxx-flag-for-oe.patch \ + file://0002-Use-the-default-install-prefix-of-cmake.patch \ + file://0003-disable-building-sdl-tools.patch \ + file://0004-Change-to-use-standard-libdir.patch \ + file://0005-add-env-for-log4cxx-properties-path.patch \ + file://0006-Install-the-configure-file-to-sysconf-dir.patch \ + file://0007-Add-standard-usr-lib-path-to-rpath.patch \ + file://0008-Unbreak-build-when-BUILD_BT_SUPPORT-OFF.patch \ + file://0009-Function-GetDataOnSessionKey-cannot-be-overloade.patch \ + file://0010-fix-error-of-WriteHandshakeData-return-value.patch \ + file://smartdevicelink.service \ +" + +PV = "4.5.1" +SRCREV = "7f7fcbb998fb17f2954fd103349af67ea9b71a3f" + +S = "${WORKDIR}/git" + +inherit cmake pythonnative systemd + +# The Bluetooth support in the source code is written in terms of Bluez and Pulseaudio. So both must +# be enabled in the distribution for the option to be activated. +PACKAGECONFIG_BLUETOOTH ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth pulseaudio', 'bluez5', '', d)}" + +# The extended media support uses Pulseaudio +PACKAGECONFIG_PULSEAUDIO ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}" + +PACKAGECONFIG ??= "${PACKAGECONFIG_BLUETOOTH} ${PACKAGECONFIG_PULSEAUDIO}" + +PACKAGECONFIG[bluez5] = "-DBUILD_BT_SUPPORT=ON,-DBUILD_BT_SUPPORT=OFF,bluez5 pulseaudio,pulseaudio-module-bluetooth-discover pulseaudio-module-bluetooth-policy pulseaudio-module-switch-on-connect pulseaudio-module-bluez5-discover pulseaudio-module-bluez5-device bluez-tools" + +PACKAGECONFIG[pulseaudio] = "-DEXTENDED_MEDIA_MODE=ON,-DEXTENDED_MEDIA_MODE=OFF,pulseaudio,pulseaudio-module-alsa-sink" + +DEPENDS += "avahi glib-2.0 sqlite3 log4cxx dbus openssl libusb1 bson-c-lib" +DEPENDS += "gstreamer1.0 gstreamer1.0-plugins-good" +DEPENDS += "gstreamer1.0-rtsp-server" +DEPENDS += "boost" + +export THIRD_PARTY_INSTALL_PREFIX="${STAGING_DIR_TARGET}" +export GSTREAMER_DIR="${STAGING_LIBDIR}/gstreamer-1.0" +EXTRA_OECMAKE += "-DNO_REBUILD_3RD_PARTY=ON" +EXTRA_OECMAKE += "-DUSE_CCACHE=OFF" +EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo" +EXTRA_OECMAKE += "-DUSE_GOLD_LD=OFF" +#FixMe: current with thud openssl 1.1.1. some interfaces were changed disable security... +EXTRA_OECMAKE += "-DENABLE_SECURITY=OFF" + +cmake_do_generate_toolchain_file_append() { + cat >> ${WORKDIR}/toolchain.cmake <<EOF +set( CMAKE_SYSTEM_PROCESSOR ${HOST_SYS} ) +EOF +} + +do_install_append() { + sed -i -e 's:AppConfigFolder =:AppConfigFolder = /etc/smartdevicelink/:g' \ + ${D}/${sysconfdir}/smartdevicelink/smartDeviceLink.ini + sed -i -e 's:SmartDeviceLinkCore.log:/var/log/smartdevicelink/SmartDeviceLinkCore.log:g' \ + -e 's:TransportManager.log:/var/log/smartdevicelink/TransportManager.log:g' \ + -e 's:ProtocolFordHandling.log:/var/log/smartdevicelink/ProtocolFordHandling.log:g' \ + ${D}/${sysconfdir}/smartdevicelink/log4cxx.properties + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 644 ${WORKDIR}/smartdevicelink.service ${D}${systemd_unitdir}/system/smartdevicelink.service + + if ${@bb.utils.contains('PACKAGECONFIG', 'bluez5', 'false', 'true', d)}; then + sed -i -e '/Requires=bluetooth.service/d' \ + -e '/After=bluetooth.service/d' \ + ${D}${systemd_unitdir}/system/smartdevicelink.service + fi + fi +} + +SYSTEMD_SERVICE_${PN} = "smartdevicelink.service" + +RDEPENDS_${PN} += " bash" + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ + ${PN}-staticdev \ + ${PN}-dbg \ +" + +FILES_${PN}_append = " \ + ${libdir}/lib*.so \ +" + +INSANE_SKIP_${PN} = "dev-so" diff --git a/external/meta-sdl/recipes-automotive/sdl-generic-hmi/sdl-generic-hmi_git.bb b/external/meta-sdl/recipes-automotive/sdl-generic-hmi/sdl-generic-hmi_git.bb new file mode 100644 index 00000000..bac1740e --- /dev/null +++ b/external/meta-sdl/recipes-automotive/sdl-generic-hmi/sdl-generic-hmi_git.bb @@ -0,0 +1,34 @@ +SUMMARY = "HTML based reference HMI for SmartDeviceLink" +DESCRIPTION = "SmartDeviceLink (SDL) is a standard set of protocols and \ +messages that connect applications on a smartphone to a vehicle head \ +unit." +HOMEPAGE = "https://www.smartdevicelink.com" +SECTION = "app" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=cf455e8d39d2ded1d85b1c5dea6ec3c5" + +SRC_URI = "git://github.com/smartdevicelink/generic_hmi.git;branch=develop" + +PV = "0.0.0+git${SRCPV}" +SRCREV = "8d05d53d228d1dec82b78af824e33a0de5697e0c" + +S = "${WORKDIR}/git" + +PACKAGES = " \ + ${PN} \ +" + +FILES_${PN}_append = " \ + ${datadir}/smartdevicelink/generic_hmi/ \ +" + +do_install() { + install -d ${D}${datadir}/smartdevicelink/generic_hmi + install -m 0644 ${S}/index.html ${D}${datadir}/smartdevicelink/generic_hmi/ + install -d ${D}${datadir}/smartdevicelink/generic_hmi/build + install -m 0644 ${S}/build/* ${D}${datadir}/smartdevicelink/generic_hmi/build + install -d ${D}${datadir}/smartdevicelink/generic_hmi/fonts + install -m 0644 ${S}/fonts/* ${D}${datadir}/smartdevicelink/generic_hmi/fonts +} + diff --git a/external/meta-sdl/recipes-connectivity/bluez-tools/bluez-tools_git.bb b/external/meta-sdl/recipes-connectivity/bluez-tools/bluez-tools_git.bb new file mode 100644 index 00000000..deead03d --- /dev/null +++ b/external/meta-sdl/recipes-connectivity/bluez-tools/bluez-tools_git.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Bluez Tools" +HOMEPAGE = "http://code.google.com/p/bluez-tools/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" + +RDEPENDS_${PN} = "bluez5" +DEPENDS = "glib-2.0 dbus-glib readline" + +PV = "0.2.0+git${SRCPV}" +PR = "r3" + +SRCREV = "97efd293491ad7ec96a655665339908f2478b3d1" + +S = "${WORKDIR}/git" + +SRC_URI = "git://github.com/khvzak/bluez-tools.git;protocol=git" + +inherit autotools pkgconfig + +EXTRA_AUTORECONF_append = " -I ${STAGING_DATADIR}/aclocal" diff --git a/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/0001-LOGCXX-413-doesn-t-compile-on-openembedded-thanks-to.patch b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/0001-LOGCXX-413-doesn-t-compile-on-openembedded-thanks-to.patch new file mode 100644 index 00000000..38acb604 --- /dev/null +++ b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/0001-LOGCXX-413-doesn-t-compile-on-openembedded-thanks-to.patch @@ -0,0 +1,61 @@ +From 4120267758d6fd7cc11560773b02fe53a3b211a0 Mon Sep 17 00:00:00 2001 +From: Christian Grobmeier <grobmeier@apache.org> +Date: Wed, 7 Aug 2013 05:24:54 +0000 +Subject: [PATCH] LOGCXX-413: doesn't compile on openembedded, thanks to Alex + Zbarcea + +git-svn-id: https://svn.apache.org/repos/asf/logging/log4cxx/trunk@1511175 13f79535-47bb-0310-9956-ffa450edef68 +(cherry picked from commit 3faaf9a4e4a00e70fc973a3afd8997bf96859682) + +Conflicts: + src/changes/changes.xml +--- + src/changes/changes.xml | 1 + + src/main/include/log4cxx/Makefile.am | 2 +- + src/main/include/log4cxx/private/Makefile.am | 6 +----- + 3 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/changes/changes.xml b/src/changes/changes.xml +index 7faa62b..8a133b5 100644 +--- a/src/changes/changes.xml ++++ b/src/changes/changes.xml +@@ -227,6 +227,7 @@ + <action issue="LOGCXX-257">ServerSocket::accept hangs on Unix</action> + <action issue="LOGCXX-258">unable to build from make dist package due to missing doxygen file</action> + <action issue="LOGCXX-259">Several appenders fail to compile in Visual Studio 2008</action> ++<action issue="LOGCXX-413">log4cxx doesn't compile on openembedded (due to Alex Zbarcea)</action> + </release> + <release version="0.9.7" date="2004-05-10"> + <action type="fix">Fixed examples source code in the "Short introduction to log4cxx".</action> +diff --git a/src/main/include/log4cxx/Makefile.am b/src/main/include/log4cxx/Makefile.am +index 719c2dd..53e99b0 100644 +--- a/src/main/include/log4cxx/Makefile.am ++++ b/src/main/include/log4cxx/Makefile.am +@@ -15,7 +15,7 @@ + # + SUBDIRS = helpers net nt rolling spi varia xml config db private pattern filter + log4cxxincdir = $(includedir)/log4cxx +-log4cxxinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/*.h log4cxx.h ++log4cxxinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/*.h + DISTCLEANFILES = log4cxx.h + EXTRA_DIST = log4cxx.hw + +diff --git a/src/main/include/log4cxx/private/Makefile.am b/src/main/include/log4cxx/private/Makefile.am +index 3a896ea..8fb5448 100644 +--- a/src/main/include/log4cxx/private/Makefile.am ++++ b/src/main/include/log4cxx/private/Makefile.am +@@ -14,10 +14,6 @@ + # limitations under the License. + # + privateincdir = $(includedir)/log4cxx/private +-privateinc_HEADERS= $(top_builddir)/src/main/include/log4cxx/private/*.h log4cxx_private.h +-DISTCLEANFILES = log4cxx_private.h ++privateinc_HEADERS = log4cxx_private.h + EXTRA_DIST = log4cxx_private.hw + +-dist-hook: +- -rm -f $(distdir)/log4cxx_private.h +- +-- +1.9.1 + diff --git a/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/0002-LOGCXX-414-possibly-wrong-use-of-autotools-docdir-th.patch b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/0002-LOGCXX-414-possibly-wrong-use-of-autotools-docdir-th.patch new file mode 100644 index 00000000..2c7a7090 --- /dev/null +++ b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/0002-LOGCXX-414-possibly-wrong-use-of-autotools-docdir-th.patch @@ -0,0 +1,53 @@ +From f50ec1be4210877925d6a7105f5a258e2f732616 Mon Sep 17 00:00:00 2001 +From: Christian Grobmeier <grobmeier@apache.org> +Date: Wed, 7 Aug 2013 05:27:14 +0000 +Subject: [PATCH 2/2] LOGCXX-414: possibly wrong use of autotools docdir, + thanks to Alex Zbarcea + +git-svn-id: https://svn.apache.org/repos/asf/logging/log4cxx/trunk@1511176 13f79535-47bb-0310-9956-ffa450edef68 +(cherry picked from commit 34e2b302a5be1a106d7d565da0944c53aad4fd21) + +Conflicts: + src/changes/changes.xml +--- + src/changes/changes.xml | 1 + + src/site/doxy/Makefile.am | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/changes/changes.xml b/src/changes/changes.xml +index 8a133b5..c1e167b 100644 +--- a/src/changes/changes.xml ++++ b/src/changes/changes.xml +@@ -228,6 +228,7 @@ + <action issue="LOGCXX-258">unable to build from make dist package due to missing doxygen file</action> + <action issue="LOGCXX-259">Several appenders fail to compile in Visual Studio 2008</action> + <action issue="LOGCXX-413">log4cxx doesn't compile on openembedded (due to Alex Zbarcea)</action> ++<action issue="LOGCXX-414">possibly wrong use of autotools docdir (due to Alex Zbarcea)</action> + </release> + <release version="0.9.7" date="2004-05-10"> + <action type="fix">Fixed examples source code in the "Short introduction to log4cxx".</action> +diff --git a/src/site/doxy/Makefile.am b/src/site/doxy/Makefile.am +index 0c7293d..963c6fb 100644 +--- a/src/site/doxy/Makefile.am ++++ b/src/site/doxy/Makefile.am +@@ -20,7 +20,7 @@ EXTRA_DIST = Doxyfile mainpage.dox license_notice_footer.txt + + if DOC + +-htmldest = $(pkgdatadir)/html ++htmldest = $(docdir)/html + + install-data-hook: + $(mkinstalldirs) $(DESTDIR)$(htmldest) +@@ -40,7 +40,7 @@ pdf: @PACKAGE@.pdf + $(MAKE) -C ./latex pdf + ln -s ./latex/refman.ps @PACKAGE@.ps + ln -s ./latex/refman.pdf @PACKAGE@.pdf +- ++ + endif + + else +-- +1.9.1 + diff --git a/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/0003-Applied-patch-for-LOGCXX-400-LOGCXX-404-LOGCXX-402-L.patch b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/0003-Applied-patch-for-LOGCXX-400-LOGCXX-404-LOGCXX-402-L.patch new file mode 100644 index 00000000..ef13dd88 --- /dev/null +++ b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/0003-Applied-patch-for-LOGCXX-400-LOGCXX-404-LOGCXX-402-L.patch @@ -0,0 +1,179 @@ +From 5b75dfa78b2c5e95296cee0201bc045ef7264ed0 Mon Sep 17 00:00:00 2001 +From: Christian Grobmeier <grobmeier@apache.org> +Date: Tue, 27 Nov 2012 09:39:18 +0000 +Subject: [PATCH] Applied patch for LOGCXX-400 LOGCXX-404 LOGCXX-402 LOGCXX-403 + LOGCXX-401 thanks to Andrew Lazarus + +git-svn-id: https://svn.apache.org/repos/asf/logging/log4cxx/trunk@1414037 13f79535-47bb-0310-9956-ffa450edef68 +--- + pom.xml | 2 ++ + src/main/cpp/locationinfo.cpp | 4 ++-- + src/main/cpp/loggingevent.cpp | 2 +- + src/main/cpp/ndc.cpp | 4 ++-- + src/main/cpp/objectoutputstream.cpp | 4 ++-- + src/main/cpp/transcoder.cpp | 2 +- + src/main/include/log4cxx/helpers/object.h | 6 +++--- + src/main/include/log4cxx/helpers/simpledateformat.h | 4 +++- + src/main/include/log4cxx/logstring.h | 2 +- + 9 files changed, 17 insertions(+), 13 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 3504c8a3..255907bd 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -55,6 +55,7 @@ + </organization> + <build> + <plugins> ++ <!-- + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> +@@ -166,6 +167,7 @@ + </dependency> + </dependencies> + </plugin> ++ --> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> +diff --git a/src/main/cpp/locationinfo.cpp b/src/main/cpp/locationinfo.cpp +index e76ea29c..1daa3a5f 100644 +--- a/src/main/cpp/locationinfo.cpp ++++ b/src/main/cpp/locationinfo.cpp +@@ -153,8 +153,8 @@ void LocationInfo::write(ObjectOutputStream& os, Pool& p) const { + 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C, + 0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69, + 0x2E, 0x4C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, +- 0x6E, 0x49, 0x6E, 0x66, 0x6F, 0xED, 0x99, 0xBB, +- 0xE1, 0x4A, 0x91, 0xA5, 0x7C, 0x02, 0x00, 0x01, ++ 0x6E, 0x49, 0x6E, 0x66, 0x6F, static_cast<char>(0xED), static_cast<char>(0x99), static_cast<char>(0xBB), ++ static_cast<char>(0xE1), 0x4A, static_cast<char>(0x91), static_cast<char>(0xA5), 0x7C, 0x02, 0x00, 0x01, + 0x4C, 0x00, 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49, + 0x6E, 0x66, 0x6F, + 0x74, 0x00, 0x12, 0x4C, 0x6A, +diff --git a/src/main/cpp/loggingevent.cpp b/src/main/cpp/loggingevent.cpp +index 1c0d4be7..edbf40b6 100644 +--- a/src/main/cpp/loggingevent.cpp ++++ b/src/main/cpp/loggingevent.cpp +@@ -242,7 +242,7 @@ void LoggingEvent::writeProlog(ObjectOutputStream& os, Pool& p) { + 0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A, + 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F, 0x67, + 0x67, 0x69, 0x6E, 0x67, 0x45, 0x76, 0x65, 0x6E, +- 0x74, 0xF3, 0xF2, 0xB9, 0x23, 0x74, 0x0B, 0xB5, ++ 0x74, static_cast<char>(0xF3), static_cast<char>(0xF2), static_cast<char>(0xB9), 0x23, 0x74, 0x0B, static_cast<char>(0xB5), + 0x3F, 0x03, 0x00, 0x0A, 0x5A, 0x00, 0x15, 0x6D, + 0x64, 0x63, 0x43, 0x6F, 0x70, 0x79, 0x4C, 0x6F, + 0x6F, 0x6B, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, +diff --git a/src/main/cpp/ndc.cpp b/src/main/cpp/ndc.cpp +index 4ab612dd..89788c16 100644 +--- a/src/main/cpp/ndc.cpp ++++ b/src/main/cpp/ndc.cpp +@@ -309,7 +309,7 @@ bool NDC::pop(CFStringRef& dst) + Stack& stack = data->getStack(); + if(!stack.empty()) + { +- dst = Transcoder::encode(stack.top().message); ++ dst = Transcoder::encode(getMessage(stack.top())); + stack.pop(); + data->recycle(); + return true; +@@ -326,7 +326,7 @@ bool NDC::peek(CFStringRef& dst) + Stack& stack = data->getStack(); + if(!stack.empty()) + { +- dst = Transcoder::encode(stack.top().message); ++ dst = Transcoder::encode(getMessage(stack.top())); + return true; + } + data->recycle(); +diff --git a/src/main/cpp/objectoutputstream.cpp b/src/main/cpp/objectoutputstream.cpp +index 7cd696b8..9567a856 100644 +--- a/src/main/cpp/objectoutputstream.cpp ++++ b/src/main/cpp/objectoutputstream.cpp +@@ -36,7 +36,7 @@ ObjectOutputStream::ObjectOutputStream(OutputStreamPtr outputStream, Pool& p) + objectHandle(0x7E0000), + classDescriptions(new ClassDescriptionMap()) + { +- char start[] = { 0xAC, 0xED, 0x00, 0x05 }; ++ char start[] = { static_cast<char>(0xAC), static_cast<char>(0xED), 0x00, 0x05 }; + ByteBuffer buf(start, sizeof(start)); + os->write(buf, p); + } +@@ -85,7 +85,7 @@ void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) { + 0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61, + 0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61, + 0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13, +- 0xBB, 0x0F, 0x25, 0x21, 0x4A, 0xE4, 0xB8, 0x03, ++ static_cast<char>(0xBB), 0x0F, 0x25, 0x21, 0x4A, static_cast<char>(0xE4), static_cast<char>(0xB8), 0x03, + 0x00, 0x02, 0x46, 0x00, 0x0A, 0x6C, 0x6F, 0x61, + 0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49, + 0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, +diff --git a/src/main/cpp/transcoder.cpp b/src/main/cpp/transcoder.cpp +index d572ffce..32bed844 100644 +--- a/src/main/cpp/transcoder.cpp ++++ b/src/main/cpp/transcoder.cpp +@@ -356,7 +356,7 @@ static void encodeUTF16(unsigned int sv, String& dst) { + unsigned char u = (unsigned char) (sv >> 16); + unsigned char w = (unsigned char) (u - 1); + unsigned short hs = (0xD800 + ((w & 0xF) << 6) + ((sv & 0xFFFF) >> 10)); +- unsigned short ls = (0xDC00 + (sv && 0x3FF)); ++ unsigned short ls = (0xDC00 + (sv & 0x3FF)); + dst.append(1, hs); + dst.append(1, ls); + } +diff --git a/src/main/include/log4cxx/helpers/object.h b/src/main/include/log4cxx/helpers/object.h +index 92d44c55..b9386c47 100644 +--- a/src/main/include/log4cxx/helpers/object.h ++++ b/src/main/include/log4cxx/helpers/object.h +@@ -61,8 +61,8 @@ static const helpers::Class& getStaticClass();\ + static const log4cxx::helpers::ClassRegistration& registerClass(); + + #define IMPLEMENT_LOG4CXX_OBJECT(object)\ +-const log4cxx::helpers::Class& object::getClass() const { return getStaticClass(); }\ +-const log4cxx::helpers::Class& object::getStaticClass() { \ ++const ::log4cxx::helpers::Class& object::getClass() const { return getStaticClass(); }\ ++const ::log4cxx::helpers::Class& object::getStaticClass() { \ + static Clazz##object theClass; \ + return theClass; \ + } \ +@@ -71,7 +71,7 @@ const log4cxx::helpers::ClassRegistration& object::registerClass() { \ + return classReg; \ + }\ + namespace log4cxx { namespace classes { \ +-const log4cxx::helpers::ClassRegistration& object##Registration = object::registerClass(); \ ++const ::log4cxx::helpers::ClassRegistration& object##Registration = object::registerClass(); \ + } } + + +diff --git a/src/main/include/log4cxx/helpers/simpledateformat.h b/src/main/include/log4cxx/helpers/simpledateformat.h +index 9c27f685..76fb784c 100644 +--- a/src/main/include/log4cxx/helpers/simpledateformat.h ++++ b/src/main/include/log4cxx/helpers/simpledateformat.h +@@ -29,7 +29,9 @@ + #include <vector> + #include <time.h> + +-namespace std { class locale; } ++#include <locale> ++ ++using std::locale; + + namespace log4cxx + { +diff --git a/src/main/include/log4cxx/logstring.h b/src/main/include/log4cxx/logstring.h +index 3bbcdf2d..19e8aec7 100644 +--- a/src/main/include/log4cxx/logstring.h ++++ b/src/main/include/log4cxx/logstring.h +@@ -27,7 +27,7 @@ + #include <string> + #include <log4cxx/log4cxx.h> + +-#if LOG4CXX_LOGCHAR_IS_WCHAR && LOG4CXX_LOGCHAR_IS_UTF8 && LOG4CXX_LOGCHAR_IS_UNICHAR ++#if (LOG4CXX_LOGCHAR_IS_WCHAR + LOG4CXX_LOGCHAR_IS_UTF8 + LOG4CXX_LOGCHAR_IS_UNICHAR)>1 + #error only one of LOG4CXX_LOGCHAR_IS_WCHAR, LOG4CXX_LOGCHAR_IS_UTF8 or LOG4CXX_LOGCHAR_IS_UNICHAR may be true + #endif + +-- +2.11.0 + diff --git a/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/svn-log4cxx-rev-1751050.patch b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/svn-log4cxx-rev-1751050.patch new file mode 100644 index 00000000..f92ac48f --- /dev/null +++ b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx/svn-log4cxx-rev-1751050.patch @@ -0,0 +1,365 @@ +diff --git a/src/test/cpp/xml/domtestcase.cpp b/src/test/cpp/xml/domtestcase.cpp +index a50062818..a1491c73e 100644 +--- a/src/test/cpp/xml/domtestcase.cpp ++++ b/src/test/cpp/xml/domtestcase.cpp +@@ -15,7 +15,6 @@ + * limitations under the License. + */ + +- + #include <log4cxx/logger.h> + #include <log4cxx/xml/domconfigurator.h> + #include "../logunit.h" +@@ -36,190 +35,186 @@ using namespace log4cxx; + using namespace log4cxx::helpers; + using namespace log4cxx::xml; + +- + #define TEST1_1A_PAT \ +- "(DEBUG|INFO |WARN |ERROR|FATAL) \\w*\\.\\w* - Message [0-9]" ++ "(DEBUG|INFO |WARN |ERROR|FATAL) \\w*\\.\\w* - Message [0-9]" + + #define TEST1_1B_PAT "(DEBUG|INFO |WARN |ERROR|FATAL) root - Message [0-9]" + + #define TEST1_2_PAT "^[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\} " \ +- "\\[0x[0-9A-F]*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message [0-9]" ++ "\\[0x[0-9A-F]*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message [0-9]" + + LOGUNIT_CLASS(DOMTestCase) + { +- LOGUNIT_TEST_SUITE(DOMTestCase); +- LOGUNIT_TEST(test1); ++ LOGUNIT_TEST_SUITE(DOMTestCase); ++ LOGUNIT_TEST(test1); + #if defined(_WIN32) +- LOGUNIT_TEST(test2); ++ LOGUNIT_TEST(test2); + #endif +- LOGUNIT_TEST(test3); +- LOGUNIT_TEST(test4); +- LOGUNIT_TEST_SUITE_END(); +- +- LoggerPtr root; +- LoggerPtr logger; +- +- static const File TEMP_A1; +- static const File TEMP_A2; +- static const File FILTERED_A1; +- static const File FILTERED_A2; +- static const File TEMP_A1_2; +- static const File TEMP_A2_2; +- static const File FILTERED_A1_2; +- static const File FILTERED_A2_2; ++ LOGUNIT_TEST(test3); ++ LOGUNIT_TEST(test4); ++ LOGUNIT_TEST_SUITE_END(); ++ ++ LoggerPtr root; ++ LoggerPtr logger; ++ ++ static const File TEMP_A1; ++ static const File TEMP_A2; ++ static const File FILTERED_A1; ++ static const File FILTERED_A2; ++ static const File TEMP_A1_2; ++ static const File TEMP_A2_2; ++ static const File FILTERED_A1_2; ++ static const File FILTERED_A2_2; + + public: +- void setUp() +- { +- root = Logger::getRootLogger(); +- logger = Logger::getLogger(LOG4CXX_TEST_STR("org.apache.log4j.xml.DOMTestCase")); +- } +- +- void tearDown() +- { +- root->getLoggerRepository()->resetConfiguration(); +- } +- +- +- void test1() { +- DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase1.xml")); +- common(); +- +- ControlFilter cf1; +- cf1 << TEST1_1A_PAT << TEST1_1B_PAT; +- +- ControlFilter cf2; +- cf2 << TEST1_2_PAT; +- +- ThreadFilter threadFilter; +- ISO8601Filter iso8601Filter; +- +- std::vector<Filter *> filters1; +- filters1.push_back(&cf1); +- +- std::vector<Filter *> filters2; +- filters2.push_back(&cf2); +- filters2.push_back(&threadFilter); +- filters2.push_back(&iso8601Filter); +- +- try +- { +- Transformer::transform(TEMP_A1, FILTERED_A1, filters1); +- Transformer::transform(TEMP_A2, FILTERED_A2, filters2); +- } +- catch(UnexpectedFormatException& e) +- { +- std::cout << "UnexpectedFormatException :" << e.what() << std::endl; +- throw; +- } +- +- const File witness1(LOG4CXX_TEST_STR("witness/dom.A1.1")); +- const File witness2(LOG4CXX_TEST_STR("witness/dom.A2.1")); +- // TODO: A1 doesn't contain duplicate entries +- // +- // LOGUNIT_ASSERT(Compare::compare(FILTERED_A1, witness1)); +- LOGUNIT_ASSERT(Compare::compare(FILTERED_A2, witness2)); +- } +- +- // +- // Same test but backslashes instead of forward +- // +- void test2() { +- DOMConfigurator::configure(LOG4CXX_TEST_STR("input\\xml\\DOMTestCase2.xml")); +- common(); +- +- ThreadFilter threadFilter; +- ISO8601Filter iso8601Filter; +- +- std::vector<Filter *> filters1; +- +- std::vector<Filter *> filters2; +- filters2.push_back(&threadFilter); +- filters2.push_back(&iso8601Filter); +- +- try +- { +- Transformer::transform(TEMP_A1_2, FILTERED_A1_2, filters1); +- Transformer::transform(TEMP_A2_2, FILTERED_A2_2, filters2); +- } +- catch(UnexpectedFormatException& e) +- { +- std::cout << "UnexpectedFormatException :" << e.what() << std::endl; +- throw; +- } +- +- const File witness1(LOG4CXX_TEST_STR("witness/dom.A1.2")); +- const File witness2(LOG4CXX_TEST_STR("witness/dom.A2.2")); +- // TODO: A1 doesn't contain duplicate entries +- // +- // LOGUNIT_ASSERT(Compare::compare(FILTERED_A1, witness1)); +- LOGUNIT_ASSERT(Compare::compare(FILTERED_A2, witness2)); +- } +- +- +- void common() +- { +- int i = 0; +- +- LOG4CXX_DEBUG(logger, "Message " << i); +- LOG4CXX_DEBUG(root, "Message " << i); +- +- i++; +- LOG4CXX_INFO(logger, "Message " << i); +- LOG4CXX_INFO(root, "Message " << i); +- +- i++; +- LOG4CXX_WARN(logger, "Message " << i); +- LOG4CXX_WARN(root, "Message " << i); +- +- i++; +- LOG4CXX_ERROR(logger, "Message " << i); +- LOG4CXX_ERROR(root, "Message " << i); +- +- i++; +- LOG4CXX_FATAL(logger, "Message " << i); +- LOG4CXX_FATAL(root, "Message " << i); +- +- } +- +- /** +- * Creates a output file that ends with a superscript 3. +- * Output file is checked by build.xml after completion. +- */ +- void test3() { +- DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml")); +- LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3"); ++ void setUp() ++ { ++ root = Logger::getRootLogger(); ++ logger = Logger::getLogger(LOG4CXX_TEST_STR("org.apache.log4j.xml.DOMTestCase")); ++ } ++ ++ void tearDown() ++ { ++ root->getLoggerRepository()->resetConfiguration(); ++ } ++ ++ void test1() { ++ DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase1.xml")); ++ common(); ++ ++ ControlFilter cf1; ++ cf1 << TEST1_1A_PAT << TEST1_1B_PAT; ++ ++ ControlFilter cf2; ++ cf2 << TEST1_2_PAT; ++ ++ ThreadFilter threadFilter; ++ ISO8601Filter iso8601Filter; ++ ++ std::vector<Filter *> filters1; ++ filters1.push_back(&cf1); ++ ++ std::vector<Filter *> filters2; ++ filters2.push_back(&cf2); ++ filters2.push_back(&threadFilter); ++ filters2.push_back(&iso8601Filter); ++ ++ try ++ { ++ Transformer::transform(TEMP_A1, FILTERED_A1, filters1); ++ Transformer::transform(TEMP_A2, FILTERED_A2, filters2); ++ } ++ catch(UnexpectedFormatException& e) ++ { ++ std::cout << "UnexpectedFormatException :" << e.what() << std::endl; ++ throw; ++ } ++ ++ const File witness1(LOG4CXX_TEST_STR("witness/dom.A1.1")); ++ const File witness2(LOG4CXX_TEST_STR("witness/dom.A2.1")); ++ // TODO: A1 doesn't contain duplicate entries ++ // ++ // LOGUNIT_ASSERT(Compare::compare(FILTERED_A1, witness1)); ++ LOGUNIT_ASSERT(Compare::compare(FILTERED_A2, witness2)); ++ } ++ ++ // ++ // Same test but backslashes instead of forward ++ // ++ void test2() { ++ DOMConfigurator::configure(LOG4CXX_TEST_STR("input\\xml\\DOMTestCase2.xml")); ++ common(); ++ ++ ThreadFilter threadFilter; ++ ISO8601Filter iso8601Filter; ++ ++ std::vector<Filter *> filters1; ++ ++ std::vector<Filter *> filters2; ++ filters2.push_back(&threadFilter); ++ filters2.push_back(&iso8601Filter); ++ ++ try ++ { ++ Transformer::transform(TEMP_A1_2, FILTERED_A1_2, filters1); ++ Transformer::transform(TEMP_A2_2, FILTERED_A2_2, filters2); ++ } ++ catch(UnexpectedFormatException& e) ++ { ++ std::cout << "UnexpectedFormatException :" << e.what() << std::endl; ++ throw; ++ } ++ ++ const File witness1(LOG4CXX_TEST_STR("witness/dom.A1.2")); ++ const File witness2(LOG4CXX_TEST_STR("witness/dom.A2.2")); ++ // TODO: A1 doesn't contain duplicate entries ++ // ++ // LOGUNIT_ASSERT(Compare::compare(FILTERED_A1, witness1)); ++ LOGUNIT_ASSERT(Compare::compare(FILTERED_A2, witness2)); ++ } ++ ++ ++ void common() ++ { ++ int i = 0; ++ ++ LOG4CXX_DEBUG(logger, "Message " << i); ++ LOG4CXX_DEBUG(root, "Message " << i); ++ ++ i++; ++ LOG4CXX_INFO(logger, "Message " << i); ++ LOG4CXX_INFO(root, "Message " << i); ++ ++ i++; ++ LOG4CXX_WARN(logger, "Message " << i); ++ LOG4CXX_WARN(root, "Message " << i); ++ ++ i++; ++ LOG4CXX_ERROR(logger, "Message " << i); ++ LOG4CXX_ERROR(root, "Message " << i); ++ ++ i++; ++ LOG4CXX_FATAL(logger, "Message " << i); ++ LOG4CXX_FATAL(root, "Message " << i); ++ } ++ ++ /** ++ * Creates a output file that ends with a superscript 3. ++ * Output file is checked by build.xml after completion. ++ */ ++ void test3() { ++ DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml")); ++ LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3"); + #if LOG4CXX_LOGCHAR_IS_UTF8 +- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 }; ++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xC2), static_cast<logchar>(0xB3), 0 }; + #else +- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 }; ++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xB3), 0 }; + #endif +- File file; +- file.setPath(fname); +- Pool p; +- bool exists = file.exists(p); +- LOGUNIT_ASSERT(exists); +- } +- +- /** +- * Creates a output file that ends with a ideographic 4. +- * Output file is checked by build.xml after completion. +- */ +- void test4() { +- DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml")); +- LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4"); ++ File file; ++ file.setPath(fname); ++ Pool p; ++ bool exists = file.exists(p); ++ LOGUNIT_ASSERT(exists); ++ } ++ ++ /** ++ * Creates a output file that ends with a ideographic 4. ++ * Output file is checked by build.xml after completion. ++ */ ++ void test4() { ++ DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml")); ++ LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4"); + #if LOG4CXX_LOGCHAR_IS_UTF8 +- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 }; ++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xE3), static_cast<logchar>(0x86), static_cast<logchar>(0x95), 0 }; + #else +- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 }; ++ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0x3195), 0 }; + #endif +- File file; +- file.setPath(fname); +- Pool p; +- bool exists = file.exists(p); +- LOGUNIT_ASSERT(exists); +- } +- ++ File file; ++ file.setPath(fname); ++ Pool p; ++ bool exists = file.exists(p); ++ LOGUNIT_ASSERT(exists); ++ } + }; + + LOGUNIT_TEST_SUITE_REGISTRATION(DOMTestCase); diff --git a/external/meta-sdl/recipes-devtools/log4cxx/log4cxx_0.10.0.bb b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx_0.10.0.bb new file mode 100644 index 00000000..2a0f5dfe --- /dev/null +++ b/external/meta-sdl/recipes-devtools/log4cxx/log4cxx_0.10.0.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Apache logging framework for C++ library 3rd party" +SECTION = "libs" +DEPENDS = "apr apr-util expat gdbm" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" +HOMEPAGE = "http://logging.apache.org/log4cxx/" + +SRC_URI = "git://github.com/smartdevicelink/sdl_core.git;branch=master" +SRC_URI_append = " \ + file://0001-LOGCXX-413-doesn-t-compile-on-openembedded-thanks-to.patch \ + file://0002-LOGCXX-414-possibly-wrong-use-of-autotools-docdir-th.patch \ + file://0003-Applied-patch-for-LOGCXX-400-LOGCXX-404-LOGCXX-402-L.patch \ + file://svn-log4cxx-rev-1751050.patch \ +" + +SRCREV = "7f7fcbb998fb17f2954fd103349af67ea9b71a3f" + +S = "${WORKDIR}/git/src/3rd_party/apache-${PN}-${PV}" + +inherit autotools-brokensep pkgconfig + +BBCLASSEXTEND += "native" + +SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" diff --git a/external/meta-sdl/recipes-extended/bson-c-lib/bson-c-lib_git.bb b/external/meta-sdl/recipes-extended/bson-c-lib/bson-c-lib_git.bb new file mode 100644 index 00000000..577bff16 --- /dev/null +++ b/external/meta-sdl/recipes-extended/bson-c-lib/bson-c-lib_git.bb @@ -0,0 +1,14 @@ +SUMMARY = "Library for converting to and from BSON" +HOMEPAGE = "https://github.com/smartdevicelink/bson_c_lib" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ba5f5f5d25c7ac21f27e90890d6a70f9 \ + file://src/emhashmap/LICENSE;md5=38aa84309f9da2ed93c60836a8456033" + +SRC_URI = "git://github.com/smartdevicelink/bson_c_lib.git" + +PV = "1.1.0+git${SRCPV}" +SRCREV = "82f9e9dcb1f49811ec678a6d19d4f90da831ac0f" + +S = "${WORKDIR}/git" + +inherit autotools |