diff --git a/ports/pixman/fix_clang-cl.patch b/ports/pixman/fix_clang-cl.patch new file mode 100644 index 0000000000..0a6bdba566 --- /dev/null +++ b/ports/pixman/fix_clang-cl.patch @@ -0,0 +1,13 @@ +diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c +index d7cf2659d..625a08ace 100644 +--- a/pixman/pixman-mmx.c ++++ b/pixman/pixman-mmx.c +@@ -137,7 +137,7 @@ _mm_mulhi_pu16 (__m64 __A, __m64 __B) + * then define USE_M64_CASTS. + * If __m64 is a double datatype, then define USE_M64_DOUBLE. + */ +-#ifdef _MSC_VER ++#if defined(_MSC_VER) && !defined(__clang__) + # define M64_MEMBER m64_u64 + #elif defined(__ICC) + # define USE_CVT_INTRINSICS diff --git a/ports/pixman/missing_intrin_include.patch b/ports/pixman/missing_intrin_include.patch new file mode 100644 index 0000000000..76f74af70a --- /dev/null +++ b/ports/pixman/missing_intrin_include.patch @@ -0,0 +1,15 @@ +diff --git a/pixman/pixman-x86.c b/pixman/pixman-x86.c +index 0130b7bfa..d3d0fe1d9 100644 +--- a/pixman/pixman-x86.c ++++ b/pixman/pixman-x86.c +@@ -24,7 +24,10 @@ + #endif + + #include "pixman-private.h" ++#ifdef _MSC_VER ++#include ++#endif + + #if defined(USE_X86_MMX) || defined (USE_SSE2) || defined (USE_SSSE3) + + /* The CPU detection code needs to be in a file not compiled with diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake index ed0ceef4fb..8e6096369b 100644 --- a/ports/pixman/portfile.cmake +++ b/ports/pixman/portfile.cmake @@ -1,7 +1,3 @@ -if(VCPKG_TARGET_IS_WINDOWS) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # Meson is not able to automatically export symbols for DLLs -endif() - if(VCPKG_TARGET_IS_UWP) list(APPEND OPTIONS -Dmmx=disabled @@ -46,6 +42,8 @@ vcpkg_extract_source_archive_ex( PATCHES remove_test_demos.patch no-host-cpu-checks.patch + fix_clang-cl.patch + missing_intrin_include.patch ) # Meson install wrongly pkgconfig file! vcpkg_configure_meson( diff --git a/ports/pixman/vcpkg.json b/ports/pixman/vcpkg.json index 1098ef64b1..d46c7195d2 100644 --- a/ports/pixman/vcpkg.json +++ b/ports/pixman/vcpkg.json @@ -1,7 +1,7 @@ { "name": "pixman", "version": "0.40.0", - "port-version": 3, + "port-version": 4, "description": "Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization.", "homepage": "https://www.cairographics.org/releases", "license": "MIT", diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake index 9056a1099f..2115680d8b 100644 --- a/scripts/cmake/vcpkg_configure_meson.cmake +++ b/scripts/cmake/vcpkg_configure_meson.cmake @@ -270,7 +270,7 @@ function(z_vcpkg_meson_generate_cross_file additional_binaries) #https://mesonbu string(APPEND cross_file "[host_machine]\n") string(APPEND cross_file "endian = 'little'\n") - if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_TARGET_IS_MINGW) + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_TARGET_IS_MINGW OR VCPKG_TARGET_IS_UWP) set(meson_system_name "windows") else() string(TOLOWER "${VCPKG_CMAKE_SYSTEM_NAME}" meson_system_name) @@ -319,6 +319,15 @@ function(z_vcpkg_meson_generate_cross_file_config config_type) #https://mesonbui if(${config_type} STREQUAL "DEBUG") set(crt_type ${crt_type}d) endif() + set(c_winlibs "${VCPKG_DETECTED_CMAKE_C_STANDARD_LIBRARIES}") + set(cpp_winlibs "${VCPKG_DETECTED_CMAKE_CXX_STANDARD_LIBRARIES}") + foreach(libvar IN ITEMS c_winlibs cpp_winlibs) + string(REGEX REPLACE "( |^)(-|/)" [[;\2]] "${libvar}" "${${libvar}}") + string(REPLACE ".lib " ".lib;" "${libvar}" "${${libvar}}") + vcpkg_list(REMOVE_ITEM "${libvar}" "") + vcpkg_list(JOIN "${libvar}" "', '" "${libvar}") + string(APPEND cross_${config_type}_log "${libvar} = ['${${libvar}}']\n") + endforeach() string(APPEND cross_${config_type}_log "b_vscrt = '${crt_type}'\n") endif() string(TOLOWER "${config_type}" lowerconfig) diff --git a/versions/baseline.json b/versions/baseline.json index 97aedd3002..cde931096d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5530,7 +5530,7 @@ }, "pixman": { "baseline": "0.40.0", - "port-version": 3 + "port-version": 4 }, "pkgconf": { "baseline": "1.8.0", diff --git a/versions/p-/pixman.json b/versions/p-/pixman.json index 0dec4d7410..9944061c03 100644 --- a/versions/p-/pixman.json +++ b/versions/p-/pixman.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d0209cb23d5ca18cd74fa4a67e7ca80f7e81c0cd", + "version": "0.40.0", + "port-version": 4 + }, { "git-tree": "f6930f7300af86c20679b38f53bbdbc1a1310eed", "version": "0.40.0",