Fix browse-url-firefox for firefox 36, bug 542046.
authorUlrich Müller <ulm@gentoo.org>
Sat, 7 Mar 2015 15:06:36 +0000 (15:06 +0000)
committerUlrich Müller <ulm@gentoo.org>
Sat, 7 Mar 2015 15:06:36 +0000 (15:06 +0000)
Package-Manager: portage-2.2.18/cvs/Linux x86_64
Manifest-Sign-Key: 0x9433907D693FB5B8!

app-editors/emacs/ChangeLog
app-editors/emacs/Manifest
app-editors/emacs/emacs-23.4-r13.ebuild [new file with mode: 0644]
app-editors/emacs/emacs-24.4-r4.ebuild [new file with mode: 0644]

index db2ce5584be553586dcbf921937dbfc94bfe384e..23f62643ed3f9037cbd502b378f7c8c3355da71f 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for app-editors/emacs
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.659 2015/03/02 09:21:35 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.660 2015/03/07 15:06:19 ulm Exp $
+
+*emacs-24.4-r4 (07 Mar 2015)
+*emacs-23.4-r13 (07 Mar 2015)
+
+  07 Mar 2015; Ulrich Müller <ulm@gentoo.org> +emacs-23.4-r13.ebuild,
+  +emacs-24.4-r4.ebuild:
+  Fix browse-url-firefox for firefox 36, bug 542046.
 
   02 Mar 2015; Agostino Sarubbo <ago@gentoo.org> emacs-24.4-r1.ebuild:
   Stable for ppc, wrt bug #531806
index 06f391efdb8a4be8c0467a529bd95f3cb56bcc36..68015b3a99de0e76e642f6ef49c566379a5fe62a 100644 (file)
@@ -6,34 +6,35 @@ DIST emacs-18.59-patches-8.tar.bz2 19667 SHA256 637542bf5ee07d4abac11b76e742598a
 DIST emacs-18.59.tar.gz 2962652 SHA256 1e27e33f91984a91e9b4c1f21433f931aba03670960ecc147bb6d7b0de0f051e SHA512 03ce565e346e89b7aacb1852f4783e8907f394de7da0c543b475cb038eb89b87f980d0f7ca1841b1d2108b20f211e95113c7214e4a33e5767a1827ff43173f33 WHIRLPOOL 5e98e71518f665e2a8278afe54e0ace6d7fdd9df23ff0a3354ffc1d5cc25cd21b0dd4d82766fcb436d4f24e9291c933295e956e1ffea43cfeedf915175763be6
 DIST emacs-23.4-patches-15.tar.xz 12400 SHA256 a8e609a75c2a904efeb7269f4d1a0829cc7701010faf5d8bf6ad08dd5826a509 SHA512 e11bc4383552387a0016ab0ea978da5cd079e8759161448d757f308d7dcca762b7111064842c8abe762e05818e380dca52295e6246b258d51d8515169c746882 WHIRLPOOL c776ae58a54320a29852d8cb63c33c4c86feacd21d1454a5205355c2294d73de2814f8746be8c97b799025f67f1eb5330ae4ede140a6d377b30199dcf6ee0d9f
 DIST emacs-23.4-patches-16.tar.xz 15052 SHA256 b19c01e19ade5de37242740afb229ab82ef9145549e4c738c6efc70fc8ba2526 SHA512 4c4d35c24f4a2f25c8c42681b0745b5fc091df1237dd845f0507982ed237372f1cb207b93d392a6b823d2b0f23364e2e7239af994a01a71ec9b09607f86d54a1 WHIRLPOOL 455e3806f20563332bbe0263808f054ff1cac1fd1453a44fed28138c2b3ca3fbf3e1a91800b69dedaf3090ce43faf97cfb65e4a0636ce7d28e822ec20df009c2
+DIST emacs-23.4-patches-17.tar.xz 16164 SHA256 bc9d4a36239f2749e218d903b67102e211a3a62ef162f5ab2801865dab77b752 SHA512 ceccd559b4f53328d75016b64d246ecf6fca7edebd080ce3bbba5f4d000bec38be5da91f3195c972ede0710da14b3be0545891321259b0a0b2963981c8fd62de WHIRLPOOL 4b70ce4d876e92a006e3dc0a31301f604aa8fa53a198515d1cbb3517a94933b1d7a11636494c1bd28ad1049a5a233d4ec13213e74e1eaff1cf96bb1fd095c345
 DIST emacs-23.4.tar.bz2 38646508 SHA256 26576f9e664397c729f78f5ffcd092969251988461896fe8793062346ee988b9 SHA512 def7a95ecaefae24d8102b96b1d575a23def1b11a8f0bb17b68f7913bd118e2ea4449a8feee76c1bd649f099b70419f0d494ddd9bb32b26f92720cda842b0296 WHIRLPOOL 2384c3f63ff153c3975e373334d6021d46b23ad3cab448ed2e1180501236453a61d13bf1dfbb2e6075bb141dd8511d85f77e37c763b39769f98de48eacc56f3b
 DIST emacs-24.3-patches-7.tar.xz 6484 SHA256 167a004b3b528dada8f68d28ce98cfbf1f23a1e00e52d7b23e14352178e5eab7 SHA512 6e3f6f053ad66e6d298b4fd904c57a6c2a03269ec53e9dfc56f834672a42c8f48eeb20a7ed1bcfb534eb62e0cca6e01b4a1663bebb046a0ce7325b732a378868 WHIRLPOOL bb68a6874e682afe58fe4cdf60695bc7b8d763afd15ba40ffda3156e80a6cad318e969fed6f22cb6e484ffdc29daa1b6b64873bf6cf73de28cfa711172046138
 DIST emacs-24.3.tar.xz 35565352 SHA256 70aa2942e9ae689ed17eddedfca5027c364ffbcc8b59968b1645e935f4c7058d SHA512 a1300fa10a9fba2db9735db3d01382bcda89ceec033976c4622796dfdf6d2748ed5fa73edf229182b368190c8acbf706810dd5f344542d2c0d294154bc2d0ca9 WHIRLPOOL 687ad4c7d69b41884bf28269bdea1808e03cdcec5a5218d0bac23c07cca3ced341ef98b4d5892149e2dbe899774a5e60edde9931d6c0fe41687995f530fb61d8
 DIST emacs-24.4-patches-2.tar.xz 1316 SHA256 e67954091f565668b921d32c14f9f31800e09249248fe03fd4369480a17a26f5 SHA512 c52910391ca58fc9a4b99147f62f2f1d9432c08889bd756cb3b5bf21028ef205a5d285fdbd495c5f1608180b834682ee8b4877e2d02359afb3596078fea5533b WHIRLPOOL a571557a3e86c69dde864cb1aac34b12bc6b8b2d97b8a73293337c1c971143fcf807be30c61c0bf6ecec3d5174f46afdece7395f1012d366dca45b4560c825c7
 DIST emacs-24.4-patches-4.tar.xz 4652 SHA256 8b97fe775ed120df42e6f3afbe3ce503c0fedd8957caa759649323ac340f2922 SHA512 b8f8aea92472b5c074fc4cb2198b329e7b0496a70ba04d76eea4f420e398f3882b89d848020750659f60828217ea3155f4d53078edc8dc715b2946b8a239157a WHIRLPOOL e5e92ce3fba0e62ba3135e89ab8de9b6196f9a342048dbe679e06c3530a305311a1b300b72abdee50416d989cb55ca053ea1e0b259e63cc56260bfd58d43894a
+DIST emacs-24.4-patches-5.tar.xz 6000 SHA256 967dac364282a51933f90c56f368bc3f2741efe0b7ff42d3151bb4824b70fa04 SHA512 0a337ad5b7601f5e453645d1fba99717328c6bc7a5505bcb4bd8e853179cf61be43eb6f3b9370edf0f44aa6485d4847c14554c1592ccc7da87b10dabaaa9d421 WHIRLPOOL 149f3a431d055963c544d9fa6c6447a16aa093840f6bf4086f50506979356a12407af16291c46ee62a92b3ee41767452046f45a7163214be33ab7bdbcd6059dc
 DIST emacs-24.4.tar.xz 39733124 SHA256 47e391170db4ca0a3c724530c7050655f6d573a711956b4cd84693c194a9d4fd SHA512 f51f88a4736a3f153ef01f3ad710571e967cd3d0c0112b066169a4040725d370ec29b14a4ca8fa3e3f4c657c726ba8e64c3ac4e390b8e911ea47a3afb5ac755c WHIRLPOOL eae38c2382731fecf0ccf8f717f8c96cc130d01a893ff560caecde903294eb843660492761ea8cce9920b79bfc55e821921924e27c040f25355110f56cd2255b
 EBUILD emacs-18.59-r10.ebuild 4297 SHA256 74c5d7927ea976e02680e0a24a90a270a067787e45cbb74602c8e7e513eec166 SHA512 d19f66368ed77bd4caeb260b098e79077a8e87328522d75092297c2cf15b39deb267518242f4939405a99365682653506374c0b6942be267816ddf9419a0ae4a WHIRLPOOL f8fe6dd1b04e838b0e5acc2d199a2d356dbf5ae61152a3ec9df156eceb04a9120743f8f98b04b27ae620b7c30ec5e1841df65b86a572be0746044969c42699a5
 EBUILD emacs-23.4-r11.ebuild 11320 SHA256 cf04e92c7c20bf3b8e5bbab062fb973f1aac81ca22b3575a5f267fd299f0d3c0 SHA512 7db86ce284dc9df0df4b2a00997cfc77b3067c8de277fdfe5bf794698bf018ad2c6036eaca84982de03f777bd746f23312267031924b7616d9078642a014bc70 WHIRLPOOL 863e5d02d8af5e70a9b57c6e82c2b6d2218f87a3947742febd67b9aed55084e38e18bd8489ef7514366bedf4db94605412f9002f114643b054d38b3328e22637
 EBUILD emacs-23.4-r12.ebuild 11310 SHA256 249aa3f72ecef6cbaeb9f7149dade700b53bc101fc2e1022d1f31a327cd017cb SHA512 c67923d31c1112f342fd8ad6ab3fb6f2a82daada8053756ea027a7de9e7cca72f9f4bad080b05b6b06d3dc4ba3a8ecdc0b931c2e6c46c975242e2cb0c04feeb4 WHIRLPOOL 50f585e87a8c41c16475b95976b6451931c73749cbea79137297d166ea809aec93f814b9b315980e848fe29e64f3dd2d7114718256f4f17d04f6fb1672ce1d98
+EBUILD emacs-23.4-r13.ebuild 11310 SHA256 784aab004b38045d8cce52d1ea43abff7f7803d77cd6232ed6d70d57089ab8fb SHA512 076ab9552e51370593577a92277b4ad0db1baf7b1d5c32280e11e0769b30e3fcf752a87212ce885e9646e513e5d40d95f8478f195f532cf7d0cb3320d3c3700a WHIRLPOOL 195e0e317d11e5ccbc3c917af5b5ccefeeb6eeb8fbc47369803c7f975c23550e8555a5f05f456fd9736a47d8cd9de69ff6c784410297034a4dcd989ac7070420
 EBUILD emacs-24.3-r6.ebuild 11210 SHA256 3a18d2256db1c69b55ce9094f85baf63c474acab482f892016d7e2843b8501ae SHA512 33996a553ed01f41ac7702b841de771d5fb7421e3db714af9b85ec50399b390f51f68de29c3899534b77359aae3605e1c9d3b6d41299759d4d1532a82acec56b WHIRLPOOL 69227fcd9cc536fb6f76c0742077735f5e744a88d69b84f663361c165b399610d857b51548e3c7d8a6087497f052a4755bb7089e3a0ada6f2bfce80f85543762
 EBUILD emacs-24.4-r1.ebuild 10674 SHA256 bdf46a1e69d26b446445a767caae59827bb78725a6290d14486b1251b3a243cf SHA512 e4f98b8fa857397249d21772922418f8d908113cfc6f700afa7f8821ea63bee83e11d60e3b5bed90b34e578b79f5fdb98ad2fb66802a62b2a8097111170a9eb1 WHIRLPOOL 5cfc5698d70b51786b44c36185d8ded1923d247e616eef60ed5572d7de471b1315786117a1daa2d3b14684158cc1e23fd0d75a4cb115c0faf5790b6419c8e099
 EBUILD emacs-24.4-r3.ebuild 10669 SHA256 978624cd544a29e8100c2bd0d1ee98535e05febf26a8708b5557a4a18f57e9fd SHA512 a9e3a91247afb260d2b394e8a41622aef9ee5d68c6c45a6ffc85cdf3450632dcd15092d0505c11452416cc398a339ac0a434cbd8c78a4ad33a5592145cf4da0e WHIRLPOOL daaa15989ac8544b9eabb4954a4eb46af6a01bbd30e6aee7b91806f04ae619d8658bbec24eb9e2a7acd3eeff21871f18aac8d19a97c43f8d40d7acd353c023cb
-MISC ChangeLog 90086 SHA256 83b9dd1167b6eefba2f9c3740c760c83cc07abcc3d161c230ab0a2e10dc8fb14 SHA512 dfe9cac1df44da752c8b695343db764da6e12a6265c81a1080403e63f733f1297c0b6efdcde67fc7cfac9ce580cfac750b1e1fb87df00bf6e049a68ed18ac3d7 WHIRLPOOL 671ce6c684e743b13e0f7be6c2e01881e288212c8e474b395683c06ea64815e01f761b19f7519167017536b835653f7d475191c73c0502e6f61b651c6d710d8b
+EBUILD emacs-24.4-r4.ebuild 10669 SHA256 5fd69fe35d85b2cbd3c861fcfb19ad3b8b48e78371b02e7b580faf11bd80992d SHA512 16fd0812cabbe04c1fdd6cb6b5f99fa9eb32224186d8412c76c3d1b4e749cd0e632e84c082746951cf918a5b90570ad337e07ba7d53c66449fad858eb769c2e5 WHIRLPOOL 1145b46ed47cbf035d55b54a5cd1c11a0636fdc4af6c31e1a872a90b05544ad1cdf49692b9057d3ca5b64e623e9481e565601c571a710388843b67c7158539ae
+MISC ChangeLog 90296 SHA256 187c4dcbd44b0eb8657f18e4e86388511e8f29c96389d2fc5912769b33b0825f SHA512 7bfe1bb605cb68af383694c5e07bd1be99730d9b486526cf9468e6e85452b497213a83cddb04f9ac6ad11b722573b927a2b71730f09f515d50bcbfddbfdffa70 WHIRLPOOL 91cebc7e6e8005c796e61da5754a2d92ebc7ca99c40c637f70f603cd1a867a7a383369891591d817dcd70ed8b2d1141f3d211bb9dde218810e62fb477190cf09
 MISC metadata.xml 2489 SHA256 21b3602d37aa25bca31b05ea810b37ee2192f4e53b8f8daeb814d9dca59d03d7 SHA512 4f3d663cd61253ae3390c55c5974dd3cc22dbf1306a823c3cb71794d09eaf28d7727c7e24f66f02dbd8d3845894f3a8cafa5ddaf330c1bbb7f99d8130ece077c WHIRLPOOL bcefdded503fa9cebea943952d3f56847002cb5ddc10f5adbd774301b648d1b12a09da7e493694f9cbbb19e8b53b66132cbd2e0141ded41b226415cfdbbcf8f6
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
-iQIcBAEBCAAGBQJU9CugAAoJELp701BxlEWfLvQQAKyFmcbkbURLZIpPFv4JWuwx
-cTzbP19OFobxWrt1IQJ0DwF3xqRiZv0JPOaPFmLXuH5mPXhmO3AXB7rRqoB5NCmO
-mYnY+OsIKiHIC4wbvLmxgPWLAQVDVX+Spuy8bc9cc3PU1WmtBKm+tDWD+nr/iHbO
-usvWMWFvqpjAvB7ef8PWYw6FYZPKKcJAgbTSEG4RPnG4h+Kiynp6++/uQAwYEQ3P
-gNFDYFOzn5E21fLW4g3sATWv/TLZhsiik8G5cfDalbchZ/ZOLzGKi5HpIOy/bEki
-2cWixv+2UM916OXWtDbxc6JePBPvrVVhQRKi4gRh0cecC96boKC9IHfCZXVBWh5k
-UzLXLQa88GBhZphvXIUOPCptD7B8r7ni0stBQj3VlPLmsC5t3Mwhwmf4wcsoOzTh
-SYdUtw5PPkjIlb+xyCjhmwuzLVbll2hLRZXHXfemgW5d+rKgk4R5mug136LqqnGZ
-KQMZqcJgu4ZoApGIn1jLbvdQIIS7H8eUlPNir4QFaQuc4XPETAzP/s0tsnKHZCpC
-L/Li2iAB/ihWziMRyaoAcaO+EgscHsO6sFzWR+dXkTuTL9ADI3N+ESatMBBf86b7
-drRdvRglckMflfIc4WQ+nYnV9RtYk0/hY1FFgoLkiBKX1G+sc/K1ZkM7BJIGs3le
-Sc2PgHMIvpdLEOwW5siv
-=9hoS
+iQGcBAEBCAAGBQJU+xP4AAoJEJQzkH1pP7W4LRAMAJdxpsnoWevKgqffEYADz+1S
+vWvLcOA7GatS0EHEAlhllBZX/9XJOvgLyG8WqfuvGwjVQJhtmaY0ENJM7HgJxmO+
+NpAS3YdJtUCN/9zwTpm9M5V9RK1Mp4V4D2/myT7mZBLyh3VnbDkGS0Wa52EBNCvQ
+lnVlkCR/DzaC3rznrZDcZ383uOORI5s3oDhOA/+vlCWzYTt1YaL2TglwG/LcE64C
+OOr1948t5lJ62acnqIsQEC7xXErU4DjMKCHkbkCYwNvCVhjKIqUpN2oun9xvI2cA
+qtwvPViRq08Av9DMZuk5t2/nLZ1e/GfrYaaiXUod3nAgYcAgGqGUfgC9Zk0Fnfwa
+gG1sSvLoBRxMvLsCqQNnwcX7CjPrc5j6PmRVT+MM8/VoDk8Iu5nwFGDFJJTXal+5
+CDDqHVxWCxBCd8aSv+3EEGhX9Av3lAqxQ+9uqCAy8KOdyJ5dejHIdk9l3oP2SJb1
+n17EUli49Ad7mf8O6A9fOnHRDDJbepuly0oM5cml7A==
+=HHQo
 -----END PGP SIGNATURE-----
diff --git a/app-editors/emacs/emacs-23.4-r13.ebuild b/app-editors/emacs/emacs-23.4-r13.ebuild
new file mode 100644 (file)
index 0000000..e725bab
--- /dev/null
@@ -0,0 +1,348 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-23.4-r13.ebuild,v 1.1 2015/03/07 15:06:19 ulm Exp $
+
+EAPI=5
+WANT_AUTOMAKE="none"
+
+inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo
+
+DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
+HOMEPAGE="http://www.gnu.org/software/emacs/"
+SRC_URI="mirror://gnu/emacs/${P}.tar.bz2
+       http://dev.gentoo.org/~ulm/emacs/${P}-patches-17.tar.xz"
+
+LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
+SLOT="23"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="alsa aqua athena dbus games gconf gif gpm gtk gzip-el hesiod jpeg kerberos livecd m17n-lib motif pax_kernel png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm"
+REQUIRED_USE="?? ( aqua X )"
+
+RDEPEND="sys-libs/ncurses
+       >=app-admin/eselect-emacs-1.16
+       >=app-emacs/emacs-common-gentoo-1.5[games?,X?]
+       net-libs/liblockfile
+       hesiod? ( net-dns/hesiod )
+       kerberos? ( virtual/krb5 )
+       alsa? ( media-libs/alsa-lib )
+       gpm? ( sys-libs/gpm )
+       dbus? ( sys-apps/dbus )
+       X? (
+               x11-libs/libXmu
+               x11-libs/libXt
+               x11-misc/xbitmaps
+               gconf? ( >=gnome-base/gconf-2.26.2 )
+               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:0 )
+               xpm? ( x11-libs/libXpm )
+               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? ( x11-libs/gtk+:2 )
+               !gtk? (
+                       motif? ( >=x11-libs/motif-2.3:0 )
+                       !motif? (
+                               Xaw3d? ( x11-libs/libXaw3d )
+                               !Xaw3d? ( athena? ( x11-libs/libXaw ) )
+                       )
+               )
+       )"
+
+DEPEND="${RDEPEND}
+       alsa? ( virtual/pkgconfig )
+       dbus? ( virtual/pkgconfig )
+       X? ( virtual/pkgconfig )
+       gzip-el? ( app-arch/gzip )
+       pax_kernel? (
+               sys-apps/attr
+               sys-apps/paxctl
+       )"
+
+RDEPEND="${RDEPEND}
+       !<app-editors/emacs-vcs-${PV}"
+
+EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
+SITEFILE="20${PN}-${SLOT}-gentoo.el"
+# 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}"
+
+src_prepare() {
+       EPATCH_SUFFIX=patch epatch
+       epatch_user
+
+       sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \
+               || die "unable to sed ctags.1"
+
+       if ! use alsa; then
+               # ALSA is detected even if not requested by its USE flag.
+               # Suppress it by supplying pkg-config with a wrong library name.
+               sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
+                       || die "unable to sed configure.in"
+       fi
+       if ! use gzip-el; then
+               # Emacs' build system automatically detects the gzip binary and
+               # compresses el files. We don't want that so confuse it with a
+               # wrong binary name
+               sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
+                       || die "unable to sed configure.in"
+       fi
+
+       eautoreconf
+}
+
+src_configure() {
+       strip-flags
+       filter-flags -fstrict-aliasing -pie
+       append-flags $(test-flags -fno-strict-aliasing)
+
+       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 && ! use sound; then
+               einfo "Although sound USE flag is disabled you chose to have alsa,"
+               einfo "so sound is switched on anyway."
+               myconf+=" --with-sound"
+       else
+               myconf+=" $(use_with sound)"
+       fi
+
+       if use X; then
+               myconf+=" --with-x --without-ns"
+               myconf+=" $(use_with gconf)"
+               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)"
+
+               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
+
+               # GTK+ is the default toolkit if USE=gtk is chosen with other
+               # possibilities. Emacs upstream thinks this should be standard
+               # policy on all distributions
+               local f
+               if use gtk; then
+                       einfo "Configuring to build with GIMP Toolkit (GTK+)"
+                       myconf+=" --with-x-toolkit=gtk"
+                       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}"
+
+       # According to configure, this option is only used for GNU/Linux
+       # (x86_64 and s390). For Gentoo Prefix we have to explicitly spell
+       # out the location because $(get_libdir) does not necessarily return
+       # something that matches the host OS's libdir naming (e.g. RHEL).
+       local crtdir=$($(tc-getCC) -print-file-name=crt1.o)
+       crtdir=${crtdir%/*}
+
+       econf \
+               --program-suffix="-${EMACS_SUFFIX}" \
+               --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
+               --localstatedir="${EPREFIX}"/var \
+               --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
+               --with-crt-dir="${crtdir}" \
+               --with-gameuser=":gamestat" \
+               $(use_with hesiod) \
+               $(use_with kerberos) $(use_with kerberos kerberos5) \
+               $(use_with gpm) \
+               $(use_with dbus) \
+               ${myconf}
+}
+
+src_compile() {
+       export SANDBOX_ON=0                     # for the unbelievers, see Bug #131505
+       emake CC="$(tc-getCC)" \
+               AR="$(tc-getAR) cq" \
+               RANLIB="$(tc-getRANLIB)"
+}
+
+src_install () {
+       emake DESTDIR="${D}" install
+
+       rm "${ED}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
+               || die "removing duplicate emacs executable failed"
+       mv "${ED}"/usr/bin/emacs-${EMACS_SUFFIX} "${ED}"/usr/bin/${EMACS_SUFFIX} \
+               || die "moving emacs executable failed"
+
+       # move man pages to the correct place
+       local m
+       mv "${ED}"/usr/share/man/man1/{emacs,${EMACS_SUFFIX}}.1 \
+               || die "moving emacs man page failed"
+       for m in b2m ctags ebrowse emacsclient etags grep-changelog rcs-checkin; do
+               mv "${ED}"/usr/share/man/man1/${m}{,-${EMACS_SUFFIX}}.1 \
+                       || die "moving ${m} man page failed"
+       done
+
+       # 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/{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
+
+       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}
+               doins -r src/{m,s}
+               rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/Makefile.c
+               rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/{m,s}/README
+       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
+
+       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 a previous major version of Emacs, 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
+       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
+}
diff --git a/app-editors/emacs/emacs-24.4-r4.ebuild b/app-editors/emacs/emacs-24.4-r4.ebuild
new file mode 100644 (file)
index 0000000..28b1556
--- /dev/null
@@ -0,0 +1,338 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-24.4-r4.ebuild,v 1.1 2015/03/07 15:06:19 ulm Exp $
+
+EAPI=5
+
+inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo
+
+DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
+HOMEPAGE="http://www.gnu.org/software/emacs/"
+SRC_URI="mirror://gnu/emacs/${P}.tar.xz
+       http://dev.gentoo.org/~ulm/emacs/${P}-patches-5.tar.xz"
+
+LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
+SLOT="24"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+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.5[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:0 )
+               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
+       )"
+
+RDEPEND="${RDEPEND}
+       !<app-editors/emacs-vcs-${PV}"
+
+EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
+SITEFILE="20${PN}-${SLOT}-gentoo.el"
+# 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}"
+
+src_prepare() {
+       EPATCH_SUFFIX=patch epatch
+       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}"
+
+       econf \
+               --program-suffix="-${EMACS_SUFFIX}" \
+               --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
+               --localstatedir="${EPREFIX}"/var \
+               --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
+               --with-gameuser=":gamestat" \
+               --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/{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
+
+       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
+}