Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/emacs-tools:eselect-emacs commit in: /
Date: Sat, 31 Jul 2021 17:39:47
Message-Id: 1627752847.db0e1f18245abd3288fa76135fc048ec1f495aa4.ulm@gentoo
1 commit: db0e1f18245abd3288fa76135fc048ec1f495aa4
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 31 17:34:07 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 31 17:34:07 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=db0e1f18
7
8 Set symbolic links to C header files
9
10 * emacs.eselect (set_header_symlinks): New function, set symbolic
11 links to C header files. Bug 805491.
12 (set_symlinks): Call it.
13 (remove_symlinks): Remove symlinks to header files.
14 (HEADERLIST): New variable.
15
16 Bug: https://bugs.gentoo.org/805491
17 Reported-by: akater <nuclearspace <AT> gmail.com>
18 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
19
20 ChangeLog | 8 ++++++++
21 emacs.eselect | 16 ++++++++++++++++
22 2 files changed, 24 insertions(+)
23
24 diff --git a/ChangeLog b/ChangeLog
25 index f78ae66..b04b0fa 100644
26 --- a/ChangeLog
27 +++ b/ChangeLog
28 @@ -1,3 +1,11 @@
29 +2021-07-31 Ulrich Müller <ulm@g.o>
30 +
31 + * emacs.eselect (set_header_symlinks): New function, set symbolic
32 + links to C header files. Bug 805491.
33 + (set_symlinks): Call it.
34 + (remove_symlinks): Remove symlinks to header files.
35 + (HEADERLIST): New variable.
36 +
37 2014-12-23 Ulrich Müller <ulm@g.o>
38
39 * Makefile (all): Explicitly depend on etags.eselect.
40
41 diff --git a/emacs.eselect b/emacs.eselect
42 index dfffb58..775fd49 100644
43 --- a/emacs.eselect
44 +++ b/emacs.eselect
45 @@ -27,6 +27,7 @@ VERSION="1.18"
46 # ctags and etags are handled in their own module
47 BINARYLIST="emacsclient b2m ebrowse rcs-checkin grep-changelog"
48 MANPAGELIST="${BINARYLIST}"
49 +HEADERLIST="emacs-module.h"
50
51 find_targets() {
52 # Return the list of available Emacs binaries
53 @@ -57,6 +58,9 @@ remove_symlinks() {
54 for f in emacs ${MANPAGELIST}; do
55 rm -f "${EROOT}/usr/share/man/man1/${f}.1"*
56 done
57 + for f in ${HEADERLIST}; do
58 + rm -f "${EROOT}/usr/include/${f}"
59 + done
60 remove_infopath
61 }
62
63 @@ -87,6 +91,17 @@ set_man_symlinks() {
64 done
65 }
66
67 +set_header_symlinks() {
68 + # Set symlinks to header files in /usr/include/
69 + local target=$1 f
70 + for f in ${HEADERLIST}; do
71 + if [[ -f ${EROOT}/usr/include/${target}/${f} ]]; then
72 + ln -s "${target}/${f}" "${EROOT}/usr/include/${f}" \
73 + || die "Couldn't set ${EROOT}/usr/include/${f} symlink"
74 + fi
75 + done
76 +}
77 +
78 set_symlinks() {
79 # Set symlinks to binaries and man pages, update info path
80 local target=$1 nomain=$2 targets suffix i
81 @@ -120,6 +135,7 @@ set_symlinks() {
82 fi
83 set_bin_symlinks "${target}"
84 set_man_symlinks "${target}"
85 + set_header_symlinks "${target}"
86 set_infopath "${target}"
87
88 # update /etc/profile.env from /etc/env.d files