commit: db0e1f18245abd3288fa76135fc048ec1f495aa4 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sat Jul 31 17:34:07 2021 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sat Jul 31 17:34:07 2021 +0000 URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=db0e1f18
Set symbolic links to C header files * emacs.eselect (set_header_symlinks): New function, set symbolic links to C header files. Bug 805491. (set_symlinks): Call it. (remove_symlinks): Remove symlinks to header files. (HEADERLIST): New variable. Bug: https://bugs.gentoo.org/805491 Reported-by: akater <nuclearspace <AT> gmail.com> Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> ChangeLog | 8 ++++++++ emacs.eselect | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index f78ae66..b04b0fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2021-07-31 Ulrich Müller <[email protected]> + + * emacs.eselect (set_header_symlinks): New function, set symbolic + links to C header files. Bug 805491. + (set_symlinks): Call it. + (remove_symlinks): Remove symlinks to header files. + (HEADERLIST): New variable. + 2014-12-23 Ulrich Müller <[email protected]> * Makefile (all): Explicitly depend on etags.eselect. diff --git a/emacs.eselect b/emacs.eselect index dfffb58..775fd49 100644 --- a/emacs.eselect +++ b/emacs.eselect @@ -27,6 +27,7 @@ VERSION="1.18" # ctags and etags are handled in their own module BINARYLIST="emacsclient b2m ebrowse rcs-checkin grep-changelog" MANPAGELIST="${BINARYLIST}" +HEADERLIST="emacs-module.h" find_targets() { # Return the list of available Emacs binaries @@ -57,6 +58,9 @@ remove_symlinks() { for f in emacs ${MANPAGELIST}; do rm -f "${EROOT}/usr/share/man/man1/${f}.1"* done + for f in ${HEADERLIST}; do + rm -f "${EROOT}/usr/include/${f}" + done remove_infopath } @@ -87,6 +91,17 @@ set_man_symlinks() { done } +set_header_symlinks() { + # Set symlinks to header files in /usr/include/ + local target=$1 f + for f in ${HEADERLIST}; do + if [[ -f ${EROOT}/usr/include/${target}/${f} ]]; then + ln -s "${target}/${f}" "${EROOT}/usr/include/${f}" \ + || die "Couldn't set ${EROOT}/usr/include/${f} symlink" + fi + done +} + set_symlinks() { # Set symlinks to binaries and man pages, update info path local target=$1 nomain=$2 targets suffix i @@ -120,6 +135,7 @@ set_symlinks() { fi set_bin_symlinks "${target}" set_man_symlinks "${target}" + set_header_symlinks "${target}" set_infopath "${target}" # update /etc/profile.env from /etc/env.d files
