summaryrefslogtreecommitdiff
path: root/games-fps/chocolate-doom/files/chocolate-doom-3.0.1-bash-completion-always-install-into-datadir-bash-com.patch
blob: 3931166599f9a48580f971cd3905a0d8e84ac89c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From b9d4c04c840321f5ec70787d8afb1256766aaa01 Mon Sep 17 00:00:00 2001
From: Mike Swanson <mikeonthecomputer@gmail.com>
Date: Tue, 6 Aug 2019 15:40:46 -0700
Subject: [PATCH] bash-completion: always install into $datadir/bash-completion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The bash-completion package by default searches in $HOME/.local and
/usr/local first before /usr, and we should respect local installation
locations instead of always trying to write to a path that is
accessible only to root and could conflict with a package manager.

This removes a toggle in the configure script, which neither actually
worked properly (setting DIR didn’t work) and I believe did the wrong
thing by default anyway.
---
 configure.ac                    | 9 ---------
 man/bash-completion/Makefile.am | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index f12eae68..5ec9dfbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,13 +87,6 @@ AC_CHECK_DECLS([strcasecmp, strncasecmp], [], [], [[#include <strings.h>]])
 AC_CHECK_LIB(i386, i386_iopl)
 AC_CHECK_LIB(amd64, amd64_iopl)
 
-AC_ARG_WITH([bashcompletiondir],
-    AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completion directory]),
-    [],
-    [AS_IF([$($PKG_CONFIG --exists bash-completion 2> /dev/null)],
-        [bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)],
-	[bashcompletiondir=${datadir}/bash-completion/completions])])
-
 case "$host" in
   *-*-mingw* | *-*-cygwin* | *-*-msvc* )
     AC_CHECK_TOOL(WINDRES, windres, )
@@ -153,8 +146,6 @@ AC_SUBST(PACKAGE_URL)
 AC_SUBST(PACKAGE_RDNS)
 AC_SUBST(PACKAGE_ISSUES)
 
-AC_SUBST(bashcompletiondir)
-
 dnl Shut up the datarootdir warnings.
 AC_DEFUN([AC_DATAROOTDIR_CHECKED])
 
diff --git a/man/bash-completion/Makefile.am b/man/bash-completion/Makefile.am
index bb706fc7..9c1400f1 100644
--- a/man/bash-completion/Makefile.am
+++ b/man/bash-completion/Makefile.am
@@ -1,4 +1,4 @@
-bashcompletiondir=@bashcompletiondir@
+bashcompletiondir=@datadir@/bash-completion/completions
 
 BASH_COMPLETION_TEMPLATES = \
     doom.template \
-- 
2.26.2