xref: /OK3568_Linux_fs/buildroot/package/procps-ng/0001-configure-Add--disable-w.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 1524a625e693b956ce0b5091c9f89f24fb7e8614 Mon Sep 17 00:00:00 2001
2From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
3Date: Fri, 23 Apr 2021 15:58:36 -0400
4Subject: [PATCH] configure: Add --disable-w
5
6[Retrieved (and backported) from:
7https://gitlab.com/procps-ng/procps/-/commit/1524a625e693b956ce0b5091c9f89f24fb7e8614]
8Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
9---
10 Makefile.am  | 21 +++++++++++++++------
11 configure.ac |  6 ++++++
12 2 files changed, 21 insertions(+), 6 deletions(-)
13
14diff --git a/Makefile.am b/Makefile.am
15index de15e137..d2356872 100644
16--- a/Makefile.am
17+++ b/Makefile.am
18@@ -47,8 +47,7 @@ bin_PROGRAMS = \
19 	pwdx \
20 	tload \
21 	uptime \
22-	vmstat \
23-	w
24+	vmstat
25 if BUILD_PWAIT
26 bin_PROGRAMS += pwait
27 endif
28@@ -60,8 +59,7 @@ usrbin_exec_PROGRAMS += \
29 	pkill \
30 	pmap \
31 	uptime \
32-	vmstat \
33-	w
34+	vmstat
35 endif
36
37 lib_LTLIBRARIES = \
38@@ -74,7 +72,6 @@ dist_man_MANS = \
39 	pmap.1 \
40 	uptime.1 \
41 	vmstat.8 \
42-	w.1 \
43 	ps/procps.1
44
45 if !CYGWIN
46@@ -137,6 +134,19 @@ else
47   EXTRA_DIST += kill.1
48 endif
49
50+if BUILD_W
51+if CYGWIN
52+usrbin_exec_PROGRAMS += w
53+else
54+bin_PROGRAMS += w
55+endif
56+
57+dist_man_MANS += w.1
58+w_SOURCES = w.c lib/fileutils.c
59+else
60+  EXTRA_DIST += w.1
61+endif
62+
63 if WITH_NCURSES
64 if !CYGWIN
65 bin_PROGRAMS += \
66@@ -213,7 +223,6 @@ endif
67 tload_SOURCES = tload.c lib/strutils.c lib/fileutils.c
68 uptime_SOURCES = uptime.c lib/fileutils.c
69 vmstat_SOURCES = vmstat.c lib/strutils.c lib/fileutils.c
70-w_SOURCES = w.c lib/fileutils.c
71
72 # proc/libprocps.la
73
74diff --git a/configure.ac b/configure.ac
75index 750c0fbb..3e83fb88 100644
76--- a/configure.ac
77+++ b/configure.ac
78@@ -234,6 +234,12 @@ AC_ARG_ENABLE([kill],
79   [], [enable_kill=yes]
80 )
81 AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
82+AC_ARG_ENABLE([w],
83+  AS_HELP_STRING([--disable-w], [do not build w]),
84+  [], [enable_w=yes]
85+)
86+AM_CONDITIONAL(BUILD_W, test "x$enable_w" = xyes)
87+
88 AM_CONDITIONAL(LINUX, test "x$host_os" = xlinux-gnu)
89 AM_CONDITIONAL(CYGWIN, test "x$host_os" = xcygwin)
90
91--
92GitLab
93
94