From db0e1f18245abd3288fa76135fc048ec1f495aa4 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Sat, 31 Jul 2021 19:34:07 +0200 Subject: Set symbolic links to C header files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Signed-off-by: Ulrich Müller --- emacs.eselect | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'emacs.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 -- cgit v1.2.3-65-gdbad