Commit graph

288 commits

Author SHA1 Message Date
Nathan Lee
baf8a8cfc7 Re-enable windows backends in autotool
AC_LANG_SOURCE only takes one argument, ignored the others.

Closes #542
2022-03-01 20:54:16 +11:00
Emmanuele Bassi
3eef8ea907 build: Remove unused DirectFB bits on Windows
The DirectFB surface removal commit did not remove all the build bits.
2022-02-26 17:17:18 +00:00
Emmanuele Bassi
9b9028c160 Drop cairo-vg surface
OpenVG is a failed experiment from 10 years ago, and nobody has been
using the cairo-vg surface in pretty much the same amount of time.
2022-02-25 02:09:58 +00:00
Emmanuele Bassi
fc3437128d Remove cairo-directfb
Nobody cares about DirectFB any more, not even the people that registered
and maintained the DirectFB domain.
2022-02-25 02:03:35 +00:00
Emmanuele Bassi
803afe6edd tanis: Remove cairo-cogl
Cogl's upstream is unmaintained, and has been for the past 6 years.
2022-02-25 01:58:24 +00:00
Emmanuele Bassi
1409079eef Remove cairo-drm
The DRM backend has always been a science experiment, but now it hasn't
been built in more than 10 years, and it's completely broken.
2022-02-25 01:54:29 +00:00
Emmanuele Bassi
64db153c43 Drop OS/2 support
OS/2 support was last built in Cairo 1.12, which was released 10 years
ago.

Additionally, OS/2 is not supported by Meson.
2022-02-25 01:44:57 +00:00
Emmanuele Bassi
1fa3b10cce Remove boilerplate for the Skia surface
The Skia surface is not there any more.
2022-02-25 01:41:15 +00:00
Emmanuele Bassi
81ecff3800 Remove BeOS support
Nobody cares about BeOS in 2022, and it cannot be built with Meson anyway.

Removing the BeOS backend also allows us to drop the dependency on a C++
compiler and simplify the Autotools build considerably by removing all
the extra CXX targets.
2022-02-25 01:39:29 +00:00
Emmanuele Bassi
64ece6d545 Remove Qt surface
It's disabled by default, and unsupported as it depends on Qt4, which
has been EOL since 2015.
2022-02-25 01:19:58 +00:00
Heiko Lewin
f0873222ef Fix autoconf warnings for version 2.70 2021-01-18 17:55:04 +01:00
Uli Schlachter
4258fbd3b7 cairo 1.17.4 release
-----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCgA4FiEEpmEQCz2sHU8srYpU5gOyV4+48PsFAl/Cz0AaHGJyeWNlQGJy
 eWNlaGFycmluZ3Rvbi5vcmcACgkQ5gOyV4+48PtUXxAAnYipgwpcIKWoSt4eP1o/
 SPqeupY0AQUWB8y6xKoAhcBzt/HOQBqMxWo+zJSkIndJMRusezSmnt+qHY1bXGTX
 pqyipyYfSUJnT6BB/iZvwcAPlW2ISLuI85qdW126nKX9jxCx1uTejogGzeLC2nLK
 DucPZ1N7HU87GEc2mcl1aYkwTHp1f4jEQhRFExvCJg9YA3W+SgDQ2XEMEeewqljM
 /AT7tL3yWFCv4OU5ci7qhUZPp9ZgWZ1vc+0zS1MgpVo7XwxUWL+NaCbhbVJoH6Dq
 rwPE+RJOh1zkkatY/jZQYmW65gnqxed7lcUJ8XmRCUQiIQNvKzYApthj1EW4bxV4
 yxz+O6OiHlnnf20IwqAirEeHOUHYwINHVTE/UZovB1pu983iPQztNH9wfSmhDkhj
 MS+mNVyLJc4Jb/UQvLOkDVljuT2tmtOYytSeMb5z0D+EjBPDAnWZk9RV7UouK+nF
 HjuXEC45NEPzD5H4G8R4HZXBlSbV/SuzyS0Ljor8GBSdAJ9Xf6pDojgNCXLzHgny
 byD1j7jB5rqmGfy72IRUtLFqThroEiTaKXPNJ44P9lK/YdpBZfn99BmtLEUETNeM
 enm8ex1CWYrzLlq5UwM/2FYLE6Tiy5AQOqGfcnQpuaEG4qKao5Za7hmUy3yWitfa
 OK/2GwlDbHXfu/Ekg1kzzFk=
 =jna2
 -----END PGP SIGNATURE-----

Merge tag '1.17.4'

cairo 1.17.4 release

We are not quite sure what happened, but the 1.17.4 tag and the master
branch have different Git histories, but the same content. The merge
commits are missing from the history of the tag. This merge is simply
the result of "git merge 1.17.4".

This fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/446
2021-01-16 16:17:46 +01:00
Xavier Claessens
ebbaebdec1 meson: Generate cairo-script-interpreter.pc needed by GTK+ 2020-12-22 13:16:05 -05:00
Bryce Harrington
dfbc57f9a3 build: Update ssh url for cairographics.org 2020-11-27 18:18:03 -08:00
George Matsumura
9a3ad1df1c build: Include correct poll.h
Including sys/poll.h when poll.h is available produces a compile
warning on some systems, but only sys/poll.h is present on others
such as AIX. This makes sure the most suitable poll.h is included
in each situation.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-09-05 12:15:57 +00:00
Sergei Trofimovich
23b6e8bb57 build/aclocal.float.m4: detect 'strings' with AC_CHECK_TOOL
This way all binutils tools are detected with $CHOST prefix
if exist. And strings is allowed to be substituted with
STRINGS environment override, so 'llvm-strings' (or other)
alternative can be used.

Bug: https://bugs.gentoo.org/726200
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2020-06-14 09:58:52 +01:00
luz.paz
6d93bddbd6 Misc. typos
Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint`
Follow up of 12cb59be7d

Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-31 17:37:15 -08:00
Paul Menzel
1c9201721d Use HTTPS URLs for freedesktop.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*freedesktop.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}freedesktop\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:07 -07:00
Paul Menzel
15ad6ca3e1 Use HTTPS URLs for cairographics.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*cairographics.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}cairographics\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:01 -07:00
Bryce Harrington
c1e37f4f02 doc: Drop tmpl support
Fix distcheck by dropping use of the now-obsolete gtkdoc-mktmpl.

In preparation for the upcoming 1.16 release, I've made a few changes to
get distcheck to pass.  I also updated it to run on Ubuntu 18.04, but
found that on newer distros distcheck won't run due to missing
gtkdoc-mktmpl, which has been deprecated upstream for some time.  The
patch below disables everything that references it, and enables
distcheck to finish successfully.

Unfortunately, this probably regresses portions of our document
generation, and thus will need some reimplementation work.  Anyone got
time to investigate a better solution for this?
2018-09-14 12:42:22 -07:00
Bryce Harrington
3476aa9b68 build: Sp. fix 2018-08-16 20:14:57 -07:00
Bryce Harrington
38806bc3c0 Disable skia from configure
Implement suggestion by Adrian Johnson to comment out skia in
configure.ac to avoid presenting it as an option to users.  This was
discussed on the Cairo mailing list in September 2017.

Skia is not API stable and is not available in packaged+versioned forms,
resulting in it being a continually moving target.  I.e. it's pretty
much always unusably out of date.  The last update to the skia backend
was in 2014, and had not been updated very regularly prior to that.

We'll simply disable it for now.  If no one complains by the next Cairo
snapshot release, we'll assume no one is needing it and will drop the
code entirely.

Meanwhile, if anyone does need it, it can be uncommented and used.

(The changes to the win32 build config appear to be automatically
generated as a result of disabling the feature in configure.  I'm
committing them to avoid confusion.)
2018-04-02 20:20:00 -07:00
Unknown
12cb59be7d Cairo trivial typos
Found using `codespell -q 3 -I cairo-whitelist.txt`
whereby whitelist contained:
```
amin
iff
lod
writen
```

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2018-04-02 17:46:58 -07:00
Mikhail Fludkov
e5532f5ad7 Fix code generation when using GCC legacy atomic operations
https://bugs.freedesktop.org/show_bug.cgi?id=103559
2017-11-26 13:09:51 +10:30
Adrian Johnson
1674d2b885 pdf: set default create date 2017-10-24 21:44:08 +10:30
Adrian Johnson
117a3c27d4 build: use _WIN32 instead of windows.h to check for windows build
ifdef _WIN32 is the recommended way to check for a windows build [1]
and avoids identifying cygwin as windows.

based on the patch at [2]

[1] https://lists.gnu.org/archive/html/autoconf/2012-02/msg00008.html
[2] https://lists.gnu.org/archive/html/autoconf/2012-02/msg00009.html
2017-09-16 10:04:57 +09:30
Bryce Harrington
8ff3019f51 gl: Add support for OpenGL ES 3.0
This improves the OpenGL ES support to extend it to version 3.0.
A number of new features are available in glesv3 including creation of
multi-sampled renderbuffers.  These renderbuffers can be blitted to
single sample textures (but not the other way around).  Other features
such as PBO for image uploading, are left as followon work.

For this preliminary implementation, glesv3 backends always create
renderbuffers, which can be set as single sample or multisample.  The
renderbuffer's content is blitted to the texture only when used as a
source or a mask.

Images uploaded to a texture stay there until the surface is used as a
rendering target, at which point its painted to the renderbuffer.

This patch is heavily based off of Henry Song's initial GLESv3 patch
6f7f3795 from his cairogles fork of Cairo, and incorporates subsequent
fixes and pertinent refactorings from his trunk and review feedback from
Uli.

This implements the *functional* support for glesv3, excluding the
various optimization work to utilize its features.  Rendering and
performance should not be expected to improve notably from pure glesv2.
As the GL backend for Cairo remains "experimental", these changes should
likewise be considered as such.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2017-09-13 15:18:04 -07:00
Bryce Harrington
cd1040ed80 build: Don't rely on non-POSIX 'strings -' behavior
On systems using GNU's strings implementation, 'strings -' causes a scan
of the whole file, which is equivalent to 'strings -a'.  However, in
POSIX passing '-' as the first argument to 'strings' is declared
unspecified, and thus may break the build on systems that use a
different POSIX strings implementation.

Patch from Jung-uk Kim

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88639
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2016-10-12 13:17:05 -07:00
Bryce Harrington
7cc77d1cee build: Use memory barriers for ARM
ARM has much weaker memory ordering guarantees than x86 by default, and
needs the memory barriers.  A similar fix exists in the Skia codebase.
Fix suggested by Nathan Froyd.

Fixes: FDO #90302

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: "Henry (Yu) Song" <henry.song@samsung.com>
2015-10-14 18:13:42 -07:00
Bryce Harrington
776dd20c84 configure: Fix typo for missing line continuation character
There is an unintentional (benign) missing line continuation "\" in the
definition of MAYBE_WARN in configure.  configure completes and issues a
WARNING:

configure: WARNING: cache variable cairo_cv_warn_maybe contains a
newline

Found and solved by Larry Baker.

Fixes:  https://bugs.freedesktop.org/show_bug.cgi?id=89750
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-06-27 00:44:29 -07:00
Julien Isorce
f032133e6d build: Show all disabled features in cairo-features.h
Even features which are disabled by default should appear in
cairo-features.h.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83359
(Patch approved by Behdad Esfahbod in bug tracker.)

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-06-04 14:12:12 -07:00
Nathan Froyd
5d150ee111 Support new-style __atomic_* primitives
Recent versions of GCC/clang feature a new set of compiler intrinsics
for performing atomic operations, motivated by the operations needed to
support the C++11 memory model.  These intrinsics are more flexible than
the old __sync_* intrinstics and offer efficient support for atomic load
and store operations.

Having the load appear atomic to the compiler is particular important
for tools like ThreadSanitizer so they don't report false positives on
memory operations that we intend to be atomic.

Patch from Nathan Froyd <froydnj@mozilla.com>
2015-06-04 13:25:23 -07:00
Bryce Harrington
c3605bd3ad git-ignore: Add build's test-driver 2015-03-06 23:29:53 -08:00
Adrian Johnson
f9b65ae1fc build: fix regression on mingw
7cfebce1 removed the filename extension for executables.

Patch from http://sourceforge.net/p/inkscape/mailman/message/32939144/

Bug 85120
2014-10-21 22:42:34 +10:30
Bryce Harrington
7cfebce152 build: Fix float endian configure test when using clang -O4
When using clang -O4, the compiled test object is output in bitcode
format rather than as an ELF object, so when we grep the test value from
the object it fails.  To work around this, go ahead and link the test
object into an executable, and then grep against this native binary
instead of the compiler's intermediary object.

We need to add __attribute__((used)) to ensure the d variable doesn't
get optimized out during linking, since it's not referenced in the
test's main().

Patch authored by cmuelle8 <abendstund@gmail.com>

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=63310
2014-09-23 12:40:25 -07:00
David Weiß
e77d0a5611 made paths to pixman, libpng and zlib configurable by commandline for win32 builds
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2014-09-11 13:00:13 -07:00
Ravi Nanjundappa
3b9d7e583f qt: Suppress warnings in qt backend build
This patch fixes majorly 2 kinds of warning issues:

(1)
cc1plus: warning: command line option '-Wold-style-definition' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wnested-externs' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wmissing-prototypes' is valid for Ada/C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wbad-function-cast' is valid for C/ObjC but not for C++ [enabled by default]

Solution: Enable these warnings only for C compiler and not for C++

(2)
cairo-qt-surface.cpp: In function 'cairo_int_status_t _cairo_qt_surface_fill(void*, cairo_operator_t, const cairo_pattern_t*, const cairo_path_fixed_t*, cairo_fill_rule_t, double, cairo_antialias_t, const cairo_clip_t*)':
cairo-qt-surface.cpp:852:5: warning: inlining failed in call to 'PatternToBrushConverter::PatternToBrushConverter(const cairo_pattern_t*)': --param max-inline-insns-single limit reached [-Winline]
cairo-qt-surface.cpp:1339:38: warning: called from here [-Winline]
cairo-qt-surface.cpp:390:1: warning: inlining failed in call to 'QPainterPath _ZL10path_to_qtPK17_cairo_path_fixedPK13_cairo_matrix.part.13()': call is unlikely and code size would grow [-Winline]
cairo-qt-surface.cpp:1306:1: warning: called from here [-Winline]
cairo-qt-surface.cpp:1051:5: warning: inlining failed in call to 'PatternToBrushConverter::~PatternToBrushConverter()': call is unlikely and code size would grow [-Winline]

Solution: Add __attribute__ ((noinline)) to the function as mentioned in
http://stackoverflow.com/questions/11724235/warning-for-template-with-g-o2-or-os-o-o1 (Edit 3)

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2014-09-11 12:53:05 -07:00
Uli Schlachter
c7ff9bb32e Remove LTO support
This just never worked too well and caused too many issues. I don't think anyone
will miss this.

As mentioned in the below bug report, proper LTO support also requires using
special versions of ranlib, nm and ar which support the LTO object files.
Otherwise, calling the normal ranlib on an .a library breaks the list of
exported symbols and thus completely breaks the static library.

This (partly) reverts the following commits:

c3645d97eb configure.ac: Add a --disable-lto configure option
d486ea30f1 configure: Conditionally include -flto
0870c6fb5b gcc-4.5 warnings and optimisation flags.

(The last commit is the one which brought us -flto in the first place even
though it doesn't talk about this. It's also the one which is only reverted
partly.)

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77060
CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-08-01 13:11:31 -07:00
Bryce Harrington
c3645d97eb configure.ac: Add a --disable-lto configure option
Link-Time Optimization seems to be stable enough with gcc 4.8 and 4.9,
but has proven to be an issue in the past for many cairo users (webkit,
efl, ubuntu, opensuse, gentoo, arch...) who carry patches to disable it.

Gentoo's patch[1] adds a --disable-lto option to leave it enabled by
default but give users the ability to work around lto related build
problems (c.f. fdo #77060).  Patch appears to have been authored by
Alexandre Rostovtsev[2].

1: sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-lto-optional.patch
2: https://bugs.gentoo.org/show_bug.cgi?id=509552

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60852
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2014-07-11 18:34:43 -07:00
Bryce Harrington
28c3b92fb4 .gitignore: Ignore two generated files in build/
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2014-07-08 17:47:23 -07:00
Behdad Esfahbod
3cd6c5966a Revert accidentally committed stuff 2013-07-29 22:47:26 -04:00
Behdad Esfahbod
0554d76402 [ft] Add missing include 2013-07-29 22:41:46 -04:00
Gilles Espinasse
d49b2284b5 configure: fix unrecognized -Wno option
gcc-4.4 and later accept every -Wno option. So we can test for the
option without no in the name to check if the option is supported.

Each time a warning is emitted and without this fix, on gcc-4.4 that will
add this warning:
   cc1: warning: unrecognized command line option "-Wno-unused-but-set-variable"

bugs.freedesktop.org #51633, rediffed after 1.12.4

Of course this assumes that all compilers will behave like gcc, which is
reasonably implicit in the set of warning flags.

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
[ickle: slight modification to test both -W and -Wno variants to ideally
preserve compatability with non-GCC compilers sharing GCC options!]
2012-10-21 17:32:53 +01:00
Gilles Espinasse
b12a94b983 configure: fix PKG_CHECK_MODULES tests displaying no no
Inside PKG_CHECK_MODULES, AC_MSG_RESULT(no) is already displayed, so the
caller should not use another AC_MSG_RESULT(no).

Add a comment that empty ACTION-IF-NOT-FOUND is not allowed for
PKG_CHECK_MODULES, but a simple : is enough.

This is bugs.freedesktop.org #51628, rediffed after 1.12.4

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-10-21 09:36:28 +01:00
Javier Jardón
aa90a8f84f configure.ac: generate xz tarballs by default 2012-04-14 15:04:06 +01:00
Marcus Meissner
d486ea30f1 configure: Conditionally include -flto
As some systems fail to create working binaries with when linked with
lto, perform a check during configure.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39114
2012-04-14 14:48:32 +01:00
Gilles Espinasse
09de481ce5 Cosmetic configure fix
'how to allow undefined symbols in shared libraries' test should use CAIRO_CC_TRY_FLAG_SILENT or configure display is a bit out of order like this

checking how to allow undefined symbols in shared libraries used by test suite... checking whether gcc supports -Wl,--allow-shlib-undefined... yes
-Wl,--allow-shlib-undefined

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-10 17:46:13 +02:00
Chris Wilson
de61681574 build: Disable -Wset-but-unused-variable
This is too noisy in the current build, and masking more important
warnings.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-09 12:47:34 +01:00
Andrea Canciani
ed803a1935 build: Add 'clean' target to Makefile.win32 build system
The Makefile.win32 in the subdirectories provide a working 'clean'
target (defined in Makefile.win32.common), the central Makefile.win32
'clean' target does not do anything.

Replace the noop 'clean' target with one that cleans all the subdirs.
2012-02-16 23:00:46 +01:00
Andrea Canciani
dfb8b131f5 win32: Fix Makefile.win32 build
The Makefile.win32 build system assumes that the files are in the same
directory level. If this is not the case, the compiler fails when it
tries to write the object files to a non-existing directory.

This can be fixed simply by making sure that the destination directory
always exists.

Fixes:

fatal error C1083: Cannot open compiler generated file:
'release/win32/cairo-win32-debug.obj': No such file or directory
2012-02-15 19:11:39 +01:00