xref: /OK3568_Linux_fs/buildroot/package/gnuplot/0001-configure-add-without-demo-option.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1Add options to enable/disable docs and demos
2
3Originally written by Anthony Viallard
4<viallard@syscom-instruments.com>.
5
6Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7[Vincent: adapt patch to 5.0.5 version]
8Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
9[Michael: adapt patch to 5.4.0 version]
10Signed-off-by: Michael Fischer <mf@go-sys.de>
11
12diff -Naur a/configure.ac b/configure.ac
13--- a/configure.ac	2020-07-12 02:29:47.000000000 +0200
14+++ b/configure.ac	2020-08-06 14:21:17.918756893 +0200
15@@ -713,6 +713,17 @@
16                [ Define if you want to read .gnuplot from current directory (SECURITY RISK!).])
17 fi
18
19+dnl Whether we want to build the doc files
20+dnl Does nothing here, is passed on to the doc subdir
21+AC_ARG_ENABLE(doc,dnl
22+[  --disable-doc    do not build doc files])
23+
24+dnl Whether we want to build the demo files
25+dnl Does nothing here, is passed on to the demo subdir
26+AC_ARG_ENABLE(demo,dnl
27+[  --disable-demo    do not build demo files])
28+
29+
30 dnl Sort help/subtopic tables by row or column
31 AC_ARG_WITH(row-help,dnl
32 [  --with-row-help         format help and subtopic tables by row (default)
33@@ -1095,6 +1106,24 @@
34   AC_DEFINE_UNQUOTED([DIST_CONTACT],["$DIST_CONTACT"],[Contact address for modified and binary distributed gnuplot versions])
35 fi
36
37+dnl build doc files
38+if test "$enable_doc" != no; then
39+  AC_CONFIG_SUBDIRS(docs)
40+  DOCSUBDIR=docs
41+else
42+  DOCSUBDIR=
43+fi
44+AC_SUBST(DOCSUBDIR)
45+
46+dnl build demo files
47+if test "$enable_demo" != no; then
48+  AC_CONFIG_SUBDIRS(demo)
49+  DEMOSUBDIR=demo
50+else
51+  DEMOSUBDIR=
52+fi
53+AC_SUBST(DEMOSUBDIR)
54+
55 dnl Substitute variables
56 AC_SUBST(PACKAGE)
57 AC_SUBST(VERSION_MAJOR)
58diff -Naur a/Makefile.am b/Makefile.am
59--- a/Makefile.am	2020-03-31 19:28:16.000000000 +0200
60+++ b/Makefile.am	2020-08-06 14:34:12.995097799 +0200
61@@ -1,7 +1,7 @@
62 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
63 AUTOMAKE_OPTIONS = foreign
64
65-SUBDIRS = config m4 term src docs man demo share
66+SUBDIRS = config m4 term src $(DOCSUBDIR) man $(DEMOSUBDIR) share
67
68 EXTRA_DIST = BUGS Copyright FAQ.pdf INSTALL INSTALL.gnu \
69 PATCHLEVEL PGPKEYS README RELEASE_NOTES \
70