diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2020-02-04 15:50:10 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2020-02-04 15:50:10 -0800 |
| commit | 6f66ad14fe9da11d4bf50f5b25b4da86ed971c53 (patch) | |
| tree | 0f5dbcd1719cd6a8e486c4058cfefd607d58aa6c /ports/teemo | |
| parent | d502f061bb3ee0258d6453acbf258b9e5d93d564 (diff) | |
| parent | d808514c9df44bb97d6eccff952bfe8ec4e156f7 (diff) | |
| download | vcpkg-6f66ad14fe9da11d4bf50f5b25b4da86ed971c53.tar.gz vcpkg-6f66ad14fe9da11d4bf50f5b25b4da86ed971c53.zip | |
Merge remote-tracking branch 'origin/master' into HEAD
Diffstat (limited to 'ports/teemo')
| -rw-r--r-- | ports/teemo/CONTROL | 5 | ||||
| -rw-r--r-- | ports/teemo/adjust-install-dir.patch | 22 | ||||
| -rw-r--r-- | ports/teemo/portfile.cmake | 44 |
3 files changed, 71 insertions, 0 deletions
diff --git a/ports/teemo/CONTROL b/ports/teemo/CONTROL new file mode 100644 index 000000000..4d96fe5af --- /dev/null +++ b/ports/teemo/CONTROL @@ -0,0 +1,5 @@ +Source: teemo +Version: 1.2-1 +Build-Depends: curl[non-http], cpprestsdk +Description: C++ File Download Library, support Multithreading, Breakpoint Transmission, Speed Limit, Real-time Speed. +Homepage: https://github.com/winsoft666/teemo
\ No newline at end of file diff --git a/ports/teemo/adjust-install-dir.patch b/ports/teemo/adjust-install-dir.patch new file mode 100644 index 000000000..3ca1dcf56 --- /dev/null +++ b/ports/teemo/adjust-install-dir.patch @@ -0,0 +1,22 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 20de97c..0009c8a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -108,7 +108,7 @@ set_target_properties(${LIB_NAME}
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" )
+
+ target_include_directories(${LIB_NAME} INTERFACE
+- $<INSTALL_INTERFACE:include>)
++ $<INSTALL_INTERFACE:include/teemo>)
+
+ install(TARGETS ${LIB_NAME}
+ EXPORT ${LIB_NAME}-target
+@@ -117,7 +117,7 @@ install(TARGETS ${LIB_NAME}
+ ARCHIVE DESTINATION lib)
+
+
+-install(FILES ${HEADER_FILES} DESTINATION include)
++install(FILES ${HEADER_FILES} DESTINATION include/teemo)
+
+
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../CMake/teemo-config.cmake
diff --git a/ports/teemo/portfile.cmake b/ports/teemo/portfile.cmake new file mode 100644 index 000000000..07b5d5a53 --- /dev/null +++ b/ports/teemo/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO winsoft666/teemo + REF 15edb1705d18ee78b32516a8ae52d6b10507af62 + SHA512 7dbe917d48b1e8c4b004bad33d8a82524e501d8bec6cdeca4e89ebbe8ed79fa484028c3afd365347e31fa83f64a6f0f5a42ea0063baa7c0985824fb3dffcc8f2 + HEAD_REF master + PATCHES + # Installing "slice.h" to the root include directory causes build issues in many other libraries + adjust-install-dir.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" TEEMO_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTEEMO_STATIC:BOOL=${TEEMO_STATIC} + -DBUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/teemo) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/teemo) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/teemo) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/teemo) +endif() + +file(READ ${CURRENT_PACKAGES_DIR}/include/teemo/teemo.h TEEMO_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "#ifdef TEEMO_STATIC" "#if 1" TEEMO_H "${TEEMO_H}") +else() + string(REPLACE "#ifdef TEEMO_STATIC" "#if 0" TEEMO_H "${TEEMO_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/teemo/teemo.h "${TEEMO_H}") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs()
\ No newline at end of file |
