Use the official Pixman project as a submodule.

This approach will make it easy to update Pixman, at least in theory.
However, it requires maintaining a separate set of files outside the
submodule. And since Cairo needs access to one of these (but not the
other), that one must be duplicated.
This commit is contained in:
Joseph Cloutier
2022-05-06 20:37:18 -04:00
parent bc584ea611
commit 4129789e42
6 changed files with 420 additions and 50 deletions

View File

@@ -1,23 +1,24 @@
<xml>
<files id="native-toolkit-cairo" >
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/pixman/include" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/pixman/pixman/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/cairo/include/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/cairo/include/configs/default/" unless="windows || mac || linux" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/cairo/include/configs/linux/" if="linux" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/cairo/include/configs/windows/" if="windows" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/cairo/include/configs/mac/" if="mac" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/include/pixman/" /> <!-- Pixman's config.h must come after Cairo's. -->
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/cairo/src" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype/include" />
<compilerflag value="-DNDEBUG" unless="debug" />
<compilerflag value="-DHAVE_CONFIG_H" />
<compilerflag value="-DCAIRO_WIN32_STATIC_BUILD" if="windows" />
<compilerflag value="-Wno-attributes" unless="windows" />
<compilerflag value="-Wno-enum-conversion" if="mac || ios || emscripten || tvos" />
<file name="${NATIVE_TOOLKIT_PATH}/cairo/src/cairo-analysis-surface.c" />
<file name="${NATIVE_TOOLKIT_PATH}/cairo/src/cairo-arc.c" />
<file name="${NATIVE_TOOLKIT_PATH}/cairo/src/cairo-array.c" />
@@ -124,7 +125,7 @@
<file name="${NATIVE_TOOLKIT_PATH}/cairo/src/cairo-user-font.c" />
<file name="${NATIVE_TOOLKIT_PATH}/cairo/src/cairo-version.c" />
<file name="${NATIVE_TOOLKIT_PATH}/cairo/src/cairo-wideint.c" />
</files>
</xml>

View File

@@ -0,0 +1,314 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Whether we have alarm() */
#ifdef HX_LINUX
#define HAVE_ALARM 1
#else
/* #undef HAVE_ALARM */
#endif
/* Whether the compiler supports __builtin_clz */
#if defined(HX_LINUX) || defined(HX_MACOS) || defined(HX_ANDROID)
#define HAVE_BUILTIN_CLZ /**/
#else
/* #undef HAVE_BUILTIN_CLZ */
#endif
/* Define to 1 if you have the <dlfcn.h> header file. */
#ifndef HX_WINDOWS
#define HAVE_DLFCN_H 1
#else
/* #undef HAVE_DLFCN_H */
#endif
/* Whether we have feenableexcept() */
#ifdef HX_LINUX
#define HAVE_FEENABLEEXCEPT 1
#else
/* #undef HAVE_FEENABLEEXCEPT */
#endif
/* Define to 1 if we have <fenv.h> */
#ifndef HX_WINDOWS
#define HAVE_FENV_H 1
#else
/* #undef HAVE_FENV_H */
#endif
/* Whether the tool chain supports __float128 */
#ifdef HX_LINUX
#define HAVE_FLOAT128 /**/
#else
/* #undef HAVE_FLOAT128 */
#endif
/* Whether the compiler supports GCC vector extensions */
#ifdef HX_LINUX
#define HAVE_GCC_VECTOR_EXTENSIONS /**/
#else
/* #undef HAVE_GCC_VECTOR_EXTENSIONS */
#endif
/* Define to 1 if you have the `getisax' function. */
/* #undef HAVE_GETISAX */
/* Whether we have getpagesize() */
#ifdef HX_LINUX
#define HAVE_GETPAGESIZE 1
#else
/* #undef HAVE_GETPAGESIZE */
#endif
/* Whether we have gettimeofday() */
#ifdef HX_LINUX
#define HAVE_GETTIMEOFDAY 1
#else
/* #undef HAVE_GETTIMEOFDAY */
#endif
/* Define to 1 if you have the <inttypes.h> header file. */
#ifndef HX_WINDOWS
#define HAVE_INTTYPES_H 1
#else
/* #undef HAVE_INTTYPES_H */
#endif
/* Define to 1 if you have the `pixman-1' library (-lpixman-1). */
/* #undef HAVE_LIBPIXMAN_1 */
/* Whether we have libpng */
#ifdef NATIVE_TOOLKIT_HAVE_PNG
#define HAVE_LIBPNG 1
#else
/* #undef HAVE_LIBPNG */
#endif
/* Define to 1 if you have the <memory.h> header file. */
#ifdef HX_LINUX
#define HAVE_MEMORY_H 1
#else
/* #undef HAVE_MEMORY_H */
#endif
/* Whether we have mmap() */
#ifdef HX_LINUX
#define HAVE_MMAP 1
#else
/* #undef HAVE_MMAP */
#endif
/* Whether we have mprotect() */
#ifdef HX_LINUX
#define HAVE_MPROTECT 1
#else
/* #undef HAVE_MPROTECT */
#endif
/* Whether we have posix_memalign() */
#ifdef HX_LINUX
#define HAVE_POSIX_MEMALIGN 1
#else
/* #undef HAVE_POSIX_MEMALIGN */
#endif
/* Whether pthreads is supported */
#ifndef HX_WINDOWS
#define HAVE_PTHREADS /**/
#else
/* #undef HAVE_PTHREADS */
#endif
/* Whether we have sigaction() */
#ifdef HX_LINUX
#define HAVE_SIGACTION 1
#else
/* #undef HAVE_SIGACTION */
#endif
/* Define to 1 if you have the <stdint.h> header file. */
#ifndef HX_WINDOWS
#define HAVE_STDINT_H 1
#else
/* #undef HAVE_STDINT_H */
#endif
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#ifndef HX_WINDOWS
#define HAVE_STRINGS_H 1
#else
/* #undef HAVE_STRINGS_H */
#endif
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if we have <sys/mman.h> */
#ifndef HX_WINDOWS
#define HAVE_SYS_MMAN_H 1
#else
/* #undef HAVE_SYS_MMAN_H */
#endif
/* Define to 1 if you have the <sys/stat.h> header file. */
#ifndef HX_WINDOWS
#define HAVE_SYS_STAT_H 1
#else
/* #undef HAVE_SYS_STAT_H */
#endif
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#ifndef HX_WINDOWS
#define HAVE_UNISTD_H 1
#else
/* #undef HAVE_UNISTD_H */
#endif
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
/* #undef LT_OBJDIR */
/* Name of package */
#define PACKAGE "pixman"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "pixman@lists.freedesktop.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "pixman"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "pixman 0.32.8"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pixman"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.32.8"
/* enable TIMER_BEGIN/TIMER_END macros */
/* #undef PIXMAN_TIMERS */
/* The size of `long', as computed by sizeof. */
#if (defined(HX_LINUX) && defined(HXCPP_M64)) || defined(HX_MACOS)
#define SIZEOF_LONG 8
#else
#define SIZEOF_LONG 4
#endif
/* Define to 1 if you have the ANSI C header files. */
#ifndef HX_WINDOWS
#define STDC_HEADERS 1
#else
/* #undef STDC_HEADERS */
#endif
/* The compiler supported TLS storage class */
#if !defined(HX_WINDOWS) && !defined(IPHONE)
#define TLS __thread
#else
/* #undef TLS */
#endif
/* Whether the tool chain supports __attribute__((constructor)) */
#ifdef __GNUC__
#define TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR /**/
#else
/* #undef TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR */
#endif
/* use ARM IWMMXT compiler intrinsics */
// #if !defined(HX_LINUX) && !defined(HX_MACOS) && !defined(HX_WINDOWS) && !defined(EMSCRIPTEN)
// #define USE_ARM_IWMMXT 1
// #else
/* #undef USE_ARM_IWMMXT */
// #endif
/* use ARM NEON assembly optimizations */
// #if defined(HXCPP_ARMV7) || defined(HXCPP_ARMV7S) || defined(HXCPP_ARM64)
// #define USE_ARM_NEON 1
// #else
/* #undef USE_ARM_NEON */
// #endif
/* use ARM SIMD assembly optimizations */
// #if defined(HXCPP_ARMV7) || defined(HXCPP_ARMV7S) || defined(HXCPP_ARM64)
// #define USE_ARM_SIMD 1
// #else
/* #undef USE_ARM_SIMD */
// #endif
/* use GNU-style inline assembler */
#ifdef __GNUC__
#define USE_GCC_INLINE_ASM 1
#else
/* #undef USE_GCC_INLINE_ASM */
#endif
/* use Loongson Multimedia Instructions */
/* #undef USE_LOONGSON_MMI */
/* use MIPS DSPr2 assembly optimizations */
/* #undef USE_MIPS_DSPR2 */
/* use OpenMP in the test suite */
/* #undef USE_OPENMP */
/* use SSE2 compiler intrinsics */
#if defined(HX_WINDOWS) || defined(HX_MACOS) || (defined(HX_LINUX) && !defined(RASPBERRYPI))
#define USE_SSE2 1
#else
/* #undef USE_SSE2 */
#endif
/* use SSSE3 compiler intrinsics */
#if defined(HX_WINDOWS) || defined(HX_MACOS) || (defined(HX_LINUX) && !defined(RASPBERRYPI))
#define USE_SSE3 1
#else
/* #undef USE_SSE3 */
#endif
/* use VMX compiler intrinsics */
/* #undef USE_VMX */
/* use x86 MMX compiler intrinsics */
#if (defined(HX_WINDOWS) || /*defined(HX_MACOS) ||*/ (defined(HX_LINUX) && !defined(RASPBERRYPI)) ) && !defined(HXCPP_M64)
#define USE_X86_MMX 1
#else
/* #undef USE_X86_MMX */
#endif
/* Version number of package */
#define VERSION "0.32.8"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to sqrt if you do not have the `sqrtf' function. */
/* #undef sqrtf */

View File

@@ -0,0 +1,54 @@
/*
* Copyright © 2008 Red Hat, Inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Author: Carl D. Worth <cworth@cworth.org>
*/
#ifndef PIXMAN_VERSION_H__
#define PIXMAN_VERSION_H__
#ifndef PIXMAN_H__
# error pixman-version.h should only be included by pixman.h
#endif
#define PIXMAN_VERSION_MAJOR 0
#define PIXMAN_VERSION_MINOR 40
#define PIXMAN_VERSION_MICRO 1
#define PIXMAN_VERSION_STRING "0.40.1"
#define PIXMAN_VERSION_ENCODE(major, minor, micro) ( \
((major) * 10000) \
+ ((minor) * 100) \
+ ((micro) * 1))
#define PIXMAN_VERSION PIXMAN_VERSION_ENCODE( \
PIXMAN_VERSION_MAJOR, \
PIXMAN_VERSION_MINOR, \
PIXMAN_VERSION_MICRO)
#ifndef PIXMAN_API
# define PIXMAN_API
#endif
#endif /* PIXMAN_VERSION_H__ */

View File

@@ -7,7 +7,8 @@
<files id="native-toolkit-pixman" >
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/pixman/src" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/include/pixman" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/pixman/pixman" />
<compilerflag value="-DHAVE_CONFIG_H" />
<compilerflag value="-DPIXMAN_NO_TLS" if="windows" />
@@ -28,45 +29,45 @@
<compilerflag value="-Wno-attributes" if="android" />
<compilerflag value="-Wno-tautological-constant-out-of-range-compare" if="mac || ios || tvos" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-access.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-access-accessors.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-arm.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-arm-neon.c" if="PIXMAN_ARM_NEON" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-arm-neon-asm-bilinear.S" if="PIXMAN_ARM_NEON" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-arm-neon-asm.S" if="PIXMAN_ARM_NEON" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-arm-simd.c" if="PIXMAN_ARM_SIMD" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-arm-simd-asm.S" if="PIXMAN_ARM_SIMD" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-arm-simd-asm-scaled.S" if="PIXMAN_ARM_SIMD" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-bits-image.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-combine32.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-combine-float.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-conical-gradient.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-edge.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-edge-accessors.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-fast-path.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-filter.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-glyph.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-general.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-gradient-walker.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-image.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-implementation.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-linear-gradient.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-matrix.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-mips.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-mmx.c" if="windows || mac || linux" unless="rpi"/>
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-noop.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-ppc.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-radial-gradient.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-region16.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-region32.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-solid-fill.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-sse2.c" if="windows || mac || linux" unless="rpi"/>
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-ssse3.c" if="windows || mac || linux" unless="rpi"/>
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-timer.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-trap.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-utils.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/src/pixman-x86.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-access.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-access-accessors.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-arm.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-arm-neon.c" if="PIXMAN_ARM_NEON" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-arm-neon-asm-bilinear.S" if="PIXMAN_ARM_NEON" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-arm-neon-asm.S" if="PIXMAN_ARM_NEON" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-arm-simd.c" if="PIXMAN_ARM_SIMD" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-arm-simd-asm.S" if="PIXMAN_ARM_SIMD" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-arm-simd-asm-scaled.S" if="PIXMAN_ARM_SIMD" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-bits-image.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-combine32.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-combine-float.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-conical-gradient.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-edge.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-edge-accessors.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-fast-path.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-filter.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-glyph.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-general.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-gradient-walker.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-image.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-implementation.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-linear-gradient.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-matrix.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-mips.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-mmx.c" if="windows || mac || linux" unless="rpi"/>
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-noop.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-ppc.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-radial-gradient.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-region16.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-region32.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-solid-fill.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-sse2.c" if="windows || mac || linux" unless="rpi"/>
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-ssse3.c" if="windows || mac || linux" unless="rpi"/>
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-timer.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-trap.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-utils.c" />
<file name="${NATIVE_TOOLKIT_PATH}/pixman/pixman/pixman-x86.c" />
</files>