diff options
| author | Alexander Saprykin <xelfium@gmail.com> | 2018-05-26 13:27:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-26 13:27:14 +0200 |
| commit | 4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5 (patch) | |
| tree | d95c9490352eb73f078d34a33bc4bb44ac9fa48b /ports/plibsys | |
| parent | fb689bd13dd6ba563a885d71fff1dd2b32a615db (diff) | |
| parent | 2ac7527b40b1dbeb7856b9f763362c1e139e2ca9 (diff) | |
| download | vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.tar.gz vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.zip | |
Merge pull request #1 from Microsoft/master
Update vcpkg from upstream
Diffstat (limited to 'ports/plibsys')
| -rw-r--r-- | ports/plibsys/CONTROL | 3 | ||||
| -rw-r--r-- | ports/plibsys/portfile.cmake | 69 |
2 files changed, 72 insertions, 0 deletions
diff --git a/ports/plibsys/CONTROL b/ports/plibsys/CONTROL new file mode 100644 index 000000000..92d57ca47 --- /dev/null +++ b/ports/plibsys/CONTROL @@ -0,0 +1,3 @@ +Source: plibsys
+Version: 0.0.3-1
+Description: Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more.
diff --git a/ports/plibsys/portfile.cmake b/ports/plibsys/portfile.cmake new file mode 100644 index 000000000..b70fe771d --- /dev/null +++ b/ports/plibsys/portfile.cmake @@ -0,0 +1,69 @@ +include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO saprykin/plibsys
+ REF 0.0.3
+ SHA512 e2393fecb3e5feae81a4d60cd03e2ca17bc58453efaa5598beacdc5acedbc7c90374f9f851301fee08ace8dace843a2dff8c1c449cd457302363c98dd24e0415
+ HEAD_REF master
+)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ SET(PLIBSYS_STATIC OFF)
+else()
+ SET(PLIBSYS_STATIC ON)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DPLIBSYS_TESTS=OFF
+ -DPLIBSYS_COVERAGE=OFF
+ -DPLIBSYS_BUILD_STATIC=${PLIBSYS_STATIC}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/plibsys RENAME copyright)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(PLIBSYS_FILENAME plibsys)
+
+ # Put shared libraries into the proper directory
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
+
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/plibsys.dll ${CURRENT_PACKAGES_DIR}/bin/plibsys.dll)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.dll ${CURRENT_PACKAGES_DIR}/debug/bin/plibsys.dll)
+else()
+ set(PLIBSYS_FILENAME plibsysstatic)
+
+ # For static build remove dynamic libraries
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/plibsys.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/plibsys.dll)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.lib)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.dll)
+endif()
+
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tmp)
+
+# Save library files
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${PLIBSYS_FILENAME}.lib ${CURRENT_PACKAGES_DIR}/tmp/plibsys.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${PLIBSYS_FILENAME}.lib ${CURRENT_PACKAGES_DIR}/tmp/plibsys_debug.lib)
+
+# Remove unused shared libraries
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib)
+
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib)
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib)
+
+# Re-install library files
+file(RENAME ${CURRENT_PACKAGES_DIR}/tmp/plibsys.lib ${CURRENT_PACKAGES_DIR}/lib/plibsys.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/tmp/plibsys_debug.lib ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.lib)
+
+# Remove duplicate library files (already installed)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tmp)
+
+vcpkg_copy_pdbs()
|
