Commit d8a6ba9d authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠 Committed by GStreamer Marge Bot
Browse files

harfbuzz: build with meson

Part-of: <gstreamer/cerbero!494>
parent 638617c7
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
from cerbero.tools.libtool import LibtoolLibrary
class Recipe(recipe.Recipe):
name = 'harfbuzz'
version = '2.6.7'
stype = SourceType.TARBALL
btype = BuildType.MESON
url = 'https://github.com/%(name)s/%(name)s/releases/download/%(version)s/%(name)s-%(version)s.tar.xz'
tarball_checksum = '49e481d06cdff97bf68d99fa26bdf785331f411614485d892ea4c78eb479b218'
licenses = [{License.BSD_like: ['COPYING']}]
deps = ['fontconfig', 'cairo', 'glib']
configure_options = "--enable-static --with-icu=no"
autoreconf = True
meson_options = {'icu': 'disabled',
'glib': 'enabled',
'cairo': 'enabled', # Is this needed? Is it only used for cmd line utils?
'gobject': 'disabled',
'icu_builtin': 'false',
'introspection': 'disabled',
'tests': 'disabled'}
files_bins = ['hb-ot-shape-closure', 'hb-view', 'hb-shape']
files_libs = ['libharfbuzz']
files_devel = ['include/harfbuzz/*.h', 'lib/pkgconfig/harfbuzz.pc']
patches = ['harfbuzz/0001-build-checkout-for-gnustl-for-android.patch']
patches = []
def post_install(self):
# Meson does not generate la files
LibtoolLibrary('harfbuzz', None, None, None,
self.config.libdir, self.config.target_platform,
deps=['glib-2.0', 'freetype', 'fontconfig']).save()
LibtoolLibrary('harfbuzz-subset', None, None, None,
self.config.libdir, self.config.target_platform,
deps=['harfbuzz']).save()
super().post_install()
def prepare(self):
if self.config.target_platform == Platform.ANDROID:
v = DistroVersion.get_android_api_version(self.config.target_distro_version)
if self.config.target_arch in [Architecture.ARM, Architecture.ARMv7, Architecture.X86] and v < 21:
# FIXME: HACK to make projects using mmap compile with NDK 16
# we fail to compile with -D_FILE_OFFSET_BITS=64
# because we don't use clang and we use a platform < 21 (Lollipop)
# See $NDK_ROOT/sysroot/usr/include/sys/mman.h as one example
self.set_env('ac_cv_func_mmap', 'no')
From ba979499d16fffca4da61afc720b972aa7703507 Mon Sep 17 00:00:00 2001
From: Matthew Waters <matthew@centricular.com>
Date: Tue, 31 Mar 2020 16:13:10 +1100
Subject: [PATCH] build: checkout for gnustl for android
cerbero-specific hack
---
configure.ac | 2 ++
util/Makefile.am | 1 +
2 files changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac
index ab079fc..6439807 100644
--- a/configure.ac
+++ b/configure.ac
@@ -482,6 +482,8 @@ if test "$os_win32" = no && ! $have_pthread; then
AC_SEARCH_LIBS(sched_yield,rt,AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield]))
fi
+PKG_CHECK_MODULES(GNUSTL, gnustl, have_gnustl=true, :)
+
dnl ===========================================================================
AC_CONFIG_FILES([
diff --git a/util/Makefile.am b/util/Makefile.am
index 5298e77..14077c5 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -29,6 +29,7 @@ LDADD = \
-lm \
$(GLIB_LIBS) \
$(FREETYPE_LIBS) \
+ $(GNUSTL_LIBS) \
$(NULL)
if HAVE_GLIB
--
2.26.0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment