mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:19:00 +08:00
[log4cxx] Update to 0.13.0 (#25317)
* [log4cxx] Update to 0.13.0 * [log4cxx] Update to 0.13.0 * [log4cxx] Add license id * [log4cxx] Add license id * [log4cxx] Add license id * [log4cxx] Add license id * [log4cxx] Fix compilation error in static build * Fix compilation error in a static build * Fix compilation error in a static build * Fix compilation error in a static build * [log4cxx] Update to 0.13.0 * update version * update portfile.cmake * update version * update vcpkg_extract_source_archive * update evrsion Co-authored-by: Stephen Webb <stephen.webb@sabreautonomous.com.au> Co-authored-by: Jonliu1993 <13720414433@163.com>
This commit is contained in:
parent
e8c16a3136
commit
aed77722f8
@ -1,49 +1,13 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index e5b44ef..e84e497 100644
|
index a4b96376..8b966872 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -33,7 +33,7 @@ find_package(APR-Util REQUIRED)
|
@@ -49,7 +49,7 @@ find_package(APR-Util REQUIRED)
|
||||||
find_package( Threads REQUIRED )
|
find_package( Threads REQUIRED )
|
||||||
|
|
||||||
# Find expat for XML parsing
|
# Find expat for XML parsing
|
||||||
-find_package(EXPAT REQUIRED)
|
-find_package(EXPAT REQUIRED)
|
||||||
+find_package(expat CONFIG REQUIRED)
|
+find_package(expat CONFIG REQUIRED)
|
||||||
|
if(TARGET EXPAT::EXPAT)
|
||||||
# Request C++17, if available
|
set(EXPAT_LIBRARIES EXPAT::EXPAT)
|
||||||
# This *should* fallback to an older standard if it is not available
|
elseif(TARGET expat::expat)
|
||||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
||||||
index b60e54f..b6138b3 100644
|
|
||||||
--- a/src/CMakeLists.txt
|
|
||||||
+++ b/src/CMakeLists.txt
|
|
||||||
@@ -3,7 +3,7 @@ cmake_policy(SET CMP0079 NEW)
|
|
||||||
add_subdirectory(main)
|
|
||||||
target_compile_definitions(log4cxx PRIVATE ${LOG4CXX_COMPILE_DEFINITIONS} ${APR_COMPILE_DEFINITIONS} ${APR_UTIL_COMPILE_DEFINITIONS} )
|
|
||||||
target_include_directories(log4cxx INTERFACE $<INSTALL_INTERFACE:include> PRIVATE ${APR_INCLUDE_DIR} ${APR_UTIL_INCLUDE_DIR})
|
|
||||||
-target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} EXPAT::EXPAT ${APR_LIBRARIES} ${APR_SYSTEM_LIBS})
|
|
||||||
+target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} expat::expat ${APR_LIBRARIES} ${APR_SYSTEM_LIBS})
|
|
||||||
if(WIN32)
|
|
||||||
# The ODBC appender is always enabled in the Windows configuration
|
|
||||||
target_link_libraries(log4cxx PRIVATE odbc32.lib)
|
|
||||||
diff --git a/src/cmake/FindAPR-Util.cmake b/src/cmake/FindAPR-Util.cmake
|
|
||||||
index d9cf4df..17a2457 100644
|
|
||||||
--- a/src/cmake/FindAPR-Util.cmake
|
|
||||||
+++ b/src/cmake/FindAPR-Util.cmake
|
|
||||||
@@ -38,7 +38,6 @@ if(EXISTS ${APR_UTIL_CONFIG_EXECUTABLE})
|
|
||||||
_apu_invoke(_apu_util_link_args --link-ld)
|
|
||||||
string(REGEX MATCH "-L([^ ]+)" _apu_util_L_flag ${_apu_util_link_args})
|
|
||||||
find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1.a PATHS "${CMAKE_MATCH_1}")
|
|
||||||
- _apu_invoke(XMLLIB_LIBRARIES --libs)
|
|
||||||
set(APR_UTIL_COMPILE_DEFINITIONS APU_DECLARE_STATIC)
|
|
||||||
else()
|
|
||||||
_apu_invoke(APR_UTIL_LIBRARIES --link-ld)
|
|
||||||
diff --git a/src/test/cpp/xml/CMakeLists.txt b/src/test/cpp/xml/CMakeLists.txt
|
|
||||||
index 138c489..7b62f3e 100644
|
|
||||||
--- a/src/test/cpp/xml/CMakeLists.txt
|
|
||||||
+++ b/src/test/cpp/xml/CMakeLists.txt
|
|
||||||
@@ -4,5 +4,5 @@ add_executable(xmltests
|
|
||||||
xmllayouttestcase
|
|
||||||
)
|
|
||||||
|
|
||||||
-target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} EXPAT::EXPAT)
|
|
||||||
+target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} expat::expat)
|
|
||||||
set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} xmltests PARENT_SCOPE)
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index e84e497..ff8b920 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -94,7 +94,7 @@ if(UNIX)
|
|
||||||
)
|
|
||||||
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx.pc"
|
|
||||||
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
||||||
|
|
||||||
if(LOG4CXX_QT_SUPPORT)
|
|
||||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
|
||||||
@@ -107,7 +107,7 @@ if(UNIX)
|
|
||||||
)
|
|
||||||
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx-qt.pc"
|
|
||||||
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
||||||
endif(LOG4CXX_QT_SUPPORT)
|
|
||||||
endif(UNIX)
|
|
||||||
|
|
@ -1,22 +1,20 @@
|
|||||||
set(VERSION 0.12.1)
|
set(VERSION 0.13.0)
|
||||||
vcpkg_download_distfile(ARCHIVE
|
vcpkg_download_distfile(ARCHIVE
|
||||||
URLS "https://archive.apache.org/dist/logging/log4cxx/${VERSION}/apache-log4cxx-${VERSION}.tar.gz"
|
URLS "https://archive.apache.org/dist/logging/log4cxx/${VERSION}/apache-log4cxx-${VERSION}.tar.gz"
|
||||||
FILENAME "apache-log4cxx-${VERSION}.tar.gz"
|
FILENAME "apache-log4cxx-${VERSION}.tar.gz"
|
||||||
SHA512 807058734cebf7c92e99484313becbc6be63e48bd930889c733318bb78dfec498b66aaa12255ed30879abb005b32e2b965f9dd87ec50d0421ca067f3f66280d9
|
SHA512 2a5f4fecc0415d942658c588774f0666082c497b6fd49bf64ab3328a997775206788c9b10a8c89208896c57da52fcc12c18d5d11ca1d3bf699e4633b8fcea6e5
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_extract_source_archive_ex(
|
vcpkg_extract_source_archive(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
SOURCE_PATH ARCHIVE "${ARCHIVE}"
|
||||||
ARCHIVE ${ARCHIVE}
|
|
||||||
REF ${VERSION}
|
|
||||||
PATCHES
|
PATCHES
|
||||||
expat.patch
|
expat.patch
|
||||||
|
threadutility.patch
|
||||||
linux.patch
|
linux.patch
|
||||||
pkgconfig.patch
|
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_cmake_configure(
|
vcpkg_cmake_configure(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-DLOG4CXX_INSTALL_PDB=OFF # Installing pdbs failed on debug static. So, disable it and let vcpkg_copy_pdbs() do it
|
-DLOG4CXX_INSTALL_PDB=OFF # Installing pdbs failed on debug static. So, disable it and let vcpkg_copy_pdbs() do it
|
||||||
-DBUILD_TESTING=OFF
|
-DBUILD_TESTING=OFF
|
||||||
@ -25,7 +23,7 @@ vcpkg_cmake_configure(
|
|||||||
vcpkg_cmake_install()
|
vcpkg_cmake_install()
|
||||||
vcpkg_copy_pdbs()
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/log4cxx)
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/log4cxx)
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
|
if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
|
||||||
vcpkg_fixup_pkgconfig()
|
vcpkg_fixup_pkgconfig()
|
||||||
|
17
ports/log4cxx/threadutility.patch
Normal file
17
ports/log4cxx/threadutility.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/src/main/cpp/threadutility.cpp b/src/main/cpp/threadutility.cpp
|
||||||
|
index b57ab66b..c14c12fd 100644
|
||||||
|
--- a/src/main/cpp/threadutility.cpp
|
||||||
|
+++ b/src/main/cpp/threadutility.cpp
|
||||||
|
@@ -16,8 +16,11 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "log4cxx/helpers/threadutility.h"
|
||||||
|
-#include "log4cxx/private/log4cxx_private.h"
|
||||||
|
#include "log4cxx/helpers/loglog.h"
|
||||||
|
+#if !defined(LOG4CXX)
|
||||||
|
+ #define LOG4CXX 1
|
||||||
|
+#endif
|
||||||
|
+#include "log4cxx/private/log4cxx_private.h"
|
||||||
|
|
||||||
|
#include <signal.h>
|
||||||
|
#include <mutex>
|
@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "log4cxx",
|
"name": "log4cxx",
|
||||||
"version": "0.12.1",
|
"version": "0.13.0.1",
|
||||||
"description": "Apache log4cxx is a logging framework for C++ patterned after Apache log4j, which uses Apache Portable Runtime for most platform-specific code and should be usable on any platform supported by APR",
|
"description": "Apache log4cxx is a logging framework for C++ patterned after Apache log4j, which uses Apache Portable Runtime for most platform-specific code and should be usable on any platform supported by APR",
|
||||||
"homepage": "https://logging.apache.org/log4cxx",
|
"homepage": "https://logging.apache.org/log4cxx",
|
||||||
|
"license": "Apache-2.0",
|
||||||
"supports": "!uwp",
|
"supports": "!uwp",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"apr",
|
"apr",
|
||||||
|
@ -4325,7 +4325,7 @@
|
|||||||
"port-version": 7
|
"port-version": 7
|
||||||
},
|
},
|
||||||
"log4cxx": {
|
"log4cxx": {
|
||||||
"baseline": "0.12.1",
|
"baseline": "0.13.0.1",
|
||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"loguru": {
|
"loguru": {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "65dd3e2c021462bc3445c9f215ace6936a177bb6",
|
||||||
|
"version": "0.13.0.1",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "b85ee3fd18c7e2f12f928ef132e5707059ad32c0",
|
"git-tree": "b85ee3fd18c7e2f12f928ef132e5707059ad32c0",
|
||||||
"version": "0.12.1",
|
"version": "0.12.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user