diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2019-08-27 15:56:20 -0700 |
|---|---|---|
| committer | Curtis J Bezault <curtbezault@gmail.com> | 2019-08-27 15:56:20 -0700 |
| commit | cb48082e5c2afdd9355c0ff1d625cceaa29e1102 (patch) | |
| tree | 18b36d6718c1d145b59181b04b298b8806f1f363 | |
| parent | 6296a1c39ea2eab4951de816e4a46ec5bd63e44b (diff) | |
| download | vcpkg-cb48082e5c2afdd9355c0ff1d625cceaa29e1102.tar.gz vcpkg-cb48082e5c2afdd9355c0ff1d625cceaa29e1102.zip | |
[log4cpp] Add new port. (#7433)
| -rw-r--r-- | ports/log4cpp/CONTROL | 5 | ||||
| -rw-r--r-- | ports/log4cpp/fix-install-targets.patch | 13 | ||||
| -rw-r--r-- | ports/log4cpp/portfile.cmake | 36 |
3 files changed, 54 insertions, 0 deletions
diff --git a/ports/log4cpp/CONTROL b/ports/log4cpp/CONTROL new file mode 100644 index 000000000..9706c1316 --- /dev/null +++ b/ports/log4cpp/CONTROL @@ -0,0 +1,5 @@ +Source: log4cpp +Version: 2.9.1-1 +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-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..56688c6f7 --- /dev/null +++ b/ports/log4cpp/portfile.cmake @@ -0,0 +1,36 @@ +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 +) + +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) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +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) |
