Move all to deprecated folder.

This commit is contained in:
2016-11-16 21:57:57 +01:00
parent 01738a7684
commit 05de7d6c04
9777 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
Fix build on platforms where __USER_LABEL_PREFIX__ is not empty
On most platforms, a C language symbol and its assembly equivalent are
identical. However, on the Blackfin architecture, this isn't the case,
the corresponding C language symbol in assembly is prepended with a
"_". Blackfin therefore has __USER_LABEL_PREFIX__ defined to "_".
Cairo already has some code to cope with __USER_LABEL_PREFIX__, but
this code isn't completely correct: it prepends both assembly symbols
and C symbols with __USER_LABEL_PREFIX__, which cannot work.
This patch fixes that by using the existing slim_hidden_asmname() to
define assembly symbols, and introduce a new slim_hidden_realname()
for C symbols.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/src/cairo-compiler-private.h
===================================================================
--- a/src/cairo-compiler-private.h
+++ b/src/cairo-compiler-private.h
@@ -93,12 +93,13 @@
__asm__ (slim_hidden_asmname (internal))
# define slim_hidden_def1(name, internal) \
extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \
- __attribute__((__alias__(slim_hidden_asmname(internal))))
+ __attribute__((__alias__(slim_hidden_realname(internal))))
# define slim_hidden_ulp slim_hidden_ulp1(__USER_LABEL_PREFIX__)
# define slim_hidden_ulp1(x) slim_hidden_ulp2(x)
# define slim_hidden_ulp2(x) #x
# define slim_hidden_asmname(name) slim_hidden_asmname1(name)
# define slim_hidden_asmname1(name) slim_hidden_ulp #name
+# define slim_hidden_realname(name) #name
#else
# define slim_hidden_proto(name) int _cairo_dummy_prototype(void)
# define slim_hidden_proto_no_warn(name) int _cairo_dummy_prototype(void)
Index: b/util/cairo-script/cairo-script-private.h
===================================================================
--- a/util/cairo-script/cairo-script-private.h
+++ b/util/cairo-script/cairo-script-private.h
@@ -109,12 +109,13 @@
__asm__ (slim_hidden_asmname (internal))
# define slim_hidden_def1(name, internal) \
extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \
- __attribute__((__alias__(slim_hidden_asmname(internal))))
+ __attribute__((__alias__(slim_hidden_realname(internal))))
# define slim_hidden_ulp slim_hidden_ulp1(__USER_LABEL_PREFIX__)
# define slim_hidden_ulp1(x) slim_hidden_ulp2(x)
# define slim_hidden_ulp2(x) #x
# define slim_hidden_asmname(name) slim_hidden_asmname1(name)
# define slim_hidden_asmname1(name) slim_hidden_ulp #name
+# define slim_hidden_realname(name) #name
#else
# define slim_hidden_proto(name) int _csi_dummy_prototype(void)
# define slim_hidden_proto_no_warn(name) int _csi_dummy_prototype(void)

View File

@@ -0,0 +1,29 @@
test: fix build when SHOULD_FORK is false
The code in test/cairo-test-runner.c properly takes into account
platforms that do have fork() support, and uses the SHOULD_FORK define
to know whether fork is available or not.
However, this SHOULD_FORK macro is used to guard the inclusion of
<unistd.h>, which is needed to get the prototype of other functions
(namely readlink and getppid), that are used in portions of this file
not guarded by SHOULD_FORK.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/test/cairo-test-runner.c
===================================================================
--- a/test/cairo-test-runner.c
+++ b/test/cairo-test-runner.c
@@ -36,10 +36,10 @@
#include <pixman.h> /* for version information */
#define SHOULD_FORK HAVE_FORK && HAVE_WAITPID
-#if SHOULD_FORK
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
+#if SHOULD_FORK
#if HAVE_SIGNAL_H
#include <signal.h>
#endif

View File

@@ -0,0 +1,38 @@
Fix build with gcc 4.9
cairo fails to build with gcc 4.9 due to a bad interaction of cairo
modules with the LTO mechanism. The suggested workaround is to pass
-ffat-lto-objects. See
https://bugs.freedesktop.org/show_bug.cgi?id=77060 for the upstream
bug report, and
https://bugs.archlinux.org/task/40313?project=1&openedfrom=-1+week for
the ArchLinux bug report.
This patch passes -ffat-lto-objects when gcc understands this option,
in order to provide compatibility with gcc versions older than 4.8,
which did not provide this option, but are anyway unaffected by the
issue.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,16 @@
m4_include(build/configure.ac.pthread) dnl checks for pthreads
AC_CACHE_SAVE
+old_cflags=$CFLAGS
+CFLAGS=-ffat-lto-objects
+AC_MSG_CHECKING([whether CC supports -ffat-lto-objects])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [AC_MSG_RESULT([yes])]
+ [LTO_CFLAGS=-ffat-lto-objects],
+ [AC_MSG_RESULT([no])]
+)
+CFLAGS="${old_CFLAGS} ${LTO_CFLAGS}"
+
dnl ===========================================================================
AC_CHECK_LIB(z, compress,

View File

@@ -0,0 +1,48 @@
config BR2_PACKAGE_CAIRO
bool "cairo"
select BR2_PACKAGE_PIXMAN
select BR2_PACKAGE_FONTCONFIG
select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
help
Cairo is a 2D graphics library with support for multiple
output devices. Currently supported output targets include
the X Window System, Win32, image buffers, and PostScript,
PDF, and SVG file output. Experimental backends include
OpenGL (through glitz), Quartz, and XCB.
http://cairographics.org/
if BR2_PACKAGE_CAIRO
config BR2_PACKAGE_CAIRO_PS
bool "postscript support"
select BR2_PACKAGE_ZLIB
select BR2_PACKAGE_CAIRO_PDF
config BR2_PACKAGE_CAIRO_PDF
bool "pdf support"
select BR2_PACKAGE_ZLIB
config BR2_PACKAGE_CAIRO_PNG
bool "png support"
select BR2_PACKAGE_LIBPNG
select BR2_PACKAGE_ZLIB
config BR2_PACKAGE_CAIRO_SCRIPT
bool "script support"
select BR2_PACKAGE_CAIRO_PNG
config BR2_PACKAGE_CAIRO_SVG
bool "svg support"
select BR2_PACKAGE_CAIRO_PNG
select BR2_PACKAGE_CAIRO_PDF
config BR2_PACKAGE_CAIRO_TEE
bool "tee support"
config BR2_PACKAGE_CAIRO_XML
bool "xml support"
select BR2_PACKAGE_CAIRO_PNG
endif

View File

@@ -0,0 +1,2 @@
# From http://cairographics.org/releases/cairo-1.14.4.tar.xz.sha1
sha1 5b44471e7c328f96de6830baf8ea65030de797f9 cairo-1.14.4.tar.xz

View File

@@ -0,0 +1,160 @@
################################################################################
#
# cairo
#
################################################################################
CAIRO_VERSION = 1.14.4
CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.xz
CAIRO_LICENSE = LGPLv2.1+
CAIRO_LICENSE_FILES = COPYING
CAIRO_SITE = http://cairographics.org/releases
CAIRO_INSTALL_STAGING = YES
CAIRO_AUTORECONF = YES
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1"
endif
# cairo can use C++11 atomics when available, so we need to link with
# libatomic for the architectures who need libatomic.
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),y)
CAIRO_CONF_ENV += LIBS="-latomic"
endif
CAIRO_CONF_OPTS = \
--enable-trace=no \
--enable-interpreter=no
CAIRO_DEPENDENCIES = host-pkgconf fontconfig pixman
# Just the bare minimum to make other host-* packages happy
HOST_CAIRO_CONF_OPTS = \
--enable-trace=no \
--enable-interpreter=no \
--disable-directfb \
--enable-ft \
--disable-gobject \
--disable-glesv2 \
--disable-vg \
--disable-xlib \
--disable-xcb \
--without-x \
--disable-xlib-xrender \
--disable-ps \
--disable-pdf \
--enable-png \
--disable-script \
--disable-svg \
--disable-tee \
--disable-xml
HOST_CAIRO_DEPENDENCIES = \
host-freetype \
host-fontconfig \
host-libpng \
host-pixman \
host-pkgconf
# DirectFB svg support rely on Cairo and Cairo DirectFB support depends on
# DirectFB. Break circular dependency by disabling DirectFB support in Cairo
# (which is experimental)
ifeq ($(BR2_PACKAGE_DIRECTFB)x$(BR2_PACKAGE_DIRECTFB_SVG),yx)
CAIRO_CONF_OPTS += --enable-directfb
CAIRO_DEPENDENCIES += directfb
else
CAIRO_CONF_OPTS += --disable-directfb
endif
ifeq ($(BR2_PACKAGE_FREETYPE),y)
CAIRO_CONF_OPTS += --enable-ft
CAIRO_DEPENDENCIES += freetype
else
CAIRO_CONF_OPTS += --disable-ft
endif
ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
CAIRO_CONF_OPTS += --enable-gobject
CAIRO_DEPENDENCIES += libglib2
else
CAIRO_CONF_OPTS += --disable-gobject
endif
ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
CAIRO_CONF_OPTS += --enable-glesv2
CAIRO_DEPENDENCIES += libgles
else
CAIRO_CONF_OPTS += --disable-glesv2
endif
ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
CAIRO_CONF_OPTS += --enable-vg
CAIRO_DEPENDENCIES += libopenvg
else
CAIRO_CONF_OPTS += --disable-vg
endif
ifeq ($(BR2_PACKAGE_LZO),y)
CAIRO_DEPENDENCIES += lzo
endif
ifeq ($(BR2_PACKAGE_XORG7),y)
CAIRO_CONF_OPTS += --enable-xlib --enable-xcb --with-x
CAIRO_DEPENDENCIES += xlib_libX11 xlib_libXext
else
CAIRO_CONF_OPTS += --disable-xlib --disable-xcb --without-x
endif
ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
CAIRO_CONF_OPTS += --enable-xlib-xrender
CAIRO_DEPENDENCIES += xlib_libXrender
else
CAIRO_CONF_OPTS += --disable-xlib-xrender
endif
ifeq ($(BR2_PACKAGE_CAIRO_PS),y)
CAIRO_CONF_OPTS += --enable-ps
CAIRO_DEPENDENCIES += zlib
else
CAIRO_CONF_OPTS += --disable-ps
endif
ifeq ($(BR2_PACKAGE_CAIRO_PDF),y)
CAIRO_CONF_OPTS += --enable-pdf
CAIRO_DEPENDENCIES += zlib
else
CAIRO_CONF_OPTS += --disable-pdf
endif
ifeq ($(BR2_PACKAGE_CAIRO_PNG),y)
CAIRO_CONF_OPTS += --enable-png
CAIRO_DEPENDENCIES += libpng
else
CAIRO_CONF_OPTS += --disable-png
endif
ifeq ($(BR2_PACKAGE_CAIRO_SCRIPT),y)
CAIRO_CONF_OPTS += --enable-script
else
CAIRO_CONF_OPTS += --disable-script
endif
ifeq ($(BR2_PACKAGE_CAIRO_SVG),y)
CAIRO_CONF_OPTS += --enable-svg
else
CAIRO_CONF_OPTS += --disable-svg
endif
ifeq ($(BR2_PACKAGE_CAIRO_TEE),y)
CAIRO_CONF_OPTS += --enable-tee
else
CAIRO_CONF_OPTS += --disable-tee
endif
ifeq ($(BR2_PACKAGE_CAIRO_XML),y)
CAIRO_CONF_OPTS += --enable-xml
else
CAIRO_CONF_OPTS += --disable-xml
endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))