Commit Graph

203 Commits

Author SHA1 Message Date
Garret Rieger 5d3511e5b1 [subset] Change compute_distances() to use a priority queue. 2021-03-17 15:53:57 -07:00
Khaled Hosny 7b9e23f28b [introspection] Fix g-ir-scanner syntax errors
Fixes https://github.com/harfbuzz/harfbuzz/issues/2851
2021-02-10 23:37:43 +02:00
josephshen d9e0244cdf remove duplicate file names 2021-02-02 09:23:41 -08:00
Behdad Esfahbod 59721c2f37 [use] Move data table into same compilation unit 2021-02-01 11:30:39 -08:00
Behdad Esfahbod d9b167da3d [use] Remove hb-ot-shape-complex-use.hh
Inline into ragel machine.
2021-02-01 11:30:39 -08:00
Behdad Esfahbod 675b6c2994 [indic/khmer/myanmar/use] Remove unused dump-*-data programs
In prep for streamlining tables.
2021-02-01 11:30:39 -08:00
Behdad Esfahbod e8e9fd9556 [syllabic] Add hb-ot-shape-complex-syllabic.cc/hh
Empty for now.

Part of https://github.com/harfbuzz/harfbuzz/issues/1810
2021-01-18 12:00:58 -08:00
Behdad Esfahbod 3c5b7886eb Revert "Avoid category duplication between C++ and Ragel"
This reverts commit 67ea8133d3.

Merged accidentally on https://github.com/harfbuzz/harfbuzz/pull/2726
2021-01-15 19:26:04 -07:00
David Corbett 67ea8133d3 Avoid category duplication between C++ and Ragel 2021-01-15 18:24:52 -08:00
Myaamori 5f32fdff11 meson: use meson.current_source_dir() instead of @CURRENT_SOURCE_DIR@
@CURRENT_SOURCE_DIR@ is not listed as a valid string substitution
for custom targets in the Meson reference, and in practice
it does not get substituted when using the vs2019 backend.
2020-11-24 01:29:24 +00:00
Fabrice Fontaine 2604201ae0 src/meson.build: allow introspection when cross-compiling
introspection can be enabled when cross-compiling on certains conditions
(for example it is supported by buildroot) so, as suggested by
Tim-Philipp Müller, disable it by default for cross builds unless the
option was explicitly enabled by the user

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-09-25 18:40:43 +02:00
Ross Burton 5aff83104e [build] generate hb-version.h once at configure time with Meson
Currently with Meson hb-version.h is generated during the build without
any explicit dependencies which can result in build failures due races
over the file.

Change this to be generated at configure time, so that the file is always
generated once before the build itself.

Closes #2667
2020-09-08 09:42:27 +01:00
Ross Burton bc1c93fbe0 [build] No need to pass source directory to gen-hb-version
The input file is by definition in the source directory, so dirname()
that instead of needing the directory to be passed.

Needed because a follow-up commit will change when this is called, and the
source directory isn't trivially available at that point.
2020-09-08 09:40:56 +01:00
Khaled Hosny fe6381d9f1 [build] Minor 2020-09-01 03:44:01 +02:00
ebraminio a4f3a752dd [build] hb-directwrite needs a C++ linker 2020-09-01 03:21:12 +02:00
Ebrahim Byagowi 253a8f7a51 [meson] Another approach to skip tests incompatible with MSVC 2020-08-13 18:28:42 +04:30
Ebrahim Byagowi 411b426c69 [meson] minor 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
Tom Schoonjans eea9b59fc5 [meson] fix generating introspection
Only libharfbuzz_gobject is introspectable, not libharfbuzz. Therefore,
it makes no sense to target the latter for introspection: it should
instead be listed as a dependency.
2020-08-12 16:07:30 +04:30
David Corbett 7bffb5d7ba Generate `has_arabic_joining` 2020-08-12 11:34:49 +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 75efa89343 Remove cmake-config support of HarfBuzz
Reverts d38f37b2 as discussed in #2316
2020-08-03 16:45:17 +04:30
Ebrahim Byagowi 11bb8aa83e
[meson] limit check-libstdc++ check to 0.55
library(..., link_language: 'c') is introduced in 0.55 but we were relying on this anyway
assuming b_asneeded being true on meson.

#2614
2020-08-02 00:47:21 +04:30
Ebrahim Byagowi 9d3fbe0588 [meson] Add darwin versions to library()
We now have,

$ otool -L src/libharfbuzz.dylib
src/libharfbuzz.dylib:
	@rpath/libharfbuzz.0.dylib (compatibility version 0.0.0, current version 0.0.0)

And with the change should we get

$ otool -L src/libharfbuzz.dylib
src/libharfbuzz.dylib:
	@rpath/libharfbuzz.0.dylib (compatibility version 20700.0.0, current version 20700.0.0)
2020-08-02 00:34:29 +04:30
Ebrahim Byagowi c33e8006fd [fuzz] Implement failing allocator 2020-07-29 07:35:34 +04:30
Ebrahim Byagowi 60959b08e5
[meson] execute find_program('gen-ragel-artifacts.py') only once
should rename the script also
2020-07-14 20:28:06 +04:30
Ebrahim Byagowi 5c8e1bd237 [meson] Don't allow introspection on static library 2020-07-14 18:02:40 +04:30
Ebrahim Byagowi 122a2897e4 [aat] Remove lcar support
Very low use, only two distinct font files, Apple Chancery.ttf and Hoefler Text.ttc
have it so it really doesn't worth the size addition and so, but one may argue that
whole ligature caret is low use but guess we better to encourage GDEF one anyway.
2020-07-06 00:05:36 +04:30
Ebrahim Byagowi a3b9b94b63
[style] Remove fdsc support (#2541)
It isn't exposed yet and low use between Apple fonts,
32 fdsc table vs 767 OS/2 tables, even Apple doesn't
support it anymore per Ned.
2020-07-06 00:05:21 +04:30
Jan Alexander Steffens (heftig) 4444482297 meson: Pin harfbuzz in .pc files to the built version
This ensures that we link -subset, -icu and -gobject with a matching
version of the main library.
2020-07-04 23:16:09 +04:30
Jan Alexander Steffens (heftig) 3adcf398a0 meson: Make Requires in .pc files match autotools
Libreoffice tries to use only harfbuzz-icu.pc and assumes this includes
-lharfbuzz.
2020-07-04 23:16:09 +04:30
Ebrahim Byagowi 359dbc97ae [meson] Use the recommended way to generate harfbuzz.cc
As https://github.com/harfbuzz/harfbuzz/pull/2532
2020-07-04 13:55:48 +04:30
Ebrahim Byagowi a7e82e4ffd [meson] use the recommended way to generate hb-version.h
As https://github.com/harfbuzz/harfbuzz/pull/2532
2020-07-04 13:55:48 +04:30
Ebrahim Byagowi 404ecc252c [meson] use basename in check scripts now that meson passes dir also 2020-07-04 13:55:48 +04:30
Ebrahim Byagowi 785a9a8f8a [meson] use the recommended way to generate ragel headers
As described in https://github.com/mesonbuild/meson/issues/7156#issuecomment-629622827
2020-07-04 13:55:48 +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 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 47a0fbec31 [meson] Mark longer tests with slow
So one can skip them easily by `meson test -Cbuild --no-suite slow`
2020-06-21 08:47:10 +04:30
Ebrahim Byagowi 4e7cb7e2c4 minor, fix lists sorting 2020-06-12 01:38:16 +04:30
Nirbheek Chauhan b88f1096ad meson: Export symbols for a DLL when not building statically
`default_library` might be 'both', in which case we will fail to link
when building with MSVC.
2020-06-09 20:22:28 +04:30
Ebrahim Byagowi 0151da23d6 [meson] Remove with_libstdcxx build option
This was done in #770 but no indication of anyone is using it,
let's remove it from our meson port and we can just don't care about
it in autotools port after the migration to meson.
2020-06-06 03:43:29 +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 d54de56870 [style] Adopt with meson 2020-06-04 20:33:39 +04:30
Ebrahim Byagowi d67553d12f
[meson] fix with_libstdcxx effect
oops
2020-06-04 12:31:57 +04:30
Ebrahim Byagowi 029ecf326e [meson] Fix gen-hb-version.py run
It gets complicated apparently when executed in the dist process, let's use raw
names now that we are operating in the script folder anyway.
2020-06-04 03:35:28 +04:30
Ebrahim Byagowi 870304df76 [meson] Remove amalgam build option
Fixes #2444
2020-06-04 03:26:19 +04:30
Ebrahim Byagowi b8320340ce
[meson] fix gen script input
matters more when harfbuzz is a subproject
2020-06-03 23:40:57 +04:30
Ebrahim Byagowi a9d13463b5 [meson] Categorize tests using `suite: [...]`
So one can run a category of interested tests like

  meson test -Cbuild --suite aots --suite src --print-errorlogs

Intead issuing particular tests which also is possible like

  meson test -Cbuild test-shape --print-errorlogs
2020-05-30 16:58:46 +04:30
Ebrahim Byagowi 7250adee26 [tests] Port check scripts to python 2020-05-30 13:55:47 +04:30
Ebrahim Byagowi e3af529e51 [meson] update generated headers only when the result is different
This way it won't ruin incremental builds.

We need a better way to declare source altering tasks
https://github.com/mesonbuild/meson/issues/7156
yet this is good enough despite being not idiomatic.

It is however not that smooth yet as the change may is detected on the
next meson run. One of course can issue ./gen-ragel-artifacts.py
manually for better experience before running meson.
2020-05-23 22:35:43 +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 d9177a594b [meson] Use a c linker for on Windows also
Using a C linker was limited to non-Windows as 20a840c7, let's
revisit this while transition to meson.

Packagers easily override that via the option and use a C++ linker
if needed.
2020-05-21 19:37:57 +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
Ebrahim Byagowi 4fc6189a32 [meson] Generate harfbuzz.cc, hb-version.h and ragel artifacts 2020-05-18 13:54:42 +04:30
Christoph Reiter b19f927f96 meson: error out if introspection is enabled but gobject isn't
In case a user passed -Dintrospection=enabled the build would just ignore
it by default because gobject defaults to disabled and the introspection build
gets skipped.

Instead, if introspection is explicitly enabled but gobject is for some reason
missing error out.

Fixes #2404
2020-05-17 11:10:08 +04:30
Ebrahim Byagowi bb095e1bdd [meson] make -subset target dependent to deps to get libm dependency 2020-05-10 22:00:05 +04:30
Ebrahim Byagowi eea99d7b72 [meson] Let name_prefix of exported libraries the default
meson complains about this and it is the default per #2256

Fixes #2256
2020-05-10 14:46:19 +04:30
Ebrahim Byagowi 2ac4222022 [meson] specify preferred linker to avoid stdc++ linking 2020-05-10 14:35:20 +04:30
Ebrahim Byagowi 15083c24ee [meson] Reenable make check-symbols compatible with gcov 2020-05-10 14:35:20 +04:30
Ebrahim Byagowi 6890554256
[ci/meson] temporarily disable check-symbols
will enable again
2020-04-28 14:56:47 +04:30
Hugo Beauzée-Luyssen 6881939f77 src: meson: Reindent after last changes 2020-04-23 13:27:12 +04:30
Hugo Beauzée-Luyssen e18858c685 src: Don't build tests when they are disabled 2020-04-23 13:27:12 +04:30
Ebrahim Byagowi 750bb73e32 [meson] Add an experimental-api option 2020-04-21 01:26:08 +04:30
Christoph Reiter fb3acdbcb6 meson: only install gobject/icu headers if the features are enabled 2020-04-19 18:49:43 +04:30
Christoph Reiter ad5dcda0b5 meson: install hb-icu.h header 2020-04-19 18:49:43 +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
Christoph Reiter dced2fbee9 meson: complete introspection build config
Pass the same config to gobject-introspection as with cmake/autotools.

This makes sure the c-include and package name is included in the gir
and also fixes the build because of the missing HB_AAT_H* defines.

Fixes #2336
2020-04-18 17:24:53 +04:30
Ebrahim Byagowi 18fc9197e2 [meson] Run check-symbols.sh and check-static-inits.sh correctly
* Search src/ build directory for objects in check-static-inits.sh
* Find .def files in src/ build directory in src/check-symbols.sh
* Pass builddir also in autotools also, we may just remove libs passing after autotools removal
* Move harfbuzz_subset_def target so can be referenced as a check-static-inits.sh dependency
2020-03-26 09:40:14 +00:00
Ebrahim Byagowi f0ce56bbd0 [meson] Don't compile test-bimap on msvc either
MSVC doens't like its NullPool,

test-bimap.cc.obj : error LNK2019: unresolved external symbol "unsigned __int64 const * const _hb_NullPool" (?_hb_NullPool@@3QB_KB) referenced in function
2020-03-24 19:06:09 +00:00
Ebrahim Byagowi 22f311e100 [meson] Don't compile noinst_programs in msvc for now 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi 7054b12206 [meson] Mark rest of non-install executables explicitly 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
Ebrahim Byagowi 2db8279162 [meson] Don't compile test-{algs,iter,meta} on msvc 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi 3385afacd3 [meson] Don't run check-includes if is amalgam build 2020-03-24 19:06:09 +00:00
Ebrahim Byagowi 6a8a1dc5bb [meson] Port src/ binary artifacts to meson 2020-03-24 19:06:09 +00:00
Tim-Philipp Müller 93b3e30215 [meson] fix icu-related linking errors in test with amalgam build
test-unicode.c:960: undefined reference to `hb_icu_get_unicode_funcs'
test-unicode.c:961: undefined reference to `hb_icu_get_unicode_funcs'

For now add the icu sources to libharfbuzz also for the amalgam
build, later we need to have a separate harfbuzz-icu module and
link against that, and/or generate harfbuzz.cc.
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 4b4d5c295d src/meson.build: Some cleanups for Visual Studio builds
We don't actually need the .def files (vs_module_defs) entry when we are
building DLLs with Visual Studio as long as we have HB_DLL_EXPORT defined.

Plus, to maintain compatibility with the CMake builds, for Visual Studio builds
we do not prefix the libraries with 'lib', nor have a '-0' suffix for the DLL
file name.
2020-03-13 14:30:17 +03:30
Chun-wei Fan 8d425ed446 meson: Fix harfbuzz-gobject builds without introspection
Make the `sources:` field reflect the items depending on whether introspection
is being built
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 f8c8be0564 [meson] Add amalgam build option 2020-03-12 00:25:48 +03:30
Aaron Boxer 68f982415b meson: update to latest master 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 535186fd84 meson: provide a harfbuzz-config for use from CMake
See #822 and #1437.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 7eaf3754dc meson: update for changes in master
And remove header files from sources list, Meson figures
out header dependencies by itself (via the compiler).
2020-03-11 19:18:57 +03:30
Khaled Hosny 04438554c8 meson: Update build files after rebase 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 618584e923 meson: rename incbase to incconfig
Makes it clearer what it's for: config.h. See #4.
2020-03-11 19:18:57 +03:30
Khaled Hosny 14b5c774c2 meson: Fix include directory when used as subproject
HarfBuzz headers are under src/ not the root directory, without using
incsrc no headers will be found by the dependent project. I think
incbase is superfluous, it should be replaced by incsrc or dropped.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 6abe7983ed meson: add g-i introspection 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller d230a02048 meson: generate .def file for MSVC symbol export on the fly
Fix symbol export with MSVC when features are disabled,
such as GLib. We need to generate the list of exported
symbols on the fly to make sure we only export symbols
that are actually available.

Needs some minor modifications to the gen-def.py script:
 - accept header list also via command line args; we can't
   pass things to a configure_file() command via the environment
   in Meson.
 - strip any leading 'src/' from library filename. This might
   be there because in Meson the script might be called from
   the top-level directory and not the current source directory.

Remove .def files again which had been checked in for earlier
versions of the Meson port.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 4840c8237e meson: add option and build system plumbing for CoreText on macOS/iOS
Untested though.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 83ebbe4ade meson: add option and build system plumbing for DirectWrite on Windows
Untested though.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller b7796a5d69 meson: add option and build system plumbing for uniscribe on Windows
Untested though.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller c81290b0c1 meson: add feature option for internal ucdn lib 2020-03-11 19:18:57 +03:30
Nirbheek Chauhan f65def4dc7 meson: Declare dependencies for use as a subproject
Also use fallbacks for dependencies that have meson build files
2020-03-11 19:18:57 +03:30
Mathieu Duponchelle 29c47d8eb5 meson: pass subdirs to pkgconfig.generate() 2020-03-11 19:18:57 +03:30
Mathieu Duponchelle 484313ff36 meson: install 2020-03-11 19:18:57 +03:30
Mathieu Duponchelle 99b26789d2 meson: more windows fixes 2020-03-11 19:18:57 +03:30
Mathieu Duponchelle 920efc0ef7 Add Meson build definitions
Fixes #490

http://mesonbuild.com
2020-03-11 19:18:57 +03:30