[DO-973] harfbuzz package (!10)

Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/10
This commit is contained in:
Aleksandr Vodyanov
2024-12-26 12:02:17 +03:00
parent 39afe6a1dd
commit c807f2514e
126 changed files with 6604 additions and 0 deletions

View File

@@ -0,0 +1,148 @@
diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
index 9c409e6..1913b6d 100755
--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
+++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env @PYTHON@
# GDBus - GLib D-Bus Library
#
diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build
index 67ea9f2..2ee1fc8 100644
--- a/gio/gdbus-2.0/codegen/meson.build
+++ b/gio/gdbus-2.0/codegen/meson.build
@@ -31,7 +31,7 @@ gdbus_codegen_conf = configuration_data()
gdbus_codegen_conf.set('VERSION', glib_version)
gdbus_codegen_conf.set('MAJOR_VERSION', major_version)
gdbus_codegen_conf.set('MINOR_VERSION', minor_version)
-gdbus_codegen_conf.set('PYTHON', python.full_path())
+gdbus_codegen_conf.set('PYTHON', python_name)
gdbus_codegen_conf.set('DATADIR', glib_datadir)
# Install gdbus-codegen executable
diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py
index 6399945..86024d7 100644
--- a/gio/gdbus-2.0/codegen/utils.py
+++ b/gio/gdbus-2.0/codegen/utils.py
@@ -21,10 +21,9 @@
#
# Author: David Zeuthen <davidz@redhat.com>
-import packaging.version
import os
import sys
-
+import re
# pylint: disable=too-few-public-methods
class Color:
@@ -161,11 +160,35 @@ def lookup_brief_docs(annotations):
def version_cmp_key(key):
# If the 'since' version is 'UNRELEASED', compare higher than anything else
# If it is empty put a 0 in its place as this will
- # allow LooseVersion to work and will always compare lower.
+ # allow _parse_version() to work and will always compare lower.
if key[0] == "UNRELEASED":
v = "9999"
elif key[0]:
v = str(key[0])
else:
v = "0"
- return (packaging.version.Version(v), key[1])
+ return (_parse_version(v), key[1])
+
+
+def _parse_version(version):
+ """
+ Parse a version string into a list of integers and strings.
+
+ This function takes a version string and breaks it down into its component parts.
+ It separates numeric and non-numeric segments, converting numeric segments to integers.
+
+ Args:
+ version (str): The version string to parse.
+
+ Returns:
+ list: A list where each element is either an integer (for numeric parts)
+ or a string (for non-numeric parts).
+
+ Example:
+ >>> parseversion("1.2.3a")
+ [1, 2, 3, 'a']
+ >>> parseversion("2.0.0-rc1")
+ [2, 0, 0, 'rc1']
+ """
+ blocks = re.findall(r"(\d+|\w+)", version)
+ return [int(b) if b.isdigit() else b for b in blocks]
diff --git a/glib/gtester-report.in b/glib/gtester-report.in
index 0745d53..b8291d2 100644
--- a/glib/gtester-report.in
+++ b/glib/gtester-report.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#! /usr/bin/env @PYTHON@
# GLib Testing Framework Utility -*- Mode: python; -*-
# Copyright (C) 2007 Imendio AB
# Authors: Tim Janik
diff --git a/glib/meson.build b/glib/meson.build
index b2dd569..5c29bb7 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -502,7 +502,7 @@ endif
report_conf = configuration_data()
report_conf.set('GLIB_VERSION', glib_version)
-report_conf.set('PYTHON', python.full_path())
+report_conf.set('PYTHON', python_name)
configure_file(
input: 'gtester-report.in',
output: 'gtester-report',
diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
index 0578b74..aa5af43 100755
--- a/gobject/glib-genmarshal.in
+++ b/gobject/glib-genmarshal.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env @PYTHON@
# pylint: disable=too-many-lines, missing-docstring, invalid-name
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index 7e794e9..e10b910 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env @PYTHON@
# If the code below looks horrible and unpythonic, do not panic.
#
diff --git a/gobject/meson.build b/gobject/meson.build
index 78b732b..2129aaf 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -87,7 +87,7 @@ python_tools = [
python_tools_conf = configuration_data()
python_tools_conf.set('VERSION', glib_version)
-python_tools_conf.set('PYTHON', python.full_path())
+python_tools_conf.set('PYTHON', python_name)
foreach tool: python_tools
tool_bin = configure_file(
diff --git a/meson.build b/meson.build
index bcc2887..6cca73d 100644
--- a/meson.build
+++ b/meson.build
@@ -2457,7 +2457,9 @@ endif
glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)
-python = import('python').find_installation(modules: ['packaging'])
+python = import('python').find_installation()
+# used for '#!/usr/bin/env <name>'
+python_name = 'python3'
python_version = python.language_version()
python_version_req = '>=3.7'

View File

@@ -0,0 +1,49 @@
From 32249a22fc39319651e7c23442d37ec837f05764 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Thu, 8 Sep 2022 02:36:33 +0530
Subject: [PATCH] meson: Fix detection of a system-provided proxy-libintl
proxy-libintl defines ngettext() as a define in the header that points
to the actual symbol in the library which is g_libintl_ngettext().
Same with bind_textdomain_codeset().
---
meson.build | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 0cbc9689f5..de0bee5a39 100644
--- a/meson.build
+++ b/meson.build
@@ -2089,6 +2089,7 @@ libz_dep = dependency('zlib')
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
# implementations. This could be extended if issues are found in some platforms.
libintl_deps = []
+libintl_prefix = '#include <libintl.h>'
libintl = dependency('intl', required: false, allow_fallback: false)
if libintl.found()
# libintl supports different threading APIs, which may not
@@ -2100,11 +2101,11 @@ if libintl.found()
#
# Meson's builtin dependency lookup as of 0.60.0 doesn't check for
# pthread, so we do this manually here.
- if cc.has_function('ngettext', dependencies : libintl)
+ if cc.has_function('ngettext', dependencies : libintl, prefix: libintl_prefix)
libintl_deps += [libintl]
else
libintl_pthread = cc.find_library('pthread', required : false)
- if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread])
+ if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread], prefix: libintl_prefix)
libintl_deps += [libintl, libintl_pthread]
else
libintl = disabler()
@@ -2113,7 +2114,7 @@ if libintl.found()
endif
if libintl.found()
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps)
+ have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps, prefix: libintl_prefix)
else
libintl = dependency('intl', allow_fallback: true)
assert(libintl.type_name() == 'internal')
--
GitLab

View File

@@ -0,0 +1,51 @@
diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py
index 0204610..f8d758c 100644
--- a/gio/gdbus-2.0/codegen/utils.py
+++ b/gio/gdbus-2.0/codegen/utils.py
@@ -19,7 +19,7 @@
#
# Author: David Zeuthen <davidz@redhat.com>
-import distutils.version
+import re
import os
import sys
@@ -159,11 +159,35 @@ def lookup_brief_docs(annotations):
def version_cmp_key(key):
# If the 'since' version is 'UNRELEASED', compare higher than anything else
# If it is empty put a 0 in its place as this will
- # allow LooseVersion to work and will always compare lower.
+ # allow _parse_version() to work and will always compare lower.
if key[0] == "UNRELEASED":
v = "9999"
elif key[0]:
v = str(key[0])
else:
v = "0"
- return (distutils.version.LooseVersion(v), key[1])
+ return (_parse_version(v), key[1])
+
+
+def _parse_version(version):
+ """
+ Parse a version string into a list of integers and strings.
+
+ This function takes a version string and breaks it down into its component parts.
+ It separates numeric and non-numeric segments, converting numeric segments to integers.
+
+ Args:
+ version (str): The version string to parse.
+
+ Returns:
+ list: A list where each element is either an integer (for numeric parts)
+ or a string (for non-numeric parts).
+
+ Example:
+ >>> parseversion("1.2.3a")
+ [1, 2, 3, 'a']
+ >>> parseversion("2.0.0-rc1")
+ [2, 0, 0, 'rc1']
+ """
+ blocks = re.findall(r"(\d+|\w+)", version)
+ return [int(b) if b.isdigit() else b for b in blocks]

View File

@@ -0,0 +1,51 @@
diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py
index 95559d3..2b7a176 100644
--- a/gio/gdbus-2.0/codegen/utils.py
+++ b/gio/gdbus-2.0/codegen/utils.py
@@ -19,7 +19,7 @@
#
# Author: David Zeuthen <davidz@redhat.com>
-import distutils.version
+import re
import os
import sys
@@ -155,11 +155,35 @@ def lookup_brief_docs(annotations):
def version_cmp_key(key):
# If the 'since' version is 'UNRELEASED', compare higher than anything else
# If it is empty put a 0 in its place as this will
- # allow LooseVersion to work and will always compare lower.
+ # allow _parse_version() to work and will always compare lower.
if key[0] == "UNRELEASED":
v = "9999"
elif key[0]:
v = str(key[0])
else:
v = "0"
- return (distutils.version.LooseVersion(v), key[1])
+ return (_parse_version(v), key[1])
+
+
+def _parse_version(version):
+ """
+ Parse a version string into a list of integers and strings.
+
+ This function takes a version string and breaks it down into its component parts.
+ It separates numeric and non-numeric segments, converting numeric segments to integers.
+
+ Args:
+ version (str): The version string to parse.
+
+ Returns:
+ list: A list where each element is either an integer (for numeric parts)
+ or a string (for non-numeric parts).
+
+ Example:
+ >>> parseversion("1.2.3a")
+ [1, 2, 3, 'a']
+ >>> parseversion("2.0.0-rc1")
+ [2, 0, 0, 'rc1']
+ """
+ blocks = re.findall(r"(\d+|\w+)", version)
+ return [int(b) if b.isdigit() else b for b in blocks]