diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-11-10 09:27:33 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-11-10 09:27:33 +0000 |
commit | e80777b54c5b430ca044e16878f59a2020423d48 (patch) | |
tree | b72b3422d129532b8f0ceb415c6e7c5109e3fe75 /media-libs/harfbuzz | |
parent | aa61828f226f3b30e6939408847d914a145fdf35 (diff) |
gentoo auto-resync : 10:11:2022 - 09:27:33
Diffstat (limited to 'media-libs/harfbuzz')
-rw-r--r-- | media-libs/harfbuzz/Manifest | 2 | ||||
-rw-r--r-- | media-libs/harfbuzz/files/harfbuzz-5.3.1-meson-freetype-icu.patch | 120 | ||||
-rw-r--r-- | media-libs/harfbuzz/harfbuzz-5.3.1-r1.ebuild | 104 |
3 files changed, 226 insertions, 0 deletions
diff --git a/media-libs/harfbuzz/Manifest b/media-libs/harfbuzz/Manifest index 36a77e5ee713..397be560af39 100644 --- a/media-libs/harfbuzz/Manifest +++ b/media-libs/harfbuzz/Manifest @@ -1,3 +1,4 @@ +AUX harfbuzz-5.3.1-meson-freetype-icu.patch 5077 BLAKE2B e8eee50d555f7d12b374885e56d946b6283b2a041c4aa0d42bbb0463eca6a039aaef329ca9900f939dbc8a8797784d4e1719be3717e07c1d101827c11ce7f70d SHA512 5a6e3eb18153b87610c0cd14cefb4decf23183b4bebe439edacd3f61d3cfebb0863727dab395aef8bbd38264bf2e741181d0949c78b89cfdb353eb6fa08586cc DIST harfbuzz-4.4.1.tar.gz 29231251 BLAKE2B 3947084ea2eedd76d64acfc5286ecd14d772ce0507163bc2c54a86579556a8799959ff4d47ea2919ee8472f8fe50d0266d325e3d0a7024f2ae8dcdf48d14f37e SHA512 bbc415d7b74408b1e8d34bfbc19a3cab002471fdd56d71b469c3129f0eae5532d5c7aaae7bb5cc3942fea6008d2ed9e96a7b20b10f4f5e46db63cecfa5c0248e DIST harfbuzz-5.1.0.tar.gz 29358116 BLAKE2B 006e66e9c76b505214b948c7c8756af38171b85cc865923e4665a4dd3eb14d89d20456ad4490b11208d57d056b087da78e1742141e41f8a22e644f20d3ea4851 SHA512 bdd7c2ca0b6f2a3a3fffbf0324d3c8bfd64a1753314048f6f67f901d4098e90054eeda9155d134f03c5d3ddefb15e087f872d2d87b2ace07bac6625fb43c7f3e DIST harfbuzz-5.3.0.tar.xz 17921224 BLAKE2B a220c1d4912487012f30942280651bcb63b5109e49be778a210bf26f4a0bcc7dc5ab7247775286b75cbe5b8fad7c439ae420d2085c6719088f028679242f9269 SHA512 0eae94769ac0157bf1df9b001223b30d40104ac448b1062f34ac793edb27ed1e459ac99954498c4b3cfb65c8cda29f2214a300f11523826b378ab67deec1a5f3 @@ -5,6 +6,7 @@ DIST harfbuzz-5.3.1.tar.xz 17874260 BLAKE2B e4d3926daca4f5c95441a9b99e10acd4b95b EBUILD harfbuzz-4.4.1.ebuild 2568 BLAKE2B 7e139034f21f106e2d3df102161487d788b49e6f52d2d109a922c0d38a9821fe090f71f5d844e04f495e16c69328b5b75c37dfd2faa05d1e120b19f4ccca66dd SHA512 0548def0efedc11cf90c9b57090e835a2f83a9e7f5b679166c04c16fc011dcf7919d5399c0ccbff1c7c8371c2480771d7a92da60573c3aa530e451cf5c2726c3 EBUILD harfbuzz-5.1.0.ebuild 2574 BLAKE2B 2793ad1bf84ab388d2d5efddb74cd1431e2d4db4789273314e1824fd8c9fff9ea3f1489253b15703295fb46fd8509712cdd3cafe1a9e3aa07d2d9d9170bdd022 SHA512 80cd15636bc586ff84796bd0fb2d4b4b607e94335ad7eb83f6901164f4236c1cbb5db0533532b500638f25eb615da725ffd82aab5dc2cfdef50432597c1cf62d EBUILD harfbuzz-5.3.0.ebuild 2588 BLAKE2B f1a74063855a9437e2b3ff5322d03ef90bb6432721cb223373a8a088362db51f9819ea09179f2a7e1ee2b23ed783b8daebca8f689044d89f86ef1f114ad3fbae SHA512 398bc8ba0dd4f9b04157e7b842bbd6f2c7ea51699a47249192e5c31f78167eaa47bd1cc9c9cbb56ef7ead2626a754f2ef75124aea14d59cd5f4f701c8589b879 +EBUILD harfbuzz-5.3.1-r1.ebuild 2646 BLAKE2B 0132fbdda5e3d2e6f245fc2219d3153c3bb496139d73ad393002e9074a3a1f379bae8bccb4977007b59e160db903c6af52566539f4e0bf663d530a142fac2da6 SHA512 6975a84b548a031b5b143f0bb66effabb8dc09e4199b820e7e1c4adf0ef3be03298362bc1fd0a25924747a721b281fb92750ac24ee0d8e79b2f246e0bdc88b2f EBUILD harfbuzz-5.3.1.ebuild 2582 BLAKE2B 578a1f1d8d3e252587ec45d6b7bc07a78bb0284647226d3160ebb1a38f0e276579bc333038c7cd3bffb3bc9eae1aa5b1c6308ce1a51678bf2966bb7e3aa1a29c SHA512 d799301c05dfdaa20a10cc8c179240feec5bface78d3aec751cfe27e4066ddfb5b0d1ff1575928fde7f53599312d7ab35b4d04d3c90a23643a237bebfe9ea6d7 EBUILD harfbuzz-9999.ebuild 2588 BLAKE2B f1a74063855a9437e2b3ff5322d03ef90bb6432721cb223373a8a088362db51f9819ea09179f2a7e1ee2b23ed783b8daebca8f689044d89f86ef1f114ad3fbae SHA512 398bc8ba0dd4f9b04157e7b842bbd6f2c7ea51699a47249192e5c31f78167eaa47bd1cc9c9cbb56ef7ead2626a754f2ef75124aea14d59cd5f4f701c8589b879 MISC metadata.xml 763 BLAKE2B cb8679b8a67d692c73f1dc48facf6a98a442d34b51a90b2236070919b737d22e38a15babe5847cf4d30d4630c66d803f9d6e684c5e8b8b87a199d5d471a9e35c SHA512 0d87926c3e7a475bc84859d630cc8ed1b62e5766856e15b9aa74c87b5fd22345a9c05951508ccecadbea3513afdfd2244b1dbfbec8b41022d413a1401701e55e diff --git a/media-libs/harfbuzz/files/harfbuzz-5.3.1-meson-freetype-icu.patch b/media-libs/harfbuzz/files/harfbuzz-5.3.1-meson-freetype-icu.patch new file mode 100644 index 000000000000..3e0a7beece9c --- /dev/null +++ b/media-libs/harfbuzz/files/harfbuzz-5.3.1-meson-freetype-icu.patch @@ -0,0 +1,120 @@ +https://bugs.gentoo.org/880479 +https://bugs.gentoo.org/880405 +https://github.com/harfbuzz/harfbuzz/pull/3870 + +From 2c14943fb06ffd6de4e270454501ff5d305ede6e Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Tue, 8 Nov 2022 16:24:08 -0500 +Subject: [PATCH] meson: fix regression in detecting freetype2/icu-uc when + explicitly disabled + +In #3811 / commit 53a194aa3f5f7de0b40e879e41fcbe0de6e9fefe a broken and +half-implemented approach to kind of sort of handling the detection of +both pkg-config and cmake names for dependencies, was implemented. It +just checked for both versions with required: false, but when the build +was configured with *disabled* options, it was still found because it +was treated as auto. + +Really, the problem here is trying to outsmart Meson, which handles a +lot of edge cases correctly. But it's possible, albeit very wordy, to +manually implement Meson's internal logic via if/else fallbacks. Do so +here. +--- a/meson.build ++++ b/meson.build +@@ -83,20 +83,35 @@ check_funcs = [ + + m_dep = cpp.find_library('m', required: false) + +- +-# Try pkgconfig name +-freetype_dep = dependency('freetype2', required: false) +-if not freetype_dep.found() +- # Try cmake name +- freetype_dep = dependency('freetype', required: false) +-endif +-if not freetype_dep.found() +- # Subproject fallback, `allow_fallback: true` means the fallback will be +- # tried even if the freetype option is set to `auto`. +- freetype_dep = dependency('freetype2', ++if meson.version().version_compare('>=0.60.0') ++ # pkg-config: freetype2, cmake: Freetype ++ freetype_dep = dependency('freetype2', 'Freetype', + required: get_option('freetype'), + default_options: ['harfbuzz=disabled'], + allow_fallback: true) ++else ++ # painful hack to handle multiple dependencies but also respect options ++ freetype_opt = get_option('freetype') ++ # we want to handle enabled manually after fallbacks, but also handle disabled normally ++ if freetype_opt.enabled() ++ freetype_opt = false ++ endif ++ # try pkg-config name ++ freetype_dep = dependency('freetype2', method: 'pkg-config', required: freetype_opt) ++ # when disabled, leave it not-found ++ if not freetype_dep.found() and not get_option('freetype').disabled() ++ # Try cmake name ++ freetype_dep = dependency('Freetype', method: 'cmake', required: false) ++ # Subproject fallback, `allow_fallback: true` means the fallback will be ++ # tried even if the freetype option is set to `auto`. ++ if not freetype_dep.found() ++ freetype_dep = dependency('freetype2', ++ method: 'pkg-config', ++ required: get_option('freetype'), ++ default_options: ['harfbuzz=disabled'], ++ allow_fallback: true) ++ endif ++ endif + endif + + glib_dep = dependency('glib-2.0', required: get_option('glib')) +@@ -104,18 +119,36 @@ gobject_dep = dependency('gobject-2.0', required: get_option('gobject')) + graphite2_dep = dependency('graphite2', required: get_option('graphite2')) + graphite_dep = dependency('graphite2', required: get_option('graphite')) + +-# Try pkgconfig name +-icu_dep = dependency('icu-uc', required: false) +-if not icu_dep.found() +- # Try cmake name +- icu_dep = dependency('ICU', +- required: false, +- components: 'uc', +- method: 'cmake') +-endif +-if not icu_dep.found() +- # Subproject fallback if icu option is enabled +- icu_dep = dependency('icu-uc', required: get_option('icu')) ++if meson.version().version_compare('>=0.60.0') ++ # pkg-config: icu-uc, cmake: ICU but with components ++ icu_dep = dependency('icu-uc', 'ICU', ++ components: 'uc', ++ required: get_option('icu'), ++ default_options: ['harfbuzz=disabled'], ++ allow_fallback: true) ++else ++ # painful hack to handle multiple dependencies but also respect options ++ icu_opt = get_option('icu') ++ # we want to handle enabled manually after fallbacks, but also handle disabled normally ++ if icu_opt.enabled() ++ icu_opt = false ++ endif ++ # try pkg-config name ++ icu_dep = dependency('icu-uc', method: 'pkg-config', required: icu_opt) ++ # when disabled, leave it not-found ++ if not icu_dep.found() and not get_option('icu').disabled() ++ # Try cmake name ++ icu_dep = dependency('ICU', method: 'cmake', components: 'uc', required: false) ++ # Try again with subproject fallback. `allow_fallback: true` means the ++ # fallback will be tried even if the icu option is set to `auto`, but ++ # we cannot pass this option until Meson 0.59.0, because no wrap file ++ # is checked into git. ++ if not icu_dep.found() ++ icu_dep = dependency('icu-uc', ++ method: 'pkg-config', ++ required: get_option('icu')) ++ endif ++ endif + endif + + if icu_dep.found() and icu_dep.type_name() == 'pkgconfig' + diff --git a/media-libs/harfbuzz/harfbuzz-5.3.1-r1.ebuild b/media-libs/harfbuzz/harfbuzz-5.3.1-r1.ebuild new file mode 100644 index 000000000000..fe93f48bc581 --- /dev/null +++ b/media-libs/harfbuzz/harfbuzz-5.3.1-r1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) + +inherit flag-o-matic meson-multilib python-any-r1 xdg-utils + +DESCRIPTION="An OpenType text shaping engine" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/HarfBuzz" + +if [[ ${PV} = 9999 ]] ; then + EGIT_REPO_URI="https://github.com/harfbuzz/harfbuzz.git" + inherit git-r3 +else + SRC_URI="https://github.com/harfbuzz/harfbuzz/releases/download/${PV}/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="Old-MIT ISC icu" +# 0.9.18 introduced the harfbuzz-icu split; bug #472416 +# 3.0.0 dropped some unstable APIs; bug #813705 +SLOT="0/4.0.0" + +IUSE="+cairo debug doc experimental +glib +graphite icu +introspection test +truetype" +RESTRICT="!test? ( test )" +REQUIRED_USE="introspection? ( glib )" + +RDEPEND=" + cairo? ( x11-libs/cairo:= ) + glib? ( >=dev-libs/glib-2.38:2[${MULTILIB_USEDEP}] ) + graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] ) + icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] ) + introspection? ( >=dev-libs/gobject-introspection-1.34:= ) + truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + >=dev-libs/gobject-introspection-common-1.34 +" +BDEPEND=" + ${PYTHON_DEPS} + virtual/pkgconfig + doc? ( dev-util/gtk-doc ) + introspection? ( dev-util/glib-utils ) +" + +PATCHES=( + "${FILESDIR}"/${P}-meson-freetype-icu.patch +) + +pkg_setup() { + python-any-r1_pkg_setup + if ! use debug ; then + append-cppflags -DHB_NDEBUG + fi +} + +src_prepare() { + default + + xdg_environment_reset + + # bug #726120 + sed -i \ + -e '/tests\/macos\.tests/d' \ + test/shape/data/in-house/Makefile.sources \ + || die + + # bug #618772 + append-cxxflags -std=c++14 + + # bug #790359 + filter-flags -fexceptions -fthreadsafe-statics + + # bug #762415 + local pyscript + for pyscript in $(find -type f -name "*.py") ; do + python_fix_shebang -q "${pyscript}" + done +} + +multilib_src_configure() { + # harfbuzz-gobject only used for introspection, bug #535852 + local emesonargs=( + -Dcoretext="disabled" + -Dchafa="disabled" + + $(meson_feature glib) + $(meson_feature graphite graphite2) + $(meson_feature icu) + $(meson_feature introspection gobject) + $(meson_feature test tests) + $(meson_feature truetype freetype) + + $(meson_native_use_feature cairo) + $(meson_native_use_feature doc docs) + $(meson_native_use_feature introspection) + + $(meson_use experimental experimental_api) + ) + + meson_src_configure +} |