From c1ccc8e0fe439e86e8abe5e782630dd614e5dc2b Mon Sep 17 00:00:00 2001 From: Dusan Baran Date: Tue, 30 Apr 2024 15:01:49 +0200 Subject: [PATCH 01/10] Add libfaketime port --- ports/libfaketime/CMakeLists.txt | 38 ++++++++++++++++++++++++++++++++ ports/libfaketime/portfile.cmake | 23 +++++++++++++++++++ ports/libfaketime/usage | 3 +++ ports/libfaketime/vcpkg.json | 14 ++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 ports/libfaketime/CMakeLists.txt create mode 100644 ports/libfaketime/portfile.cmake create mode 100644 ports/libfaketime/usage create mode 100644 ports/libfaketime/vcpkg.json diff --git a/ports/libfaketime/CMakeLists.txt b/ports/libfaketime/CMakeLists.txt new file mode 100644 index 00000000000000..7f2c6d4d38dc20 --- /dev/null +++ b/ports/libfaketime/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.12) + +project(faketime) + +add_library( + ${PROJECT_NAME} + src/libfaketime.c +) + +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + target_link_libraries( + ${PROJECT_NAME} + rt + ) +endif() + +target_include_directories(${PROJECT_NAME} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/src +) + +file(GLOB_RECURSE PUBLIC_HEADERS "src/*.h") + +target_sources( + ${PROJECT_NAME} + PUBLIC + FILE_SET HEADERS + BASE_DIRS src + FILES ${PUBLIC_HEADERS} +) + +install(TARGETS ${PROJECT_NAME} + FILE_SET HEADERS + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) diff --git a/ports/libfaketime/portfile.cmake b/ports/libfaketime/portfile.cmake new file mode 100644 index 00000000000000..b84bf6861f2b87 --- /dev/null +++ b/ports/libfaketime/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wolfcw/libfaketime + REF v${VERSION} + SHA512 07c431bee21e31343b680d1322dd529ea276e3cc4dbec61646c12bf5d0263163faf6186efeb36b199e24b655578a493c43e3b7a7acf8eba8b9ff84a1e94d618b +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# Handle copyright and usage +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/libfaketime/usage b/ports/libfaketime/usage new file mode 100644 index 00000000000000..39f9d1a949ab1d --- /dev/null +++ b/ports/libfaketime/usage @@ -0,0 +1,3 @@ +libfaketime provides runtime libraries: + + find_library(LIBFAKETIME NAMES faketime) diff --git a/ports/libfaketime/vcpkg.json b/ports/libfaketime/vcpkg.json new file mode 100644 index 00000000000000..ee5c0e8a24f5a2 --- /dev/null +++ b/ports/libfaketime/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "libfaketime", + "version": "0.9.10", + "license": "GPL-2.0-only", + "description": "libfaketime modifies the system time for a single application", + "supports": "!windows", + "homepage": "https://github.com/wolfcw/libfaketime", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} From 70deb0ed143b1715c533f008528c8ee3f05648cf Mon Sep 17 00:00:00 2001 From: Dusan Baran Date: Tue, 30 Apr 2024 15:04:52 +0200 Subject: [PATCH 02/10] Format --- ports/libfaketime/vcpkg.json | 4 ++-- versions/baseline.json | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/libfaketime/vcpkg.json b/ports/libfaketime/vcpkg.json index ee5c0e8a24f5a2..d2d43f3530836b 100644 --- a/ports/libfaketime/vcpkg.json +++ b/ports/libfaketime/vcpkg.json @@ -1,10 +1,10 @@ { "name": "libfaketime", "version": "0.9.10", - "license": "GPL-2.0-only", "description": "libfaketime modifies the system time for a single application", - "supports": "!windows", "homepage": "https://github.com/wolfcw/libfaketime", + "license": "GPL-2.0-only", + "supports": "!windows", "dependencies": [ { "name": "vcpkg-cmake", diff --git a/versions/baseline.json b/versions/baseline.json index 21d7c09eb6ac5f..681280f589e602 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4372,6 +4372,10 @@ "baseline": "1.13.2", "port-version": 2 }, + "libfaketime": { + "baseline": "0.9.10", + "port-version": 0 + }, "libffi": { "baseline": "3.4.6", "port-version": 0 From 62908d9daf900f08144de38b91586b36abf227f8 Mon Sep 17 00:00:00 2001 From: Dusan Baran Date: Tue, 30 Apr 2024 15:05:59 +0200 Subject: [PATCH 03/10] Commit x-add-version --- versions/l-/libfaketime.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 versions/l-/libfaketime.json diff --git a/versions/l-/libfaketime.json b/versions/l-/libfaketime.json new file mode 100644 index 00000000000000..3a8d77dadb7325 --- /dev/null +++ b/versions/l-/libfaketime.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "451debe90ea3a82a03d3ba30eeaa0abc3e9409a3", + "version": "0.9.10", + "port-version": 0 + } + ] +} From 6c24e5ca2ba695803164b4d54f6a4a129e036555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Baran?= Date: Thu, 2 May 2024 21:35:39 +0200 Subject: [PATCH 04/10] Disable support for arm as well --- ports/libfaketime/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libfaketime/vcpkg.json b/ports/libfaketime/vcpkg.json index d2d43f3530836b..984e5b4c5794d7 100644 --- a/ports/libfaketime/vcpkg.json +++ b/ports/libfaketime/vcpkg.json @@ -4,7 +4,7 @@ "description": "libfaketime modifies the system time for a single application", "homepage": "https://github.com/wolfcw/libfaketime", "license": "GPL-2.0-only", - "supports": "!windows", + "supports": "!(windows|arm)", "dependencies": [ { "name": "vcpkg-cmake", From 27632d27087b3f80beae6d3bc828ecdeea52a091 Mon Sep 17 00:00:00 2001 From: Dusan Baran Date: Tue, 7 May 2024 14:33:30 +0200 Subject: [PATCH 05/10] Update version database --- versions/l-/libfaketime.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/versions/l-/libfaketime.json b/versions/l-/libfaketime.json index 3a8d77dadb7325..7fab2e125b66a7 100644 --- a/versions/l-/libfaketime.json +++ b/versions/l-/libfaketime.json @@ -4,6 +4,11 @@ "git-tree": "451debe90ea3a82a03d3ba30eeaa0abc3e9409a3", "version": "0.9.10", "port-version": 0 + }, + { + "git-tree": "43c3d525b4e071c4265c512fda07775af3a0df6a", + "version": "0.9.10", + "port-version": 1 } ] } From c17ce4606f733d2df2f0c0ad2a91c188b6cb01cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Baran?= Date: Tue, 14 May 2024 09:41:22 +0200 Subject: [PATCH 06/10] Update vcpkg.json --- ports/libfaketime/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libfaketime/vcpkg.json b/ports/libfaketime/vcpkg.json index 984e5b4c5794d7..8dc0ef48730f56 100644 --- a/ports/libfaketime/vcpkg.json +++ b/ports/libfaketime/vcpkg.json @@ -4,7 +4,7 @@ "description": "libfaketime modifies the system time for a single application", "homepage": "https://github.com/wolfcw/libfaketime", "license": "GPL-2.0-only", - "supports": "!(windows|arm)", + "supports": "linux", "dependencies": [ { "name": "vcpkg-cmake", From 7f279a2d40e9a166c5521be698b310117ebbe921 Mon Sep 17 00:00:00 2001 From: Dusan Baran Date: Tue, 14 May 2024 10:12:27 +0200 Subject: [PATCH 07/10] Update version database --- versions/l-/libfaketime.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libfaketime.json b/versions/l-/libfaketime.json index 7fab2e125b66a7..b930ee01fa950e 100644 --- a/versions/l-/libfaketime.json +++ b/versions/l-/libfaketime.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "451debe90ea3a82a03d3ba30eeaa0abc3e9409a3", + "git-tree": "3a3a6cebdf8e4dc052903a111d50c9ee1eb90289", "version": "0.9.10", "port-version": 0 }, From 9fdac1484e63c4736983929d793467e15bbdf908 Mon Sep 17 00:00:00 2001 From: Dusan Baran Date: Mon, 20 May 2024 14:42:20 +0200 Subject: [PATCH 08/10] Rework to use Make --- ports/libfaketime/CMakeLists.txt | 38 -------------------------------- ports/libfaketime/portfile.cmake | 10 ++------- ports/libfaketime/vcpkg.json | 6 +---- 3 files changed, 3 insertions(+), 51 deletions(-) delete mode 100644 ports/libfaketime/CMakeLists.txt diff --git a/ports/libfaketime/CMakeLists.txt b/ports/libfaketime/CMakeLists.txt deleted file mode 100644 index 7f2c6d4d38dc20..00000000000000 --- a/ports/libfaketime/CMakeLists.txt +++ /dev/null @@ -1,38 +0,0 @@ -cmake_minimum_required(VERSION 3.12) - -project(faketime) - -add_library( - ${PROJECT_NAME} - src/libfaketime.c -) - -if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - target_link_libraries( - ${PROJECT_NAME} - rt - ) -endif() - -target_include_directories(${PROJECT_NAME} - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/src -) - -file(GLOB_RECURSE PUBLIC_HEADERS "src/*.h") - -target_sources( - ${PROJECT_NAME} - PUBLIC - FILE_SET HEADERS - BASE_DIRS src - FILES ${PUBLIC_HEADERS} -) - -install(TARGETS ${PROJECT_NAME} - FILE_SET HEADERS - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -) diff --git a/ports/libfaketime/portfile.cmake b/ports/libfaketime/portfile.cmake index b84bf6861f2b87..13d49332660387 100644 --- a/ports/libfaketime/portfile.cmake +++ b/ports/libfaketime/portfile.cmake @@ -7,14 +7,8 @@ vcpkg_from_github( SHA512 07c431bee21e31343b680d1322dd529ea276e3cc4dbec61646c12bf5d0263163faf6186efeb36b199e24b655578a493c43e3b7a7acf8eba8b9ff84a1e94d618b ) -file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} -) - -vcpkg_cmake_install() -vcpkg_copy_pdbs() +vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}" SKIP_CONFIGURE) +vcpkg_install_make() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/libfaketime/vcpkg.json b/ports/libfaketime/vcpkg.json index 8dc0ef48730f56..5b54fd0b2ab4e5 100644 --- a/ports/libfaketime/vcpkg.json +++ b/ports/libfaketime/vcpkg.json @@ -4,11 +4,7 @@ "description": "libfaketime modifies the system time for a single application", "homepage": "https://github.com/wolfcw/libfaketime", "license": "GPL-2.0-only", - "supports": "linux", + "supports": "linux | osx", "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - } ] } From f4296cfc67731cec4cf5c23eeace5a044f5b7134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Baran?= Date: Mon, 20 May 2024 18:32:15 +0200 Subject: [PATCH 09/10] Update ports/libfaketime/portfile.cmake Co-authored-by: Kai Pastor --- ports/libfaketime/portfile.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/libfaketime/portfile.cmake b/ports/libfaketime/portfile.cmake index 13d49332660387..a0fa5b7c4bd9fc 100644 --- a/ports/libfaketime/portfile.cmake +++ b/ports/libfaketime/portfile.cmake @@ -7,7 +7,10 @@ vcpkg_from_github( SHA512 07c431bee21e31343b680d1322dd529ea276e3cc4dbec61646c12bf5d0263163faf6186efeb36b199e24b655578a493c43e3b7a7acf8eba8b9ff84a1e94d618b ) -vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}" SKIP_CONFIGURE) +vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}" + SKIP_CONFIGURE + COPY_SOURCE +) vcpkg_install_make() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") From ddd4ff0515be24dfd62c4f56f10f6463793e94f2 Mon Sep 17 00:00:00 2001 From: Dusan Baran Date: Tue, 21 May 2024 10:27:06 +0200 Subject: [PATCH 10/10] x-add-version --- ports/libfaketime/vcpkg.json | 4 +--- versions/l-/libfaketime.json | 7 +------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/ports/libfaketime/vcpkg.json b/ports/libfaketime/vcpkg.json index 5b54fd0b2ab4e5..ce84bfa4bc09e5 100644 --- a/ports/libfaketime/vcpkg.json +++ b/ports/libfaketime/vcpkg.json @@ -4,7 +4,5 @@ "description": "libfaketime modifies the system time for a single application", "homepage": "https://github.com/wolfcw/libfaketime", "license": "GPL-2.0-only", - "supports": "linux | osx", - "dependencies": [ - ] + "supports": "linux | osx" } diff --git a/versions/l-/libfaketime.json b/versions/l-/libfaketime.json index b930ee01fa950e..f02e75c214097f 100644 --- a/versions/l-/libfaketime.json +++ b/versions/l-/libfaketime.json @@ -1,14 +1,9 @@ { "versions": [ { - "git-tree": "3a3a6cebdf8e4dc052903a111d50c9ee1eb90289", + "git-tree": "fc135622b3c36f03f55e64b1bf4675ee3f54c072", "version": "0.9.10", "port-version": 0 - }, - { - "git-tree": "43c3d525b4e071c4265c512fda07775af3a0df6a", - "version": "0.9.10", - "port-version": 1 } ] }