mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 04:19:08 +08:00
[log4cpp] Change to official upstream source (#31736)
This commit is contained in:
parent
ebf90b95b1
commit
59fa2d653f
31
ports/log4cpp-log4cpp/fix_link_msvcrt.patch
Normal file
31
ports/log4cpp-log4cpp/fix_link_msvcrt.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 140910b..08cde3b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -81,8 +81,12 @@ ADD_LIBRARY ( ${LOG4CPP_LIBRARY_NAME}
|
||||
)
|
||||
|
||||
IF (WIN32)
|
||||
- TARGET_LINK_LIBRARIES (${LOG4CPP_LIBRARY_NAME} kernel32 user32 ws2_32 advapi32 )
|
||||
- SET_TARGET_PROPERTIES(${LOG4CPP_LIBRARY_NAME} PROPERTIES LINK_FLAGS /NODEFAULTLIB:msvcrt )
|
||||
+ TARGET_LINK_LIBRARIES (${LOG4CPP_LIBRARY_NAME} kernel32 user32 ws2_32 advapi32)
|
||||
+ IF ( CMAKE_BUILD_TYPE MATCHES "Debug" )
|
||||
+ SET_TARGET_PROPERTIES(${LOG4CPP_LIBRARY_NAME} PROPERTIES LINK_FLAGS /NODEFAULTLIB:MSVCRT)
|
||||
+ ELSE(CMAKE_BUILD_TYPE MATCHES "Debug" )
|
||||
+ SET_TARGET_PROPERTIES(${LOG4CPP_LIBRARY_NAME} PROPERTIES LINK_FLAGS /NODEFAULTLIB:MSVCRTD)
|
||||
+ ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug" )
|
||||
ENDIF (WIN32)
|
||||
|
||||
INSTALL (
|
||||
@@ -92,9 +96,11 @@ INSTALL (
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "*.am" EXCLUDE
|
||||
PATTERN "*.in" EXCLUDE
|
||||
+ PATTERN ".cvsignore" EXCLUDE
|
||||
)
|
||||
|
||||
INSTALL (
|
||||
TARGETS ${LOG4CPP_LIBRARY_NAME}
|
||||
ARCHIVE DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin
|
||||
)
|
79
ports/log4cpp-log4cpp/portfile.cmake
Normal file
79
ports/log4cpp-log4cpp/portfile.cmake
Normal file
@ -0,0 +1,79 @@
|
||||
vcpkg_from_sourceforge(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO log4cpp/log4cpp-1.1.x%20%28new%29
|
||||
REF log4cpp-1.1
|
||||
FILENAME "log4cpp-1.1.4.tar.gz"
|
||||
SHA512 0cdbd46ccd048d70bea3c35d22080dc5dd21fc3b9c415fe464847e60775954f57e9c8344506f0f94f16e90e8bdaa9cc6d84d3aa65191501e52ee8dfc639f0398
|
||||
PATCHES
|
||||
fix_link_msvcrt.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
set(VCPKG_POLICY_DLLS_WITHOUT_EXPORTS enabled)
|
||||
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib" "${CURRENT_PACKAGES_DIR}/lib")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
|
||||
endif()
|
||||
elseif(VCPKG_TARGET_IS_LINUX)
|
||||
#message(STATUS "Configuring ${TARGET_TRIPLET}")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
set(SHARED_STATIC --enable-static --disable-shared)
|
||||
else()
|
||||
set(SHARED_STATIC --disable-static --enable-shared)
|
||||
endif()
|
||||
|
||||
set(OPTIONS ${SHARED_STATIC})
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
|
||||
set(CFLAGS "${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_DEBUG} -fPIC -O0 -g -I${SOURCE_PATH}/include")
|
||||
set(LDFLAGS "${VCPKG_LINKER_FLAGS}")
|
||||
#create makefile
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR}/debug ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR}/debug
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
||||
LOGNAME configure-${TARGET_TRIPLET}-dbg)
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}"
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
||||
LOGNAME install-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
#build release log4cpp
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
|
||||
set(CFLAGS "${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_RELEASE} -fPIC -O3 -I${SOURCE_PATH}/include")
|
||||
set(LDFLAGS "${VCPKG_LINKER_FLAGS}")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR} ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
LOGNAME configure-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}"
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
||||
LOGNAME install-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
13
ports/log4cpp-log4cpp/vcpkg.json
Normal file
13
ports/log4cpp-log4cpp/vcpkg.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "log4cpp-log4cpp",
|
||||
"version": "1.1.4",
|
||||
"description": "A library of C++ classes for flexible logging to files (rolling), syslog, IDSA and other destinations. It is modeled after the Log for Java library (http://www.log4j.org), staying as close to their API as is reasonable.",
|
||||
"homepage": "https://sourceforge.net/projects/log4cpp/",
|
||||
"supports": "(linux | windows) & !uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 529c18e..beace9e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -21,7 +21,11 @@ SET(LOG4CPP_LIBS)
|
||||
|
||||
IF (WIN32)
|
||||
SET (CMAKE_DEBUG_POSTFIX "d")
|
||||
- LIST(APPEND LOG4CPP_CFLAGS -D_CRT_SECURE_NO_WARNINGS -DLOG4CPP_HAS_DLL -DLOG4CPP_BUILD_DLL )
|
||||
+ IF (BUILD_SHARED_LIBS)
|
||||
+ LIST(APPEND LOG4CPP_CFLAGS -D_CRT_SECURE_NO_WARNINGS -DLOG4CPP_HAS_DLL -DLOG4CPP_BUILD_DLL )
|
||||
+ ELSE ()
|
||||
+ LIST(APPEND LOG4CPP_CFLAGS -D_CRT_SECURE_NO_WARNINGS )
|
||||
+ ENDIF ()
|
||||
ELSE (WIN32)
|
||||
IF (APPLE)
|
||||
# LIST(APPEND LOG4CPP_CFLAGS -DLOG4CPP_HAVE_SSTREAM)
|
||||
@@ -32,7 +36,7 @@ ENDIF (WIN32)
|
||||
|
||||
SET ( LOG4CPP_LIBRARY_NAME "orocos-log4cpp" )
|
||||
|
||||
-ADD_LIBRARY ( ${LOG4CPP_LIBRARY_NAME} SHARED
|
||||
+ADD_LIBRARY ( ${LOG4CPP_LIBRARY_NAME}
|
||||
src/Appender.cpp
|
||||
src/AppenderSkeleton.cpp
|
||||
src/AppendersFactory.cpp
|
@ -1,18 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 19767a0..59dbf6c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -161,11 +161,13 @@ INSTALL (
|
||||
)
|
||||
|
||||
INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME}
|
||||
+ EXPORT log4cpp-targets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
INSTALL(FILES package.xml DESTINATION share/log4cpp)
|
||||
+INSTALL(EXPORT log4cpp-targets NAMESPACE log4cpp:: DESTINATION share/log4cpp)
|
||||
|
||||
###########################################################
|
||||
# DOCUMENTATION
|
@ -1,31 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index beace9e..c8264ec 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -136,7 +136,7 @@ SET(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
SET(exec_prefix "\${prefix}")
|
||||
SET(log4cpp_cflags "")
|
||||
SET(log4cpp_libs "${LOG4CPP_LIBS}")
|
||||
-SET(includedir "\${prefix}/include/orocos")
|
||||
+SET(includedir "\${prefix}/include")
|
||||
SET(libdir "\${prefix}/lib")
|
||||
CONFIGURE_FILE(log4cpp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/orocos-log4cpp.pc @ONLY)
|
||||
|
||||
@@ -147,7 +147,7 @@ INSTALL(
|
||||
|
||||
INSTALL (
|
||||
DIRECTORY include/log4cpp
|
||||
- DESTINATION include/orocos
|
||||
+ DESTINATION include
|
||||
PATTERN "config.h.in" EXCLUDE
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "*.am" EXCLUDE
|
||||
@@ -157,7 +157,7 @@ INSTALL (
|
||||
|
||||
INSTALL (
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/include/log4cpp/config.h
|
||||
- DESTINATION include/orocos/log4cpp
|
||||
+ DESTINATION include/log4cpp
|
||||
)
|
||||
|
||||
INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME}
|
@ -1,13 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8db2287..529c18e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -159,7 +159,7 @@ INSTALL (
|
||||
INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
- RUNTIME DESTINATION lib)
|
||||
+ RUNTIME DESTINATION bin)
|
||||
|
||||
INSTALL(FILES package.xml DESTINATION share/log4cpp)
|
||||
|
@ -1,7 +0,0 @@
|
||||
|
||||
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32)
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(Threads)
|
||||
endif()
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/log4cpp-targets.cmake)
|
@ -1,35 +0,0 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO orocos-toolchain/log4cpp
|
||||
REF v2.9.1
|
||||
SHA512 5bd222c820a15c5d96587ac9fe864c3e2dc0fbce8389692be8dd41553ac0308002ad8d6f4ef3ef10af1d796f8ded410788d1a5d22f15505fac639da3f73e3518
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-install-targets.patch
|
||||
Fix-StaticSupport.patch
|
||||
fix-includepath.patch
|
||||
fix-export-targets.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/${PORT})
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_LIST_DIR}/log4cpp-config.in.cmake"
|
||||
"${CURRENT_PACKAGES_DIR}/share/${PORT}/log4cpp-config.cmake"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "log4cpp",
|
||||
"version": "2.9.1",
|
||||
"port-version": 8,
|
||||
"description": "Log4cpp is library of C++ classes for flexible logging to files, syslog, IDSA and other destinations. It is modeled after the Log4j Java library, staying as close to their API as is reasonable.",
|
||||
"homepage": "https://github.com/orocos-toolchain/log4cpp",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
@ -5020,9 +5020,9 @@
|
||||
"baseline": "2.0.7",
|
||||
"port-version": 1
|
||||
},
|
||||
"log4cpp": {
|
||||
"baseline": "2.9.1",
|
||||
"port-version": 8
|
||||
"log4cpp-log4cpp": {
|
||||
"baseline": "1.1.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"log4cxx": {
|
||||
"baseline": "1.0.0",
|
||||
|
9
versions/l-/log4cpp-log4cpp.json
Normal file
9
versions/l-/log4cpp-log4cpp.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3ac5e6e898eeac3db01d2f9c70bc4df663e035f2",
|
||||
"version": "1.1.4",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user