From 7840156f45fed76af8ec9b4d6c9d6dd179a9ab45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Mon, 6 May 2024 00:32:49 +0200 Subject: [PATCH 01/19] Added faker-cxx library as port --- ports/faker-cxx/CMakeLists.txt.patch | 16 +++++++++++++++ ports/faker-cxx/Helper.h.patch | 13 ++++++++++++ ports/faker-cxx/portfile.cmake | 30 ++++++++++++++++++++++++++++ ports/faker-cxx/usage | 4 ++++ ports/faker-cxx/vcpkg.json | 18 +++++++++++++++++ 5 files changed, 81 insertions(+) create mode 100644 ports/faker-cxx/CMakeLists.txt.patch create mode 100644 ports/faker-cxx/Helper.h.patch create mode 100644 ports/faker-cxx/portfile.cmake create mode 100644 ports/faker-cxx/usage create mode 100644 ports/faker-cxx/vcpkg.json diff --git a/ports/faker-cxx/CMakeLists.txt.patch b/ports/faker-cxx/CMakeLists.txt.patch new file mode 100644 index 00000000000000..4b2bf833ea7ab4 --- /dev/null +++ b/ports/faker-cxx/CMakeLists.txt.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e9080fc..120ba8f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -172,9 +172,8 @@ install(EXPORT ${LIBRARY_NAME}-targets + if (APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION + VERSION_LESS 12)) + +- add_subdirectory(externals/fmt) +- set(FMT_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/externals/fmt/include") +- target_link_libraries(${LIBRARY_NAME} PRIVATE fmt) ++ find_package(fmt CONFIG REQUIRED) ++ target_link_libraries(${LIBRARY_NAME} PRIVATE fmt::fmt) + endif () + + if (BUILD_FAKER_TESTS) diff --git a/ports/faker-cxx/Helper.h.patch b/ports/faker-cxx/Helper.h.patch new file mode 100644 index 00000000000000..fe9c6515dade35 --- /dev/null +++ b/ports/faker-cxx/Helper.h.patch @@ -0,0 +1,13 @@ +diff --git a/include/faker-cxx/Helper.h b/include/faker-cxx/Helper.h +index 51d5eab..c17e41c 100644 +--- a/include/faker-cxx/Helper.h ++++ b/include/faker-cxx/Helper.h +@@ -89,7 +89,7 @@ public: + { + throw std::invalid_argument{"Data is empty."}; + } +- T item; ++ T item{}; + std::sample(data.begin(), data.end(), &item, 1, pseudoRandomGenerator); + return item; + } diff --git a/ports/faker-cxx/portfile.cmake b/ports/faker-cxx/portfile.cmake new file mode 100644 index 00000000000000..39ef4b0ad63d3e --- /dev/null +++ b/ports/faker-cxx/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cieslarmichal/faker-cxx + REF 266142b + SHA512 0ad3550d45df2adda70ad64fc1afffc2d39f6644e46029b6b3f0fd42eed071b55daeee9da7456b8b75e1da566bd0d1605518722b2831dba31bf9787506ecfa9d + HEAD_REF vcpkg + PATCHES + "CMakeLists.txt.patch" + "Helper.h.patch" +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_FAKER_TESTS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + PACKAGE_NAME "faker-cxx" + CONFIG_PATH /lib/cmake/faker-cxx +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/") +file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/faker-cxx/usage b/ports/faker-cxx/usage new file mode 100644 index 00000000000000..5e0b3b56c56a9d --- /dev/null +++ b/ports/faker-cxx/usage @@ -0,0 +1,4 @@ +faker-cxx provides CMake targets: + +find_package(faker-cxx CONFIG REQUIRED) +target_link_libraries(main PRIVATE faker-cxx::faker-cxx) \ No newline at end of file diff --git a/ports/faker-cxx/vcpkg.json b/ports/faker-cxx/vcpkg.json new file mode 100644 index 00000000000000..57e7ce34d989e4 --- /dev/null +++ b/ports/faker-cxx/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "faker-cxx", + "version-string": "v1.0.0", + "homepage": "https://github.com/cieslarmichal/faker-cxx", + "description": "C++ Faker library for generating fake (but realistic) data.", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "fmt" + ] +} \ No newline at end of file From 748f2e17c9b3e1518bc8a3a635199b558816c59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Mon, 6 May 2024 00:34:39 +0200 Subject: [PATCH 02/19] Formatting vcpkg manifest --- ports/faker-cxx/vcpkg.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ports/faker-cxx/vcpkg.json b/ports/faker-cxx/vcpkg.json index 57e7ce34d989e4..a1ca43c0ea889b 100644 --- a/ports/faker-cxx/vcpkg.json +++ b/ports/faker-cxx/vcpkg.json @@ -1,18 +1,18 @@ { - "name": "faker-cxx", - "version-string": "v1.0.0", - "homepage": "https://github.com/cieslarmichal/faker-cxx", - "description": "C++ Faker library for generating fake (but realistic) data.", - "license": "MIT", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - "fmt" - ] -} \ No newline at end of file + "name": "faker-cxx", + "version-string": "v1.0.0", + "description": "C++ Faker library for generating fake (but realistic) data.", + "homepage": "https://github.com/cieslarmichal/faker-cxx", + "license": "MIT", + "dependencies": [ + "fmt", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} From 7c1be00ab28fa60e76de75f63c0db7d0a5c37d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Mon, 6 May 2024 00:35:09 +0200 Subject: [PATCH 03/19] version database --- versions/baseline.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/versions/baseline.json b/versions/baseline.json index 0c65240f59fc08..03c9e65a8a23f8 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2592,6 +2592,10 @@ "baseline": "2.4.0", "port-version": 2 }, + "faker-cxx": { + "baseline": "v1.0.0", + "port-version": 0 + }, "fameta-counter": { "baseline": "2021-02-13", "port-version": 0 From 0f0cfe584dfe7e566ec0dea8bfc8867a6921ec01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Mon, 6 May 2024 22:34:36 +0200 Subject: [PATCH 04/19] added missing version database file --- versions/f-/faker-cxx.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 versions/f-/faker-cxx.json diff --git a/versions/f-/faker-cxx.json b/versions/f-/faker-cxx.json new file mode 100644 index 00000000000000..d5299a05b0c4cc --- /dev/null +++ b/versions/f-/faker-cxx.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "3a0785c8ac5c339e2c6dade61be6b14145835094", + "version-string": "v1.0.0", + "port-version": 0 + } + ] +} From 0dcc29fca4e4cfb1197863f79fa9a7aaffd1ad06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Mon, 6 May 2024 22:55:37 +0200 Subject: [PATCH 05/19] android build fix --- ports/faker-cxx/FormatHelper.h.patch | 22 ++++++++++++++++++++++ ports/faker-cxx/portfile.cmake | 1 + 2 files changed, 23 insertions(+) create mode 100644 ports/faker-cxx/FormatHelper.h.patch diff --git a/ports/faker-cxx/FormatHelper.h.patch b/ports/faker-cxx/FormatHelper.h.patch new file mode 100644 index 00000000000000..d033dd670dc24e --- /dev/null +++ b/ports/faker-cxx/FormatHelper.h.patch @@ -0,0 +1,22 @@ +diff --git a/src/common/FormatHelper.h b/src/common/FormatHelper.h +index 6356ee9..8541469 100644 +--- a/src/common/FormatHelper.h ++++ b/src/common/FormatHelper.h +@@ -5,7 +5,7 @@ + #include + #include + +-#if defined(__APPLE__) || (defined(__GNUC__) && (__GNUC__ < 12) && !defined(__clang__)) ++#if defined(__APPLE__) || defined(__ANDROID__) || (defined(__GNUC__) && (__GNUC__ < 12) && !defined(__clang__)) + #include + #else + #include +@@ -16,7 +16,7 @@ namespace faker + class FormatHelper + { + public: +-#if defined(__APPLE__) || (defined(__GNUC__) && (__GNUC__ < 12) && !defined(__clang__)) ++#if defined(__APPLE__) || defined(__ANDROID__) || (defined(__GNUC__) && (__GNUC__ < 12) && !defined(__clang__)) + template + static std::string format(fmt::format_string fmt, Args&&... args) + { diff --git a/ports/faker-cxx/portfile.cmake b/ports/faker-cxx/portfile.cmake index 39ef4b0ad63d3e..2cd10acba5af68 100644 --- a/ports/faker-cxx/portfile.cmake +++ b/ports/faker-cxx/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( HEAD_REF vcpkg PATCHES "CMakeLists.txt.patch" + "FormatHelper.h.patch" "Helper.h.patch" ) From e945d75508433190716c42a0bb326b9ed99ad217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Mon, 6 May 2024 23:06:11 +0200 Subject: [PATCH 06/19] include fmt in CMakeLists.txt on Android build --- ports/faker-cxx/CMakeLists.txt.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/faker-cxx/CMakeLists.txt.patch b/ports/faker-cxx/CMakeLists.txt.patch index 4b2bf833ea7ab4..a8d299124601e2 100644 --- a/ports/faker-cxx/CMakeLists.txt.patch +++ b/ports/faker-cxx/CMakeLists.txt.patch @@ -1,9 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e9080fc..120ba8f 100644 +index a7c70d1..4aade40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -172,9 +172,8 @@ install(EXPORT ${LIBRARY_NAME}-targets - if (APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION +@@ -110,12 +110,11 @@ target_include_directories( + INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include" + PRIVATE "${CMAKE_CURRENT_LIST_DIR}/include") + +-if (APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION ++if (APPLE OR ANDROID OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12)) - add_subdirectory(externals/fmt) From 64afeaec8a9f0f3cddd3b309f25851dfd6c9f9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Mon, 6 May 2024 23:27:28 +0200 Subject: [PATCH 07/19] fixed CMakeLists.txt patch --- ports/faker-cxx/CMakeLists.txt.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/faker-cxx/CMakeLists.txt.patch b/ports/faker-cxx/CMakeLists.txt.patch index a8d299124601e2..a050bcd4533f20 100644 --- a/ports/faker-cxx/CMakeLists.txt.patch +++ b/ports/faker-cxx/CMakeLists.txt.patch @@ -1,10 +1,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a7c70d1..4aade40 100644 +index c0c1473..a85de65 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -110,12 +110,11 @@ target_include_directories( - INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include" - PRIVATE "${CMAKE_CURRENT_LIST_DIR}/include") +@@ -127,12 +127,11 @@ install(EXPORT ${LIBRARY_NAME}-targets + FILE ${LIBRARY_NAME}-config.cmake + DESTINATION lib/cmake/${LIBRARY_NAME}) -if (APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION +if (APPLE OR ANDROID OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION From 2fad384e30cc0f5a37779d8dbbefe79fb8b0bd0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Thu, 9 May 2024 14:52:42 +0200 Subject: [PATCH 08/19] Apply suggestions from code review usage new lines, vcpkg copyright function, config path fix, head_ref and ref Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Kai Pastor --- ports/faker-cxx/portfile.cmake | 9 ++++----- ports/faker-cxx/usage | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ports/faker-cxx/portfile.cmake b/ports/faker-cxx/portfile.cmake index 2cd10acba5af68..c3f9e263164d22 100644 --- a/ports/faker-cxx/portfile.cmake +++ b/ports/faker-cxx/portfile.cmake @@ -3,9 +3,9 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cieslarmichal/faker-cxx - REF 266142b + REF "v${VERSION}" SHA512 0ad3550d45df2adda70ad64fc1afffc2d39f6644e46029b6b3f0fd42eed071b55daeee9da7456b8b75e1da566bd0d1605518722b2831dba31bf9787506ecfa9d - HEAD_REF vcpkg + HEAD_REF master PATCHES "CMakeLists.txt.patch" "FormatHelper.h.patch" @@ -22,10 +22,9 @@ vcpkg_cmake_install() vcpkg_cmake_config_fixup( PACKAGE_NAME "faker-cxx" - CONFIG_PATH /lib/cmake/faker-cxx + CONFIG_PATH lib/cmake/faker-cxx ) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") -file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/") -file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/faker-cxx/usage b/ports/faker-cxx/usage index 5e0b3b56c56a9d..f1645103ee0fa1 100644 --- a/ports/faker-cxx/usage +++ b/ports/faker-cxx/usage @@ -1,4 +1,4 @@ faker-cxx provides CMake targets: find_package(faker-cxx CONFIG REQUIRED) -target_link_libraries(main PRIVATE faker-cxx::faker-cxx) \ No newline at end of file +target_link_libraries(main PRIVATE faker-cxx::faker-cxx) From f2340520e8733057c81cb575af1a0d1be1e3f424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Thu, 9 May 2024 15:36:04 +0200 Subject: [PATCH 09/19] android build clang++ ranges fix --- ports/faker-cxx/CMakeLists.txt.patch | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ports/faker-cxx/CMakeLists.txt.patch b/ports/faker-cxx/CMakeLists.txt.patch index a050bcd4533f20..bd71c9cd34fd1b 100644 --- a/ports/faker-cxx/CMakeLists.txt.patch +++ b/ports/faker-cxx/CMakeLists.txt.patch @@ -1,10 +1,19 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index c0c1473..a85de65 100644 +index a7c70d1..29f9692 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -127,12 +127,11 @@ install(EXPORT ${LIBRARY_NAME}-targets - FILE ${LIBRARY_NAME}-config.cmake - DESTINATION lib/cmake/${LIBRARY_NAME}) +@@ -11,6 +11,8 @@ option(BUILD_FAKER_TESTS DEFAULT ON) + + if (MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20 /permissive- /bigobj") ++elseif (ANDROID) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -stdlib=libc++ -fexperimental-library") + else () + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wconversion -Wformat -Werror" +@@ -110,12 +112,11 @@ target_include_directories( + INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include" + PRIVATE "${CMAKE_CURRENT_LIST_DIR}/include") -if (APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION +if (APPLE OR ANDROID OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION From 07a455353105cd1fbf56aeafce180253dbb77648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Fri, 10 May 2024 22:51:49 +0200 Subject: [PATCH 10/19] Apply suggestions from code review remove stdlib enforcement Co-authored-by: Kai Pastor --- ports/faker-cxx/CMakeLists.txt.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/faker-cxx/CMakeLists.txt.patch b/ports/faker-cxx/CMakeLists.txt.patch index bd71c9cd34fd1b..c0fef62ef3676f 100644 --- a/ports/faker-cxx/CMakeLists.txt.patch +++ b/ports/faker-cxx/CMakeLists.txt.patch @@ -7,7 +7,7 @@ index a7c70d1..29f9692 100644 if (MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20 /permissive- /bigobj") +elseif (ANDROID) -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -stdlib=libc++ -fexperimental-library") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -fexperimental-library") else () set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wconversion -Wformat -Werror" From 70c136b72a95a555a3ee24dccc38f7a07370c183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Fri, 10 May 2024 23:17:26 +0200 Subject: [PATCH 11/19] fixed patch file --- ports/faker-cxx/CMakeLists.txt.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/faker-cxx/CMakeLists.txt.patch b/ports/faker-cxx/CMakeLists.txt.patch index c0fef62ef3676f..1361befbb968f8 100644 --- a/ports/faker-cxx/CMakeLists.txt.patch +++ b/ports/faker-cxx/CMakeLists.txt.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a7c70d1..29f9692 100644 +index a7c70d1..b648960 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,8 @@ option(BUILD_FAKER_TESTS DEFAULT ON) From 67448a61336e760390835e30b37e8c044f29024c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Sat, 11 May 2024 00:10:59 +0200 Subject: [PATCH 12/19] CMakeLists.txt.patch fixes for master ref --- ports/faker-cxx/CMakeLists.txt.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/faker-cxx/CMakeLists.txt.patch b/ports/faker-cxx/CMakeLists.txt.patch index 1361befbb968f8..6a54cf5660d1f5 100644 --- a/ports/faker-cxx/CMakeLists.txt.patch +++ b/ports/faker-cxx/CMakeLists.txt.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a7c70d1..b648960 100644 +index c0c1473..f2e5eae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,8 @@ option(BUILD_FAKER_TESTS DEFAULT ON) @@ -11,9 +11,9 @@ index a7c70d1..b648960 100644 else () set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wconversion -Wformat -Werror" -@@ -110,12 +112,11 @@ target_include_directories( - INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include" - PRIVATE "${CMAKE_CURRENT_LIST_DIR}/include") +@@ -127,12 +129,11 @@ install(EXPORT ${LIBRARY_NAME}-targets + FILE ${LIBRARY_NAME}-config.cmake + DESTINATION lib/cmake/${LIBRARY_NAME}) -if (APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION +if (APPLE OR ANDROID OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION From 6e102e919b334f60d948cc62c560048c1ac14ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Sat, 11 May 2024 15:03:41 +0200 Subject: [PATCH 13/19] fixed git-tree hash --- versions/f-/faker-cxx.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/f-/faker-cxx.json b/versions/f-/faker-cxx.json index d5299a05b0c4cc..569d1a41a222fd 100644 --- a/versions/f-/faker-cxx.json +++ b/versions/f-/faker-cxx.json @@ -1,9 +1,9 @@ { "versions": [ { - "git-tree": "3a0785c8ac5c339e2c6dade61be6b14145835094", + "git-tree": "65ab25cf164ad83cf952c6439431c03b5b89dfa6", "version-string": "v1.0.0", "port-version": 0 } ] -} +} \ No newline at end of file From 3e1d4ea524a12ca573ff2d32aae04c544d865cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Sat, 11 May 2024 16:03:25 +0200 Subject: [PATCH 14/19] removed android build, cleared -Werror flag --- ports/faker-cxx/CMakeLists.txt.patch | 20 ++++++++------------ ports/faker-cxx/vcpkg.json | 3 ++- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/ports/faker-cxx/CMakeLists.txt.patch b/ports/faker-cxx/CMakeLists.txt.patch index 6a54cf5660d1f5..f3b023cfb7df59 100644 --- a/ports/faker-cxx/CMakeLists.txt.patch +++ b/ports/faker-cxx/CMakeLists.txt.patch @@ -1,22 +1,18 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index c0c1473..f2e5eae 100644 +index c0c1473..72e6244 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -11,6 +11,8 @@ option(BUILD_FAKER_TESTS DEFAULT ON) - - if (MSVC) +@@ -13,7 +13,7 @@ if (MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20 /permissive- /bigobj") -+elseif (ANDROID) -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -fexperimental-library") else () set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wconversion -Wformat -Werror" -@@ -127,12 +129,11 @@ install(EXPORT ${LIBRARY_NAME}-targets - FILE ${LIBRARY_NAME}-config.cmake - DESTINATION lib/cmake/${LIBRARY_NAME}) +- "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wconversion -Wformat -Werror" ++ "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wconversion -Wformat" + ) + endif () --if (APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION -+if (APPLE OR ANDROID OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION +@@ -130,9 +130,8 @@ install(EXPORT ${LIBRARY_NAME}-targets + if (APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12)) - add_subdirectory(externals/fmt) diff --git a/ports/faker-cxx/vcpkg.json b/ports/faker-cxx/vcpkg.json index a1ca43c0ea889b..a25dae55ff4145 100644 --- a/ports/faker-cxx/vcpkg.json +++ b/ports/faker-cxx/vcpkg.json @@ -4,6 +4,7 @@ "description": "C++ Faker library for generating fake (but realistic) data.", "homepage": "https://github.com/cieslarmichal/faker-cxx", "license": "MIT", + "supports": "!android", "dependencies": [ "fmt", { @@ -15,4 +16,4 @@ "host": true } ] -} +} \ No newline at end of file From 7bb39ff7926a091280a23679b0c064d5a1197970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Sat, 11 May 2024 16:34:44 +0200 Subject: [PATCH 15/19] fixed git-tree --- versions/f-/faker-cxx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/f-/faker-cxx.json b/versions/f-/faker-cxx.json index 569d1a41a222fd..97d4f6cf4e493b 100644 --- a/versions/f-/faker-cxx.json +++ b/versions/f-/faker-cxx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "65ab25cf164ad83cf952c6439431c03b5b89dfa6", + "git-tree": "e90d971758f9e295dbb354267313fb6fa8124808", "version-string": "v1.0.0", "port-version": 0 } From 06426c6e972b79398b84c813ee04150ecbaacc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Mon, 13 May 2024 19:52:01 +0200 Subject: [PATCH 16/19] format version file --- ports/faker-cxx/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/faker-cxx/vcpkg.json b/ports/faker-cxx/vcpkg.json index a25dae55ff4145..34e10ccc95d841 100644 --- a/ports/faker-cxx/vcpkg.json +++ b/ports/faker-cxx/vcpkg.json @@ -16,4 +16,4 @@ "host": true } ] -} \ No newline at end of file +} From ba4c1acff4252f4b1e6c3c01a0d03aafc6762627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Mon, 13 May 2024 19:52:47 +0200 Subject: [PATCH 17/19] x-add-version formatted manifest --- versions/f-/faker-cxx.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/f-/faker-cxx.json b/versions/f-/faker-cxx.json index 97d4f6cf4e493b..df86d22551babc 100644 --- a/versions/f-/faker-cxx.json +++ b/versions/f-/faker-cxx.json @@ -1,9 +1,9 @@ { "versions": [ { - "git-tree": "e90d971758f9e295dbb354267313fb6fa8124808", + "git-tree": "3a62ce8645e79eb8295bd55d93543b407ca70180", "version-string": "v1.0.0", "port-version": 0 } ] -} \ No newline at end of file +} From 29e252fcc5202527a093f118de08852fb2cbdc20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Tue, 14 May 2024 22:13:26 +0200 Subject: [PATCH 18/19] vcpkg_cmake_config_fixup clean, patch files references without quotes, only static lib on win only --- ports/faker-cxx/portfile.cmake | 15 +++++++-------- ports/faker-cxx/usage | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ports/faker-cxx/portfile.cmake b/ports/faker-cxx/portfile.cmake index c3f9e263164d22..30498b982dfe64 100644 --- a/ports/faker-cxx/portfile.cmake +++ b/ports/faker-cxx/portfile.cmake @@ -1,4 +1,6 @@ -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -7,9 +9,9 @@ vcpkg_from_github( SHA512 0ad3550d45df2adda70ad64fc1afffc2d39f6644e46029b6b3f0fd42eed071b55daeee9da7456b8b75e1da566bd0d1605518722b2831dba31bf9787506ecfa9d HEAD_REF master PATCHES - "CMakeLists.txt.patch" - "FormatHelper.h.patch" - "Helper.h.patch" + CMakeLists.txt.patch + FormatHelper.h.patch + Helper.h.patch ) vcpkg_cmake_configure( @@ -20,10 +22,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() -vcpkg_cmake_config_fixup( - PACKAGE_NAME "faker-cxx" - CONFIG_PATH lib/cmake/faker-cxx -) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/faker-cxx) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/faker-cxx/usage b/ports/faker-cxx/usage index f1645103ee0fa1..c1b1d44dee14c7 100644 --- a/ports/faker-cxx/usage +++ b/ports/faker-cxx/usage @@ -1,4 +1,4 @@ faker-cxx provides CMake targets: -find_package(faker-cxx CONFIG REQUIRED) -target_link_libraries(main PRIVATE faker-cxx::faker-cxx) + find_package(faker-cxx CONFIG REQUIRED) + target_link_libraries(main PRIVATE faker-cxx::faker-cxx) From f0eda75916054520518f03558204b73c1f1f9cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6hring?= Date: Tue, 14 May 2024 22:13:49 +0200 Subject: [PATCH 19/19] update version file --- versions/f-/faker-cxx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/f-/faker-cxx.json b/versions/f-/faker-cxx.json index df86d22551babc..82c4fd04b20063 100644 --- a/versions/f-/faker-cxx.json +++ b/versions/f-/faker-cxx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3a62ce8645e79eb8295bd55d93543b407ca70180", + "git-tree": "572cbf1a47f1b4bf14d0ef9b2ae2f06b241e7ffe", "version-string": "v1.0.0", "port-version": 0 }