Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 3d40c69515ea97c0996a5e4f99a893bdab803602 Mon Sep 17 00:00:00 2001
- From: Adam Duskett <Aduskett@gmail.com>
- Date: Wed, 19 Feb 2020 08:25:00 -0800
- Subject: [PATCH] gobject-introspection 2019.11.1
- Signed-off-by: Adam Duskett <Aduskett@gmail.com>
- ---
- package/Config.in | 1 +
- package/Makefile.in | 3 +
- package/gdb/gdb.mk | 4 +-
- ...lete-upstream-attempt-at-cross-compi.patch | 33 ++++
- ...d-cross-compilation-support-to-meson.patch | 163 ++++++++++++++++++
- .../0003-disable-tests.patch | 29 ++++
- ...canner-add-use-binary-wrapper-option.patch | 52 ++++++
- ...scanner-add-a-use-ldd-wrapper-option.patch | 48 ++++++
- ...scanner-add-a-lib-dirs-envvar-option.patch | 73 ++++++++
- .../0007-Add-rpath-links-to-ccompiler.patch | 29 ++++
- ...-error-return-codes-from-ldd-wrapper.patch | 28 +++
- package/gobject-introspection/Config.in | 33 ++++
- .../gobject-introspection/g-ir-compiler.in | 3 +
- .../g-ir-scanner-lddwrapper.in | 3 +
- .../g-ir-scanner-qemuwrapper.in | 17 ++
- package/gobject-introspection/g-ir-scanner.in | 8 +
- .../gobject-introspection.hash | 4 +
- .../gobject-introspection.mk | 133 ++++++++++++++
- package/libiberty/libiberty.hash | 2 +
- package/libiberty/libiberty.mk | 27 +++
- ...dist.py-import-lzma-only-when-needed.patch | 50 ------
- ...onfig-add-pkg_config_libdir-property.patch | 102 +++++++++++
- package/meson/cross-compilation.conf.in | 4 +-
- package/meson/meson.hash | 4 +-
- package/meson/meson.mk | 10 +-
- package/pkg-meson.mk | 47 +++--
- package/pkg-python.mk | 22 +--
- package/prelink-cross/prelink-cross.hash | 3 +
- package/prelink-cross/prelink-cross.mk | 16 ++
- .../0001-add-PYTHON_INCLUDES-override.patch | 32 ----
- package/python-gobject/Config.in | 20 ++-
- package/python-gobject/python-gobject.hash | 5 +-
- package/python-gobject/python-gobject.mk | 39 ++---
- package/python/python-wrapper.in | 10 ++
- package/python/python.mk | 17 +-
- package/python3/python-wrapper.in | 24 +++
- package/python3/python3.mk | 17 +-
- 37 files changed, 936 insertions(+), 179 deletions(-)
- create mode 100644 package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
- create mode 100644 package/gobject-introspection/0002-add-cross-compilation-support-to-meson.patch
- create mode 100644 package/gobject-introspection/0003-disable-tests.patch
- create mode 100644 package/gobject-introspection/0004-giscanner-add-use-binary-wrapper-option.patch
- create mode 100644 package/gobject-introspection/0005-giscanner-add-a-use-ldd-wrapper-option.patch
- create mode 100644 package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch
- create mode 100644 package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch
- create mode 100644 package/gobject-introspection/0008-ignore-error-return-codes-from-ldd-wrapper.patch
- create mode 100644 package/gobject-introspection/Config.in
- create mode 100644 package/gobject-introspection/g-ir-compiler.in
- create mode 100644 package/gobject-introspection/g-ir-scanner-lddwrapper.in
- create mode 100644 package/gobject-introspection/g-ir-scanner-qemuwrapper.in
- create mode 100644 package/gobject-introspection/g-ir-scanner.in
- create mode 100644 package/gobject-introspection/gobject-introspection.hash
- create mode 100644 package/gobject-introspection/gobject-introspection.mk
- create mode 100644 package/libiberty/libiberty.hash
- create mode 100644 package/libiberty/libiberty.mk
- delete mode 100644 package/meson/0002-mdist.py-import-lzma-only-when-needed.patch
- create mode 100644 package/meson/0003-envconfig-add-pkg_config_libdir-property.patch
- create mode 100644 package/prelink-cross/prelink-cross.hash
- create mode 100644 package/prelink-cross/prelink-cross.mk
- delete mode 100644 package/python-gobject/0001-add-PYTHON_INCLUDES-override.patch
- create mode 100644 package/python/python-wrapper.in
- create mode 100644 package/python3/python-wrapper.in
- diff --git a/package/Config.in b/package/Config.in
- index f72c77b416..811f444b6b 100644
- --- a/package/Config.in
- +++ b/package/Config.in
- @@ -1720,6 +1720,7 @@ menu "Other"
- source "package/glibmm/Config.in"
- source "package/glm/Config.in"
- source "package/gmp/Config.in"
- + source "package/gobject-introspection/Config.in"
- source "package/gsl/Config.in"
- source "package/gtest/Config.in"
- source "package/jemalloc/Config.in"
- diff --git a/package/Makefile.in b/package/Makefile.in
- index 285e2837ef..3c665f711d 100644
- --- a/package/Makefile.in
- +++ b/package/Makefile.in
- @@ -230,6 +230,9 @@ HOST_CFLAGS += $(HOST_CPPFLAGS)
- HOST_CXXFLAGS += $(HOST_CFLAGS)
- HOST_LDFLAGS += -L$(HOST_DIR)/lib -Wl,-rpath,$(HOST_DIR)/lib
- +# Location of scripts/wrappers for cross-compilation
- +HOST_BIN_CROSS = $(HOST_DIR)/$(GNU_TARGET_NAME)/cross-bin
- +
- # host-intltool should be executed with the system perl, so we save
- # the path to the system perl, before a host-perl built by Buildroot
- # might get installed into $(HOST_DIR)/bin and therefore appears
- diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
- index 46d745a897..01f7e14460 100644
- --- a/package/gdb/gdb.mk
- +++ b/package/gdb/gdb.mk
- @@ -35,7 +35,9 @@ endif
- # For the host variant, we really want to build with XML support,
- # which is needed to read XML descriptions of target architectures. We
- # also need ncurses.
- -HOST_GDB_DEPENDENCIES = host-expat host-ncurses
- +# As for libiberty, gdb may use a system-installed one if present, so
- +# we must ensure ours is installed first.
- +HOST_GDB_DEPENDENCIES = host-expat host-libiberty host-ncurses
- # Disable building documentation
- GDB_MAKE_OPTS += MAKEINFO=true
- diff --git a/package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch b/package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
- new file mode 100644
- index 0000000000..1e8bd3518a
- --- /dev/null
- +++ b/package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
- @@ -0,0 +1,33 @@
- +From 3a9d1e5ee0aae56fafec0beba2014c19e4ff310c Mon Sep 17 00:00:00 2001
- +From: Alexander Kanavin <alex.kanavin@gmail.com>
- +Date: Wed, 23 Mar 2016 17:07:28 +0200
- +Subject: [PATCH] Revert an incomplete upstream attempt at cross-compile support
- +
- +Upstream-Status: Pending
- +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
- +Signed-off-by: Adam Duskett <aduskett@gmail.com>
- +---
- + common.mk | 4 ----
- + giscanner/gdumpparser.py | 6 ------
- + 2 files changed, 10 deletions(-)
- +
- +diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py
- +index 1134f33..9bdc2bc 100644
- +--- a/giscanner/gdumpparser.py
- ++++ b/giscanner/gdumpparser.py
- +@@ -156,12 +156,6 @@ blob containing data gleaned from GObject's primitive introspection."""
- + out_path = os.path.join(self._binary.tmpdir, 'dump.xml')
- +
- + args = []
- +-
- +- # Prepend the launcher command and arguments, if defined
- +- launcher = os.environ.get('GI_CROSS_LAUNCHER')
- +- if launcher:
- +- args.extend(launcher.split())
- +-
- + args.extend(self._binary.args)
- + args.append('--introspect-dump=%s,%s' % (in_path, out_path))
- +
- +--
- +2.7.0
- +
- diff --git a/package/gobject-introspection/0002-add-cross-compilation-support-to-meson.patch b/package/gobject-introspection/0002-add-cross-compilation-support-to-meson.patch
- new file mode 100644
- index 0000000000..5e3ac59dd9
- --- /dev/null
- +++ b/package/gobject-introspection/0002-add-cross-compilation-support-to-meson.patch
- @@ -0,0 +1,163 @@
- +From 2b3bce1526b538dc2c7fa223eaf9808858aa1b06 Mon Sep 17 00:00:00 2001
- +From: Alexander Kanavin <alex.kanavin@gmail.com>
- +Date: Thu, 15 Nov 2018 15:10:05 +0100
- +Subject: [PATCH] add cross-compilation support to meson
- +
- +Upstream-Status: Pending
- +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
- +Signed-off-by: Adam Duskett <aduskett@gmail.com>
- +---
- + gir/meson.build | 62 ++++++++++++++++++++++++++++++++++-------------
- + meson.build | 4 ++-
- + meson_options.txt | 20 +++++++++++++++
- + 3 files changed, 68 insertions(+), 18 deletions(-)
- +
- +diff --git a/gir/meson.build b/gir/meson.build
- +index 85ae575..327c134 100644
- +--- a/gir/meson.build
- ++++ b/gir/meson.build
- +@@ -36,16 +36,29 @@ gir_files = [
- + typelibdir = join_paths(get_option('libdir'), 'girepository-1.0')
- + install_data(gir_files, install_dir: girdir)
- +
- +-scanner_command = [
- +- python,
- +- girscanner,
- +- '--output=@OUTPUT@',
- +- '--no-libtool',
- +- '--quiet',
- +- '--reparse-validate',
- +- '--add-include-path', join_paths(meson.current_build_dir()),
- +- '--add-include-path', join_paths(meson.current_source_dir()),
- +-]
- ++if get_option('enable-host-gi')
- ++ scanner_command = [
- ++ 'g-ir-scanner',
- ++ '--output=@OUTPUT@',
- ++ '--no-libtool',
- ++ '--quiet',
- ++ '--reparse-validate',
- ++ '--add-include-path', join_paths(meson.current_build_dir()),
- ++ '--add-include-path', join_paths(meson.current_source_dir()),
- ++ ]
- ++else
- ++ scanner_command = [
- ++ python,
- ++ girscanner,
- ++ '--output=@OUTPUT@',
- ++ '--no-libtool',
- ++ '--quiet',
- ++ '--reparse-validate',
- ++ '--add-include-path', join_paths(meson.current_build_dir()),
- ++ '--add-include-path', join_paths(meson.current_source_dir()),
- ++ ]
- ++endif
- ++
- +
- + dep_type = glib_dep.type_name()
- + if dep_type == 'internal'
- +@@ -58,6 +71,12 @@ if dep_type == 'internal'
- + '--extra-library=glib-2.0', '--extra-library=gobject-2.0']
- + endif
- +
- ++if get_option('enable-gi-cross-wrapper') != ''
- ++ scanner_command += ['--use-binary-wrapper=' + get_option('enable-gi-cross-wrapper')]
- ++endif
- ++if get_option('enable-gi-ldd-wrapper') != ''
- ++ scanner_command += ['--use-ldd-wrapper=' + get_option('enable-gi-ldd-wrapper')]
- ++endif
- + # Take a glob and print to newlines
- + globber = '''
- + from glob import glob
- +@@ -84,8 +103,8 @@ glib_command = scanner_command + [
- +
- + if dep_type == 'pkgconfig'
- + glib_command += ['--external-library', '--pkg=glib-2.0']
- +- glib_libdir = glib_dep.get_pkgconfig_variable('libdir')
- +- glib_incdir = join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0')
- ++ glib_libdir = get_option('pkgconfig-sysroot-path') + glib_dep.get_pkgconfig_variable('libdir')
- ++ glib_incdir = get_option('pkgconfig-sysroot-path') + join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0')
- + glib_libincdir = join_paths(glib_libdir, 'glib-2.0', 'include')
- + glib_files += join_paths(glib_incdir, 'gobject', 'glib-types.h')
- + glib_files += join_paths(glib_libincdir, 'glibconfig.h')
- +@@ -339,7 +358,7 @@ endforeach
- + if giounix_dep.found()
- + if dep_type == 'pkgconfig'
- + gio_command += ['--pkg=gio-unix-2.0']
- +- giounix_includedir = join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0')
- ++ giounix_includedir = get_option('pkgconfig-sysroot-path') + join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0')
- + # Get the installed gio-unix header list
- + ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h')))
- + if ret.returncode() != 0
- +@@ -422,15 +441,24 @@ gir_files += custom_target('gir-girepository',
- + )
- +
- + typelibs = []
- ++if get_option('enable-gi-cross-wrapper') != ''
- ++ gircompiler_command = [get_option('enable-gi-cross-wrapper'), gircompiler.full_path(), '-o', '@OUTPUT@', '@INPUT@',
- ++ '--includedir', meson.current_build_dir(),
- ++ '--includedir', meson.current_source_dir(),
- ++ ]
- ++else
- ++ gircompiler_command = [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
- ++ '--includedir', meson.current_build_dir(),
- ++ '--includedir', meson.current_source_dir(),
- ++ ]
- ++endif
- ++
- + foreach gir : gir_files
- + typelibs += custom_target('generate-typelib-@0@'.format(gir).underscorify(),
- + input: gir,
- + output: '@BASENAME@.typelib',
- + depends: [gobject_gir, ],
- +- command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
- +- '--includedir', meson.current_build_dir(),
- +- '--includedir', meson.current_source_dir(),
- +- ],
- ++ command: gircompiler_command,
- + install: true,
- + install_dir: typelibdir,
- + )
- +diff --git a/meson.build b/meson.build
- +index 95bbd2b..f7baefd 100644
- +--- a/meson.build
- ++++ b/meson.build
- +@@ -163,7 +163,9 @@ endif
- + subdir('girepository')
- + subdir('tools')
- + subdir('giscanner')
- +-subdir('gir')
- ++if get_option('enable-introspection-data') == true
- ++ subdir('gir')
- ++endif
- + subdir('examples')
- + subdir('docs')
- + subdir('tests')
- +diff --git a/meson_options.txt b/meson_options.txt
- +index 445a68a..a325511 100644
- +--- a/meson_options.txt
- ++++ b/meson_options.txt
- +@@ -25,3 +25,23 @@ option('python', type: 'string', value: 'python3',
- + option('gir_dir_prefix', type: 'string',
- + description: 'Intermediate prefix for gir installation under ${prefix}'
- + )
- ++
- ++option('enable-host-gi', type: 'boolean', value : false,
- ++ description: 'Use gobject introspection tools installed in the host system (useful when cross-compiling)'
- ++)
- ++
- ++option('enable-gi-cross-wrapper', type: 'string',
- ++ description: 'Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)'
- ++)
- ++
- ++option('enable-gi-ldd-wrapper', type: 'string',
- ++ description: 'Use a ldd wrapper instead of system ldd command in giscanner (useful when cross-compiling)'
- ++)
- ++
- ++option('enable-introspection-data', type: 'boolean', value : true,
- ++ description: 'Build introspection data (.gir and .typelib files) in addition to library and tools'
- ++)
- ++
- ++option('pkgconfig-sysroot-path', type: 'string',
- ++ description: 'Specify a sysroot path to prepend to pkgconfig output (useful when cross-compiling)'
- ++)
- diff --git a/package/gobject-introspection/0003-disable-tests.patch b/package/gobject-introspection/0003-disable-tests.patch
- new file mode 100644
- index 0000000000..fcc5a794f3
- --- /dev/null
- +++ b/package/gobject-introspection/0003-disable-tests.patch
- @@ -0,0 +1,29 @@
- +From 473b4288d8f4e891d0d21f7b60ef8053c5cd7af9 Mon Sep 17 00:00:00 2001
- +From: Adam Duskett <aduskett@gmail.com>
- +Date: Mon, 3 Feb 2020 10:07:15 -0800
- +Subject: [PATCH] disable tests
- +
- +If introspection data on the host is not built, meson throws the error:
- +"Unknown variable "typelibs". Because tests are not required, removing
- +the subdir tests alltogether fixes this issue.
- +
- +Signed-off-by: Adam Duskett <aduskett@gmail.com>
- +---
- + meson.build | 1 -
- + 1 file changed, 1 deletion(-)
- +
- +diff --git a/meson.build b/meson.build
- +index a5e825f..981e936 100644
- +--- a/meson.build
- ++++ b/meson.build
- +@@ -171,7 +171,6 @@ subdir('giscanner')
- + subdir('gir')
- + subdir('examples')
- + subdir('docs')
- +-subdir('tests')
- +
- + install_data('Makefile.introspection', install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'))
- + install_data('m4/introspection.m4', install_dir: join_paths(get_option('datadir'), 'aclocal'))
- +--
- +2.24.1
- +
- diff --git a/package/gobject-introspection/0004-giscanner-add-use-binary-wrapper-option.patch b/package/gobject-introspection/0004-giscanner-add-use-binary-wrapper-option.patch
- new file mode 100644
- index 0000000000..cffc2d954d
- --- /dev/null
- +++ b/package/gobject-introspection/0004-giscanner-add-use-binary-wrapper-option.patch
- @@ -0,0 +1,52 @@
- +From 704b888d0abfb01067352c40156f49f655691c7c Mon Sep 17 00:00:00 2001
- +From: Alexander Kanavin <alex.kanavin@gmail.com>
- +Date: Mon, 19 Oct 2015 18:26:40 +0300
- +Subject: [PATCH] giscanner: add --use-binary-wrapper option
- +
- +With this option, giscanner will use a wrapper executable to run
- +binaries it's producing, instead of running them directly. This
- +is useful when binaries are cross-compiled and cannot be run directly,
- +but they can be run using for example QEMU emulation.
- +
- +Upstream-Status: Pending [review on oe-core list]
- +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
- +Signed-off-by: Adam Duskett <aduskett@gmail.com>
- +---
- + giscanner/scannermain.py | 14 ++++++++++++++
- + 1 file changed, 14 insertions(+)
- +
- +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
- +index 633496f..d684cd0 100755
- +--- a/giscanner/scannermain.py
- ++++ b/giscanner/scannermain.py
- +@@ -120,6 +120,9 @@ def _get_option_parser():
- + parser.add_option("", "--program",
- + action="store", dest="program", default=None,
- + help="program to execute")
- ++ parser.add_option("", "--use-binary-wrapper",
- ++ action="store", dest="wrapper", default=None,
- ++ help="wrapper to use for running programs (useful when cross-compiling)")
- + parser.add_option("", "--program-arg",
- + action="append", dest="program_args", default=[],
- + help="extra arguments to program")
- +@@ -417,6 +420,17 @@ def create_binary(transformer, options, args):
- + gdump_parser.get_error_quark_functions())
- +
- + shlibs = resolve_shlibs(options, binary, options.libraries)
- ++ if options.wrapper:
- ++ # The wrapper needs the binary itself, not the libtool wrapper script,
- ++ # so we check if libtool has sneaked the binary into .libs subdirectory
- ++ # and adjust the path accordingly
- ++ import os.path
- ++ dir_name, binary_name = os.path.split(binary.args[0])
- ++ libtool_binary = os.path.join(dir_name, '.libs', binary_name)
- ++ if os.path.exists(libtool_binary):
- ++ binary.args[0] = libtool_binary
- ++ # Then prepend the wrapper to the command line to execute
- ++ binary.args = [options.wrapper] + binary.args
- + gdump_parser.set_introspection_binary(binary)
- + gdump_parser.parse()
- + return shlibs
- +--
- +2.7.0
- +
- diff --git a/package/gobject-introspection/0005-giscanner-add-a-use-ldd-wrapper-option.patch b/package/gobject-introspection/0005-giscanner-add-a-use-ldd-wrapper-option.patch
- new file mode 100644
- index 0000000000..386c1c34b0
- --- /dev/null
- +++ b/package/gobject-introspection/0005-giscanner-add-a-use-ldd-wrapper-option.patch
- @@ -0,0 +1,48 @@
- +From d4ad57fd4a32c4f0d2f0522a3090ef940746431b Mon Sep 17 00:00:00 2001
- +From: Alexander Kanavin <alex.kanavin@gmail.com>
- +Date: Fri, 30 Oct 2015 16:28:46 +0200
- +Subject: [PATCH] giscanner: add a --use-ldd-wrapper option
- +
- +This is useful in cross-compile environments where system's ldd
- +command does not work on binaries built for a different architecture
- +
- +Upstream-Status: Pending [review in oe-core]
- +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
- +Signed-off-by: Adam Duskett <aduskett@gmail.com>
- +---
- + giscanner/scannermain.py | 3 +++
- + giscanner/shlibs.py | 4 +++-
- + 2 files changed, 6 insertions(+), 1 deletion(-)
- +
- +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
- +index d684cd0..1b3b369 100755
- +--- a/giscanner/scannermain.py
- ++++ b/giscanner/scannermain.py
- +@@ -123,6 +123,9 @@ def _get_option_parser():
- + parser.add_option("", "--use-binary-wrapper",
- + action="store", dest="wrapper", default=None,
- + help="wrapper to use for running programs (useful when cross-compiling)")
- ++ parser.add_option("", "--use-ldd-wrapper",
- ++ action="store", dest="ldd_wrapper", default=None,
- ++ help="wrapper to use instead of ldd (useful when cross-compiling)")
- + parser.add_option("", "--program-arg",
- + action="append", dest="program_args", default=[],
- + help="extra arguments to program")
- +diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
- +index c93d20c..c5b5942 100644
- +--- a/giscanner/shlibs.py
- ++++ b/giscanner/shlibs.py
- +@@ -97,7 +97,9 @@ def _resolve_non_libtool(options, binary, libraries):
- + args.extend(libtool)
- + args.append('--mode=execute')
- + platform_system = platform.system()
- +- if platform_system == 'Darwin':
- ++ if options.ldd_wrapper:
- ++ args.extend([options.ldd_wrapper, binary.args[0]])
- ++ elif platform_system == 'Darwin':
- + args.extend(['otool', '-L', binary.args[0]])
- + else:
- + args.extend(['ldd', binary.args[0]])
- +--
- +2.7.0
- +
- diff --git a/package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch b/package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch
- new file mode 100644
- index 0000000000..06f5635610
- --- /dev/null
- +++ b/package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch
- @@ -0,0 +1,73 @@
- +From 3a9b3d8179b7eb9d2cc93da31578945bc03a45c3 Mon Sep 17 00:00:00 2001
- +From: Alexander Kanavin <alex.kanavin@gmail.com>
- +Date: Fri, 27 Apr 2018 12:56:15 -0400
- +Subject: [PATCH] giscanner: add a --lib-dirs-envvar option
- +
- +By default LD_LIBRARY_PATH is set to the list of target library paths;
- +this breaks down in cross-compilation environment, as we need to run a
- +native emulation wrapper rather than the target binary itself. This patch
- +allows exporting those paths to a different environment variable
- +which can be picked up and used by the wrapper.
- +
- +Upstream-Status: Pending
- +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
- +Signed-off-by: Adam Duskett <aduskett@gmail.com>
- +---
- + giscanner/ccompiler.py | 4 ++--
- + giscanner/dumper.py | 3 ++-
- + giscanner/scannermain.py | 3 +++
- + 3 files changed, 7 insertions(+), 3 deletions(-)
- +
- +diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
- +index d10327c..6cf25d5 100644
- +--- a/giscanner/ccompiler.py
- ++++ b/giscanner/ccompiler.py
- +@@ -174,7 +174,7 @@ class CCompiler(object):
- +
- + self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations"
- +
- +- def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths):
- ++ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar):
- + # An "internal" link is where the library to be introspected
- + # is being built in the current directory.
- +
- +@@ -184,7 +184,7 @@ class CCompiler(object):
- + if os.name == 'nt':
- + runtime_path_envvar = ['LIB', 'PATH']
- + else:
- +- runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH']
- ++ runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar]
- + # Search the current directory first
- + # (This flag is not supported nor needed for Visual C++)
- + args.append('-L.')
- +diff --git a/giscanner/dumper.py b/giscanner/dumper.py
- +index 3c7220b..0abd565 100644
- +--- a/giscanner/dumper.py
- ++++ b/giscanner/dumper.py
- +@@ -244,7 +244,8 @@ class DumpCompiler(object):
- + libtool,
- + self._options.libraries,
- + self._options.extra_libraries,
- +- self._options.library_paths)
- ++ self._options.library_paths,
- ++ self._options.lib_dirs_envvar)
- + args.extend(pkg_config_libs)
- +
- + else:
- +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
- +index d262785..51c9570 100755
- +--- a/giscanner/scannermain.py
- ++++ b/giscanner/scannermain.py
- +@@ -126,6 +126,9 @@ def _get_option_parser():
- + parser.add_option("", "--use-ldd-wrapper",
- + action="store", dest="ldd_wrapper", default=None,
- + help="wrapper to use instead of ldd (useful when cross-compiling)")
- ++ parser.add_option("", "--lib-dirs-envvar",
- ++ action="store", dest="lib_dirs_envvar", default=None,
- ++ help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH")
- + parser.add_option("", "--program-arg",
- + action="append", dest="program_args", default=[],
- + help="extra arguments to program")
- +--
- +2.14.3
- +
- diff --git a/package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch b/package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch
- new file mode 100644
- index 0000000000..08835d3ecc
- --- /dev/null
- +++ b/package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch
- @@ -0,0 +1,29 @@
- +From 72a427bc50daee8f1ded0e9221e53dbbf2a80f08 Mon Sep 17 00:00:00 2001
- +From: Adam Duskett <aduskett@gmail.com>
- +Date: Wed, 14 Mar 2018 12:07:10 -0400
- +Subject: [PATCH] Add rpath links to ccompiler
- +
- +This patch allows gobject-introspection to process extra paths passed to the
- +compiler via the GIR_EXTRA_LIBS_PATH variable.
- +
- +Signed-off-by: Adam Duskett <aduskett@gmail.com>
- +---
- + giscanner/ccompiler.py | 2 ++
- + 1 file changed, 2 insertions(+)
- +
- +diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
- +index a8bd5b1..51bb9bc 100644
- +--- a/giscanner/ccompiler.py
- ++++ b/giscanner/ccompiler.py
- +@@ -229,6 +229,8 @@ class CCompiler(object):
- +
- + for envvar in runtime_path_envvar:
- + if envvar in os.environ:
- ++ for envvar_path in os.environ[envvar].split(':'):
- ++ args.append("-Wl,-rpath-link," + envvar_path)
- + os.environ[envvar] = \
- + os.pathsep.join(runtime_paths + [os.environ[envvar]])
- + else:
- +--
- +2.14.3
- +
- diff --git a/package/gobject-introspection/0008-ignore-error-return-codes-from-ldd-wrapper.patch b/package/gobject-introspection/0008-ignore-error-return-codes-from-ldd-wrapper.patch
- new file mode 100644
- index 0000000000..568758d332
- --- /dev/null
- +++ b/package/gobject-introspection/0008-ignore-error-return-codes-from-ldd-wrapper.patch
- @@ -0,0 +1,28 @@
- +From f742da8b3913f4818d3f419117076afe62f4dbf4 Mon Sep 17 00:00:00 2001
- +From: Alexander Kanavin <alex.kanavin@gmail.com>
- +Date: Wed, 5 Sep 2018 16:46:52 +0200
- +Subject: [PATCH] giscanner: ignore error return codes from ldd-wrapper
- +
- +prelink-rtld, which we use instead of ldd returns 127 when it can't find a library.
- +It is not an error per se, but it breaks subprocess.check_output().
- +
- +Upstream-Status: Inappropriate [oe-core specific]
- +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
- +Signed-off-by: Adam Duskett <aduskett@gmail.com>
- +---
- + giscanner/shlibs.py | 2 +-
- + 1 file changed, 1 insertion(+), 1 deletion(-)
- +
- +diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
- +index d67df95..80352a6 100644
- +--- a/giscanner/shlibs.py
- ++++ b/giscanner/shlibs.py
- +@@ -102,7 +102,7 @@ def _resolve_non_libtool(options, binary, libraries):
- + args.extend(['otool', '-L', binary.args[0]])
- + else:
- + args.extend(['ldd', binary.args[0]])
- +- output = subprocess.check_output(args)
- ++ output = subprocess.run(args, check=False, stdout=subprocess.PIPE).stdout
- + if isinstance(output, bytes):
- + output = output.decode("utf-8", "replace")
- +
- diff --git a/package/gobject-introspection/Config.in b/package/gobject-introspection/Config.in
- new file mode 100644
- index 0000000000..f33d803f81
- --- /dev/null
- +++ b/package/gobject-introspection/Config.in
- @@ -0,0 +1,33 @@
- +config BR2_PACKAGE_GOBJECT_INTROSPECTION
- + bool "gobject-introspection"
- + # While gcc 4.8 might be compatible with gobject-introspection,
- + # The autobuilders use some toolchains from codesourcery which
- + # have gcc 4.8 and a very old version of glibc, which will cause
- + # compile errors with locale.c. As such, require 4.9 until this
- + # can be verified.
- + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
- + depends on BR2_USE_MMU # python3, libglib2
- + depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
- + depends on BR2_TOOLCHAIN_USES_GLIBC
- + select BR2_PACKAGE_HOST_PRELINK_CROSS
- + select BR2_PACKAGE_HOST_QEMU
- + select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
- + select BR2_PACKAGE_LIBFFI
- + select BR2_PACKAGE_LIBGLIB2
- + select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
- + select BR2_PACKAGE_ZLIB
- + help
- + GObject introspection is a middleware layer between C
- + libraries (using GObject) and language bindings. The C library
- + can be scanned at compile time and generate a metadata file,
- + in addition to the actual native C library. Then at runtime,
- + language bindings can read this metadata and automatically
- + provide bindings to call into the C library.
- +
- + https://wiki.gnome.org/action/show/Projects/GObjectIntrospection
- +
- +comment "gobject-introspection needs a glibc toolchain, gcc >= 4.9"
- + depends on BR2_USE_MMU
- + depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
- + depends on !BR2_TOOLCHAIN_USES_GLIBC || \
- + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
- diff --git a/package/gobject-introspection/g-ir-compiler.in b/package/gobject-introspection/g-ir-compiler.in
- new file mode 100644
- index 0000000000..02d7c15c38
- --- /dev/null
- +++ b/package/gobject-introspection/g-ir-compiler.in
- @@ -0,0 +1,3 @@
- +#!/usr/bin/env bash
- +
- +$(dirname $0)/g-ir-scanner-qemuwrapper $(dirname $0)/g-ir-compiler.real "$@"
- \ No newline at end of file
- diff --git a/package/gobject-introspection/g-ir-scanner-lddwrapper.in b/package/gobject-introspection/g-ir-scanner-lddwrapper.in
- new file mode 100644
- index 0000000000..d7639c5c81
- --- /dev/null
- +++ b/package/gobject-introspection/g-ir-scanner-lddwrapper.in
- @@ -0,0 +1,3 @@
- +#!/usr/bin/env bash
- +
- +${HOST_DIR}/sbin/prelink-rtld --root=$(dirname $0)/../../ "$@"
- \ No newline at end of file
- diff --git a/package/gobject-introspection/g-ir-scanner-qemuwrapper.in b/package/gobject-introspection/g-ir-scanner-qemuwrapper.in
- new file mode 100644
- index 0000000000..6e433eb300
- --- /dev/null
- +++ b/package/gobject-introspection/g-ir-scanner-qemuwrapper.in
- @@ -0,0 +1,17 @@
- +#!/usr/bin/env bash
- +
- +# Pass -r to qemu-user as to trick glibc into not errorings out if the host kernel
- +# is older than the target kernel.
- +# Use a modules directory which does not exist so we don't load random things
- +# which may then get deleted (or their dependencies) and potentially segfault
- +GIO_MODULE_DIR=$(dirname $0)/../lib/gio/modules-dummy \
- +@QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ \
- +-L $(dirname $0)/../../ \
- +-E LD_LIBRARY_PATH=${GIR_EXTRA_LIBS_PATH}:.libs:$(dirname $0)/../lib:$(dirname $0)/../../lib \
- +"$@"
- +
- +if [[ $? -ne 0 ]]; then
- + echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help."
- + echo 'Typically like this: PKG_MAKE_ENV += GIR_EXTRA_LIBS_PATH="$(@D)/.libs"'
- + exit 1
- +fi
- \ No newline at end of file
- diff --git a/package/gobject-introspection/g-ir-scanner.in b/package/gobject-introspection/g-ir-scanner.in
- new file mode 100644
- index 0000000000..9f97497b7e
- --- /dev/null
- +++ b/package/gobject-introspection/g-ir-scanner.in
- @@ -0,0 +1,8 @@
- +#!/usr/bin/env bash
- +
- +export GI_SCANNER_DISABLE_CACHE=1
- +${HOST_DIR}/bin/g-ir-scanner \
- +--lib-dirs-envvar=GIR_EXTRA_LIBS_PATH \
- +--use-binary-wrapper=$(dirname $0)/g-ir-scanner-qemuwrapper \
- +--use-ldd-wrapper=$(dirname $0)/g-ir-scanner-lddwrapper \
- +--add-include-path=$(dirname $0)/../share/gir-1.0 "$@"
- diff --git a/package/gobject-introspection/gobject-introspection.hash b/package/gobject-introspection/gobject-introspection.hash
- new file mode 100644
- index 0000000000..0454c59565
- --- /dev/null
- +++ b/package/gobject-introspection/gobject-introspection.hash
- @@ -0,0 +1,4 @@
- +#From http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.62/gobject-introspection-1.62.0.sha256sum
- +sha256 b1ee7ed257fdbc008702bdff0ff3e78a660e7e602efa8f211dc89b9d1e7d90a2 gobject-introspection-1.62.0.tar.xz
- +sha256 d245807f90032872d1438d741ed21e2490e1175dc8aa3afa5ddb6c8e529b58e5 COPYING.LGPL
- +sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING.GPL
- diff --git a/package/gobject-introspection/gobject-introspection.mk b/package/gobject-introspection/gobject-introspection.mk
- new file mode 100644
- index 0000000000..67e5e37dee
- --- /dev/null
- +++ b/package/gobject-introspection/gobject-introspection.mk
- @@ -0,0 +1,133 @@
- +################################################################################
- +#
- +# gobject-introspection
- +#
- +################################################################################
- +
- +GOBJECT_INTROSPECTION_VERSION_MAJOR = 1.62
- +GOBJECT_INTROSPECTION_VERSION = $(GOBJECT_INTROSPECTION_VERSION_MAJOR).0
- +GOBJECT_INTROSPECTION_SITE = http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/$(GOBJECT_INTROSPECTION_VERSION_MAJOR)
- +GOBJECT_INTROSPECTION_SOURCE = gobject-introspection-$(GOBJECT_INTROSPECTION_VERSION).tar.xz
- +GOBJECT_INTROSPECTION_INSTALL_STAGING = YES
- +GOBJECT_INTROSPECTION_AUTORECONF = YES
- +GOBJECT_INTROSPECTION_LICENSE = LGPL-2.0+, GPL-2.0+, BSD-2-Clause
- +GOBJECT_INTROSPECTION_LICENSE_FILES = COPYING.LGPL COPYING.GPL giscanner/scannerlexer.l
- +
- +GOBJECT_INTROSPECTION_DEPENDENCIES = \
- + host-autoconf-archive \
- + host-gobject-introspection \
- + host-prelink-cross \
- + host-qemu \
- + libffi \
- + libglib2 \
- + python3 \
- + zlib
- +
- +HOST_GOBJECT_INTROSPECTION_DEPENDENCIES = \
- + host-bison \
- + host-flex \
- + host-libglib2 \
- + host-python3
- +
- +# g-ir-scanner will default to /usr/bin/ld for linking if this is not set.
- +GOBJECT_INTROSPECTION_NINJA_ENV += \
- + CC="$(TARGET_CC)"
- +
- +# Disable introspection data on the host, as it is not needed and
- +# the package will attempt to use the systems libglib2 which will fail
- +# if the systems libglib2 version is older than 2.60.
- +HOST_GOBJECT_INTROSPECTION_CONF_OPTS = \
- + -Denable-introspection-data=false
- +
- +# Use the host gi-scanner to prevent the scanner from generating incorrect
- +# elf classes.
- +GOBJECT_INTROSPECTION_CONF_OPTS = \
- + -Denable-host-gi=true \
- + -Denable-gi-cross-wrapper="$(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper" \
- + -Denable-gi-ldd-wrapper="$(STAGING_DIR)/usr/bin/g-ir-scanner-lddwrapper" \
- + -Denable-introspection-data=true
- +
- +ifeq ($(BR2_PACKAGE_CAIRO),y)
- +GOBJECT_INTROSPECTION_DEPENDENCIES += cairo
- +GOBJECT_INTROSPECTION_CONF_OPTS += -Dcairo=true
- +endif
- +
- +# GI_SCANNER_DISABLE_CACHE=1 prevents g-ir-scanner from writing cache data to ${HOME}
- +GOBJECT_INTROSPECTION_CONF_ENV = \
- + GI_SCANNER_DISABLE_CACHE=1
- +
- +HOST_GOBJECT_INTROSPECTION_CONF_ENV = \
- + GI_SCANNER_DISABLE_CACHE=1
- +
- +# Make sure g-ir-tool-template uses the host python.
- +define GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH
- + $(SED) '1s%#!.*%#!$(HOST_DIR)/bin/python%' $(@D)/tools/g-ir-tool-template.in
- +endef
- +HOST_GOBJECT_INTROSPECTION_PRE_CONFIGURE_HOOKS += GOBJECT_INTROSPECTION_FIX_TOOLTEMPLATE_PYTHON_PATH
- +
- +# Perform the following:
- +# - Just as above, Ensure that g-ir-tool-template.in uses the host python.
- +# - Install all of the wrappers needed to build gobject-introspection.
- +# - Create a safe modules directory which does not exist so we don't load random things
- +# which may then get deleted (or their dependencies) and potentially segfault
- +define GOBJECT_INTROSPECTION_INSTALL_PRE_WRAPPERS
- + $(SED) '1s%#!.*%#!$(HOST_DIR)/bin/python%' $(@D)/tools/g-ir-tool-template.in
- +
- + $(INSTALL) -D -m 755 $(GOBJECT_INTROSPECTION_PKGDIR)/g-ir-scanner-lddwrapper.in \
- + $(STAGING_DIR)/usr/bin/g-ir-scanner-lddwrapper
- +
- + $(INSTALL) -D -m 755 $(GOBJECT_INTROSPECTION_PKGDIR)/g-ir-scanner-qemuwrapper.in \
- + $(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper
- + $(SED) "s%@QEMU_USER@%$(QEMU_USER)%g" \
- + $(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper
- + $(SED) "s%@TOOLCHAIN_HEADERS_VERSION@%$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)%g" \
- + $(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper
- +
- + # Use a modules directory which does not exist so we don't load random things
- + # which may then get deleted (or their dependencies) and potentially segfault
- + mkdir -p $(STAGING_DIR)/usr/lib/gio/modules-dummy
- +endef
- +GOBJECT_INTROSPECTION_PRE_CONFIGURE_HOOKS += GOBJECT_INTROSPECTION_INSTALL_PRE_WRAPPERS
- +
- +# Move the real compiler and scanner to .real, and replace them with the wrappers.
- +# Using .real has the following advantages:
- +# - There is no need to change the logic for other packages.
- +# - The wrappers call the .real files using qemu.
- +define GOBJECT_INTROSPECTION_INSTALL_WRAPPERS
- + # Move the real binaries to their names.real, then replace them with
- + # the wrappers.
- + $(foreach w,g-ir-compiler g-ir-scanner,
- + mv $(STAGING_DIR)/usr/bin/$(w) $(STAGING_DIR)/usr/bin/$(w).real
- + $(INSTALL) -D -m 755 \
- + $(GOBJECT_INTROSPECTION_PKGDIR)/$(w).in $(STAGING_DIR)/usr/bin/$(w)
- + )
- + # Gobject-introspection installs Makefile.introspection in
- + # $(STAGING_DIR)/usr/share which is needed for autotools-based programs to
- + # build .gir and .typelib files. Unfortuantly, gobject-introspection-1.0.pc
- + # uses $(prefix)/share as the directory, which
- + # causes the host /usr/share being used instead of $(STAGING_DIR)/usr/share.
- + # Change datarootdir to $(libdir)/../share which will prefix $(STAGING_DIR)
- + # to the correct location.
- + $(SED) "s%datarootdir=.*%datarootdir=\$${libdir}/../share%g" \
- + $(STAGING_DIR)/usr/lib/pkgconfig/gobject-introspection-1.0.pc
- +
- + # By default, girdir and typelibdir use datadir and libdir as their prefix,
- + # of which pkg-config appends the sysroot directory. This results in files
- + # being installed in $(STAGING_DIR)/$(STAGING_DIR)/path/to/files.
- + # Changing the prefix to exec_prefix prevents this error.
- + $(SED) "s%girdir=.*%girdir=\$${exec_prefix}/share/gir-1.0%g" \
- + $(STAGING_DIR)/usr/lib/pkgconfig/gobject-introspection-1.0.pc
- +
- + $(SED) "s%typelibdir=.*%typelibdir=\$${exec_prefix}/lib/girepository-1.0%g" \
- + $(STAGING_DIR)/usr/lib/pkgconfig/gobject-introspection-1.0.pc
- +endef
- +GOBJECT_INTROSPECTION_POST_INSTALL_STAGING_HOOKS += GOBJECT_INTROSPECTION_INSTALL_WRAPPERS
- +
- +# Only .typelib files are needed to run.
- +define GOBJECT_INTROSPECTION_REMOVE_DEVELOPMENT_FILES
- + find $(TARGET_DIR)/usr/share \( -iname "*.gir" -o -iname \*.rnc \) -delete
- +endef
- +GOBJECT_INTROSPECTION_TARGET_FINALIZE_HOOKS += GOBJECT_INTROSPECTION_REMOVE_DEVELOPMENT_FILES
- +
- +$(eval $(meson-package))
- +$(eval $(host-meson-package))
- diff --git a/package/libiberty/libiberty.hash b/package/libiberty/libiberty.hash
- new file mode 100644
- index 0000000000..270f38dfa7
- --- /dev/null
- +++ b/package/libiberty/libiberty.hash
- @@ -0,0 +1,2 @@
- +# From ftp://gcc.gnu.org/pub/binutils/releases/sha512.sum
- +sha512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a binutils-2.32.tar.xz
- diff --git a/package/libiberty/libiberty.mk b/package/libiberty/libiberty.mk
- new file mode 100644
- index 0000000000..17976fdd4f
- --- /dev/null
- +++ b/package/libiberty/libiberty.mk
- @@ -0,0 +1,27 @@
- +################################################################################
- +#
- +# libiberty
- +#
- +################################################################################
- +
- +LIBIBERTY_VERSION = 2.32
- +LIBIBERTY_SOURCE = binutils-$(LIBIBERTY_VERSION).tar.xz
- +LIBIBERTY_SITE = $(BR2_GNU_MIRROR)/binutils
- +LIBIBERTY_DL_SUBDIR = binutils
- +LIBIBERTY_SUBDIR = libiberty
- +
- +# We explicitly disable multilib, as we do in binutils.
- +# By default, libiberty installs nothing, so we must force it.
- +HOST_LIBIBERTY_CONF_OPTS = \
- + --disable-multilib \
- + --enable-install-libiberty
- +
- +# Some packages (e.g. host-gdb) will pick this library and build shared
- +# objects with it. But libiberty does not honour the --enable-shared and
- +# --disable-static flags; it only ever builds a static library no matter
- +# what. So we must force -fPIC in build flags.
- +HOST_LIBIBERTY_CONF_ENV = \
- + CFLAGS="$(HOST_CFLAGS) -fPIC" \
- + LDFLAGS="$(HOST_LDFLAGS) -fPIC"
- +
- +$(eval $(host-autotools-package))
- diff --git a/package/meson/0002-mdist.py-import-lzma-only-when-needed.patch b/package/meson/0002-mdist.py-import-lzma-only-when-needed.patch
- deleted file mode 100644
- index 81758bc1b3..0000000000
- --- a/package/meson/0002-mdist.py-import-lzma-only-when-needed.patch
- +++ /dev/null
- @@ -1,50 +0,0 @@
- -From a3443360c8c0014638366d5bb2f5aa7683d5aec2 Mon Sep 17 00:00:00 2001
- -From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
- -Date: Sat, 19 Oct 2019 09:52:06 +0200
- -Subject: [PATCH] mdist.py: import lzma only when needed
- -
- -Importing lzma requires that python was built with lzma support. Buildroot
- -builds its own version of python, without lzma support (i.e. without
- -dependency on host-xz).
- -
- -lzma is anyway only needed to make the dist target, which we don't do in
- -Buildroot. Therefore, in the Buildroot context, everything still works
- -properly without lzma support.
- -
- -Moving the import down to the place where it is actually needed does not
- -remove any functionality but fixes the problem for Buildroot.
- -
- -Source of patch:
- -http://lists.busybox.net/pipermail/buildroot/2019-October/262990.html
- -http://code.bulix.org/gdxcu4-914360
- -
- -Fixes https://github.com/mesonbuild/meson/issues/6012
- -
- -Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
- ----
- - mesonbuild/mdist.py | 2 +-
- - 1 file changed, 1 insertion(+), 1 deletion(-)
- -
- -diff --git a/mesonbuild/mdist.py b/mesonbuild/mdist.py
- -index 7b753826..28e2fced 100644
- ---- a/mesonbuild/mdist.py
- -+++ b/mesonbuild/mdist.py
- -@@ -13,7 +13,6 @@
- - # limitations under the License.
- -
- -
- --import lzma
- - import gzip
- - import os
- - import sys
- -@@ -133,6 +132,7 @@ def create_dist_hg(dist_name, archives, src_root, bld_root, dist_sub, dist_scrip
- - if dist_scripts:
- - mlog.warning('dist scripts are not supported in Mercurial projects')
- - if 'xztar' in archives:
- -+ import lzma
- - with lzma.open(xzname, 'wb') as xf, open(tarname, 'rb') as tf:
- - shutil.copyfileobj(tf, xf)
- - output_names.append(xzname)
- ---
- -2.20.1
- -
- diff --git a/package/meson/0003-envconfig-add-pkg_config_libdir-property.patch b/package/meson/0003-envconfig-add-pkg_config_libdir-property.patch
- new file mode 100644
- index 0000000000..ae40ab8b1c
- --- /dev/null
- +++ b/package/meson/0003-envconfig-add-pkg_config_libdir-property.patch
- @@ -0,0 +1,102 @@
- +From 3af920cb4a9c272b9b75a4f3eea9da9000520949 Mon Sep 17 00:00:00 2001
- +From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= <scerveau@collabora.com>
- +Date: Tue, 14 Jan 2020 11:11:52 +0100
- +Subject: [PATCH] envconfig: add pkg_config_libdir property
- +
- +In order to unify the use of sysroot in the cross-file,
- +the pkg_config_libdir can now be passed directly in the file.
- +
- +Upstream: 958df63dac810246e84c2b8eaa32d22d19ace0ef
- +[Arnout: remove documentation changes: we don't extract docs/]
- +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
- +---
- + mesonbuild/dependencies/base.py | 6 ++++++
- + mesonbuild/envconfig.py | 6 ++++++
- + run_unittests.py | 30 +++++++++++++++++++++++++++++-
- + 3 files changed, 41 insertions(+), 1 deletion(-)
- +
- +diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
- +index 40e304c7..282c314b 100644
- +--- a/mesonbuild/dependencies/base.py
- ++++ b/mesonbuild/dependencies/base.py
- +@@ -697,6 +697,12 @@ class PkgConfigDependency(ExternalDependency):
- + mlog.debug('PKG_CONFIG_PATH: ' + new_pkg_config_path)
- + env['PKG_CONFIG_PATH'] = new_pkg_config_path
- +
- ++ pkg_config_libdir_prop = self.env.properties[self.for_machine].get_pkg_config_libdir()
- ++ if pkg_config_libdir_prop:
- ++ new_pkg_config_libdir = ':'.join([p for p in pkg_config_libdir_prop])
- ++ env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir
- ++ mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir)
- ++
- + fenv = frozenset(env.items())
- + targs = tuple(args)
- + cache = PkgConfigDependency.pkgbin_cache
- +diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
- +index c8a37f4c..3e5e44b8 100644
- +--- a/mesonbuild/envconfig.py
- ++++ b/mesonbuild/envconfig.py
- +@@ -143,6 +143,12 @@ class Properties(HasEnvVarFallback):
- + def get_sys_root(self) -> T.Optional[T.Union[str, T.List[str]]]:
- + return self.properties.get('sys_root', None)
- +
- ++ def get_pkg_config_libdir(self) -> T.Optional[T.List[str]]:
- ++ p = self.properties.get('pkg_config_libdir', None)
- ++ if p is None:
- ++ return p
- ++ return mesonlib.listify(p)
- ++
- + def __eq__(self, other: T.Any) -> 'T.Union[bool, NotImplemented]':
- + if isinstance(other, type(self)):
- + return self.properties == other.properties
- +diff --git a/run_unittests.py b/run_unittests.py
- +index 676604f4..382c0964 100755
- +--- a/run_unittests.py
- ++++ b/run_unittests.py
- +@@ -3621,6 +3621,34 @@ recommended as it is not supported on some platforms''')
- + self.wipe()
- + self.init(testdir, extra_args=['-Dstart_native=true'], override_envvars=env)
- +
- ++ @skipIfNoPkgconfig
- ++ @unittest.skipIf(is_windows(), 'Help needed with fixing this test on windows')
- ++ def test_pkg_config_libdir(self):
- ++ testdir = os.path.join(self.unit_test_dir,
- ++ '46 native dep pkgconfig var')
- ++ with tempfile.NamedTemporaryFile(mode='w', delete=False) as crossfile:
- ++ crossfile.write(textwrap.dedent(
- ++ '''[binaries]
- ++ pkgconfig = 'pkg-config'
- ++
- ++ [properties]
- ++ pkg_config_libdir = [r'{0}']
- ++
- ++ [host_machine]
- ++ system = 'linux'
- ++ cpu_family = 'arm'
- ++ cpu = 'armv7'
- ++ endian = 'little'
- ++ '''.format(os.path.join(testdir, 'cross_pkgconfig'))))
- ++ crossfile.flush()
- ++ self.meson_cross_file = crossfile.name
- ++
- ++ env = {'PKG_CONFIG_LIBDIR': os.path.join(testdir,
- ++ 'native_pkgconfig')}
- ++ self.init(testdir, extra_args=['-Dstart_native=false'], override_envvars=env)
- ++ self.wipe()
- ++ self.init(testdir, extra_args=['-Dstart_native=true'], override_envvars=env)
- ++
- + def __reconfigure(self, change_minor=False):
- + # Set an older version to force a reconfigure from scratch
- + filename = os.path.join(self.privatedir, 'coredata.dat')
- +@@ -6847,7 +6875,7 @@ class NativeFileTests(BasePlatformTests):
- +
- + class CrossFileTests(BasePlatformTests):
- +
- +- """Tests for cross file functioality not directly related to
- ++ """Tests for cross file functionality not directly related to
- + cross compiling.
- +
- + This is mainly aimed to testing overrides from cross files.
- +--
- +2.24.1
- +
- diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
- index fc8e27f7eb..369e225b3e 100644
- --- a/package/meson/cross-compilation.conf.in
- +++ b/package/meson/cross-compilation.conf.in
- @@ -8,7 +8,7 @@ c = '@TARGET_CROSS@gcc'
- cpp = '@TARGET_CROSS@g++'
- ar = '@TARGET_CROSS@ar'
- strip = '@TARGET_CROSS@strip'
- -pkgconfig = '@HOST_DIR@/usr/bin/pkg-config'
- +pkgconfig = '@HOST_DIR@/bin/pkgconf'
- [properties]
- needs_exe_wrapper = true
- @@ -16,6 +16,8 @@ c_args = [@TARGET_CFLAGS@]
- c_link_args = [@TARGET_LDFLAGS@]
- cpp_args = [@TARGET_CXXFLAGS@]
- cpp_link_args = [@TARGET_LDFLAGS@]
- +sys_root = '@STAGING_DIR@'
- +pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
- [host_machine]
- system = 'linux'
- diff --git a/package/meson/meson.hash b/package/meson/meson.hash
- index 26b1fc9bb2..881d4211cf 100644
- --- a/package/meson/meson.hash
- +++ b/package/meson/meson.hash
- @@ -1,4 +1,4 @@
- # Locally calculated after checking pgp signature
- -# https://github.com/mesonbuild/meson/releases/download/0.52.0/meson-0.52.0.tar.gz.asc
- -sha256 d60f75f0dedcc4fd249dbc7519d6f3ce6df490033d276ef1cf27453ef4938d32 meson-0.52.0.tar.gz
- +# https://github.com/mesonbuild/meson/releases/download/0.53.1/meson-0.53.1.tar.gz.asc
- +sha256 ec1ba33eea701baca2c1607dac458152dc8323364a51fdef6babda2623413b04 meson-0.53.1.tar.gz
- sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 COPYING
- diff --git a/package/meson/meson.mk b/package/meson/meson.mk
- index c708532c6d..810c84690a 100644
- --- a/package/meson/meson.mk
- +++ b/package/meson/meson.mk
- @@ -4,7 +4,7 @@
- #
- ################################################################################
- -MESON_VERSION = 0.52.0
- +MESON_VERSION = 0.53.1
- MESON_SITE = https://github.com/mesonbuild/meson/releases/download/$(MESON_VERSION)
- MESON_LICENSE = Apache-2.0
- MESON_LICENSE_FILES = COPYING
- @@ -45,8 +45,10 @@ else
- HOST_MESON_TARGET_CPU_FAMILY = $(ARCH)
- endif
- -HOST_MESON_SED_CFLAGS = $(if $(strip $(TARGET_CFLAGS)),`printf '"%s"$(comma) ' $(TARGET_CFLAGS)`)
- -HOST_MESON_SED_LDFLAGS = $(if $(strip $(TARGET_LDFLAGS)),`printf '"%s"$(comma) ' $(TARGET_LDFLAGS)`)
- -HOST_MESON_SED_CXXFLAGS = $(if $(strip $(TARGET_CXXFLAGS)),`printf '"%s"$(comma) ' $(TARGET_CXXFLAGS)`)
- +# Avoid interpreter shebang longer than 128 chars
- +define HOST_MESON_SET_INTERPRETER
- + $(SED) '1s:.*:#!/usr/bin/env python3:' $(HOST_DIR)/bin/meson
- +endef
- +HOST_MESON_POST_INSTALL_HOOKS += HOST_MESON_SET_INTERPRETER
- $(eval $(host-python-package))
- diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
- index e7eea2aa58..352f439467 100644
- --- a/package/pkg-meson.mk
- +++ b/package/pkg-meson.mk
- @@ -60,31 +60,27 @@ ifeq ($(4),target)
- $(2)_CFLAGS ?= $$(TARGET_CFLAGS)
- $(2)_LDFLAGS ?= $$(TARGET_LDFLAGS)
- $(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
- -
- -$(2)_MESON_SED_CFLAGS = $$(if $$(strip $$($(2)_CFLAGS)),`printf '"%s"$$(comma) ' $$($(2)_CFLAGS)`)
- -$(2)_MESON_SED_LDFLAGS = $$(if $$(strip $$($(2)_LDFLAGS)),`printf '"%s"$$(comma) ' $$($(2)_LDFLAGS)`)
- -$(2)_MESON_SED_CXXFLAGS = $$(if $$(strip $$($(2)_CXXFLAGS)),`printf '"%s"$$(comma) ' $$($(2)_CXXFLAGS)`)
- -
- # Configure package for target
- #
- #
- define $(2)_CONFIGURE_CMDS
- rm -rf $$($$(PKG)_SRCDIR)/build
- mkdir -p $$($$(PKG)_SRCDIR)/build
- - sed -e "s%@TARGET_CROSS@%$$(TARGET_CROSS)%g" \
- - -e "s%@TARGET_ARCH@%$$(HOST_MESON_TARGET_CPU_FAMILY)%g" \
- - -e "s%@TARGET_CPU@%$$(GCC_TARGET_CPU)%g" \
- - -e "s%@TARGET_ENDIAN@%$$(call LOWERCASE,$$(BR2_ENDIAN))%g" \
- - -e "s%@TARGET_CFLAGS@%$$($(2)_MESON_SED_CFLAGS)%g" \
- - -e "s%@TARGET_LDFLAGS@%$$($(2)_MESON_SED_LDFLAGS)%g" \
- - -e "s%@TARGET_CXXFLAGS@%$$($(2)_MESON_SED_CXXFLAGS)%g" \
- - -e "s%@HOST_DIR@%$$(HOST_DIR)%g" \
- + sed -e 's%@TARGET_CROSS@%$$(TARGET_CROSS)%g' \
- + -e 's%@TARGET_ARCH@%$$(HOST_MESON_TARGET_CPU_FAMILY)%g' \
- + -e 's%@TARGET_CPU@%$$(GCC_TARGET_CPU)%g' \
- + -e 's%@TARGET_ENDIAN@%$$(call LOWERCASE,$$(BR2_ENDIAN))%g' \
- + -e 's%@TARGET_CFLAGS@%$$(call make-comma-list,$$($(2)_CFLAGS))%g' \
- + -e 's%@TARGET_LDFLAGS@%$$(call make-comma-list,$$($(2)_LDFLAGS))%g' \
- + -e 's%@TARGET_CXXFLAGS@%$$(call make-comma-list,$$($(2)_CXXFLAGS))%g' \
- + -e 's%@HOST_DIR@%$$(HOST_DIR)%g' \
- + -e 's%@STAGING_DIR@%$$(STAGING_DIR)%g' \
- $$(foreach x,$$($(2)_MESON_EXTRA_BINARIES), \
- -e "/^\[binaries\]$$$$/s:$$$$:\n$$(x):" \
- ) \
- package/meson/cross-compilation.conf.in \
- > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf
- - PATH=$$(BR_PATH) $$($$(PKG)_CONF_ENV) $$(MESON) \
- + $$(TARGET_MAKE_ENV) $$($$(PKG)_CONF_ENV) $$(MESON) \
- --prefix=/usr \
- --libdir=lib \
- --default-library=$(if $(BR2_STATIC_LIBS),static,shared) \
- @@ -188,19 +184,20 @@ host-meson-package = $(call inner-meson-package,host-$(pkgname),$(call UPPERCASE
- # own flags if they need to.
- define PKG_MESON_INSTALL_CROSS_CONF
- mkdir -p $(HOST_DIR)/etc/meson
- - sed -e "s%@TARGET_CROSS@%$(TARGET_CROSS)%g" \
- - -e "s%@TARGET_ARCH@%$(HOST_MESON_TARGET_CPU_FAMILY)%g" \
- - -e "s%@TARGET_CPU@%$(HOST_MESON_TARGET_CPU)%g" \
- - -e "s%@TARGET_ENDIAN@%$(HOST_MESON_TARGET_ENDIAN)%g" \
- - -e "s%@TARGET_CFLAGS@%$(HOST_MESON_SED_CFLAGS)@PKG_TARGET_CFLAGS@%g" \
- - -e "s%@TARGET_LDFLAGS@%$(HOST_MESON_SED_LDFLAGS)@PKG_TARGET_CFLAGS@%g" \
- - -e "s%@TARGET_CXXFLAGS@%$(HOST_MESON_SED_CXXFLAGS)@PKG_TARGET_CFLAGS@%g" \
- - -e "s%@HOST_DIR@%$(HOST_DIR)%g" \
- + sed -e 's%@TARGET_CROSS@%$(TARGET_CROSS)%g' \
- + -e 's%@TARGET_ARCH@%$(HOST_MESON_TARGET_CPU_FAMILY)%g' \
- + -e 's%@TARGET_CPU@%$(HOST_MESON_TARGET_CPU)%g' \
- + -e 's%@TARGET_ENDIAN@%$(HOST_MESON_TARGET_ENDIAN)%g' \
- + -e 's%@TARGET_CFLAGS@%$(call make-comma-list,$(TARGET_CFLAGS))@PKG_TARGET_CFLAGS@%g' \
- + -e 's%@TARGET_LDFLAGS@%$(call make-comma-list,$(TARGET_LDFLAGS))@PKG_TARGET_CFLAGS@%g' \
- + -e 's%@TARGET_CXXFLAGS@%$(call make-comma-list,$(TARGET_CXXFLAGS))@PKG_TARGET_CFLAGS@%g' \
- + -e 's%@HOST_DIR@%$(HOST_DIR)%g' \
- + -e 's%@STAGING_DIR@%$$(STAGING_DIR)%g' \
- $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \
- > $(HOST_DIR)/etc/meson/cross-compilation.conf.in
- - sed -e "s%@PKG_TARGET_CFLAGS@%%g" \
- - -e "s%@PKG_TARGET_LDFLAGS@%%g" \
- - -e "s%@PKG_TARGET_CXXFLAGS@%%g" \
- + sed -e 's%@PKG_TARGET_CFLAGS@%%g' \
- + -e 's%@PKG_TARGET_LDFLAGS@%%g' \
- + -e 's%@PKG_TARGET_CXXFLAGS@%%g' \
- $(HOST_DIR)/etc/meson/cross-compilation.conf.in \
- > $(HOST_DIR)/etc/meson/cross-compilation.conf
- endef
- diff --git a/package/pkg-python.mk b/package/pkg-python.mk
- index 4ded4fde83..93f24856bf 100644
- --- a/package/pkg-python.mk
- +++ b/package/pkg-python.mk
- @@ -20,21 +20,11 @@
- #
- ################################################################################
- -define PKG_PYTHON_SYSCONFIGDATA_NAME
- -$(basename $(notdir $(wildcard $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/_sysconfigdata__linux_*.py)))
- -endef
- -
- # Target distutils-based packages
- PKG_PYTHON_DISTUTILS_ENV = \
- - PATH=$(BR_PATH) \
- + PATH=$(HOST_BIN_CROSS):$(BR_PATH) \
- $(TARGET_CONFIGURE_OPTS) \
- LDSHARED="$(TARGET_CROSS)gcc -shared" \
- - PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \
- - PYTHONNOUSERSITE=1 \
- - _PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \
- - _python_sysroot=$(STAGING_DIR) \
- - _python_prefix=/usr \
- - _python_exec_prefix=/usr
- PKG_PYTHON_DISTUTILS_BUILD_OPTS = \
- --executable=/usr/bin/python
- @@ -58,14 +48,8 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \
- # Target setuptools-based packages
- PKG_PYTHON_SETUPTOOLS_ENV = \
- - _PYTHON_SYSCONFIGDATA_NAME="$(PKG_PYTHON_SYSCONFIGDATA_NAME)" \
- - PATH=$(BR_PATH) \
- + PATH=$(HOST_BIN_CROSS):$(BR_PATH) \
- $(TARGET_CONFIGURE_OPTS) \
- - PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \
- - PYTHONNOUSERSITE=1 \
- - _python_sysroot=$(STAGING_DIR) \
- - _python_prefix=/usr \
- - _python_exec_prefix=/usr
- PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS = \
- --prefix=/usr \
- @@ -225,7 +209,7 @@ endif # SETUP_TYPE
- # - otherwise, we use the one requested by *_NEEDS_HOST_PYTHON.
- #
- ifeq ($(4),target)
- -$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python
- +$(2)_PYTHON_INTERPRETER = $$(HOST_BIN_CROSS)/python
- else
- ifeq ($$($(2)_NEEDS_HOST_PYTHON),)
- $(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/bin/python
- diff --git a/package/prelink-cross/prelink-cross.hash b/package/prelink-cross/prelink-cross.hash
- new file mode 100644
- index 0000000000..3ac33ac3d0
- --- /dev/null
- +++ b/package/prelink-cross/prelink-cross.hash
- @@ -0,0 +1,3 @@
- +# Locally computed
- +sha256 cb3f5d833cd74b7e90e38465c9c948b0f4138c017509cb91e391b0931063429e prelink-cross-a853a5d715d84eec93aa68e8f2df26b7d860f5b2.tar.gz
- +sha256 b8a2f73f743dc1a51aff23f1aacbca4b868564db52496fa3c0caba755bfd1eaf COPYING
- diff --git a/package/prelink-cross/prelink-cross.mk b/package/prelink-cross/prelink-cross.mk
- new file mode 100644
- index 0000000000..b43c209b16
- --- /dev/null
- +++ b/package/prelink-cross/prelink-cross.mk
- @@ -0,0 +1,16 @@
- +################################################################################
- +#
- +# host-prelink-cross
- +#
- +################################################################################
- +
- +HOST_PRELINK_CROSS_VERSION = a853a5d715d84eec93aa68e8f2df26b7d860f5b2
- +HOST_PRELINK_CROSS_SITE = https://git.yoctoproject.org/git/prelink-cross
- +HOST_PRELINK_CROSS_SITE_METHOD = git
- +HOST_PRELINK_CROSS_LICENSE = GPL-2.0
- +HOST_PRELINK_CROSS_LICENSE_FILES = COPYING
- +# Sources from git, no configure script present
- +HOST_PRELINK_CROSS_AUTORECONF = YES
- +HOST_PRELINK_CROSS_DEPENDENCIES = host-elfutils host-libiberty
- +
- +$(eval $(host-autotools-package))
- diff --git a/package/python-gobject/0001-add-PYTHON_INCLUDES-override.patch b/package/python-gobject/0001-add-PYTHON_INCLUDES-override.patch
- deleted file mode 100644
- index d883f60ddf..0000000000
- --- a/package/python-gobject/0001-add-PYTHON_INCLUDES-override.patch
- +++ /dev/null
- @@ -1,32 +0,0 @@
- -[PATCH] m4/python.m4: add PYTHON_INCLUDES override for cross compilation
- -
- -As the configure script mixes up host/target python. Equivalent to the
- -similar code in dbus-python.
- -
- -Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
- ----
- - m4/python.m4 | 4 ++++
- - 1 file changed, 4 insertions(+)
- -
- -Index: python-gobject-2.28.6/m4/python.m4
- -===================================================================
- ---- python-gobject-2.28.6.orig/m4/python.m4
- -+++ python-gobject-2.28.6/m4/python.m4
- -@@ -43,6 +43,9 @@
- - [AC_REQUIRE([AM_PATH_PYTHON])
- - AC_MSG_CHECKING(for headers required to compile python extensions)
- - dnl deduce PYTHON_INCLUDES
- -+if test "${PYTHON_INCLUDES+set}" = set; then
- -+ AC_MSG_NOTICE([PYTHON_INCLUDES overridden to: $PYTHON_INCLUDES])
- -+else
- - py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
- - py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
- - PYTHON_CONFIG=`which $PYTHON`-config
- -@@ -54,6 +57,7 @@
- - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
- - fi
- - fi
- -+fi
- - AC_SUBST(PYTHON_INCLUDES)
- - dnl check if the headers exist:
- - save_CPPFLAGS="$CPPFLAGS"
- diff --git a/package/python-gobject/Config.in b/package/python-gobject/Config.in
- index 36ddffebb0..33f4b85385 100644
- --- a/package/python-gobject/Config.in
- +++ b/package/python-gobject/Config.in
- @@ -1,16 +1,20 @@
- config BR2_PACKAGE_PYTHON_GOBJECT
- bool "python-gobject"
- - depends on BR2_USE_WCHAR # libglib2
- - depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
- - depends on BR2_USE_MMU # libglib2
- - depends on BR2_PACKAGE_PYTHON # Broken with python 3.8
- - select BR2_PACKAGE_LIBGLIB2
- + depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
- + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
- + depends on BR2_TOOLCHAIN_USES_GLIBC # gobject-introspection
- + depends on BR2_USE_MMU # python3, libglib2, gobject-introspection
- + depends on BR2_PACKAGE_GOBJECT_INTROSPECTION
- help
- Python bindings for the GLib/GObject library
- https://wiki.gnome.org/action/show/Projects/PyGObject
- -comment "python-gobject needs a toolchain w/ wchar, threads"
- - depends on BR2_PACKAGE_PYTHON
- +comment "python-gobject needs gobject-introspection"
- + depends on !BR2_PACKAGE_GOBJECT_INTROSPECTION
- +
- +comment "python-gobject needs a glibc toolchain, host-gcc >= 4.9"
- depends on BR2_USE_MMU
- - depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
- + depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
- + depends on !BR2_TOOLCHAIN_USES_GLIBC || \
- + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
- diff --git a/package/python-gobject/python-gobject.hash b/package/python-gobject/python-gobject.hash
- index 024419e965..958c022a18 100644
- --- a/package/python-gobject/python-gobject.hash
- +++ b/package/python-gobject/python-gobject.hash
- @@ -1,2 +1,3 @@
- -# from http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-2.28.6.sha256sum
- -sha256 fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8 pygobject-2.28.6.tar.xz
- +# from http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.34/pygobject-3.34.0.sha256sum
- +sha256 87e2c9aa785f352ef111dcc5f63df9b85cf6e05e52ff04f803ffbebdacf5271a pygobject-3.34.0.tar.xz
- +sha256 32434afcc8666ba060e111d715bfdb6c2d5dd8a35fa4d3ab8ad67d8f850d2f2b COPYING
- diff --git a/package/python-gobject/python-gobject.mk b/package/python-gobject/python-gobject.mk
- index cf5c874151..29d6d995ae 100644
- --- a/package/python-gobject/python-gobject.mk
- +++ b/package/python-gobject/python-gobject.mk
- @@ -4,36 +4,17 @@
- #
- ################################################################################
- -PYTHON_GOBJECT_VERSION_MAJOR = 2.28
- -PYTHON_GOBJECT_VERSION = $(PYTHON_GOBJECT_VERSION_MAJOR).6
- +PYTHON_GOBJECT_VERSION_MAJOR = 3.34
- +PYTHON_GOBJECT_VERSION = $(PYTHON_GOBJECT_VERSION_MAJOR).0
- PYTHON_GOBJECT_SOURCE = pygobject-$(PYTHON_GOBJECT_VERSION).tar.xz
- -PYTHON_GOBJECT_SITE = http://ftp.gnome.org/pub/gnome/sources/pygobject/$(PYTHON_GOBJECT_VERSION_MAJOR)
- +PYTHON_GOBJECT_SITE = https://ftp.gnome.org/pub/gnome/sources/pygobject/$(PYTHON_GOBJECT_VERSION_MAJOR)
- PYTHON_GOBJECT_LICENSE = LGPL-2.1+
- PYTHON_GOBJECT_LICENSE_FILES = COPYING
- -PYTHON_GOBJECT_DEPENDENCIES = host-pkgconf libglib2
- -PYTHON_GOBJECT_CONF_OPTS = --disable-introspection
- -# for 0001-add-PYTHON_INCLUDES-override.patch
- -PYTHON_GOBJECT_AUTORECONF = YES
- +PYTHON_GOBJECT_INSTALL_STAGING = YES
- +PYTHON_GOBJECT_DEPENDENCIES = host-pkgconf libglib2 gobject-introspection python3
- +PYTHON_GOBJECT_CONF_OPTS = \
- + -Dpycairo=false \
- + -Dtests=false \
- + -Dpython=$(HOST_BIN_CROSS)/python
- -ifeq ($(BR2_PACKAGE_PYTHON),y)
- -PYTHON_GOBJECT_DEPENDENCIES += python host-python
- -
- -PYTHON_GOBJECT_CONF_ENV = \
- - PYTHON=$(HOST_DIR)/bin/python2 \
- - PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python2-config --includes`"
- -else
- -PYTHON_GOBJECT_DEPENDENCIES += python3 host-python3
- -
- -PYTHON_GOBJECT_CONF_ENV = \
- - PYTHON=$(HOST_DIR)/bin/python3 \
- - PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python3-config --includes`"
- -endif
- -
- -ifeq ($(BR2_PACKAGE_LIBFFI),y)
- -PYTHON_GOBJECT_CONF_OPTS += --with-ffi
- -PYTHON_GOBJECT_DEPENDENCIES += libffi
- -else
- -PYTHON_GOBJECT_CONF_OPTS += --without-ffi
- -endif
- -
- -$(eval $(autotools-package))
- +$(eval $(meson-package))
- diff --git a/package/python/python-wrapper.in b/package/python/python-wrapper.in
- new file mode 100644
- index 0000000000..c5e6e5481b
- --- /dev/null
- +++ b/package/python/python-wrapper.in
- @@ -0,0 +1,10 @@
- +#! /bin/sh
- +
- +STAGING_DIR=$(cd "${0%/*}/../sysroot"; pwd)
- +
- +PYTHONPATH="@PYTHON_PATH@" \
- +PYTHONNOUSERSITE=1 \
- +_python_sysroot="$STAGING_DIR" \
- +_python_prefix=/usr \
- +_python_exec_prefix=/usr \
- +exec "${0%/*}/../../bin/python" "$@"
- diff --git a/package/python/python.mk b/package/python/python.mk
- index 41a981e3d3..6f2e01386e 100644
- --- a/package/python/python.mk
- +++ b/package/python/python.mk
- @@ -227,6 +227,20 @@ PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_INSTALL_STAGING_PYTHON_CONFIG_SYMLIN
- PYTHON_AUTORECONF = YES
- +# Provided to other packages
- +PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/sysconfigdata/
- +
- +define PYTHON_INSTALL_CROSS_WRAPPER
- + mkdir -p $(HOST_BIN_CROSS)
- + sed 's%@PYTHON_PATH@%$(PYTHON_PATH)%' \
- + package/python/python-wrapper.in \
- + > $(HOST_BIN_CROSS)/python
- + chmod 0755 $(HOST_BIN_CROSS)/python
- + ln -sf python $(HOST_BIN_CROSS)/python2
- +endef
- +
- +PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_INSTALL_CROSS_WRAPPER
- +
- # Some packages may have build scripts requiring python2.
- # Only install the python symlink in the host tree if python3 is not enabled
- # for the target, otherwise the default python program may be missing.
- @@ -239,9 +253,6 @@ endef
- HOST_PYTHON_POST_INSTALL_HOOKS += HOST_PYTHON_INSTALL_PYTHON_SYMLINK
- endif
- -# Provided to other packages
- -PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/sysconfigdata/
- -
- $(eval $(autotools-package))
- $(eval $(host-autotools-package))
- diff --git a/package/python3/python-wrapper.in b/package/python3/python-wrapper.in
- new file mode 100644
- index 0000000000..c2f34f32df
- --- /dev/null
- +++ b/package/python3/python-wrapper.in
- @@ -0,0 +1,24 @@
- +#! /bin/sh
- +
- +STAGING_DIR=$(cd "${0%/*}/../sysroot"; pwd)
- +
- +SYSCONFIGDATA=""
- +for sysconfig in ${STAGING_DIR}/usr/lib/python*/_sysconfigdata__linux_*.py; do
- + if [ -n "$SYSCONFIGDATA" ]; then
- + echo "*** More than one sysconfigdata exists. Buildroot doesn't support mixing targets." 1>&2
- + exit 1
- + fi
- + if [ ! -r "$sysconfig" ]; then
- + echo "*** No sysconfigdata found in $sysconfig." 1>&2
- + exit 1
- + fi
- + SYSCONFIGDATA="$(echo $sysconfig | sed 's%.*/\([^/]*\).py%\1%')"
- +done
- +
- +PYTHONPATH="@PYTHON_PATH@" \
- +PYTHONNOUSERSITE=1 \
- +_PYTHON_SYSCONFIGDATA_NAME="$SYSCONFIGDATA" \
- +_python_sysroot="$STAGING_DIR" \
- +_python_prefix=/usr \
- +_python_exec_prefix=/usr \
- +exec "${0%/*}/../../bin/python3" "$@"
- diff --git a/package/python3/python3.mk b/package/python3/python3.mk
- index 9432f1c59e..6280b4a550 100644
- --- a/package/python3/python3.mk
- +++ b/package/python3/python3.mk
- @@ -239,6 +239,20 @@ ifneq ($(BR2_PACKAGE_PYTHON),y)
- PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK
- endif
- +# Provided to other packages
- +PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/
- +
- +define PYTHON3_INSTALL_CROSS_WRAPPER
- + mkdir -p $(HOST_BIN_CROSS)
- + sed 's%@PYTHON_PATH@%$(PYTHON3_PATH)%' \
- + package/python3/python-wrapper.in \
- + > $(HOST_BIN_CROSS)/python
- + chmod 0755 $(HOST_BIN_CROSS)/python
- + ln -sf python $(HOST_BIN_CROSS)/python3
- +endef
- +
- +PYTHON3_POST_INSTALL_STAGING_HOOKS += PYTHON3_INSTALL_CROSS_WRAPPER
- +
- # Some packages may have build scripts requiring python3, whatever is the
- # python version chosen for the target.
- # Only install the python symlink in the host tree if python3 is enabled
- @@ -252,9 +266,6 @@ endef
- HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK
- endif
- -# Provided to other packages
- -PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/
- -
- # Support for socket.AF_BLUETOOTH
- ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_HEADERS),y)
- PYTHON3_DEPENDENCIES += bluez5_utils-headers
- --
- 2.21.1 (Apple Git-122.3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement