diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2019-11-22 09:47:40 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-22 09:47:40 -0800 |
| commit | 45f4b820e5743b89bca3508ba2028cdd5d8bbd17 (patch) | |
| tree | f874a8c4a7392309bdbb86447288597ec0a4a281 /ports/log4cpp | |
| parent | 62d67d3bf8eeff1afa8009041fd08b8822676b7b (diff) | |
| parent | 8831e8f25f1ff6546ee4a5291b91d599421637b3 (diff) | |
| download | vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.tar.gz vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.zip | |
Merge branch 'master' into vcpkg_nuget
Diffstat (limited to 'ports/log4cpp')
| -rw-r--r-- | ports/log4cpp/CONTROL | 5 | ||||
| -rw-r--r-- | ports/log4cpp/Fix-StaticSupport.patch | 26 | ||||
| -rw-r--r-- | ports/log4cpp/fix-install-targets.patch | 13 | ||||
| -rw-r--r-- | ports/log4cpp/portfile.cmake | 33 |
4 files changed, 77 insertions, 0 deletions
diff --git a/ports/log4cpp/CONTROL b/ports/log4cpp/CONTROL new file mode 100644 index 000000000..11c37843b --- /dev/null +++ b/ports/log4cpp/CONTROL @@ -0,0 +1,5 @@ +Source: log4cpp +Version: 2.9.1-2 +Homepage: https://github.com/orocos-toolchain/log4cpp +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. + diff --git a/ports/log4cpp/Fix-StaticSupport.patch b/ports/log4cpp/Fix-StaticSupport.patch new file mode 100644 index 000000000..8053b4ce5 --- /dev/null +++ b/ports/log4cpp/Fix-StaticSupport.patch @@ -0,0 +1,26 @@ +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 diff --git a/ports/log4cpp/fix-install-targets.patch b/ports/log4cpp/fix-install-targets.patch new file mode 100644 index 000000000..49cdedf1d --- /dev/null +++ b/ports/log4cpp/fix-install-targets.patch @@ -0,0 +1,13 @@ +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)
+
diff --git a/ports/log4cpp/portfile.cmake b/ports/log4cpp/portfile.cmake new file mode 100644 index 000000000..44c915876 --- /dev/null +++ b/ports/log4cpp/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP.") +endif() + +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 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pkgconfig TARGET_PATH share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) |
