From 4129789e4205cb778a823a36c71afa8360657f46 Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Fri, 6 May 2022 20:37:18 -0400 Subject: [PATCH] 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. --- .gitmodules | 2 +- project/lib/cairo-files.xml | 17 +- project/lib/include/pixman/config.h | 314 ++++++++++++++++++++ project/lib/include/pixman/pixman-version.h | 54 ++++ project/lib/pixman | 2 +- project/lib/pixman-files.xml | 81 ++--- 6 files changed, 420 insertions(+), 50 deletions(-) create mode 100644 project/lib/include/pixman/config.h create mode 100644 project/lib/include/pixman/pixman-version.h diff --git a/.gitmodules b/.gitmodules index 3a3694038..9567ac8c2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -36,7 +36,7 @@ url = https://github.com/openfl/libcairo [submodule "project/lib/pixman"] path = project/lib/pixman - url = https://github.com/openfl/libpixman + url = https://gitlab.freedesktop.org/pixman/pixman.git [submodule "project/lib/lzma"] path = project/lib/lzma url = https://github.com/openfl/liblzma diff --git a/project/lib/cairo-files.xml b/project/lib/cairo-files.xml index efc26e162..3a7d0a371 100644 --- a/project/lib/cairo-files.xml +++ b/project/lib/cairo-files.xml @@ -1,23 +1,24 @@ - + - - + + + - + - + - + @@ -124,7 +125,7 @@ - + - + diff --git a/project/lib/include/pixman/config.h b/project/lib/include/pixman/config.h new file mode 100644 index 000000000..fba96f3ca --- /dev/null +++ b/project/lib/include/pixman/config.h @@ -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 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 */ +#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 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 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 header file. */ +#ifndef HX_WINDOWS +#define HAVE_STDINT_H 1 +#else +/* #undef HAVE_STDINT_H */ +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#ifndef HX_WINDOWS +#define HAVE_STRINGS_H 1 +#else +/* #undef HAVE_STRINGS_H */ +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if we have */ +#ifndef HX_WINDOWS +#define HAVE_SYS_MMAN_H 1 +#else +/* #undef HAVE_SYS_MMAN_H */ +#endif + +/* Define to 1 if you have the 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 header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the 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 */ diff --git a/project/lib/include/pixman/pixman-version.h b/project/lib/include/pixman/pixman-version.h new file mode 100644 index 000000000..23d30b550 --- /dev/null +++ b/project/lib/include/pixman/pixman-version.h @@ -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 + */ + +#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__ */ diff --git a/project/lib/pixman b/project/lib/pixman index 979a51f79..285b9a907 160000 --- a/project/lib/pixman +++ b/project/lib/pixman @@ -1 +1 @@ -Subproject commit 979a51f79af984763d8c1e059eb2e5a4740886e8 +Subproject commit 285b9a907caffeb979322e629d4e57aa42061b5a diff --git a/project/lib/pixman-files.xml b/project/lib/pixman-files.xml index 8f3a3c3b1..7d6c8e63e 100644 --- a/project/lib/pixman-files.xml +++ b/project/lib/pixman-files.xml @@ -7,7 +7,8 @@ - + + @@ -28,45 +29,45 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +