[pixman] add missing include and fix clang-cl build (#26186)

* pixman: add missing include and fix clang-cl builds

* v db

* use correct <> isntead of ""

* v db

* make the patch depend on _MSC_VER

* v db

* fix bug in vcpkg_configure_meson not linking WindowsApp.lib
fix another bug that system=windowsstore which meson doesn recognize

* bump port version

* v db
This commit is contained in:
Alexander Neumann 2022-08-17 21:36:12 +02:00 committed by GitHub
parent d00e2cbbec
commit dc9d737351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 47 additions and 7 deletions

View File

@ -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

View File

@ -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 <intrin.h>
+#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

View File

@ -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(

View File

@ -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",

View File

@ -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)

View File

@ -5530,7 +5530,7 @@
},
"pixman": {
"baseline": "0.40.0",
"port-version": 3
"port-version": 4
},
"pkgconf": {
"baseline": "1.8.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d0209cb23d5ca18cd74fa4a67e7ca80f7e81c0cd",
"version": "0.40.0",
"port-version": 4
},
{
"git-tree": "f6930f7300af86c20679b38f53bbdbc1a1310eed",
"version": "0.40.0",