aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Potharaju <rapoth@microsoft.com>2017-12-04 17:15:16 -0800
committerRahul Potharaju <rapoth@microsoft.com>2017-12-04 17:15:16 -0800
commit03ced8199b8dcdb64723ba5bcd26c77ec4b75f68 (patch)
treee4e4ca51985ffe287a496434a5b081c73af055ff
parent3f053c15f50ad67da4bb3c04f718f6d49e203e5e (diff)
downloadvcpkg-03ced8199b8dcdb64723ba5bcd26c77ec4b75f68.tar.gz
vcpkg-03ced8199b8dcdb64723ba5bcd26c77ec4b75f68.zip
Adding re2 port
-rw-r--r--ports/re2/CONTROL3
-rw-r--r--ports/re2/portfile.cmake19
2 files changed, 22 insertions, 0 deletions
diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL
new file mode 100644
index 000000000..5a37abbaf
--- /dev/null
+++ b/ports/re2/CONTROL
@@ -0,0 +1,3 @@
+Source: re2
+Version: 2017-12-01
+Description: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. \ No newline at end of file
diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake
new file mode 100644
index 000000000..7caf9acba
--- /dev/null
+++ b/ports/re2/portfile.cmake
@@ -0,0 +1,19 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/re2-2017-12-01)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/google/re2/archive/2017-12-01.zip"
+ FILENAME "re2-2017-12-01.zip"
+ SHA512 64e9b8673201fd3b0253acfd9fcb2985e88db69724e31a9c839d3b5cddfa1b91cf9e4fb70b12250fd4d6a7934a50550f6000627607227ed97bca329bfeb5bcc4
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS -DRE2_BUILD_TESTING=1 -DBUILD_SHARED_LIBS=1 -DBUILD_TESTING=1
+)
+
+vcpkg_install_cmake()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/re2 RENAME copyright)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)