aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-12-12 14:03:15 -0800
committerRobert Schumacher <roschuma@microsoft.com>2016-12-12 14:03:15 -0800
commitad42f30904f7631e46c1ba60e671550bb12d7e73 (patch)
treeb007ce3a69ad721a5aef774aca6d5f83b83b9b82
parent1310e9e052de50a8d53bc9b88696f8b6c61bece6 (diff)
parentc715f5c0438b22e089670da7059382b445943fb7 (diff)
downloadvcpkg-ad42f30904f7631e46c1ba60e671550bb12d7e73.tar.gz
vcpkg-ad42f30904f7631e46c1ba60e671550bb12d7e73.zip
Merge branch 'master' of https://github.com/microsoft/vcpkg
-rw-r--r--ports/dimcli/CONTROL4
-rw-r--r--ports/dimcli/portfile.cmake37
-rw-r--r--ports/http-parser/CMakeLists.txt17
-rw-r--r--ports/http-parser/CONTROL3
-rw-r--r--ports/http-parser/portfile.cmake29
-rw-r--r--ports/sdl2/portfile.cmake26
6 files changed, 111 insertions, 5 deletions
diff --git a/ports/dimcli/CONTROL b/ports/dimcli/CONTROL
new file mode 100644
index 000000000..c85457c89
--- /dev/null
+++ b/ports/dimcli/CONTROL
@@ -0,0 +1,4 @@
+Source: dimcli
+Version: 1.0.3
+Description: C++ command line parser toolkit
+
diff --git a/ports/dimcli/portfile.cmake b/ports/dimcli/portfile.cmake
new file mode 100644
index 000000000..465e1699e
--- /dev/null
+++ b/ports/dimcli/portfile.cmake
@@ -0,0 +1,37 @@
+# Common Ambient Variables:
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# TARGET_TRIPLET is the current triplet (x86-windows, etc)
+# PORT is the current port name (zlib, etc)
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+#
+
+set(ver 1.0.3)
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dimcli-${ver})
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/gknowles/dimcli/archive/v${ver}.zip"
+ FILENAME "dimcli-${ver}.zip"
+ SHA512 5168aff22223cb85421fabd4ce82f3ec0bcab6551704484bc5b05be02ead23bd3d4a629c558a15f214e9d999eccc9c129649d066fdacfda3c839a40b48f8ec17
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+set(staticCrt OFF)
+if(VCPKG_CRT_LINKAGE STREQUAL static)
+ set(staticCrt ON)
+endif()
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS -DLINK_STATIC_RUNTIME:BOOL=${staticCrt}
+)
+
+vcpkg_install_cmake()
+
+# Remove includes from ${CMAKE_INSTALL_PREFIX}/debug
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/dimcli"
+ RENAME copyright)
+
diff --git a/ports/http-parser/CMakeLists.txt b/ports/http-parser/CMakeLists.txt
new file mode 100644
index 000000000..6e9067a04
--- /dev/null
+++ b/ports/http-parser/CMakeLists.txt
@@ -0,0 +1,17 @@
+cmake_minimum_required (VERSION 3.4)
+project (http-parser)
+
+if (BUILD_SHARED_LIBS)
+ SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+endif()
+
+add_library(http_parser http_parser.c http_parser.h)
+
+install(TARGETS http_parser
+ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib"
+)
+
+if (NOT SKIP_INSTALL_HEADERS)
+ install(FILES http_parser.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
+endif() \ No newline at end of file
diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL
new file mode 100644
index 000000000..41d234d26
--- /dev/null
+++ b/ports/http-parser/CONTROL
@@ -0,0 +1,3 @@
+Source: http-parser
+Version: 2.7.1
+Description: HTTP Parser. \ No newline at end of file
diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake
new file mode 100644
index 000000000..728293eed
--- /dev/null
+++ b/ports/http-parser/portfile.cmake
@@ -0,0 +1,29 @@
+# Common Ambient Variables:
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# TARGET_TRIPLET is the current triplet (x86-windows, etc)
+# PORT is the current port name (zlib, etc)
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+#
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/http-parser-2.7.1)
+vcpkg_download_distfile(ARCHIVE_FILE
+ URLS "https://github.com/nodejs/http-parser/archive/v2.7.1.zip"
+ FILENAME "http-parser-2.7.1.zip"
+ SHA512 9fb8b855ba7edb47628c91ac062d7ffce9c4bb8d6b8237d861d7926af989fb3e354c113821bdab1b8ac910f5f1064ca1339947aa20d56f6806b919b0cd6b6eae
+)
+vcpkg_extract_source_archive(${ARCHIVE_FILE})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG
+ -DSKIP_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/http-parser)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/http-parser/LICENSE-MIT ${CURRENT_PACKAGES_DIR}/share/http-parser/copyright) \ No newline at end of file
diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake
index fd9bbd8d4..81439567c 100644
--- a/ports/sdl2/portfile.cmake
+++ b/ports/sdl2/portfile.cmake
@@ -1,7 +1,3 @@
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- message(STATUS "Warning: Static building not supported yet. Building dynamic.")
- set(VCPKG_LIBRARY_LINKAGE dynamic)
-endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.5)
vcpkg_download_distfile(ARCHIVE_FILE
@@ -32,10 +28,25 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(RENAME ${CURRENT_PACKAGES_DIR}/include/include ${CURRENT_PACKAGES_DIR}/include/SDL2)
else()
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(SDL_STATIC_LIB ON)
+ set(SDL_SHARED_LIB OFF)
+ else()
+ set(SDL_STATIC_LIB OFF)
+ set(SDL_SHARED_LIB ON)
+ endif()
+ if(VCPKG_CRT_LINKAGE STREQUAL static)
+ set(SDL_STATIC_CRT ON)
+ else()
+ set(SDL_STATIC_CRT OFF)
+ endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
- -DSDL_STATIC=OFF
+ -DSDL_STATIC=${SDL_STATIC_LIB}
+ -DSDL_SHARED=${SDL_SHARED_LIB}
+ -DFORCE_STATIC_VCRT=${SDL_STATIC_CRT}
)
vcpkg_install_cmake()
@@ -43,5 +54,10 @@ else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
endif()
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib)
+file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib)
+
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright)
vcpkg_copy_pdbs()