diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/glog')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/glog/glog/0001-Rework-CMake-glog-VERSION-management.patch | 71 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/glog/glog/0001-configure.ac-Allow-user-to-disable-gflags.patch | 35 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch | 120 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/glog/glog/0003-installation-path-fix.patch | 65 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-support/glog/glog_0.3.5.bb (renamed from meta-openembedded/meta-oe/recipes-support/glog/glog_0.3.4.bb) | 15 |
5 files changed, 265 insertions, 41 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/glog/glog/0001-Rework-CMake-glog-VERSION-management.patch b/meta-openembedded/meta-oe/recipes-support/glog/glog/0001-Rework-CMake-glog-VERSION-management.patch new file mode 100644 index 000000000..f41a6c972 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/glog/glog/0001-Rework-CMake-glog-VERSION-management.patch @@ -0,0 +1,71 @@ +From 4ea11e0d7c0575316a6ccc07a931164ca29c3d2f Mon Sep 17 00:00:00 2001 +From: Corentin Le Molgat <corentinl@google.com> +Date: Mon, 29 Jan 2018 14:59:08 +0100 +Subject: [PATCH] Rework CMake glog VERSION management. + +- Use of Project version properties instead of custom variables +- fix missmatch between VERSION (build version) and SOVERSION (API version) +src: https://cmake.org/cmake/help/latest/prop_tgt/VERSION.html#prop_tgt:VERSION + +Upstream-Status: Backport [https://github.com/google/glog/commit/6b6e38a7d53fe01f42ce34384cf4ba4c50e8cb65] +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + CMakeLists.txt | 23 ++++++++--------------- + 1 file changed, 8 insertions(+), 15 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7415eab..fb4e408 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,23 +8,16 @@ if (POLICY CMP0063) + cmake_policy (SET CMP0063 NEW) + endif (POLICY CMP0063) + +-project (google-glog) ++project(glog VERSION 0.3.5 LANGUAGES C CXX) + + enable_testing () + +-set (GLOG_MAJOR_VERSION 0) +-set (GLOG_MINOR_VERSION 3) +-set (GLOG_PATCH_VERSION 5) +- +-set (GLOG_VERSION +- ${GLOG_MAJOR_VERSION}.${GLOG_MINOR_VERSION}.${GLOG_PATCH_VERSION}) +- + set (CPACK_PACKAGE_NAME glog) + set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "") +-set (CPACK_PACKAGE_VERSION_MAJOR ${GLOG_MAJOR_VERSION}) +-set (CPACK_PACKAGE_VERSION_MINOR ${GLOG_MINOR_VERSION}) +-set (CPACK_PACKAGE_VERSION_PATCH ${GLOG_PATCH_VERSION}) +-set (CPACK_PACKAGE_VERSION ${GLOG_VERSION}) ++set (CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) ++set (CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) ++set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) ++set (CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) + + option (WITH_GFLAGS "Use gflags" ON) + option (WITH_THREADS "Enable multithreading support" ON) +@@ -406,8 +399,8 @@ if (gflags_FOUND) + endif (NOT BUILD_SHARED_LIBS) + endif (gflags_FOUND) + +-set_target_properties (glog PROPERTIES VERSION ${GLOG_MAJOR_VERSION}) +-set_target_properties (glog PROPERTIES SOVERSION ${GLOG_VERSION}) ++set_target_properties (glog PROPERTIES VERSION ${PROJECT_VERSION}) ++set_target_properties (glog PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR}) + + if (WIN32) + target_compile_definitions (glog PUBLIC GLOG_NO_ABBREVIATED_SEVERITIES) +@@ -570,7 +563,7 @@ configure_package_config_file (glog-config.cmake.in + NO_CHECK_REQUIRED_COMPONENTS_MACRO) + + write_basic_package_version_file (glog-config-version.cmake VERSION +- ${GLOG_VERSION} COMPATIBILITY SameMajorVersion) ++ ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion) + + export (TARGETS glog NAMESPACE glog:: FILE glog-targets.cmake) + export (PACKAGE glog) +-- +2.17.1 + diff --git a/meta-openembedded/meta-oe/recipes-support/glog/glog/0001-configure.ac-Allow-user-to-disable-gflags.patch b/meta-openembedded/meta-oe/recipes-support/glog/glog/0001-configure.ac-Allow-user-to-disable-gflags.patch deleted file mode 100644 index 596281ff6..000000000 --- a/meta-openembedded/meta-oe/recipes-support/glog/glog/0001-configure.ac-Allow-user-to-disable-gflags.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0fabde0515e180c53961c27346dd7a79cffa4c1f Mon Sep 17 00:00:00 2001 -From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> -Date: Thu, 11 Aug 2016 11:49:36 +0200 -Subject: [PATCH] configure.ac: Allow user to disable gflags - -Under some circumstances like cross-compilation, the user might not want -to enable support for gflags. - -This patch allows support for --without-gflags - -Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> ---- - configure.ac | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 7b4d21e7ae8a..eba5e5cda1ea 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -136,7 +136,11 @@ AC_ARG_WITH(gflags, AS_HELP_STRING[--with-gflags=GFLAGS_DIR], - CFLAGS="$CFLAGS $GFLAGS_CFLAGS" - LIBS="$LIBS $GFLAGS_LIBS" - ) --AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=1, ac_cv_have_libgflags=0) -+if test x"$with_gflags" = x"no"; then -+ ac_cv_have_libgflags=0 -+else -+ AC_CHECK_LIB(gflags, main, ac_cv_have_libgflags=1, ac_cv_have_libgflags=0) -+fi - if test x"$ac_cv_have_libgflags" = x"1"; then - AC_DEFINE(HAVE_LIB_GFLAGS, 1, [define if you have google gflags library]) - if test x"$GFLAGS_LIBS" = x""; then --- -2.8.1 - diff --git a/meta-openembedded/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch b/meta-openembedded/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch new file mode 100644 index 000000000..15cf67fd2 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/glog/glog/0002-Find-Libunwind-during-configure.patch @@ -0,0 +1,120 @@ +diff -uNr a/cmake/FindLibunwind.cmake b/cmake/FindLibunwind.cmake +--- a/cmake/FindLibunwind.cmake 1970-01-01 01:00:00.000000000 +0100 ++++ b/cmake/FindLibunwind.cmake 2018-11-20 15:53:48.799078114 +0100 +@@ -0,0 +1,54 @@ ++# - Try to find libunwind ++# Once done this will define ++# ++# Libunwind_FOUND - system has libunwind ++# unwind - cmake target for libunwind ++ ++find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library") ++include (CheckIncludeFile) ++check_include_file (libunwind.h HAVE_LIBUNWIND_H) ++check_include_file (unwind.h HAVE_UNWIND_H) ++ ++if (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") ++ set(LIBUNWIND_ARCH "arm") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") ++ set(LIBUNWIND_ARCH "aarch64") ++elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR ++ CMAKE_SYSTEM_PROCESSOR STREQUAL "corei7-64") ++ set(LIBUNWIND_ARCH "x86_64") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$") ++ set(LIBUNWIND_ARCH "x86") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64") ++ set(LIBUNWIND_ARCH "ppc64") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc") ++ set(LIBUNWIND_ARCH "ppc32") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") ++ set(LIBUNWIND_ARCH "mips") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^hppa") ++ set(LIBUNWIND_ARCH "hppa") ++elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ia64") ++ set(LIBUNWIND_ARCH "ia64") ++endif() ++ ++find_library (UNWIND_LIBRARY_PLATFORM NAMES "unwind-${LIBUNWIND_ARCH}" DOC "unwind library platform") ++if (UNWIND_LIBRARY_PLATFORM) ++ set(HAVE_LIB_UNWIND "1") ++endif() ++ ++include(FindPackageHandleStandardArgs) ++# handle the QUIETLY and REQUIRED arguments and set Libunwind_FOUND to TRUE ++# if all listed variables are TRUE ++find_package_handle_standard_args(Libunwind DEFAULT_MSG ++ UNWIND_LIBRARY HAVE_LIBUNWIND_H HAVE_UNWIND_H HAVE_LIB_UNWIND) ++ ++mark_as_advanced (UNWIND_LIBRARY UNWIND_LIBRARY_PLATFORM) ++ ++if (Libunwind_FOUND) ++ add_library(unwind INTERFACE IMPORTED) ++ set_target_properties(unwind PROPERTIES ++ INTERFACE_LINK_LIBRARIES "${UNWIND_LIBRARY};${UNWIND_LIBRARY_PLATFORM}" ++ ) ++else() ++ message("Can't find libunwind library") ++endif() +diff -uNr a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2018-11-20 15:49:07.576278417 +0100 ++++ b/CMakeLists.txt 2018-11-20 15:49:32.106819928 +0100 +@@ -58,7 +58,6 @@ + check_include_file (execinfo.h HAVE_EXECINFO_H) + check_include_file (glob.h HAVE_GLOB_H) + check_include_file (inttypes.h HAVE_INTTYPES_H) +-check_include_file (libunwind.h HAVE_LIBUNWIND_H) + check_include_file (memory.h HAVE_MEMORY_H) + check_include_file (pwd.h HAVE_PWD_H) + check_include_file (stdint.h HAVE_STDINT_H) +@@ -74,7 +73,6 @@ + check_include_file (syslog.h HAVE_SYSLOG_H) + check_include_file (ucontext.h HAVE_UCONTEXT_H) + check_include_file (unistd.h HAVE_UNISTD_H) +-check_include_file (unwind.h HAVE_UNWIND_H) + + check_include_file_cxx ("ext/hash_map" HAVE_EXT_HASH_MAP) + check_include_file_cxx ("ext/hash_set" HAVE_EXT_HASH_SET) +@@ -109,10 +107,7 @@ + # snprintf as an inline function + check_symbol_exists (snprintf stdio.h HAVE_SNPRINTF) + +-check_library_exists (unwind get_static_proc_name "" HAVE_LIB_UNWIND) +- +-find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library") +-mark_as_advanced (UNWIND_LIBRARY) ++find_package(Libunwind) + + check_c_source_compiles (" + #include <stdlib.h> +@@ -376,9 +371,9 @@ + + set_target_properties (glog PROPERTIES POSITION_INDEPENDENT_CODE ON) + +-if (UNWIND_LIBRARY) +- target_link_libraries (glog PUBLIC ${UNWIND_LIBRARY}) +-endif (UNWIND_LIBRARY) ++if (Libunwind_FOUND) ++ target_link_libraries (glog PUBLIC unwind) ++endif (Libunwind_FOUND) + + if (HAVE_PTHREAD) + target_link_libraries (glog PUBLIC ${CMAKE_THREAD_LIBS_INIT}) +@@ -571,6 +566,7 @@ + install (FILES + ${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/glog-config-version.cmake ++ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindLibunwind.cmake + DESTINATION lib/cmake/glog) + + install (EXPORT glog-targets NAMESPACE glog:: DESTINATION lib/cmake/glog) +diff -uNr a/glog-config.cmake.in b/glog-config.cmake.in +--- a/glog-config.cmake.in 2018-11-20 15:49:07.576278417 +0100 ++++ b/glog-config.cmake.in 2018-11-20 15:52:32.330418489 +0100 +@@ -4,4 +4,6 @@ + + @gflags_DEPENDENCY@ + ++find_dependency (Libunwind) ++ + include ("${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake") diff --git a/meta-openembedded/meta-oe/recipes-support/glog/glog/0003-installation-path-fix.patch b/meta-openembedded/meta-oe/recipes-support/glog/glog/0003-installation-path-fix.patch new file mode 100644 index 000000000..641f70cb2 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/glog/glog/0003-installation-path-fix.patch @@ -0,0 +1,65 @@ +diff -uNr a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2018-12-05 12:55:59.630792054 +0100 ++++ b/CMakeLists.txt 2018-12-05 13:00:22.922269200 +0100 +@@ -403,10 +403,15 @@ + + set_target_properties (glog PROPERTIES PUBLIC_HEADER "${GLOG_PUBLIC_H}") + ++set (_glog_CMake_BINDIR ${CMAKE_INSTALL_BINDIR}) ++set (_glog_CMake_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}) ++set (_glog_CMake_LIBDIR ${CMAKE_INSTALL_LIBDIR}) ++set (_glog_CMake_INSTALLDIR ${_glog_CMake_LIBDIR}/cmake/glog) ++ + target_include_directories (glog BEFORE PUBLIC + "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>" + "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>" +- "$<INSTALL_INTERFACE:include>" ++ "$<INSTALL_INTERFACE:${_glog_CMake_INCLUDE_DIR}>" + PRIVATE ${CMAKE_CURRENT_BINARY_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) + +@@ -543,10 +548,10 @@ + + install (TARGETS glog + EXPORT glog-targets +- RUNTIME DESTINATION bin +- PUBLIC_HEADER DESTINATION include/glog +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ RUNTIME DESTINATION ${_glog_CMake_BINDIR} ++ PUBLIC_HEADER DESTINATION ${_glog_CMake_INCLUDE_DIR}/glog ++ LIBRARY DESTINATION ${_glog_CMake_LIBDIR} ++ ARCHIVE DESTINATION ${_glog_CMake_LIBDIR}) + + if (gflags_FOUND) + set (gflags_DEPENDENCY "find_dependency (gflags ${gflags_VERSION})") +@@ -554,7 +559,7 @@ + + configure_package_config_file (glog-config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake +- INSTALL_DESTINATION lib/cmake/glog ++ INSTALL_DESTINATION ${_glog_CMake_INSTALLDIR} + NO_CHECK_REQUIRED_COMPONENTS_MACRO) + + write_basic_package_version_file (glog-config-version.cmake VERSION +@@ -567,6 +572,7 @@ + ${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/glog-config-version.cmake + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindLibunwind.cmake +- DESTINATION lib/cmake/glog) ++ DESTINATION ${_glog_CMake_INSTALLDIR}) + +-install (EXPORT glog-targets NAMESPACE glog:: DESTINATION lib/cmake/glog) ++install (EXPORT glog-targets NAMESPACE glog:: DESTINATION ++ ${_glog_CMake_INSTALLDIR}) +diff -uNr a/glog-config.cmake.in b/glog-config.cmake.in +--- a/glog-config.cmake.in 2018-12-05 12:55:59.630792054 +0100 ++++ b/glog-config.cmake.in 2018-12-05 13:05:19.547196843 +0100 +@@ -4,6 +4,7 @@ + + @gflags_DEPENDENCY@ + ++list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + find_dependency (Libunwind) + + include ("${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake") diff --git a/meta-openembedded/meta-oe/recipes-support/glog/glog_0.3.4.bb b/meta-openembedded/meta-oe/recipes-support/glog/glog_0.3.5.bb index d7c1974c6..3de01ef5b 100644 --- a/meta-openembedded/meta-oe/recipes-support/glog/glog_0.3.4.bb +++ b/meta-openembedded/meta-oe/recipes-support/glog/glog_0.3.5.bb @@ -9,15 +9,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=dc9db360e0bbd4e46672f3fd91dd6c4b" DEPENDS = "libunwind" SRC_URI = " \ - git://github.com/google/glog.git \ - file://0001-configure.ac-Allow-user-to-disable-gflags.patch \ + git://github.com/google/glog.git;branch=v035 \ + file://0001-Rework-CMake-glog-VERSION-management.patch \ + file://0002-Find-Libunwind-during-configure.patch \ + file://0003-installation-path-fix.patch \ " -SRCREV = "d8cb47f77d1c31779f3ff890e1a5748483778d6a" +SRCREV = "a6a166db069520dbbd653c97c2e5b12e08a8bb26" S = "${WORKDIR}/git" -PACKAGECONFIG ??= "" -PACKAGECONFIG[gflags] = ",--without-gflags,gflags," +inherit cmake -inherit autotools pkgconfig +RDEPENDS_${PN} += "libunwind" + +EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON" |