declare -x ABI="amd64" declare -x ABI_MIPS="" declare -x ABI_PPC="" declare -x ABI_S390="" declare -x ABI_X86="64" declare -x ALSA_CARDS="" declare -x ANT_HOME="/usr/share/ant" declare -x APACHE2_MODULES="" declare -x APACHE2_MPMS="" declare -x ARCH="amd64" declare BDEPEND="" declare -x BOOTSTRAP_USE="cxx unicode internal-glib split-usr python_targets_python3_6 python_targets_python2_7 multilib" declare -- BYTECOMPFLAGS="-L ." declare -x CALLIGRA_EXPERIMENTAL_FEATURES="" declare -x CALLIGRA_FEATURES="" declare -x CAMERAS="" declare -x CBUILD="x86_64-pc-linux-gnu" declare -x CFLAGS="-O2 -pipe -march=native" declare -x CFLAGS_amd64="-m64" declare -x CFLAGS_x32="-mx32" declare -x CFLAGS_x86="-m32" declare -x CHOST="x86_64-pc-linux-gnu" declare -x CHOST_amd64="x86_64-pc-linux-gnu" declare -x CHOST_x32="x86_64-pc-linux-gnux32" declare -x CHOST_x86="i686-pc-linux-gnu" declare -x COLLECTD_PLUGINS="" declare -x CPU_FLAGS_ARM="" declare -x CPU_FLAGS_X86="" declare -x CURL_SSL="" declare -x CXXFLAGS="-O2 -pipe -march=native" declare -x DEFAULT_ABI="amd64" declare -x DEFINED_PHASES=" compile configure install postinst postrm prepare setup test unpack" declare DEPEND="sys-apps/texinfo >=virtual/emacs-23" declare DESCRIPTION="Mode for editing (and running) Haskell programs in Emacs" declare -x DESTTREE="/usr" declare -x DIROPTIONS="-m0755" declare -- DOCS="NEWS README.md" declare -x EAPI="6" declare -x EGO_BUILD_FLAGS="-p 1" declare -x ELIBC="glibc" declare -- ELISP_TEXINFO="doc/haskell-mode.texi" declare -- EMACS="/usr/bin/emacs" declare -- EMACSFLAGS="-batch -q --no-site-file" declare -x ENLIGHTENMENT_MODULES="" declare -x ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" declare -x EXEOPTIONS="-m0755" declare -x FCFLAGS="-O2 -pipe" declare -x FETCHCOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && port= ; exec rsync --rsh=\\\"ssh \\\${port:+-p\\\${port}} \\\${3}\\\" -avP \\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" \"\${URI}\" \"\${PORTAGE_SSH_OPTS}\"" declare -x FFLAGS="-O2 -pipe" declare -x FFTOOLS="" declare -x FLTK_DOCDIR="/usr/share/doc/fltk-1.3.4/html" declare -x GCC_COLORS="" declare -x GCC_SPECS="" declare -x GO19CONCURRENTCOMPILATION="0" declare -x GOMAXPROCS="1" declare -x GPSD_PROTOCOLS="" declare -x GREP_COLORS="never" declare -x GRUB_PLATFORMS="" declare -x GSETTINGS_BACKEND="dconf" declare -x GUILE_LOAD_PATH="/usr/share/guile/1.8" declare HDEPEND="" declare HOMEPAGE="https://haskell.github.io/haskell-mode/ https://www.haskell.org/haskellwiki/Emacs#Haskell-mode" declare -x INHERITED=" elisp-common elisp" declare -x INPUT_DEVICES="" declare -x INSDESTTREE="" declare -x INSOPTIONS="-m0644" declare IUSE="" declare -x IUSE_EFFECTIVE="abi_x86_64 alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 elibc_AIX elibc_Cygwin elibc_Darwin elibc_DragonFly elibc_FreeBSD elibc_HPUX elibc_Interix elibc_NetBSD elibc_OpenBSD elibc_SunOS elibc_Winnt elibc_bionic elibc_glibc elibc_mingw elibc_mintlib elibc_musl elibc_uclibc hppa ia64 kernel_AIX kernel_Darwin kernel_FreeBSD kernel_HPUX kernel_NetBSD kernel_OpenBSD kernel_SunOS kernel_Winnt kernel_freemint kernel_linux m68k m68k-mint mips ppc ppc-aix ppc-macos ppc64 ppc64-linux prefix prefix-chain prefix-guest s390 sh sparc sparc-solaris sparc64-solaris userland_BSD userland_GNU x64-cygwin x64-macos x64-solaris x86 x86-cygwin x86-fbsd x86-linux x86-macos x86-solaris x86-winnt" declare -x IUSE_IMPLICIT="abi_x86_64 prefix prefix-chain prefix-guest" declare -x JAVAC="/etc/java-config-2/current-system-vm/bin/javac" declare -x JAVA_HOME="/etc/java-config-2/current-system-vm" declare -x JDK_HOME="/etc/java-config-2/current-system-vm" declare -x KERNEL="linux" declare -x KEYWORDS="~amd64 ~ppc ~sparc ~x86" declare -x L10N="" declare -x LADSPA_PATH="/usr/lib64/ladspa" declare -x LANG="en_US.UTF-8" declare -x LCD_DEVICES="" declare -x LC_COLLATE="C" declare -x LC_MESSAGES="C" declare -x LDFLAGS="-Wl,-O1 -Wl,--as-needed" declare -x LDFLAGS_amd64="-m elf_x86_64" declare -x LDFLAGS_x32="-m elf32_x86_64" declare -x LDFLAGS_x86="-m elf_i386" declare -x LIBDIR_amd64="lib64" declare -x LIBDIR_x32="libx32" declare -x LIBDIR_x86="lib32" declare -x LIBOPTIONS="-m0644" declare -x LIBREOFFICE_EXTENSIONS="" declare -x LICENSE="GPL-3+ FDL-1.2+" declare -x LIRC_DEVICES="" declare -x LLVM_TARGETS="" declare -x MAKEOPTS="-j1" declare -x MANPAGER="manpager" declare -x MONKEYD_PLUGINS="" declare -x MOZ_GMP_PATH="/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed" declare -x MULTILIB_ABIS="amd64 x86" declare -x MULTILIB_STRICT_DENY="64-bit.*shared object" declare -x MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib" declare -x MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev|systemd|clang|python-exec|llvm)" declare -x NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" declare -x NETBEANS_MODULES="" declare -x NGINX_MODULES_HTTP="" declare -x NGINX_MODULES_MAIL="" declare -x NGINX_MODULES_STREAM="" declare -x NINJAFLAGS="-j1" declare -x OFED_DRIVERS="" declare -x OFFICE_IMPLEMENTATION="" declare -x OPENGL_PROFILE="xorg-x11" declare -x OPENMPI_FABRICS="" declare -x OPENMPI_OFED_FEATURES="" declare -x OPENMPI_RM="" declare -x PATH="/usr/lib/portage/python3.6/ebuild-helpers/xattr:/usr/lib/portage/python3.6/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/7.3.1:/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin" declare -x PAX_MARKINGS="none" declare PDEPEND="" declare -x PHP_TARGETS="" declare -x PKG_CONFIG_PATH="/usr/lib64/pkgconfig" declare -x PORTAGE_COMPRESSION_COMMAND="bzip2" declare -a PORTAGE_DOCOMPRESS=([0]="/usr/share/doc" [1]="/usr/share/info" [2]="/usr/share/man") declare -x PORTAGE_DOCOMPRESS_SIZE_LIMIT="128" declare -a PORTAGE_DOCOMPRESS_SKIP=([0]="/usr/share/doc/haskell-mode-16.1/html") declare -a PORTAGE_DOSTRIP=([0]="/") declare -a PORTAGE_DOSTRIP_SKIP=() declare -x POSTGRES_TARGETS="" declare -x PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND" declare -x PROPERTIES="" declare -x PYTHIA8DATA="/usr/share/pythia8/xmldoc" declare -x PYTHONDONTWRITEBYTECODE="1" declare -x PYTHONPATH="/usr/lib/entropy/lib" declare -x PYTHON_SINGLE_TARGET="" declare -x PYTHON_TARGETS="" declare -x QEMU_SOFTMMU_TARGETS="" declare -x QEMU_USER_TARGETS="" declare RDEPEND=">=virtual/emacs-23" declare REPOSITORY declare REQUIRED_USE="" declare -x RESTRICT="" declare -x RESUMECOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && port= ; exec rsync --rsh=\\\"ssh \\\${port:+-p\\\${port}} \\\${3}\\\" -avP \\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" \"\${URI}\" \"\${PORTAGE_SSH_OPTS}\"" declare -x ROS_MESSAGES="" declare -x RUBY_TARGETS="" declare -x RUSTFLAGS="-C codegen-units=1" declare -x RUST_TEST_TASKS="1" declare -x RUST_TEST_THREADS="1" declare -x S="/var/tmp/portage/app-emacs/haskell-mode-16.1/work/haskell-mode-16.1" declare -x SANDBOX_DEBUG="0" declare -x SANDBOX_DENY="" declare -x SANDBOX_PREDICT="/var/tmp/portage/app-emacs/haskell-mode-16.1/homedir:/proc/self/coredump_filter:/var/cache/fontconfig" declare -x SANDBOX_READ="/:/var/tmp" declare -x SANDBOX_VERBOSE="1" declare -x SANDBOX_WRITE=":/dev/console:/dev/fd:/dev/full:/dev/null:/dev/ptmx:/dev/pts/:/dev/pty:/dev/shm:/dev/tts:/dev/tty:/dev/vc/:/dev/zero:/proc/self/fd:/tmp/:/usr/lib/cf:/usr/lib/conftest:/usr/lib32/cf:/usr/lib32/conftest:/usr/lib64/cf:/usr/lib64/conftest:/usr/tmp/cf:/usr/tmp/conftest:/var/tmp:/var/tmp/:/var/tmp/portage/app-emacs/haskell-mode-16.1/homedir/.bash_history" declare -x SANE_BACKENDS="" declare -x SHELL="/bin/bash" declare -- SITEETC="/usr/share/emacs/etc" declare -- SITEFILE="50haskell-mode-gentoo.el" declare -- SITELISP="/usr/share/emacs/site-lisp" declare -x SLOT="0" declare SRC_URI="https://github.com/haskell/haskell-mode/archive/v16.1.tar.gz -> haskell-mode-16.1.tar.gz" declare -x SSH_ASKPASS="/usr/bin/ssh-askpass-fullscreen" declare -x SYMLINK_LIB="yes" declare -x SYSROOT="" declare -x TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1" declare -x USE="abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU" declare -x USERLAND="GNU" declare -x USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND" declare -x USE_EXPAND_UNPREFIXED="ARCH" declare -x USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 hppa ia64 m68k m68k-mint mips ppc ppc64 ppc64-linux ppc-aix ppc-macos s390 sh sparc sparc64-solaris sparc-solaris x64-cygwin x64-macos x64-solaris x86 x86-cygwin x86-fbsd x86-linux x86-macos x86-solaris x86-winnt" declare -x USE_EXPAND_VALUES_ELIBC="AIX bionic Cygwin Darwin DragonFly FreeBSD glibc HPUX Interix mingw mintlib musl NetBSD OpenBSD SunOS uclibc Winnt" declare -x USE_EXPAND_VALUES_KERNEL="AIX Darwin FreeBSD freemint HPUX linux NetBSD OpenBSD SunOS Winnt" declare -x USE_EXPAND_VALUES_USERLAND="BSD GNU" declare -x UWSGI_PLUGINS="" declare -x VIDEO_CARDS="" declare -x VOICEMAIL_STORAGE="" declare -x XDG_CACHE_HOME="/root/cache" declare -x XDG_CONFIG_DIRS="/etc/xdg" declare -x XDG_CONFIG_HOME="/root/config" declare -x XDG_DATA_DIRS="/usr/local/share:/usr/share" declare -x XDG_DATA_HOME="/root/share" declare -x XDG_DESKTOP_DIR="/root/Desktop" declare -x XDG_DOCUMENTS_DIR="/root/Documents" declare -x XDG_DOWNLOAD_DIR="/root/Downloads" declare -x XDG_MUSIC_DIR="/root/Music" declare -x XDG_PICTURES_DIR="/root/Pictures" declare -x XDG_PUBLICSHARE_DIR="/root/Public" declare -x XDG_RUNTIME_DIR="/root/run" declare -x XDG_TEMPLATES_DIR="/root/Templates" declare -x XDG_VIDEOS_DIR="/root/Videos" declare -x XFCE_PLUGINS="" declare -x XTABLES_ADDONS="" declare -x _E_DOCDESTTREE_="" declare -x _E_EXEDESTTREE_="" declare -- phase_func __eapi6_src_install () { if [[ -f Makefile || -f GNUmakefile || -f makefile ]]; then emake DESTDIR="${D}" install; fi; einstalldocs } __eapi6_src_prepare () { if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}"; else if [[ -n ${PATCHES} ]]; then eapply ${PATCHES}; fi; fi; eapply_user } eapply () { local failed patch_cmd=patch; local -x LC_COLLATE=POSIX; type -P gpatch > /dev/null && patch_cmd=gpatch; function _eapply_patch () { local f=${1}; local prefix=${2}; started_applying=1; ebegin "${prefix:-Applying }${f##*/}"; ${patch_cmd} -p1 -f -s -g0 --no-backup-if-mismatch "${patch_options[@]}" < "${f}"; failed=${?}; if ! eend "${failed}"; then __helpers_die "patch -p1 ${patch_options[*]} failed with ${f}"; fi }; local patch_options=() files=(); local i found_doublehyphen; for ((i = 1; i <= ${#@}; ++i )) do if [[ ${@:i:1} == -- ]]; then patch_options=("${@:1:i-1}"); files=("${@:i+1}"); found_doublehyphen=1; break; fi; done; if [[ -z ${found_doublehyphen} ]]; then for ((i = 1; i <= ${#@}; ++i )) do if [[ ${@:i:1} != -* ]]; then patch_options=("${@:1:i-1}"); files=("${@:i}"); break; fi; done; for i in "${files[@]}"; do if [[ ${i} == -* ]]; then die "eapply: all options must be passed before non-options"; fi; done; fi; if [[ ${#files[@]} -eq 0 ]]; then die "eapply: no files specified"; fi; local f; for f in "${files[@]}"; do if [[ -d ${f} ]]; then function _eapply_get_files () { local LC_ALL=POSIX; local prev_shopt=$(shopt -p nullglob); shopt -s nullglob; local f; for f in "${1}"/*; do if [[ ${f} == *.diff || ${f} == *.patch ]]; then files+=("${f}"); fi; done; ${prev_shopt} }; local files=(); _eapply_get_files "${f}"; [[ ${#files[@]} -eq 0 ]] && die "No *.{patch,diff} files in directory ${f}"; einfo "Applying patches from ${f} ..."; local f2; for f2 in "${files[@]}"; do _eapply_patch "${f2}" ' '; [[ ${failed} -ne 0 ]] && return "${failed}"; done; else _eapply_patch "${f}"; [[ ${failed} -ne 0 ]] && return "${failed}"; fi; done; return 0 } eapply_user () { [[ ${EBUILD_PHASE} == prepare ]] || die "eapply_user() called during invalid phase: ${EBUILD_PHASE}"; local tagfile=${T}/.portage_user_patches_applied; [[ -f ${tagfile} ]] && return; >> "${tagfile}"; local basedir=${PORTAGE_CONFIGROOT%/}/etc/portage/patches; local applied d f; local -A _eapply_user_patches; local prev_shopt=$(shopt -p nullglob); shopt -s nullglob; for d in "${basedir}"/${CATEGORY}/{${P}-${PR},${P},${PN}}{:${SLOT%/*},}; do for f in "${d}"/*; do if [[ ( ${f} == *.diff || ${f} == *.patch ) && -z ${_eapply_user_patches[${f##*/}]} ]]; then _eapply_user_patches[${f##*/}]=${f}; fi; done; done; if [[ ${#_eapply_user_patches[@]} -gt 0 ]]; then while read -r -d '' f; do f=${_eapply_user_patches[${f}]}; if [[ -s ${f} ]]; then eapply "${f}"; applied=1; fi; done < <(printf -- '%s\0' "${!_eapply_user_patches[@]}" | LC_ALL=C sort -z); fi; ${prev_shopt}; [[ -n ${applied} ]] && ewarn "User patches applied." } einstalldocs () { ( if ! declare -p DOCS &> /dev/null; then local d; for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS FAQ CREDITS CHANGELOG; do [[ -f ${d} && -s ${d} ]] && docinto / && dodoc "${d}"; done; else if [[ $(declare -p DOCS) == "declare -a"* ]]; then [[ ${#DOCS[@]} -gt 0 ]] && docinto / && dodoc -r "${DOCS[@]}"; else [[ -n ${DOCS} ]] && docinto / && dodoc -r ${DOCS}; fi; fi ); ( if [[ $(declare -p HTML_DOCS 2>/dev/null) == "declare -a"* ]]; then [[ ${#HTML_DOCS[@]} -gt 0 ]] && docinto html && dodoc -r "${HTML_DOCS[@]}"; else [[ -n ${HTML_DOCS} ]] && docinto html && dodoc -r ${HTML_DOCS}; fi ) } elisp-compile () { ebegin "Compiling GNU Emacs Elisp files"; ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@"; eend $? "elisp-compile: batch-byte-compile failed" || die } elisp-emacs-version () { local version ret; echo "(princ emacs-version)" > "${T}"/emacs-version.el; version=$( # EMACS could be a microemacs variant that ignores the -batch # option and would therefore hang, waiting for user interaction. # Redirecting stdin and unsetting TERM and DISPLAY will cause # most of them to exit with an error. unset TERM DISPLAY ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el "${f}" <<-EOF ;;; ${f##*/} --- autoloads for ${PN} ;;; Commentary: ;; Automatically generated by elisp-common.eclass ;; DO NOT EDIT THIS FILE ;;; Code: ${page} ;; Local ${null}Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t ;; End: ;;; ${f##*/} ends here EOF ${EMACS} ${EMACSFLAGS} --eval "(setq make-backup-files nil)" --eval "(setq generated-autoload-file (expand-file-name \"${f}\"))" -f batch-update-autoloads "${@-.}"; eend $? "elisp-make-autoload-file: batch-update-autoloads failed" || die } elisp-need-emacs () { local need_emacs=$1 have_emacs; have_emacs=$(elisp-emacs-version) || return 2; einfo "Emacs version: ${have_emacs}"; if [[ ${have_emacs} =~ XEmacs|Lucid ]]; then eerror "This package needs GNU Emacs."; return 1; fi; if ! [[ ${have_emacs%%.*} -ge ${need_emacs%%.*} ]]; then eerror "This package needs at least Emacs ${need_emacs%%.*}."; eerror "Use \"eselect emacs\" to select the active version."; return 1; fi; return 0 } elisp-site-file-install () { local sf="${1##*/}" my_pn="${2:-${PN}}" ret; local header=";;; ${PN} site-lisp configuration"; [[ ${sf} == [0-9][0-9]*-gentoo*.el ]] || ewarn "elisp-site-file-install: bad name of site-init file"; [[ ${sf%-gentoo*.el} != "${sf}" ]] && sf="${sf%-gentoo*.el}-gentoo.el"; sf="${T}/${sf}"; ebegin "Installing site initialisation file for GNU Emacs"; [[ $1 = "${sf}" ]] || cp "$1" "${sf}"; sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" -e "s:@SITELISP@:${EPREFIX}${SITELISP}/${my_pn}:g" -e "s:@SITEETC@:${EPREFIX}${SITEETC}/${my_pn}:g;\$q" "${sf}"; ( insinto "${SITELISP}/site-gentoo.d"; doins "${sf}" ); ret=$?; rm -f "${sf}"; eend ${ret} "elisp-site-file-install: doins failed" || die } elisp-site-regen () { local sitelisp=${ROOT%/}${EPREFIX}${SITELISP}; local sf i ret=0 null="" page=' '; local -a sflist; if [[ ${EBUILD_PHASE} = *rm && ! -e ${sitelisp}/site-gentoo.el ]]; then ewarn "Refusing to create site-gentoo.el in ${EBUILD_PHASE} phase."; return 0; fi; [[ -d ${sitelisp} ]] || die "elisp-site-regen: Directory ${sitelisp} does not exist"; [[ -d ${T} ]] || die "elisp-site-regen: Temporary directory ${T} does not exist"; ebegin "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE})"; for sf in "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el; do [[ -r ${sf} ]] && sflist+=("${sf}"); done; cat > "${T}"/site-gentoo.el <<-EOF || ;;; site-gentoo.el --- site initialisation for Gentoo-installed packages ;;; Commentary: ;; Automatically generated by elisp-common.eclass ;; DO NOT EDIT THIS FILE ;;; Code: EOF ret=$? sed '$q' "${sflist[@]}" < /dev/null >> "${T}"/site-gentoo.el || ret=$?; cat >> "${T}"/site-gentoo.el <<-EOF || ${page} (provide 'site-gentoo) ;; Local ${null}Variables: ;; no-byte-compile: t ;; buffer-read-only: t ;; End: ;;; site-gentoo.el ends here EOF ret=$? if [[ ${ret} -ne 0 ]]; then eend ${ret} "elisp-site-regen: Writing site-gentoo.el failed."; die; else if cmp -s "${sitelisp}"/site-gentoo.el "${T}"/site-gentoo.el; then rm -f "${T}"/site-gentoo.el; eend; einfo "... no changes."; else mv "${T}"/site-gentoo.el "${sitelisp}"/site-gentoo.el; eend $? "elisp-site-regen: Replacing site-gentoo.el failed" || die; case ${#sflist[@]} in 0) [[ ${PN} = emacs-common-gentoo ]] || ewarn "... Huh? No site initialisation files found." ;; 1) einfo "... ${#sflist[@]} site initialisation file included." ;; *) einfo "... ${#sflist[@]} site initialisation files included." ;; esac; fi; fi; return 0 } elisp_pkg_postinst () { elisp-site-regen; if declare -f readme.gentoo_print_elog > /dev/null; then readme.gentoo_print_elog; fi } elisp_pkg_postrm () { elisp-site-regen } elisp_pkg_setup () { elisp-need-emacs "${NEED_EMACS:-23}"; case $? in 0) ;; 1) die "Emacs version too low" ;; *) die "Could not determine Emacs version" ;; esac } elisp_src_compile () { elisp-compile *.el; if [[ -n ${ELISP_TEXINFO} ]]; then makeinfo ${ELISP_TEXINFO} || die; fi } elisp_src_configure () { : } elisp_src_install () { elisp-install ${PN} *.el *.elc; if [[ -n ${SITEFILE} ]]; then elisp-site-file-install "${FILESDIR}/${SITEFILE}"; fi; if [[ -n ${ELISP_TEXINFO} ]]; then set -- ${ELISP_TEXINFO}; set -- ${@##*/}; doinfo ${@/%.*/.info*} || die; fi; if [[ -n ${DOCS} ]]; then dodoc ${DOCS} || die; fi; if declare -f readme.gentoo_create_doc > /dev/null; then readme.gentoo_create_doc; fi } elisp_src_prepare () { local patch file; for patch in ${ELISP_PATCHES}; do if [[ -f ${patch} ]]; then file="${patch}"; else if [[ -f ${WORKDIR}/${patch} ]]; then file="${WORKDIR}/${patch}"; else if [[ -f ${FILESDIR}/${patch} ]]; then file="${FILESDIR}/${patch}"; else die "Cannot find ${patch}"; fi; fi; fi; case ${EAPI:-0} in 0 | 1 | 2 | 3 | 4 | 5) epatch "${file}" ;; *) eapply "${file}" ;; esac; done; case ${EAPI:-0} in 0 | 1 | 2 | 3 | 4 | 5) epatch_user ;; *) eapply_user ;; esac; if [[ -n ${ELISP_REMOVE} ]]; then rm ${ELISP_REMOVE} || die; fi } elisp_src_unpack () { [[ -n ${A} ]] && unpack ${A}; if [[ -f ${P}.el ]]; then mv ${P}.el ${PN}.el || die; [[ -d ${S} ]] || S=${WORKDIR}; fi; case ${EAPI:-0} in 0 | 1) [[ -d ${S} ]] && cd "${S}"; elisp_src_prepare ;; esac } get_libdir () { local libdir_var="LIBDIR_${ABI}"; local libdir="lib"; [[ -n ${ABI} && -n ${!libdir_var} ]] && libdir=${!libdir_var}; echo "${libdir}" } in_iuse () { local use=${1}; if [[ -z "${use}" ]]; then echo "!!! in_iuse() called without a parameter." 1>&2; echo "!!! in_iuse " 1>&2; die "in_iuse() called without a parameter"; fi; local liuse=(${IUSE_EFFECTIVE}); has "${use}" "${liuse[@]#[+-]}" } pkg_nofetch () { default } pkg_postinst () { elisp_pkg_postinst "$@" } pkg_postrm () { elisp_pkg_postrm "$@" } pkg_setup () { elisp_pkg_setup "$@" } src_compile () { elisp_src_compile; elisp-make-autoload-file haskell-site-file.el } src_configure () { elisp_src_configure "$@" } src_install () { elisp_src_install; insinto "${SITEETC}/${PN}"; doins logo.svg } src_prepare () { sed -i -e "/defconst haskell-process-logo/{n;" -e "s:(.*\"\\(.*\\)\".*):\"${SITEETC}/${PN}/\\1\":}" haskell-process.el || die; eapply_user } src_test () { emake check-ert } src_unpack () { elisp_src_unpack "$@" }