aboutsummaryrefslogtreecommitdiff
path: root/ports/pixman
diff options
context:
space:
mode:
authorMichael B. McLaughlin <mikebmcl@gmail.com>2016-11-25 18:48:19 -0500
committerMichael B. McLaughlin <mikebmcl@gmail.com>2016-11-25 18:48:19 -0500
commit57f051776f3015e51045bab19d71fa8f7a69c81b (patch)
tree259cf27de1c7c1a1c92dc039990fbc41e8bb0780 /ports/pixman
parent2a8d61bf1bb74182f9a213ce4e640b05675f01df (diff)
downloadvcpkg-57f051776f3015e51045bab19d71fa8f7a69c81b.tar.gz
vcpkg-57f051776f3015e51045bab19d71fa8f7a69c81b.zip
Added ports for pixman 0.32.0 and cairo 1.14.6. Note that neither support UWP (pixman can only build as a static library due to having no exports and cairo depends on GDI among other things). Also, cairo depends on pixman, libpng, and zlib.
Diffstat (limited to 'ports/pixman')
-rw-r--r--ports/pixman/CMakeLists.txt4
-rw-r--r--ports/pixman/CMakeLists_pixman.txt53
-rw-r--r--ports/pixman/CONTROL3
-rw-r--r--ports/pixman/portfile.cmake52
4 files changed, 112 insertions, 0 deletions
diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt
new file mode 100644
index 000000000..aad6ec778
--- /dev/null
+++ b/ports/pixman/CMakeLists.txt
@@ -0,0 +1,4 @@
+cmake_minimum_required(VERSION 3.0)
+project(pixman VERSION 0.32.0 LANGUAGES C CXX)
+
+add_subdirectory(pixman) \ No newline at end of file
diff --git a/ports/pixman/CMakeLists_pixman.txt b/ports/pixman/CMakeLists_pixman.txt
new file mode 100644
index 000000000..c8030bcd6
--- /dev/null
+++ b/ports/pixman/CMakeLists_pixman.txt
@@ -0,0 +1,53 @@
+# Add include directories
+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-sse2.c"
+)
+
+set(CMAKE_DEBUG_POSTFIX "d")
+
+add_library(pixman-1 ${SOURCES})
+
+# pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days.
+target_compile_definitions(pixman-1 PUBLIC PACKAGE="pixman-1" PUBLIC PACKAGE_VERSION="0.34.0" PUBLIC PACKAGE_BUGREPORT="" PUBLIC USE_SSE2)
+
+# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files
+target_compile_options(pixman-1 PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS"
+
+# The LIBRARY DESTINATION here is lib rather than bin because pixman must always be compiled as a static library since it has no exports.
+install(TARGETS pixman-1
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
diff --git a/ports/pixman/CONTROL b/ports/pixman/CONTROL
new file mode 100644
index 000000000..564c81466
--- /dev/null
+++ b/ports/pixman/CONTROL
@@ -0,0 +1,3 @@
+Source: pixman
+Version: 0.34.0
+Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization.
diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake
new file mode 100644
index 000000000..b4029a26b
--- /dev/null
+++ b/ports/pixman/portfile.cmake
@@ -0,0 +1,52 @@
+# Common Ambient Variables:
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# TARGET_TRIPLET is the current triplet (x86-windows, etc)
+# PORT is the current port name (zlib, etc)
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+#
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported. Building static.") # pixman does not export any symbols.
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+include(vcpkg_common_functions)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pixman-0.34.0)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.cairographics.org/releases/pixman-0.34.0.tar.gz"
+ FILENAME "pixman-0.34.0.tar.gz"
+ SHA512 81caca5b71582b53aaac473bc37145bd66ba9acebb4773fa8cdb51f4ed7fbcb6954790d8633aad85b2826dd276bcce725e26e37997a517760e9edd72e2669a6d
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_pixman.txt DESTINATION ${SOURCE_PATH}/pixman)
+file(RENAME ${SOURCE_PATH}/pixman/CMakeLists_pixman.txt ${SOURCE_PATH}/pixman/CMakeLists.txt)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+
+# 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
+)
+
+# 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)
+
+vcpkg_copy_pdbs()