diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt deleted file mode 100644 index 06643c30cf8e0c..00000000000000 --- a/ports/pixman/CMakeLists.txt +++ /dev/null @@ -1,87 +0,0 @@ -cmake_minimum_required(VERSION 3.0) -project(pixman VERSION 0.34.0 LANGUAGES C) - -set(CMAKE_DEBUG_POSTFIX "d") - -if(UNIX) - add_definitions(-DHAVE_PTHREADS) -endif() - -include_directories(".") - -file(GLOB SOURCES -"pixman.c" -"pixman-access.c" -"pixman-access-accessors.c" -"pixman-bits-image.c" -"pixman-combine32.c" -"pixman-combine-float.c" -"pixman-conical-gradient.c" -"pixman-filter.c" -"pixman-x86.c" -"pixman-mips.c" -"pixman-arm.c" -"pixman-ppc.c" -"pixman-edge.c" -"pixman-edge-accessors.c" -"pixman-fast-path.c" -"pixman-glyph.c" -"pixman-general.c" -"pixman-gradient-walker.c" -"pixman-image.c" -"pixman-implementation.c" -"pixman-linear-gradient.c" -"pixman-matrix.c" -"pixman-noop.c" -"pixman-radial-gradient.c" -"pixman-region16.c" -"pixman-region32.c" -"pixman-solid-fill.c" -"pixman-timer.c" -"pixman-trap.c" -"pixman-utils.c" -) - -# pixman requires the three PACKAGE* definitions in order to compile. -set(PIXMAN_DEFS - PRIVATE - PACKAGE="pixman-1" - PACKAGE_VERSION="0.34.0" - PACKAGE_BUGREPORT="" -) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm) - # don't enable SSE2 for arm64-windows and arm-windows -else() - # The USE_SSE2 definition lets it use SSE2 instructions for speed. Every x86/64 target machine should have SSE2 these days. - set(PIXMAN_DEFS ${PIXMAN_DEFS} USE_SSE2) - file(GLOB SSE2_SOURCES "pixman-sse2.c") - set(SOURCES ${SOURCES} ${SSE2_SOURCES}) -endif() - -add_library(pixman-1 ${SOURCES}) -target_include_directories(pixman-1 PUBLIC $) -target_compile_definitions(pixman-1 ${PIXMAN_DEFS}) - -if(USE_SSE2 AND UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 4) - target_compile_options(pixman-1 PRIVATE -msse2) -endif() - -# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files -if(MSVC) - target_compile_options(pixman-1 PRIVATE "/wd4244" "/wd4146" "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" -endif() - -install(TARGETS pixman-1 - EXPORT pixman-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -install( - EXPORT pixman-targets - NAMESPACE unofficial::pixman:: - FILE unofficial-pixman-config.cmake - DESTINATION share/unofficial-pixman -) diff --git a/ports/pixman/CONTROL b/ports/pixman/CONTROL index a9e21f833a2384..6dbd573ffccfaa 100644 --- a/ports/pixman/CONTROL +++ b/ports/pixman/CONTROL @@ -1,5 +1,5 @@ Source: pixman -Version: 0.38.4 -Port-Version: 2 +Version: 0.40.0 Homepage: https://www.cairographics.org/releases Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization. +Build-Depends: libpng, tool-meson diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake index 25bbd2d04869f7..298912f041e203 100644 --- a/ports/pixman/portfile.cmake +++ b/ports/pixman/portfile.cmake @@ -1,43 +1,57 @@ -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - -set(PIXMAN_VERSION 0.38.4) +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 + -Dsse2=disabled + -Dssse3=disabled) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(VCPKG_CXX_FLAGS "/arch:SSE2 ${VCPKG_CXX_FLAGS}") + set(VCPKG_C_FLAGS "/arch:SSE2 ${VCPKG_C_FLAGS}") + list(APPEND OPTIONS + -Dmmx=enabled + -Dsse2=enabled + -Dssse3=enabled) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + #x64 in general has all those intrinsics. (except for UWP for some reason) + list(APPEND OPTIONS + -Dmmx=enabled + -Dsse2=enabled + -Dssse3=enabled) +elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + list(APPEND OPTIONS + #-Darm-simd=enabled does not work with arm64-windows + -Dmmx=disabled + -Dsse2=disabled + -Dssse3=disabled + ) +endif() + +set(PIXMAN_VERSION 0.40.0) vcpkg_download_distfile(ARCHIVE URLS "https://www.cairographics.org/releases/pixman-${PIXMAN_VERSION}.tar.gz" FILENAME "pixman-${PIXMAN_VERSION}.tar.gz" - SHA512 b66dc23c0bc7327cb90085cbc14ccf96ad58001a927f23af24e0258ca13f32d4255535862f1efcf00e9e723410aa9f51edf26fb01c8cde49379d1225acf7b5af + SHA512 063776e132f5d59a6d3f94497da41d6fc1c7dca0d269149c78247f0e0d7f520a25208d908cf5e421d1564889a91da44267b12d61c0bd7934cd54261729a7de5f ) vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${PIXMAN_VERSION} + PATCHES remove_test_demos.patch ) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/pixman) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}/pixman - PREFER_NINJA -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-pixman TARGET_PATH share/unofficial-pixman) - -# Copy the appropriate header files. -file(COPY - "${SOURCE_PATH}/pixman/pixman.h" - "${SOURCE_PATH}/pixman/pixman-accessor.h" - "${SOURCE_PATH}/pixman/pixman-combine32.h" - "${SOURCE_PATH}/pixman/pixman-compiler.h" - "${SOURCE_PATH}/pixman/pixman-edge-imp.h" - "${SOURCE_PATH}/pixman/pixman-inlines.h" - "${SOURCE_PATH}/pixman/pixman-private.h" - "${SOURCE_PATH}/pixman/pixman-version.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include +# Meson install wrongly pkgconfig file! +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${OPTIONS} + -Dlibpng=enabled ) +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pixman) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/pixman/COPYING ${CURRENT_PACKAGES_DIR}/share/pixman/copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -vcpkg_copy_pdbs() +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/pixman/remove_test_demos.patch b/ports/pixman/remove_test_demos.patch new file mode 100644 index 00000000000000..18efbdc2f9b47d --- /dev/null +++ b/ports/pixman/remove_test_demos.patch @@ -0,0 +1,15 @@ +diff --git a/meson.build b/meson.build +index 1cec22728..fa6199ed0 100644 +--- a/meson.build ++++ b/meson.build +@@ -528,8 +528,8 @@ version_conf.set('PIXMAN_VERSION_MICRO', split[2]) + add_project_arguments('-DHAVE_CONFIG_H', language : ['c']) + + subdir('pixman') +-subdir('test') +-subdir('demos') ++# subdir('test') ++# subdir('demos') + + pkg = import('pkgconfig') + pkg.generate( diff --git a/versions/baseline.json b/versions/baseline.json index f45c801d233d49..71a33498dc7744 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4517,8 +4517,8 @@ "port-version": 0 }, "pixman": { - "baseline": "0.38.4", - "port-version": 2 + "baseline": "0.40.0", + "port-version": 0 }, "platform-folders": { "baseline": "4.0.0", diff --git a/versions/p-/pixman.json b/versions/p-/pixman.json index 6daee6513416f1..46795f70da7ed0 100644 --- a/versions/p-/pixman.json +++ b/versions/p-/pixman.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9ac4606b446e1469fad7e0f8917a45cbdd1de388", + "version-string": "0.40.0", + "port-version": 0 + }, { "git-tree": "3cb6610f632460553bb2ae5fe3838e15880dc7e2", "version-string": "0.38.4",