summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch99
-rw-r--r--meta/recipes-extended/mc/mc_4.8.23.bb5
2 files changed, 103 insertions, 1 deletions
diff --git a/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch b/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch
new file mode 100644
index 0000000000..e76aac8161
--- /dev/null
+++ b/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch
@@ -0,0 +1,99 @@
1From a54501d3c9541bc8600225aa2d42531f93c6def7 Mon Sep 17 00:00:00 2001
2From: Joshua Watt <JPEWhacker@gmail.com>
3Date: Sat, 9 Nov 2019 20:01:48 -0600
4Subject: [PATCH] Add option to control configure args
5
6Embedding the configure time options into the executable can lead to
7non-reproducible builds, since configure options often have embedded
8paths. Add a configure time option to control if the configure args are
9embedded so this can be disabled.
10
11Upstream-Status: Submitted [https://midnight-commander.org/ticket/4031]
12Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
13---
14 configure.ac | 6 ++++++
15 src/args.c | 6 ++++++
16 src/textconf.c | 2 ++
17 3 files changed, 14 insertions(+)
18
19diff --git a/configure.ac b/configure.ac
20index 19d1a76be..a1948f6b9 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -544,6 +544,12 @@ dnl Clarify do we really need GModule
24 AM_CONDITIONAL([HAVE_GMODULE], [test -n "$g_module_supported" && \
25 test x"$textmode_x11_support" = x"yes" -o x"$enable_aspell" = x"yes"])
26
27+AC_ARG_ENABLE([configure-args],
28+ AS_HELP_STRING([--enable-configure-args], [Handle all compiler warnings as errors]))
29+if test "x$enable_configure_args" != xno; then
30+ AC_DEFINE([ENABLE_CONFIGURE_ARGS], 1, [Define to enable showing configure arguments in help])
31+fi
32+
33 AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments])
34
35 AC_CONFIG_FILES(
36diff --git a/src/args.c b/src/args.c
37index baef1a1c8..f8dc24020 100644
38--- a/src/args.c
39+++ b/src/args.c
40@@ -95,7 +95,9 @@ static gboolean mc_args__nouse_subshell = FALSE;
41 #endif /* ENABLE_SUBSHELL */
42 static gboolean mc_args__show_datadirs = FALSE;
43 static gboolean mc_args__show_datadirs_extended = FALSE;
44+#ifdef ENABLE_CONFIGURE_ARGS
45 static gboolean mc_args__show_configure_opts = FALSE;
46+#endif
47
48 static GOptionGroup *main_group;
49
50@@ -125,6 +127,7 @@ static const GOptionEntry argument_main_table[] = {
51 NULL
52 },
53
54+#ifdef ENABLE_CONFIGURE_ARGS
55 /* show configure options */
56 {
57 "configure-options", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE,
58@@ -132,6 +135,7 @@ static const GOptionEntry argument_main_table[] = {
59 N_("Print configure options"),
60 NULL
61 },
62+#endif
63
64 {
65 "printwd", 'P', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING,
66@@ -758,11 +762,13 @@ mc_args_show_info (void)
67 return FALSE;
68 }
69
70+#ifdef ENABLE_CONFIGURE_ARGS
71 if (mc_args__show_configure_opts)
72 {
73 show_configure_options ();
74 return FALSE;
75 }
76+#endif
77
78 return TRUE;
79 }
80diff --git a/src/textconf.c b/src/textconf.c
81index 1e0613e58..f39b9e028 100644
82--- a/src/textconf.c
83+++ b/src/textconf.c
84@@ -232,10 +232,12 @@ show_datadirs_extended (void)
85
86 /* --------------------------------------------------------------------------------------------- */
87
88+#ifdef ENABLE_CONFIGURE_ARGS
89 void
90 show_configure_options (void)
91 {
92 (void) printf ("%s\n", MC_CONFIGURE_ARGS);
93 }
94+#endif
95
96 /* --------------------------------------------------------------------------------------------- */
97--
982.23.0
99
diff --git a/meta/recipes-extended/mc/mc_4.8.23.bb b/meta/recipes-extended/mc/mc_4.8.23.bb
index 83de8dbb2c..71f61b4848 100644
--- a/meta/recipes-extended/mc/mc_4.8.23.bb
+++ b/meta/recipes-extended/mc/mc_4.8.23.bb
@@ -8,6 +8,7 @@ RDEPENDS_${PN} = "ncurses-terminfo"
8 8
9SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ 9SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
10 file://0001-mc-replace-perl-w-with-use-warnings.patch \ 10 file://0001-mc-replace-perl-w-with-use-warnings.patch \
11 file://0001-Add-option-to-control-configure-args.patch \
11 " 12 "
12SRC_URI[md5sum] = "152927ac29cf0e61d7d019f261bb7d89" 13SRC_URI[md5sum] = "152927ac29cf0e61d7d019f261bb7d89"
13SRC_URI[sha256sum] = "238c4552545dcf3065359bd50753abbb150c1b22ec5a36eaa02c82808293267d" 14SRC_URI[sha256sum] = "238c4552545dcf3065359bd50753abbb150c1b22ec5a36eaa02c82808293267d"
@@ -21,9 +22,11 @@ PACKAGECONFIG ??= ""
21PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba," 22PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
22PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2," 23PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
23 24
24EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x" 25EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --disable-configure-args"
25 26
26CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" 27CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
28CACHED_CONFIGUREVARS += "ac_cv_path_PYTHON='/usr/bin/env python'"
29CACHED_CONFIGUREVARS += "ac_cv_path_GREP='/usr/bin/env grep'"
27 30
28do_install_append () { 31do_install_append () {
29 sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* 32 sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*