kumquat-buildroot/package/libglib2/0002-add-option-to-build-tests.patch
Adam Duskett bb912cb36d package/libglib2: bump to version 2.62.0
Other changes:
 - Refactor 0002-add-option-to-build-tests.patch to work with the new version.
 - Add the new option oss_fuzz=disabled to HOST_LIBGLIB2_CONF_OPTS and
   LIBGLIB2_CONF_OPTS.
 - Change -Diconv=gnu to -Diconv=external as the option has changed.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-17 21:44:37 +02:00

80 lines
2.6 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 3a137f52869fdbc7050d606bfba0e5b1e41bd8e6 Mon Sep 17 00:00:00 2001
From: Adam Duskett <Aduskett@gmail.com>
Date: Mon, 16 Sep 2019 10:08:52 -0700
Subject: [PATCH] add option to build tests.
Upstream won't build tests when cross-compiling. However; this means still
building the tests during a host build. Building the tests causes build
failures on older distributions such as CentOS 6 and Debian 7 because the
command `objcopy --add-symbol` is used when building the test
"test_resources2," which is not available with the older version of objcopy
provided by the distributions.
Instead, add the option 'tests' which when set to false, enforces not
building any tests, even when building the host variant.
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
gio/meson.build | 1 -
gobject/meson.build | 1 -
meson.build | 2 +-
meson_options.txt | 5 +++++
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gio/meson.build b/gio/meson.build
index 9a9e621..6adc014 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -1010,7 +1010,6 @@ endif
subdir('fam')
# Dont build the tests unless we can run them (either natively or in an exe wrapper)
-build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
if build_tests
subdir('tests')
endif
diff --git a/gobject/meson.build b/gobject/meson.build
index c7805c5..fb5874d 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -166,7 +166,6 @@ if enable_systemtap
endif
# Dont build the tests unless we can run them (either natively or in an exe wrapper)
-build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
if build_tests
subdir('tests')
endif
diff --git a/meson.build b/meson.build
index 717d1bc..3124f28 100644
--- a/meson.build
+++ b/meson.build
@@ -2098,7 +2098,7 @@ subdir('gmodule')
subdir('gio')
subdir('fuzzing')
# Dont build the tests unless we can run them (either natively or in an exe wrapper)
-build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
+build_tests = get_option('tests')
if build_tests
subdir('tests')
endif
diff --git a/meson_options.txt b/meson_options.txt
index 2c831e3..90468a7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -90,6 +90,11 @@ option('nls',
yield: true,
description : 'Enable native language support (translations)')
+option('tests',
+ type : 'boolean',
+ value : false,
+ description : 'Build tests')
+
option('oss_fuzz',
type : 'feature',
value : 'disabled',
--
2.21.0