Commit Graph

169 Commits

Author SHA1 Message Date
Khaled Hosny be91d2917d 3.2.0 2021-12-12 04:45:54 +02:00
Khaled Hosny 549e2b7038 Revert "Remove direct link to dwrite from meson scripts"
This reverts commit 6ea6c581ed.
2021-12-01 19:55:48 +02:00
Khaled Hosny 8aed5c21a3 3.1.2 2021-11-26 17:54:18 +02:00
Khaled Hosny 69d8f27c69 [meson] Require 0.55.0
We implicitly require it for building ragel subproject. This new version
requirement should satisfied in both Fedora 33 and Debian bullseye, and
not be too cutting edge for us.
2021-11-22 03:11:36 +02:00
Khaled Hosny cd5c6cd041 3.1.1 2021-11-08 06:59:55 +02:00
Khaled Hosny 77eeec53a9 3.1.0 2021-11-03 23:31:03 +02:00
Cameron Cawley 6ea6c581ed Remove direct link to dwrite from meson scripts 2021-10-23 13:19:39 -07:00
Khaled Hosny 792ca307b0 [meson] Add graphite2 option and deprecate graphite
Fixes https://github.com/harfbuzz/harfbuzz/issues/3241

Should be better handled when we can use https://github.com/mesonbuild/meson/pull/9184
2021-10-23 10:59:02 -07:00
Khaled Hosny 9c387e20d6
3.0.0 2021-09-17 21:32:30 +02:00
Khaled Hosny 22cbd038d3 [meson] Add ragel subproject
If ragel 6.10 is not found, build it from source.

Seems to work, except that ragel uses exceptions and we configure
HarfBuzz build to not use exceptions, and I can’t find away to enable
exceptions only for the ragel subproject. I had to remove cpp_eh=none
from default options and try to disable exceptions in MSVC manually
(other compilers are already handled).
2021-09-14 18:46:33 -06:00
Khaled Hosny 7e9ac8fea2 [meson] Require ragel 6.10
Ragel 7 is also not stable from upstream's point of view.

This uses “version” argument find_program(), which was introduced in
meson 0.52.0, so I raised the minimum required meson version
accordingly.
2021-09-14 18:46:33 -06:00
Khaled Hosny 505df5abf8 2.9.1 2021-09-07 13:46:43 +02:00
Khaled Hosny 9aa6f8a93f 2.9.0 2021-08-18 09:32:04 +02:00
Khaled Hosny 63e15eac4f 2.8.2 2021-07-08 23:02:49 +02:00
Khaled Hosny b37f03f16b 2.8.1 2021-05-04 02:07:06 +02:00
Hans Petter Jansson 8298c2f93b [hb-view] Use Chafa for terminal graphics if available
This produces high-quality terminal graphics using symbols or sixels
according to the detected terminal capabilities.

Fixes #2430.
2021-04-26 12:13:10 -06:00
Khaled Hosny 743baf3543 [build] Don’t look for FontConfig
We don’t currently use it anywhere. It was used briefly for the
hb-fc-list tool, but this tool have not been built since 2015:

commit cd042fc8c4
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Thu Jun 18 10:55:13 2015 -0700

    [util] Disable hb-fc-list for now

    Until I figure out what to do about the API, and finalize
    the tool.
2021-03-29 15:54:51 -06:00
Khaled Hosny 03538e872a 2.8.0 2021-03-16 19:28:35 +02:00
Behdad Esfahbod c2fc2aa44c [atomic] Remove Solaris intrinsics 2021-02-20 15:20:33 -07:00
Behdad Esfahbod 7099a6dca1 [atomic] Remove old Intel primitives implementation 2021-02-20 15:20:06 -07:00
Behdad Esfahbod 711c241f6c m[mutex] Remove busyloop mutex implemenation
Don't know why I ever added this. :)
2021-02-20 15:16:59 -07:00
Khaled Hosny 68d2e1b221 [meson] Disable benchmark feature by default
It downloads a dependency from the internet, and in the same time not
used anywhere (one needs to explicitly call ninja benchmark), not even
on the CI (not sure if it that would make much sense since it does not
seem to ever fail).
2021-02-09 22:10:20 +02:00
Khaled Hosny b6f47af555 [meson] Report more options in the summary 2021-02-09 22:10:20 +02:00
Khaled Hosny 7236c7e29c 2.7.4 2020-12-27 01:59:00 +02:00
Khaled Hosny 71a3b54f3c 2.7.3 2020-12-23 15:33:15 +02:00
Xavier Claessens e2ba0e009e meson: Fix check for cairo and cairo-ft dependencies
When cairo comes from a subproject fallback it should still take
cairo-ft dependency, otherwise it miss freetype2 cflags.

Also update wrap file to use upstream repository now that meson support
has been merged.

This requires Meson >= 0.54.0 because cairo itself requires that version
and we use the new `fallback: 'cairo'` syntax without specifying a
variable name because cairo does not provide a variable name for
cairo-ft.
2020-11-17 11:52:35 -05:00
Khaled Hosny 9c98b2b9a9 2.7.2 2020-08-29 00:39:42 +02:00
Ebrahim Byagowi 05ef75c553 2.7.1 2020-08-13 20:54:53 +04:30
Ebrahim Byagowi 0a02f1e760 [meson] Abort if GDI/Uniscribe headers couldn't be found 2020-08-13 18:28:42 +04:30
Ebrahim Byagowi 24b4200243 [meson] Avoid using has_headers as that has added in 0.50.0 2020-08-13 18:28:42 +04:30
Ebrahim Byagowi 6e32145dc9 [meson] Make compatbile with 0.47.0 2020-08-13 18:28:42 +04:30
Ebrahim Byagowi 58209c86a0 [meson] Make compatbile with 0.49.0
Contains a just put together summary feature polyfill and workaround
to broken ternary operator.
2020-08-13 18:28:42 +04:30
Ebrahim Byagowi ef2e380342 Revert "Remove cmake-config support of HarfBuzz"
This reverts commit 75efa89343.
2020-08-12 01:00:33 +04:30
Ebrahim Byagowi 34a0532092
[meson] minor note 2020-08-04 15:14:59 +04:30
Ebrahim Byagowi 75efa89343 Remove cmake-config support of HarfBuzz
Reverts d38f37b2 as discussed in #2316
2020-08-03 16:45:17 +04:30
Ebrahim Byagowi 97079a7c8f
[meson] Pass cpp_eh=none and cpp_rtti=false as default options
If we want to support a build with exception handling and RTTI
We should reflect that on library(..., link_language: 'c') also so for
now it is ok to just set it here to get MSVC support also and we
can remove hard coded flags later upon request.

One other concern over just relying on it is on when harfbuzz is used
as a subproject and the parent project hasn't provided the same options,
that should be resolved first I think.

Closes #2584
2020-08-02 12:34:21 +04:30
Ebrahim Byagowi 749e2754c8
[meson] remove useless note about -fvisibility-inlines-hidden
It was put there as current situation of autotools but msys2 is ok
with the flag, if something like is needed for other it can handled
as a local patch.
2020-08-02 12:21:51 +04:30
Ebrahim Byagowi a01c7a380b 2.7.0 2020-07-25 12:40:57 +04:30
Ebrahim Byagowi f9ac6ddbef
[meson] Rename 'gtk_doc' option to 'docs' 2020-07-22 17:53:04 +04:30
Ebrahim Byagowi 8cbdb6fa41 [meson] Don't enable benchmark under the conditions ever
As we don't want to make headache for packagers as we don't want to
enable it when --auto-features=enabled is used.
2020-07-15 13:33:00 +04:30
Ebrahim Byagowi dc981fe951
[meson] Merge gdi and uniscribe
They are the same thing obviously
2020-07-15 13:15:27 +04:30
Ebrahim Byagowi f62f4e388b [meson] minor on gdi, dwrite and icu 2020-07-08 03:12:32 +04:30
Ebrahim Byagowi 69a1e07acb
[meson] don't enable benchmark if is in nodownload wrap mode
Fixes #2551
2020-07-08 03:12:09 +04:30
Ebrahim Byagowi 747f65f9ef
[meson] Remove HAVE_OT and HAVE_FALLBACK
No need as 1e8fdd2 and 23768a9
2020-07-07 11:37:16 +04:30
Ebrahim Byagowi e1c35ca581
[meson] rename the section
As Behdad's comment
2020-07-06 22:29:11 +04:30
Ebrahim Byagowi ddb103ea1a
[meson] minor 2020-07-06 22:27:39 +04:30
Khaled Hosny dc684103d4 [meson] Set the default wrap mode to nofallback
This, I believe, will prevent any automatic use of subprojects be
default and will only look for dependencies on the system.
https://mesonbuild.com/Subprojects.html#commandline-options
2020-07-06 21:15:44 +04:30
Ebrahim Byagowi 52199349aa
[meson] mark meson as tested
tested in a CI bot that in a `-Dcoretext=enabled` build, `build/util/hb-shape --shaper=ot` works fine.
2020-07-06 16:30:59 +04:30
Ebrahim Byagowi a08ba46d86 [meson] move meson version so can be referenced easier 2020-07-06 11:48:59 +04:30
Ebrahim Byagowi 6d3d0ebba3 Remove .tarball-revision generation from meson dist
Toward making release tarball identical to git checkout now that we are moving to meson.
2020-07-06 11:48:59 +04:30
Ebrahim Byagowi 38fa924904 [meson] revert 020b182 as meson fails when there is cyclic dependency 2020-07-03 15:47:13 +04:30
Ebrahim Byagowi 42d039cc99 [meson] minor 2020-07-03 04:49:12 +04:30
Ebrahim Byagowi f2a80ab2c2 [meson] use null_dep idiom 2020-07-03 04:49:12 +04:30
Ebrahim Byagowi 05ab073d9b [meson] Improve the way cairo-ft availability is checked 2020-07-03 03:10:00 +04:30
Ebrahim Byagowi aadcd3ed8a [meson] use dependency's has_headers to make pulled cairo has ft support 2020-07-01 17:47:20 +04:30
Ebrahim Byagowi 020b182c79 [meson] try freetype without harfbuzz just as a last resort 2020-07-01 17:47:20 +04:30
Xavier Claessens 01fa55e88f meson: Allow freetype and cairo subprojects to fail
If their respective option is set to 'auto' configuration of the
fallback subproject should be allowed to fail for any reason.
2020-07-01 14:11:11 +04:30
Xavier Claessens 00c652adab meson: Fallback to cairo subproject when option is 'auto' 2020-07-01 14:11:11 +04:30
Xavier Claessens 571365df33 meson: Simplify check for cairo library and headers 2020-07-01 14:11:11 +04:30
Xavier Claessens c4bbe89b53 meson: Fallback to freetype2 subproject when option is 'auto'
But disable harfbuzz support when configuring freetype2 subproject to
avoid dependency cycle.
2020-07-01 14:11:11 +04:30
Xavier Claessens 33252ce576 meson: Simplify check for freetype2 library and headers 2020-07-01 14:11:11 +04:30
Ebrahim Byagowi f3f9205fac [meson] Assume cairo_ft always available when cairo isn't from pkgconfig 2020-07-01 03:21:39 +04:30
Ebrahim Byagowi 702847aadd [meson] Turn benchmark to a feature 2020-06-29 12:54:58 +04:30
Ebrahim Byagowi 1536271f6b Don't check roundf availability in cmake and meson 2020-06-28 13:35:28 +04:30
Ebrahim Byagowi 95b1081be4 Add performance benchmark for shaping, get extents and draw 2020-06-25 01:30:07 +04:30
Ebrahim Byagowi 53b0a183c7 Remove concept of stable/unstable from build tools
We never practiced the concept of stable and unstable releases, let's
remove the code and always use the stable scheme.
2020-06-23 14:46:47 +04:30
Ebrahim Byagowi e4203c1469 2.6.8 2020-06-22 12:51:22 +04:30
Ebrahim Byagowi 8c84fee2e5 Update build systems status messages 2020-06-22 04:32:59 +04:30
Ebrahim Byagowi a6bcc577a9
[meson] don't `add_dist_script` when we are subproject
Happens when harfbuzz is used as a meson subproject,
  `ERROR: add_dist_script may not be used in a subproject.`
2020-06-20 14:19:12 +04:30
Ebrahim Byagowi 03bd3efaa7
[meson] Write git revision to .tarball-revision on dist tarball 2020-06-19 10:32:46 +04:30
Ebrahim Byagowi 62de2f749c [meson] Remove spaces before named parameter colons
meson documentations sometimes adds the space and sometimes don't and we
aren't adding it most of the times unconsciously so let's the cases and
be consistent.
2020-06-12 01:11:06 +04:30
Ebrahim Byagowi b8454c3d61 [meson] use if blocks to separate different dependencies 2020-06-12 01:11:06 +04:30
Ebrahim Byagowi ebab4b8658 [meson] Implement disabled state for cairo/freetype/icu
'disabled' wasn't implemented for some of the features so they were
getting found even with explicit -Dfeature=disabled, this implements it.

Run the following command to test this change and check whether 'disabled'
was actually effective,
  meson build -Dglib=disabled -Dgobject=disabled -Dcairo=disabled -Dfontconfig=disabled -Dicu=disabled -Dfreetype=disabled -Dintrospection=disabled -Dgtk_doc=disabled

This is useful when one wants to integrate harfbuzz into another project via
meson's subproject mechanism.
2020-06-10 20:15:42 +04:30
Ebrahim Byagowi 22048d55aa [meson] Add -Bsymbolic-functions 2020-06-05 12:00:44 +04:30
Ebrahim Byagowi 65462c4b0b minor, improve the need for graphite comment 2020-06-05 01:23:15 +04:30
Christoph Reiter 03bd6ead44 [meson] Only pass required dependencies to everything
Instead of passing dependencies as required we used one giant shared
dependency list containing all dependencies for every library/executable.
While this kinda works, the specified deps are also used for generating
the pkg-config files and this leads to lots of Requires.private and Libs.private
entries which aren't really needed.

This removes the "deps" array and replaces it with a few smaller ones and
makes sure the public libraries only get passed the dependencies actually
needed.

Fixes #2441
2020-06-04 23:28:57 +04:30
Ebrahim Byagowi fb46a32ed0 2.6.7 2020-06-03 12:56:07 +04:30
Ebrahim Byagowi 6058ede3ae
Build win32 artifacts using meson
As a part of meson migration, this builds hb-shape dependencies
using meson subprojects and removes different unrelated mingw
files we've put on source root about things that aren't really our
concern. This also simplifies all the instructions we've put in
README.mingw.md and makes it easy to build the project on
distros that no mingw libraries (such i686-win32-{freetype,glib,...}
are packaged. The known catch is however lack of hb-view as its need
for build of cairo which apparently isn't that straightforward.
2020-06-01 12:58:31 +04:30
Ebrahim Byagowi 887aa0214f [meson] Use find_program for locating python script
Apparently that is the simplest and supported way of finding python scripts.
2020-05-21 20:03:11 +04:30
Ebrahim Byagowi cc53fd158c
[meson] Normalize options names
As https://github.com/harfbuzz/harfbuzz/pull/2412#discussion_r426275027
2020-05-21 19:33:18 +04:30
Ebrahim Byagowi a9e8328ae2 [meson] Add build configuration summary just like autotools 2020-05-21 19:29:32 +04:30
Ebrahim Byagowi f7562672f9 [meson] Use / instead join_paths
We need some of the very recent features of meson, let's use the new features also
2020-05-21 18:52:31 +04:30
Tim-Philipp Müller 3dd7b2105b meson: build documentation with gtk-doc
Fixes https://github.com/harfbuzz/harfbuzz/issues/2409
2020-05-18 13:56:46 +04:30
Ebrahim Byagowi 42025680cb 2.6.6 2020-05-12 00:17:44 +04:30
Ebrahim Byagowi 44fe1c8ff1 Remove xlocale use now that isn't available in most distros
Our CI bots don't detect it in Alpine, ArchLinux, Ubuntu and Fedora
so let's get rid of it use the fallback we are using anyway for a
long time.
2020-05-10 14:51:35 +04:30
Ebrahim Byagowi 750bb73e32 [meson] Add an experimental-api option 2020-04-21 01:26:08 +04:30
Ebrahim Byagowi c6b3f73b09 [meson] Make harfbuzz-icu separate module optout-able 2020-04-19 02:06:01 +04:30
Christoph Reiter 8ae06c9489 meson: build a separate library for harfbuzz-icu
This adds a seperate library like with autotools.

This also fixes the ico feature option which was just set to required:false
when disabled instead of really disabling it.
Disabling is still broken with msvc because it then tries to find the library
another way, but that's broken for all other deps as well so I left it as is.

For tests only test-unicode.c is using icu specific functions so split it out
into its own category which depends on harfbuzz-icu.

Fixes #2338
2020-04-18 23:34:31 +04:30
Ebrahim Byagowi f9bc373381 2.6.5 2020-04-17 23:49:56 +04:30
Ebrahim Byagowi 466dbaa258 [meson] Add a note on meson stability status 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi e8808c1c20 [meson] Minor, replace tabs with spaces 2020-03-24 19:06:09 +00:00
Tim-Philipp Müller a3892be701 [meson] fix spurious warning when building test/api C sources
Fixes compiler warning

  test-unicode.c:589:1: warning: ‘test_unicode_properties_lenient’ defined but not used

which didn't happen with autotools.

Reason it does with meson is that the setup for C was slightly wrong.
We would only add -DHAVE_CONFIG_H to cpp_args which is only valid when
compiling C++ code, but not plain C code, and many of these tests were
plain C.

Instead pass -DHAVE_CONFIG_H via add_project_arguments() and make sure
to set both c_args and cpp_args when building test executables.

Fixes https://github.com/harfbuzz/harfbuzz/issues/2257
2020-03-14 15:16:00 +03:30
Tim-Philipp Müller bb8aaa3108 [meson] use add_project_arguments() instead of add_global_arguments()
.. and simplify, can pass two languages in one go.

add_global_arguments() won't work if harfbuzz is used as a
meson subproject.
2020-03-14 15:16:00 +03:30
Chun-wei Fan 838346c54a meson: Support GDI integration
...and supersede the configuration option uniscribe with gdi, as Uniscribe is
tightly tied to GDI.  This means that enabling GDI would also mean enabling
Uniscribe.
2020-03-13 14:30:17 +03:30
Chun-wei Fan 9d0e6aef8a Meson: Look harder for Cairo on Visual Studio
Since Cairo's build system for Visual Studio does not generate pkg-config files
for us, look for cairo.h and cairo.lib manually if the pkg-config files cannot
be found.

Also look for cairo-ft more carefully: ensure that we have cairo-ft.h, and one
of its symbols can be found in the same cairo.lib that we previously found.
2020-03-13 14:30:17 +03:30
Chun-wei Fan 5efce600ab Meson: Try harder to look for ICU on Visual Studio
ICU's Visual Studio build files do not generate pkg-config files for us, unless
it is built with Cygwin instead of the project files.  If pkg-config files for
ICU cannot be found, look for its headers and .lib manually.
2020-03-13 14:30:17 +03:30
Chun-wei Fan 7baa8e0dbe meson: Updates to Uniscribe and DirectWrite build support
Update the DirectWrite support to look for dwrite_1.h, and give the green light
for both the DirectWrite and Uniscribe build options.
2020-03-13 14:30:17 +03:30
Chun-wei Fan 733414b286 meson: Try harder to find FreeType on Visual Studio
If we can't find FreeType via pkg-config or CMake, try looking for it manually,
before we attempt to build it as a fallback.
2020-03-13 14:30:17 +03:30
Chun-wei Fan 3341d5346e meson: Don't apply -DHB_DLL_EXPORT to all targets
Only have it apply to the libraries when they are not built statically on
Visual Studio
2020-03-13 14:30:17 +03:30
Ebrahim Byagowi 31218b41c6 [meson] Explicit state C++11 for older compilers
Needed as https://circleci.com/gh/harfbuzz/harfbuzz/132417
2020-03-12 00:25:48 +03:30