New snapshot of trunk.
authorUlrich Müller <ulm@gentoo.org>
Sat, 3 Jan 2015 12:18:41 +0000 (12:18 +0000)
committerUlrich Müller <ulm@gentoo.org>
Sat, 3 Jan 2015 12:18:41 +0000 (12:18 +0000)
Package-Manager: portage-2.2.15/cvs/Linux x86_64
Manifest-Sign-Key: 0x9433907D693FB5B8!

app-editors/emacs-vcs/ChangeLog
app-editors/emacs-vcs/Manifest
app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20141231.ebuild [new file with mode: 0644]

index 894f7e997df429582642a7053e687942553f92e7..2399b9c3aa775798282c52c577a01dae3607d6b5 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for app-editors/emacs-vcs
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.179 2014/12/29 11:28:11 ulm Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.180 2015/01/03 12:17:36 ulm Exp $
+
+*emacs-vcs-25.0.50_pre20141231 (03 Jan 2015)
+
+  03 Jan 2015; Ulrich Müller <ulm@gentoo.org>
+  +emacs-vcs-25.0.50_pre20141231.ebuild:
+  New snapshot of trunk.
 
   29 Dec 2014; Ulrich Müller <ulm@gentoo.org> emacs-vcs-25.0.9999-r1.ebuild:
   Install CONTRIBUTE file.
index a0257afa57706e95d5fe99a48713c8aa78288980..086e6f63d8f44b30f26a1196a795f4cb40c35570 100644 (file)
@@ -1,27 +1,12 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
 DIST emacs-25.0.50_pre20141031.tar.xz 24539480 SHA256 ff6af35edc35441465e4b41893573ff72cb85218ebe1c02b211286c72aefe645 SHA512 2abbde5906be73f2b4ca0375a9f138a08c671cbdfecb96e92f4b606ac05177dfbc7afe9409f0b6774497800eb4efe1a461c9c6d64f2a2494a8b27aa0b26e1c44 WHIRLPOOL ac12e7f4577d0b1f42fbe46a333ab0d67eddaf1ab5e723ab9fc3f7c305db453f77fdb4e5919049fe297f3bf2e273b35627c88d8e447d2b335f52ae6fa15ace39
 DIST emacs-25.0.50_pre20141110.tar.xz 24564108 SHA256 ed5a3600a2434fa6c43fbbb711c9ad682f76bcaeba5632031a0053d1fa7c0020 SHA512 db2add52e31be1d696e3634c92f993db124eaa8f3a727d04603cf47ed4c581643594571177d812d6c86584dce357eec6c86a7c9df1b07b09cb6faac4c699daf2 WHIRLPOOL 91cdba50d7ad9f41859d3247b1b839d1a42cb8004e209b1afe8d86f3c27abdfd3f2b1cf767b480f2ea271871b79886c878a899918056c1abb100bfa0eab87668
 DIST emacs-25.0.50_pre20141130.tar.xz 24635536 SHA256 0d7627d217c7b90051af4a0cffe23fe12ddaf79f18a55651627bf5fdf4ce5d0e SHA512 57b8a57a8f46c9ef34b7f5575b6062fb3ac6b47cf913599ecd10187925acf15569cc3cdf35f5775510809886841d9f803ef423ac3c5c600058bfe10aa190d4bd WHIRLPOOL 3dd946dce4f23009a7021de65764f085e7ef1732fcbbd174e1530a0e2274ac32045987016335e11d6e9af2f4c911ce6848f06b8915b56650785a2a06003964c3
+DIST emacs-25.0.50_pre20141231.tar.xz 24688612 SHA256 15bc6b8e1923bb6c1e18e3a8d89652c6594d72fbd1e3c15898ab9df03d19ad77 SHA512 b544f3530c707927c8ef4614b0804505e6cb32d8d6cef45f7aff56f67d632906d447d381a374ef37c6c46660cba1bb53dc7adead308bd902951abcc475593c75 WHIRLPOOL 0f373c4ef413a88e91e41b707686413a93661121453f3a80bff1cba75a17271dd30cd8dc64037487d2dcb2e3f4681af3bc989668c931b006a1bb2742eb5a9d5b
 EBUILD emacs-vcs-24.4.9999-r2.ebuild 11454 SHA256 a5a2538022d65c11f90c70e659478396d37bd025cc098cb85092e6561edb9eed SHA512 89775f4d5341b9095dafeec87c9fa262e87c2988a20c42cb4151dd0cf8e04ae136c9c588cde7da1a3caee6ed251530835287bfbba4efc2fab77ccbea1f4c1272 WHIRLPOOL 7b282562343aae530fb24483c82c4d38cc46f361a6de81c61d1d04a67ab85b9f49a7dcf05e42123295f2538d72ec0b3d48c61677d35fef7a892e5c5a5aa7e9c8
 EBUILD emacs-vcs-25.0.50_pre20141031.ebuild 11644 SHA256 b053e2cd5643ffaa54efa770cbce3cf3398fb3e48bdcbad64c9406f1c2d1face SHA512 260c480c3b0076efec28ce93304f81cdeafacdf5ea6e2cb28e2b6b746896c873a71badbb21f4ffb03143a9fedc173a56e045762d7212a0db83c3f2ea1a793f7b WHIRLPOOL 275a0dcd04c2c9c10f7676fc3f7e7c1f54791386a49b6e65b2714a1bc2c3cc215a7b9d23303e8e51683a3a047427b91580c7b605ec995eba74d45bb415a980a6
 EBUILD emacs-vcs-25.0.50_pre20141110.ebuild 11644 SHA256 f48d19c9db1df5fa57cd6dcebb8237758f399be2e2a41f9cf8be7f32b496d660 SHA512 0f2c45ef86c9b2129f0ee2ab644bce1629dedd0ff2256d09eb7fe31cb0227135954ee293f6893d314fdb72be0c2dd2cd01234e6d2692b3002163d70287fbe87f WHIRLPOOL 7107bbac2c486f49651b6fa164a1ac41253195a1d2810fe32e9ffb92625aca645e7bcafe7f2de1db24ea12a3b49e6896c30a028d393e3fb141f952a06b2f056b
 EBUILD emacs-vcs-25.0.50_pre20141130.ebuild 11467 SHA256 f5fe83961b5845bf63dc209ad2e608ea7725b382399b1dec61dae4423c8514bd SHA512 dd6d91b9fc599debb268c2a7127efe12d375a67280dfcad92f62ea14db7c9ece76c65c017609028597b4e502764d922e6711a69ffab4dadaf3fd42205f1705fb WHIRLPOOL 38e3b4fdb7cf47a8b6df5dab34ebe75fc6790632be46a69b95377fc7ba5cbd506547d38823ea8e57033d9061c826b20ad66cd4710d86db169fb9ba78161d3f7d
+EBUILD emacs-vcs-25.0.50_pre20141231.ebuild 11478 SHA256 8d78733a4f580c803ca8302f24be7dc83d7fc8fb19b15439874b6fe41c88110a SHA512 b7b25b1f1b68f5702ffbed52dd4c0ff4dd5c928dc89eb915fdb5658638ddab00449a9d9d8aa8515b603f745f72d9f3ba96511c7909e440b85fa95ec2832b6068 WHIRLPOOL 2c75bd8cd13b285d8579d463b6ff2cda9b9ef4336ee05f3b6143f2d947486d7d24ce522d7b52332b7f0bffccc0e7851434ca6961529f5cd5ff3042f422b4fa9c
 EBUILD emacs-vcs-25.0.9999-r1.ebuild 11471 SHA256 d660c6accf6cfd0533fd55c6dfbad34808337fa777013b3dc32f7291072ecd88 SHA512 4e451e25c6ec9c4e52f776a75a976271ec9b3123870a824fbdb0bc31f06096745ae5769c8824816ee5c1609d9e7f4acce8b69bcc538e9279e93a6d3387ccbf11 WHIRLPOOL 54147853cbcd33ad88b1ecb6492e02dc531383c087cee297d0eb2db4ede282243558b94ec4764c12b3353e8c22cf9a7db082c3291344ad3b619c24c0b2189e75
-MISC ChangeLog 82181 SHA256 0eaec4925f1049933f98d14900a76f7566f03be8549e7542f16e383ca19cf6a4 SHA512 f3c805c4cdbe2d02807f3f52fac4d2971910be8ed588ece73ad696a335c7d54ccd2c399cabf2d39e74f58b9eff4895f751d788e27d2fccc9121d44e2b55b439f WHIRLPOOL 91b9d98d683de5af550edd75058645c6bae7a45398070804f25324aafbaa6bdffe49f05a04ecf39e931e58b9e04a42c8c9a12051da6143aee7c151c8eac0d6e2
+MISC ChangeLog 82341 SHA256 fdfe6d7ce1efcd87b0d1493c0f453d509c6691609847457614ff6206ef837aa3 SHA512 62527cefaed12890469947ffc40fcf5930f94cb1092bbd57acbf12c2ed52097679387a1b13b3029d725bc114ed012852947d80bba49051414fd487264c418444 WHIRLPOOL a3d77d7b2f094edb82d5dc6c438039c5124de581664d6f5e4f8aa4e20568cb1b5e783b0fa97c7dbdb7e2e3f3cf4f0a0aacf9fa80858c309ba55d408861930b6a
 MISC metadata.xml 2522 SHA256 0dcfb3cd3457215ad785b82adfd0d60eafc10df3ac58c9125f6006e4ac90ced6 SHA512 8fefab8f3644c38b5a5c37e8aba2ee45a0b329b4dd846d280ef33893d940892abaf09204bf807d98870106677caf48e376667a4f2bf7c1dca26e72b6b5ea2c54 WHIRLPOOL b40fe229764c94b5bf59eda550e9a480a9793f3a4df43fa65c0dea518ad2372faf3276ce6009ad44a02907c2df63068b9596fc39e53cc7214dd5b30750df9a8d
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2
-
-iQGcBAEBCAAGBQJUoTwCAAoJEJQzkH1pP7W4xjMMAJY+YkK1tOn6P4m0DUyXm09+
-J685+nzg8oc9ZWbdKG+1KCe50Xd/u392lGSCby2w+RON01+Tp+Cot9BKmg+xHp+9
-zhJ+98aJGvb7NmetxCziSJaCkaamEVIA25I468d3faNoROm0DVcq46SVtJNBZYCn
-oibKiqBjQ1JOEkr4ndpCbgW6rNJM03jYpuKIgknGPCCrCb7VJE5XvLLdMo0brnjS
-NCCQUPa322FcbD/a3M0Qfg1z2i4awTq/YQX4DfjlLEprCR5QZQnYMm5g0oOzmHhe
-w0OrpXDF8ab4oiL059FZXu3HSuxyjvjXITwXKcmLs20uB9OuzwXaJOd29U5A4TTU
-RH2uWyzEQWTzBQbQaHs1efLOYpmUlV4tFFSNx7VG6zbXTipVeHyBf7o5Ufu3cj//
-ZAD+tIeNB85ETM1FqM2RnzswUT2xLMzc0jN11ZzpnHkXFQlKZdZ9ZRefIinQQuLM
-Hs6uTiAP3EnXJk+zORCYYycQ7QPoAKPi2aFp/BL/0A==
-=ERQu
------END PGP SIGNATURE-----
diff --git a/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20141231.ebuild b/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20141231.ebuild
new file mode 100644 (file)
index 0000000..a396b52
--- /dev/null
@@ -0,0 +1,363 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20141231.ebuild,v 1.1 2015/01/03 12:17:36 ulm Exp $
+
+EAPI=5
+
+inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo
+
+if [[ ${PV##*.} = 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="git://git.sv.gnu.org/emacs.git"
+       EGIT_BRANCH="master"
+       EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
+       S="${EGIT_CHECKOUT_DIR}"
+else
+       SRC_URI="http://dev.gentoo.org/~ulm/distfiles/emacs-${PV}.tar.xz
+               mirror://gnu-alpha/emacs/pretest/emacs-${PV}.tar.xz"
+       KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+       # FULL_VERSION keeps the full version number, which is needed in
+       # order to determine some path information correctly for copy/move
+       # operations later on
+       FULL_VERSION="${PV%%_*}"
+       #S="${WORKDIR}/emacs-${FULL_VERSION}"
+       S="${WORKDIR}/emacs"
+fi
+
+DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
+HOMEPAGE="http://www.gnu.org/software/emacs/"
+
+LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
+SLOT="25"
+IUSE="acl alsa aqua athena dbus games gconf gfile gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib"
+REQUIRED_USE="?? ( aqua X )"
+
+RDEPEND="sys-libs/ncurses
+       >=app-admin/eselect-emacs-1.16
+       >=app-emacs/emacs-common-gentoo-1.4-r1[games?,X?]
+       net-libs/liblockfile
+       acl? ( virtual/acl )
+       alsa? ( media-libs/alsa-lib )
+       dbus? ( sys-apps/dbus )
+       gfile? ( >=dev-libs/glib-2.28.6 )
+       gnutls? ( net-libs/gnutls )
+       gpm? ( sys-libs/gpm )
+       hesiod? ( net-dns/hesiod )
+       kerberos? ( virtual/krb5 )
+       libxml2? ( >=dev-libs/libxml2-2.2.0 )
+       selinux? ( sys-libs/libselinux )
+       zlib? ( sys-libs/zlib )
+       X? (
+               x11-libs/libXmu
+               x11-libs/libXt
+               x11-misc/xbitmaps
+               gconf? ( >=gnome-base/gconf-2.26.2 )
+               gsettings? ( >=dev-libs/glib-2.28.6 )
+               gif? ( media-libs/giflib )
+               jpeg? ( virtual/jpeg:0= )
+               png? ( >=media-libs/libpng-1.4:0= )
+               svg? ( >=gnome-base/librsvg-2.0 )
+               tiff? ( media-libs/tiff )
+               xpm? ( x11-libs/libXpm )
+               imagemagick? ( >=media-gfx/imagemagick-6.6.2 )
+               xft? (
+                       media-libs/fontconfig
+                       media-libs/freetype
+                       x11-libs/libXft
+                       m17n-lib? (
+                               >=dev-libs/libotf-0.9.4
+                               >=dev-libs/m17n-lib-1.5.1
+                       )
+               )
+               gtk? (
+                       gtk3? ( x11-libs/gtk+:3 )
+                       !gtk3? ( x11-libs/gtk+:2 )
+               )
+               !gtk? (
+                       motif? ( >=x11-libs/motif-2.3:0 )
+                       !motif? (
+                               Xaw3d? ( x11-libs/libXaw3d )
+                               !Xaw3d? ( athena? ( x11-libs/libXaw ) )
+                       )
+               )
+       )"
+
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+       gzip-el? ( app-arch/gzip )
+       pax_kernel? (
+               sys-apps/attr
+               sys-apps/paxctl
+       )"
+
+if [[ ${PV##*.} = 9999 ]]; then
+       DEPEND="${DEPEND}
+       sys-apps/texinfo"
+fi
+
+EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
+SITEFILE="20${PN}-${SLOT}-gentoo.el"
+
+src_prepare() {
+       if [[ ${PV##*.} = 9999 ]]; then
+               FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \
+                       configure.ac)
+               [[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
+               einfo "Emacs branch: ${EGIT_BRANCH}"
+               einfo "Commit: ${EGIT_VERSION}"
+               einfo "Emacs version number: ${FULL_VERSION}"
+               [[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
+                       || die "Upstream version number changed to ${FULL_VERSION}"
+       fi
+
+       epatch_user
+
+       # Fix filename reference in redirected man page
+       sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \
+               || die "unable to sed ctags.1"
+
+       AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+       strip-flags
+       filter-flags -pie                                       #526948
+
+       if use sh; then
+               replace-flags "-O[1-9]" -O0             #262359
+       elif use ia64; then
+               replace-flags "-O[2-9]" -O1             #325373
+       else
+               replace-flags "-O[3-9]" -O2
+       fi
+
+       local myconf
+
+       if use alsa; then
+               use sound || ewarn \
+                       "USE flag \"alsa\" overrides \"-sound\"; enabling sound support."
+               myconf+=" --with-sound=alsa"
+       else
+               myconf+=" --with-sound=$(usex sound oss)"
+       fi
+
+       if use X; then
+               myconf+=" --with-x --without-ns"
+               myconf+=" $(use_with gconf)"
+               myconf+=" $(use_with gsettings)"
+               myconf+=" $(use_with toolkit-scroll-bars)"
+               myconf+=" $(use_with gif)"
+               myconf+=" $(use_with jpeg)"
+               myconf+=" $(use_with png)"
+               myconf+=" $(use_with svg rsvg)"
+               myconf+=" $(use_with tiff)"
+               myconf+=" $(use_with xpm)"
+               myconf+=" $(use_with imagemagick)"
+
+               if use xft; then
+                       myconf+=" --with-xft"
+                       myconf+=" $(use_with m17n-lib libotf)"
+                       myconf+=" $(use_with m17n-lib m17n-flt)"
+               else
+                       myconf+=" --without-xft"
+                       myconf+=" --without-libotf --without-m17n-flt"
+                       use m17n-lib && ewarn \
+                               "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
+               fi
+
+               local f
+               if use gtk; then
+                       einfo "Configuring to build with GIMP Toolkit (GTK+)"
+                       myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)"
+                       for f in motif Xaw3d athena; do
+                               use ${f} && ewarn \
+                                       "USE flag \"${f}\" has no effect if \"gtk\" is set."
+                       done
+               elif use motif; then
+                       einfo "Configuring to build with Motif toolkit"
+                       myconf+=" --with-x-toolkit=motif"
+                       for f in Xaw3d athena; do
+                               use ${f} && ewarn \
+                                       "USE flag \"${f}\" has no effect if \"motif\" is set."
+                       done
+               elif use athena || use Xaw3d; then
+                       einfo "Configuring to build with Athena/Lucid toolkit"
+                       myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
+               else
+                       einfo "Configuring to build with no toolkit"
+                       myconf+=" --with-x-toolkit=no"
+               fi
+       elif use aqua; then
+               einfo "Configuring to build with Nextstep (Cocoa) support"
+               myconf+=" --with-ns --disable-ns-self-contained"
+               myconf+=" --without-x"
+       else
+               myconf+=" --without-x --without-ns"
+       fi
+
+       # Save version information in the Emacs binary. It will be available
+       # in variable "system-configuration-options".
+       myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}"
+       if [[ ${PV##*.} = 9999 ]]; then
+               myconf+=" EGIT_BRANCH=${EGIT_BRANCH} EGIT_VERSION=${EGIT_VERSION}"
+       fi
+
+       econf \
+               --program-suffix="-${EMACS_SUFFIX}" \
+               --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
+               --localstatedir="${EPREFIX}"/var \
+               --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
+               --with-gameuser="${GAMES_USER_DED:-games}" \
+               --without-compress-install \
+               --with-file-notification=$(usev gfile || usev inotify || echo no) \
+               $(use_enable acl) \
+               $(use_with dbus) \
+               $(use_with gnutls) \
+               $(use_with gpm) \
+               $(use_with hesiod) \
+               $(use_with kerberos) $(use_with kerberos kerberos5) \
+               $(use_with libxml2 xml2) \
+               $(use_with selinux) \
+               $(use_with wide-int) \
+               $(use_with zlib) \
+               ${myconf}
+}
+
+src_compile() {
+       export SANDBOX_ON=0                     # for the unbelievers, see Bug #131505
+       emake
+}
+
+src_install () {
+       emake DESTDIR="${D}" NO_BIN_LINK=t install
+
+       mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \
+               || die "moving emacs executable failed"
+       mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \
+               || die "moving emacs man page failed"
+
+       # move info dir to avoid collisions with the dir file generated by portage
+       mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
+               || die "moving info dir failed"
+       touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
+       docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
+
+       # avoid collision between slots, see bug #169033 e.g.
+       rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
+       rm -rf "${ED}"/usr/share/{appdata,applications,icons}
+       rm -rf "${ED}"/var
+
+       # remove unused <version>/site-lisp dir
+       rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
+
+       # remove COPYING file (except for etc/COPYING used by describe-copying)
+       rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
+
+       if use gzip-el; then
+               # compress .el files when a corresponding .elc exists
+               find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \
+                       -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n
+               assert "gzip .el failed"
+       fi
+
+       local cdir
+       if use source; then
+               cdir="/usr/share/emacs/${FULL_VERSION}/src"
+               insinto "${cdir}"
+               # This is not meant to install all the source -- just the
+               # C source you might find via find-function
+               doins src/*.{c,h,m}
+       elif has installsources ${FEATURES}; then
+               cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src"
+       fi
+
+       sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF
+       X
+       ;;; ${PN}-${SLOT} site-lisp configuration
+       X
+       (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
+       Y  (setq find-function-C-source-directory
+       Y       "${EPREFIX}${cdir}")
+       X  (let ((path (getenv "INFOPATH"))
+       X       (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
+       X       (re "\\\\\`${EPREFIX}/usr/share/info\\\\>"))
+       X    (and path
+       X        ;; move Emacs Info dir before anything else in /usr/share/info
+       X        (let* ((p (cons nil (split-string path ":" t))) (q p))
+       X          (while (and (cdr q) (not (string-match re (cadr q))))
+       X            (setq q (cdr q)))
+       X          (setcdr q (cons dir (delete dir (cdr q))))
+       X          (setq Info-directory-list (prune-directory-list (cdr p)))))))
+       EOF
+       elisp-site-file-install "${T}/${SITEFILE}" || die
+
+       dodoc README BUGS CONTRIBUTE
+
+       if use aqua; then
+               dodir /Applications/Gentoo
+               rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app
+               mv nextstep/Emacs.app \
+                       "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die
+       fi
+
+       DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs
+               through the Emacs eselect module, which also redirects man and info
+               pages. Therefore, several Emacs versions can be installed at the
+               same time. \"man emacs.eselect\" for details.
+               \\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is
+               strongly recommended that you use app-admin/emacs-updater to rebuild
+               all byte-compiled elisp files of the installed Emacs packages."
+       use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
+               Installing media-fonts/font-adobe-{75,100}dpi on the X server's
+               machine would satisfy basic Emacs requirements under X11.
+               See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
+               for how to enable anti-aliased fonts."
+       use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in
+               \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink
+               it into /Applications by yourself."
+       readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+       # move Info dir file to correct name
+       local infodir=/usr/share/info/${EMACS_SUFFIX} f
+       if [[ -f ${ED}${infodir}/dir.orig ]]; then
+               mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
+       elif [[ -d "${ED}"${infodir} ]]; then
+               # this should not happen in EAPI 4
+               ewarn "Regenerating Info directory index in ${infodir} ..."
+               rm -f "${ED}"${infodir}/dir{,.*}
+               for f in "${ED}"${infodir}/*; do
+                       if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
+                               install-info --info-dir="${ED}"${infodir} "${f}" \
+                                       || die "install-info failed"
+                       fi
+               done
+       fi
+}
+
+pkg_postinst() {
+       elisp-site-regen
+
+       local pvr
+       for pvr in ${REPLACING_VERSIONS}; do
+               [[ ${pvr%%[-_]*} = 24.[12] ]] && FORCE_PRINT_ELOG=1
+       done
+       readme.gentoo_print_elog
+
+       if use livecd; then
+               # force an update of the emacs symlink for the livecd/dvd,
+               # because some microemacs packages set it with USE=livecd
+               eselect emacs update
+       elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then
+               # refresh symlinks in case any installed files have changed
+               eselect emacs set ${EMACS_SUFFIX}
+       else
+               eselect emacs update ifunset
+       fi
+}
+
+pkg_postrm() {
+       elisp-site-regen
+       eselect emacs update ifunset
+}