Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ports/pfultz2-linq/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: pfultz2-linq
Version: 2018-02-08
Description: Linq for list comprehension in C++
Build-Depends: boost-fusion, boost-iterator, boost-mpl, boost-optional, boost-preprocessor, boost-range, boost-static-assert, boost-type-traits, boost-unordered, boost-utility
27 changes: 27 additions & 0 deletions ports/pfultz2-linq/fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34ae7c7..dd35281 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.0)
-project(linq)
-
-enable_testing()
+project(linq CXX)

find_package(Boost)

@@ -37,6 +35,10 @@ install(FILES
install(FILES linq.h DESTINATION include)
install(DIRECTORY linq DESTINATION include)

-add_executable(linq-test test.cpp)
-target_link_libraries(linq-test linq ${Boost_test_LIBRARY_RELEASE})
-add_test(NAME linq-test COMMAND linq-test)
+include(CTest)
+
+if (BUILD_TESTING)
+ add_executable(linq-test test.cpp)
+ target_link_libraries(linq-test linq ${Boost_test_LIBRARY_RELEASE})
+ add_test(NAME linq-test COMMAND linq-test)
+endif (BUILD_TESTING)
32 changes: 32 additions & 0 deletions ports/pfultz2-linq/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# header-only library

include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pfultz2/Linq
REF 51e45d25faa95f945d0bf515f214feed4401e542
SHA512 128973f79f1cc1f63b5ad4501cc3247352559de382c2ab2fc8fb2df90f8926e373db3469414a2e3816f27fb606c1139a25e94b4e5203201e7ab0320b4b004b4d
HEAD_REF master
PATCHES
fix-cmake.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/linq TARGET_PATH share/linq)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)

# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)

# CMake integration test
vcpkg_test_cmake(PACKAGE_NAME linq)