aboutsummaryrefslogtreecommitdiff
path: root/ports/log4cxx/expat.patch
diff options
context:
space:
mode:
authorStephen Webb <swebb2066@gmail.com>2020-10-07 09:00:58 +1100
committerGitHub <noreply@github.com>2020-10-06 15:00:58 -0700
commit41ec19fa8a61483469dde7e51282e64b42aa1a4e (patch)
tree93893ed7f9bc4bcf46635bd22ebcdce39dd0219d /ports/log4cxx/expat.patch
parent524a7c61f3d3f3df569f134ebe9745ad64a730dc (diff)
downloadvcpkg-41ec19fa8a61483469dde7e51282e64b42aa1a4e.tar.gz
vcpkg-41ec19fa8a61483469dde7e51282e64b42aa1a4e.zip
[log4cxx] Upgrade to 0.11.0 (#13767)
* [log4cxx] Upgrade to newly released 0.11.0 * [log4cxx] 0.11.0 should build everywhere except uwp * Changes suggested by @ras0219 * Prevent WIN32 libraries being used on linux * Prevent WIN32 libraries being used on linux * Prevent WIN32 libraries being used on linux * Update ports/log4cxx/portfile.cmake Co-authored-by: Stephen Webb <stephen.webb@sabreautonomous.com.au> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Diffstat (limited to 'ports/log4cxx/expat.patch')
-rw-r--r--ports/log4cxx/expat.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/ports/log4cxx/expat.patch b/ports/log4cxx/expat.patch
new file mode 100644
index 000000000..da0172141
--- /dev/null
+++ b/ports/log4cxx/expat.patch
@@ -0,0 +1,59 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d30a71b..3ecf5f0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,6 +23,9 @@ find_package(APR REQUIRED)
+ # Find Apache Runtime Utilities
+ find_package(APR-Util REQUIRED)
+
++# Find expat for XML parsing
++find_package(EXPAT REQUIRED)
++
+ # Building
+ add_subdirectory(src)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 3e0cb17..9a450b7 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ 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} ${XMLLIB_LIBRARIES} ${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 bb4e951..75093d8 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)
+@@ -48,8 +47,6 @@ else()
+ if (APU_STATIC OR NOT BUILD_SHARED_LIBS)
+ set(APR_UTIL_COMPILE_DEFINITIONS APU_DECLARE_STATIC)
+ find_library(APR_UTIL_LIBRARIES NAMES aprutil-1)
+- find_library(XMLLIB_LIBRARIES NAMES libexpat)
+- find_program(XMLLIB_DLL libexpat.dll)
+ else()
+ find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1)
+ find_program(APR_UTIL_DLL libaprutil-1.dll)
+diff --git a/src/test/cpp/xml/CMakeLists.txt b/src/test/cpp/xml/CMakeLists.txt
+index bddfe48..138c489 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} ${XMLLIB_LIBRARIES})
++target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} EXPAT::EXPAT)
+ set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} xmltests PARENT_SCOPE)