Skip to content

Commit

Permalink
Add lttng-ust port.
Browse files Browse the repository at this point in the history
Format and add version.

Update CI baseline.

Update port version.

[vcpkg] Fix cross compiling macOS (microsoft#26240)

This follows the pattern in the Windows toolchain with respect to
setting VCPKG_CMAKE_SYSTEM_VERSION and also how arm64 macOS can execute
x86_64 through Rosetta.

[buck-yeh-bux] fix clang-cl builds (microsoft#26248)

* [buck-yeh-bux] fix clang-cl

* v db

[cppcms] Fix narrowing for clang-cl builds (microsoft#26251)

* [cppcms] fix narrowing error with clang-cl

* v db

[crc32c] Clang-cl fix  (microsoft#26253)

* [crc32c] fix clang-cl builds.

* v db

[json-c] clang-cl fix. (microsoft#26254)

* [json-c] fix clang-cl builds

* v db

[cpr] disable werror (microsoft#26252)

* [cpr] disable werror

* v db

[sqlcipher] update to 4.5.2 (microsoft#26262)

* [sqlcipher] update to 4.5.2

* requested changes

* portfile.cmake - quote paths

[osgearth] Fix naming of target and exported variables (microsoft#26258)

* [osgearth] Fix target name and match exported variables

* Fix version SHA

Add port version to baseline.

Add x64-linux build expected to fail.

Add port 0 version.

Update version database

Specify supported CI so it only build dynamic.

Update SHA.
  • Loading branch information
diegovelaz committed Aug 10, 2022
1 parent 030c538 commit 8101177
Show file tree
Hide file tree
Showing 32 changed files with 337 additions and 44 deletions.
33 changes: 33 additions & 0 deletions ports/buck-yeh-bux/fix-clang-cl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 306074e50..a032ab09e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,13 +5,13 @@ project(bux)
set(GNU_LIKE_CXX_FLAGS " -Wall -Wextra -Wshadow -Wconversion -Wno-parentheses -g3 -Og -std=c++20")
#string(APPEND CMAKE_CXX_FLAGS " -g3")

-if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT MSVC)
message("Clang")
string(APPEND CMAKE_CXX_FLAGS "${GNU_LIKE_CXX_FLAGS} -Wno-potentially-evaluated-expression")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
message("GNU")
string(APPEND CMAKE_CXX_FLAGS "${GNU_LIKE_CXX_FLAGS}")
-elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+elseif(MSVC)
message("MSVC")
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus /std:c++latest /MP")
else()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 093a1da8d..8de40efa4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,7 +8,7 @@ add_library(bux STATIC
XConsole.cpp XException.cpp
)
target_include_directories(bux PRIVATE ../include/bux)
-if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+if(MSVC)
target_link_libraries(bux PRIVATE fmt::fmt)
endif()

1 change: 1 addition & 0 deletions ports/buck-yeh-bux/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ vcpkg_from_github(
REF b046518dcffcdef9b8dbccd0accc2636df301766 # v1.6.6
SHA512 af1ca5c37623a09c64e1a84a630a26911be8c87eb007b112665b7c6080dfac67bd89eb36367202c5d29af97f4e549d6f27e41410220a57bd7756bdb1ecf8ddf0
HEAD_REF main
PATCHES fix-clang-cl.patch
)

vcpkg_cmake_configure(
Expand Down
1 change: 1 addition & 0 deletions ports/buck-yeh-bux/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "buck-yeh-bux",
"version": "1.6.6",
"port-version": 1,
"description": "A supplemental C++ library with functionalities not directly supported from Modern C++ standard.",
"homepage": "https://github.com/buck-yeh/bux",
"license": "MIT",
Expand Down
13 changes: 13 additions & 0 deletions ports/cppcms/fix_narrowing_error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/session_win32_file_storage.cpp b/src/session_win32_file_storage.cpp
index ce3fba330..a5e54be84 100644
--- a/src/session_win32_file_storage.cpp
+++ b/src/session_win32_file_storage.cpp
@@ -186,7 +186,7 @@ void session_file_storage::save_to_file(HANDLE h,time_t timeout,std::string cons
int64_t timeout;
uint32_t crc;
uint32_t size;
- } tmp = { timeout, 0, in.size() };
+ } tmp = { timeout, 0, static_cast<uint32_t>(in.size()) };
impl::crc32_calc crc_calc;
crc_calc.process_bytes(in.data(),in.size());
tmp.crc=crc_calc.checksum();
1 change: 1 addition & 0 deletions ports/cppcms/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ vcpkg_from_github(
SHA512 e99d34d14fbde22be725ac2c0bec069fb584e45c66767af75efaf454ca61a7a5e57434bf86109f910884c72202b8cf98fe16505e7d3d30d9218abd4d8b27d5df
PATCHES
no-tests-and-examples.patch
fix_narrowing_error.patch
)

vcpkg_find_acquire_program(PYTHON2)
Expand Down
2 changes: 1 addition & 1 deletion ports/cppcms/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cppcms",
"version": "1.2.1",
"port-version": 5,
"port-version": 6,
"description": "CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development",
"homepage": "https://github.com/artyom-beilis/cppcms",
"license": "MIT",
Expand Down
13 changes: 13 additions & 0 deletions ports/cpr/disable_werror.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb7c5f042..a5bc0b942 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,7 +71,7 @@ if(CPR_ENABLE_CPPCHECK)
include(cmake/cppcheck.cmake)
endif()

-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+if (1)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Werror")
endif()
1 change: 1 addition & 0 deletions ports/cpr/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
001-cpr-config.patch
disable_werror.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down
1 change: 1 addition & 0 deletions ports/cpr/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "cpr",
"version-semver": "1.9.0",
"port-version": 1,
"description": "C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project.",
"homepage": "https://github.com/libcpr/cpr",
"license": "MIT",
Expand Down
13 changes: 13 additions & 0 deletions ports/crc32c/fix_clang-cl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84907285c..8c446b0c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ if(NOT CMAKE_CXX_STANDARD)
endif(NOT CMAKE_CXX_STANDARD)

# https://github.com/izenecloud/cmake/blob/master/SetCompilerWarningAll.cmake
-if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+if(MSVC)
# Use the highest warning level for Visual Studio.
set(CMAKE_CXX_WARNING_LEVEL 4)
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
2 changes: 2 additions & 0 deletions ports/crc32c/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ vcpkg_from_github(
REF 1.1.2
SHA512 6325c52b5a6850b9f90086e0c0c86798c008af36e7cfd3a0216184a2d37b3bf7323481ddc6bfe4cbd5b31288b3ee6c69772d03085a13094cf95d00a9756a7196
HEAD_REF master
PATCHES
fix_clang-cl.patch
)

vcpkg_cmake_configure(
Expand Down
1 change: 1 addition & 0 deletions ports/crc32c/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "crc32c",
"version": "1.1.2",
"port-version": 1,
"description": "CRC32C implementation with support for CPU-specific acceleration instructions.",
"homepage": "https://github.com/google/crc32c",
"dependencies": [
Expand Down
22 changes: 22 additions & 0 deletions ports/json-c/fix-clang-cl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9741b45f9..11b397024 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -281,7 +281,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_DIR}/config.h")
configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h)
message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h")

-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
+if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" AND NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
if ("${DISABLE_WERROR}" STREQUAL "OFF")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
@@ -297,7 +297,7 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL
endif()

add_definitions(-D_GNU_SOURCE)
-elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
+elseif (MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DEBUG")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4100")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996")
1 change: 1 addition & 0 deletions ports/json-c/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ vcpkg_from_github(
SHA512 30063c8e32eb82e170647363055119f2f7eab19e1c3152673b966f41ed07e0349c3d6141b215b9912f9e84c2e06677b3d7ac949f720c7ebc2c95d692dc3881fe
HEAD_REF master
PATCHES pkgconfig.patch
fix-clang-cl.patch
)

vcpkg_cmake_configure(
Expand Down
1 change: 1 addition & 0 deletions ports/json-c/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "json-c",
"version-date": "2022-06-26",
"port-version": 1,
"description": "A JSON implementation in C",
"homepage": "https://github.com/json-c/json-c",
"license": "MIT",
Expand Down
47 changes: 47 additions & 0 deletions ports/lttng-ust/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lttng/lttng-ust
REF v2.12.5
SHA512 1ba781218608ce10decedab49a947b7cc60bf8e69d77d5bc56629238b97e5006131eec4071143f14968e602c535f94a7c034d44e1f27eca3fbc5edb995a476d3
HEAD_REF main
)

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

set(VCPKG_CMAKE_SYSTEM_NAME Linux)

set(VCPKG_FIXUP_ELF_RPATH ON)

if(EXISTS "${src_dir}/configure" AND "${src_dir}/configure.ac")
if(NOT VCPKG_MAINTAINER_SKIP_AUTOCONFIG)
set(requires_autoconfig ON)
file(REMOVE "${SRC_DIR}/configure")
set(arg_AUTOCONFIG ON)
endif()
elseif(EXISTS "${src_dir}/configure" AND NOT arg_SKIP_CONFIGURE)
endif()

vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
--prefix=/usr
--disable-man-pages
${OPTIONS}

)

vcpkg_install_make()

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

vcpkg_fixup_pkgconfig()

file(
INSTALL "${SOURCE_PATH}/LICENSE"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
7 changes: 7 additions & 0 deletions ports/lttng-ust/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "lttng-ust",
"version": "2.12.5",
"description": "LTTng-UST, the Linux Trace Toolkit Next Generation Userspace Tracer, is port of the low-overhead tracing capabilities of the LTTng kernel tracer to user-space. The library 'liblttng-ust' enables tracing of applications and libraries.",
"homepage": "https://github.com/lttng/lttng-ust",
"supports": "linux & !static"
}
80 changes: 69 additions & 11 deletions ports/osgearth/fix-osgearth-config.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,85 @@
diff --git a/osgEarthConfig.cmake.in b/osgEarthConfig.cmake.in
index 3f27dffe9..354e0f7dc 100644
index 3f27dffe9..4141ff939 100644
--- a/osgEarthConfig.cmake.in
+++ b/osgEarthConfig.cmake.in
@@ -13,11 +13,11 @@ endif()
set(osgearth_DEFINITIONS ${${XPREFIX}_CFLAGS})
@@ -6,52 +6,54 @@ set(XPREFIX OSGEARTH)

find_path(osgearth_INCLUDE_DIR
- NAMES OSGEARTH/RTREE.H
+ NAMES osgEarth/rtree.h


-if (osgearth_USE_STATIC_LIBS)
+if (osgEarth_USE_STATIC_LIBS)
set(XPREFIX ${XPREFIX}_STATIC)
endif()

-set(osgearth_DEFINITIONS ${${XPREFIX}_CFLAGS})
+set(osgEarth_DEFINITIONS ${${XPREFIX}_CFLAGS})

-find_path(osgearth_INCLUDE_DIR
+find_path(osgEarth_INCLUDE_DIR
NAMES OSGEARTH/RTREE.H
HINTS ${${XPREFIX}_INCLUDE_DIRS}
)

-set(OSGEARTH_NAMES osgearth)
+set(OSGEARTH_NAMES osgEarth)

find_library(osgearth_LIBRARY
-find_library(osgearth_LIBRARY
+find_library(osgEarth_LIBRARY
NAMES ${OSGEARTH_NAMES}
@@ -38,6 +38,8 @@ find_package_handle_standard_args(osgearth DEFAULT_MSG
HINTS ${${XPREFIX}_LIBRARY_DIRS}
)

-set(osgearth_LIBRARIES ${osgearth_LIBRARY})
-set(osgearth_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
-set(osgearth_LIBRARY_DIR ${osgearth_LIBRARY_DIRS})
-set(osgearth_INCLUDE_DIRS ${osgearth_INCLUDE_DIR})
-set(osgearth_LDFLAGS ${${XPREFIX}_LDFLAGS})
+set(osgEarth_LIBRARIES ${osgEarth_LIBRARY})
+set(osgEarth_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
+set(osgEarth_LIBRARY_DIR ${osgEarth_LIBRARY_DIRS})
+set(osgEarth_INCLUDE_DIRS ${osgEarth_INCLUDE_DIR})
+set(osgEarth_LDFLAGS ${${XPREFIX}_LDFLAGS})

string (REPLACE ";" " " osgearth_LDFLAGS "${osgearth_LDFLAGS}")
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(osgearth DEFAULT_MSG
- osgearth_LIBRARY
- osgearth_INCLUDE_DIR
+find_package_handle_standard_args(osgEarth DEFAULT_MSG
+ osgEarth_LIBRARY
+ osgEarth_INCLUDE_DIR
)

-string (REPLACE ";" " " osgearth_LDFLAGS "${osgearth_LDFLAGS}")
+string (REPLACE ";" " " osgEarth_LDFLAGS "${osgEarth_LDFLAGS}")

-set_target_properties(osgearth
+add_library(osgEarth UNKNOWN IMPORTED)
+
set_target_properties(osgearth
+set_target_properties(osgEarth
PROPERTIES
IMPORTED_LOCATION "${osgearth_LIBRARIES}"
- IMPORTED_LOCATION "${osgearth_LIBRARIES}"
- INTERFACE_INCLUDE_DIRECTORIES "${osgearth_INCLUDE_DIRS}"
- INTERFACE_LINK_LIBRARIES "${osgearth_LDFLAGS}"
- INTERFACE_COMPILE_OPTIONS "${osgearth_DEFINITIONS}"
+ IMPORTED_LOCATION "${osgEarth_LIBRARIES}"
+ INTERFACE_INCLUDE_DIRECTORIES "${osgEarth_INCLUDE_DIRS}"
+ INTERFACE_LINK_LIBRARIES "${osgEarth_LDFLAGS}"
+ INTERFACE_COMPILE_OPTIONS "${osgEarth_DEFINITIONS}"
)

- message(STATUS "osgearth_FOUND: ${osgearth_FOUND}")
- message(STATUS "osgearth_INCLUDE_DIRS: ${osgearth_INCLUDE_DIRS}")
- message(STATUS "osgearth_LIBRARIES: ${osgearth_LIBRARIES}")
- message(STATUS "osgearth_LDFLAGS: ${osgearth_LDFLAGS}")
- message(STATUS "osgearth_DEFINITIONS: ${osgearth_DEFINITIONS}")
+ message(STATUS "osgEarth_FOUND: ${osgEarth_FOUND}")
+ message(STATUS "osgEarth_INCLUDE_DIRS: ${osgEarth_INCLUDE_DIRS}")
+ message(STATUS "osgEarth_LIBRARIES: ${osgEarth_LIBRARIES}")
+ message(STATUS "osgEarth_LDFLAGS: ${osgEarth_LDFLAGS}")
+ message(STATUS "osgEarth_DEFINITIONS: ${osgEarth_DEFINITIONS}")



-check_required_components(osgearth)
\ No newline at end of file
+check_required_components(osgEarth)
2 changes: 1 addition & 1 deletion ports/osgearth/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "osgearth",
"version": "3.3",
"port-version": 1,
"port-version": 2,
"description": "osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2021 Pelican Mapping.",
"homepage": "https://github.com/gwaldron/osgearth",
"license": "LGPL-3.0-or-later",
Expand Down
Loading

0 comments on commit 8101177

Please sign in to comment.