aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiy Shapkin <arkady.shapkin@gmail.com>2017-04-03 15:54:11 +0300
committerArkadiy Shapkin <arkady.shapkin@gmail.com>2017-04-03 15:54:11 +0300
commitea45a09eda370d04ad75870f478656d47af4d2af (patch)
tree70449c2251ac86af4b0f8bdfdd1f65c0d82b593e
parenta1cfa18481f9ea0f7eaaaeb34832d89c51f5f4f1 (diff)
downloadvcpkg-ea45a09eda370d04ad75870f478656d47af4d2af.tar.gz
vcpkg-ea45a09eda370d04ad75870f478656d47af4d2af.zip
[libevent] Initial support
-rw-r--r--ports/libevent/CONTROL3
-rw-r--r--ports/libevent/portfile.cmake27
2 files changed, 30 insertions, 0 deletions
diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL
new file mode 100644
index 000000000..f4edafe6b
--- /dev/null
+++ b/ports/libevent/CONTROL
@@ -0,0 +1,3 @@
+Source: libevent
+Version: 2.1.8
+Description: An event notification library \ No newline at end of file
diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake
new file mode 100644
index 000000000..0b1ca4f45
--- /dev/null
+++ b/ports/libevent/portfile.cmake
@@ -0,0 +1,27 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libevent-release-2.1.8-stable)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/libevent/libevent/archive/release-2.1.8-stable.tar.gz"
+ FILENAME "libevent-2.1.8-stable.tar.gz"
+ SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
+file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/libevent)
+
+file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/LibeventTargets-debug.cmake DEBUG_MODULE)
+string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-debug.cmake "${DEBUG_MODULE}")
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
+
+file(COPY ${CURRENT_BUILDTREES_DIR}/src/libevent-release-2.1.8-stable/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libevent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libevent/copyright)
+vcpkg_copy_pdbs()