aboutsummaryrefslogtreecommitdiff
path: root/ports/log4cpp
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@hamburg.de>2019-09-20 12:24:23 +0200
committerAlexander Neumann <alexander.neumann@hamburg.de>2019-09-20 12:24:23 +0200
commit5b1e426929b40a9b60809284993b424b841a28fc (patch)
treebd12300ad859bababb7d4acc03700fd31949fddc /ports/log4cpp
parent279e25aecfe30f55296881ea9b0236c1d6ee030a (diff)
parent358ec0954d9b71b0def4fd4b4dbafdd0b8478d81 (diff)
downloadvcpkg-5b1e426929b40a9b60809284993b424b841a28fc.tar.gz
vcpkg-5b1e426929b40a9b60809284993b424b841a28fc.zip
Merge remote-tracking branch 'upstream/master' into path_separator
# Conflicts: # scripts/cmake/vcpkg_common_definitions.cmake
Diffstat (limited to 'ports/log4cpp')
-rw-r--r--ports/log4cpp/CONTROL5
-rw-r--r--ports/log4cpp/fix-install-targets.patch13
-rw-r--r--ports/log4cpp/portfile.cmake36
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)