diff options
author | Ulrich Müller <ulm@gentoo.org> | 2018-07-01 15:18:08 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2018-07-01 15:22:11 +0200 |
commit | 67300938dec2b8e726bcee9a3bded684a63e9262 (patch) | |
tree | 4134929722228377f0a5b7f48b4f6f1cee827a94 /app-editors | |
parent | app-crypt/easy-rsa: Version bump (diff) | |
download | gentoo-67300938dec2b8e726bcee9a3bded684a63e9262.tar.gz gentoo-67300938dec2b8e726bcee9a3bded684a63e9262.tar.bz2 gentoo-67300938dec2b8e726bcee9a3bded684a63e9262.zip |
app-editors/emacs: Make the X11 interface in Emacs 18 work again.
Package-Manager: Portage-2.3.41, Repoman-2.3.9
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/emacs/Manifest | 1 | ||||
-rw-r--r-- | app-editors/emacs/emacs-18.59-r12.ebuild | 162 |
2 files changed, 163 insertions, 0 deletions
diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest index f15ec949952b..3930fa08353e 100644 --- a/app-editors/emacs/Manifest +++ b/app-editors/emacs/Manifest @@ -1,5 +1,6 @@ DIST emacs-18.59-linux22x-elf-glibc21.diff.gz 15671 BLAKE2B 0106fe8053b4f65f384d451ca85138991a57afaca16b32035585055bb877c039af826859fa58c4660ec80664d3bfb0ee7a757ad76381c150ebcb22cb333a98d6 SHA512 c6c6ea33850dadf08d68fff56fc6aacc80ad1aa36661260715d50b95438942d56e6244094427d50356cfe716f26559feb885254c436399bff7be639637d605b6 DIST emacs-18.59-patches-10.tar.xz 21496 BLAKE2B bfa0202511a9e41d3278c63f43f174cca4ba95f42675796d85139fc43654ca3b9bc56a8c547029eaae967df66ec1e520d3bcdc67c4d53261fea70def6641574c SHA512 c0255d9d02e047cc2173cebb916677e268d8f5043c9dd08041b78019df208cdd02eb8eb49256acde7a3d5b004a7227ee9a1220d7b1e24580bdb5a5258216fc39 +DIST emacs-18.59-patches-11.tar.xz 22032 BLAKE2B cfdb85aeefa7a71dfd0719de893e9ea3f7118baa0b8c5aa97b3800c1a5743e77d63c35ab1e4afb13c284f5c6dda522d1e2e37f8bfd9bbba052e543af7401565b SHA512 cac3f2efc8b3f18cdf43474453acc406c5b469ecc11955f8216083a4deced887aea4a73221aa36f0bc6b7480788606f969ee1df15a8932ee771fdf790e98c00c DIST emacs-18.59.tar.gz 2962652 BLAKE2B d617636daff41e672af2dcda26ec24b2495cf0a3e6373561ee26a2a922b7252c074dd6b79289d771853a4720c60f084f5726b904bf65989718173232ac874b0b SHA512 03ce565e346e89b7aacb1852f4783e8907f394de7da0c543b475cb038eb89b87f980d0f7ca1841b1d2108b20f211e95113c7214e4a33e5767a1827ff43173f33 DIST emacs-23.4-patches-21.tar.xz 19604 BLAKE2B 97327f2079c496c28122203d233a12199a3c11a8c4efb2107247a4ca4483b898467d73d19d4f0570ec7be2a49dc5f6bd1bc9ee0811f932e7deb6b1c4ca96e362 SHA512 135eda432de64200797456d594f7de811275a7adf792d10a1c3a51ca4bbbbaa3a2c682b9fd577c4d93fbce967ca08d4ac47eb45f031477c3e44c69c14d5d5b48 DIST emacs-23.4.tar.bz2 38646508 BLAKE2B 33dac5d27a63b7aab6b4053964a0ecf7f7939c7aea5af15103f2da7bd34fbb18dba7a1bf44cc4fcc2e3fb1439cdf7085d8dfc4b0005f5485748996e75ca6872d SHA512 def7a95ecaefae24d8102b96b1d575a23def1b11a8f0bb17b68f7913bd118e2ea4449a8feee76c1bd649f099b70419f0d494ddd9bb32b26f92720cda842b0296 diff --git a/app-editors/emacs/emacs-18.59-r12.ebuild b/app-editors/emacs/emacs-18.59-r12.ebuild new file mode 100644 index 000000000000..48dbd0a516e3 --- /dev/null +++ b/app-editors/emacs/emacs-18.59-r12.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs flag-o-matic multilib + +DESCRIPTION="The extensible self-documenting text editor" +HOMEPAGE="https://www.gnu.org/software/emacs/" +SRC_URI="ftp://ftp.gnu.org/old-gnu/emacs/${P}.tar.gz + ftp://ftp.splode.com/pub/users/friedman/emacs/${P}-linux22x-elf-glibc21.diff.gz + https://dev.gentoo.org/~ulm/emacs/${P}-patches-11.tar.xz" + +LICENSE="GPL-1+ GPL-2+ BSD HPND" +SLOT="18" +KEYWORDS="~amd64 ~x86" +IUSE="abi_x86_x32 X" + +RDEPEND=">=app-eselect/eselect-emacs-1.16 + sys-libs/ncurses:0= + amd64? ( + abi_x86_x32? ( >=sys-libs/ncurses-5.9-r3:0=[abi_x86_x32(-)?] ) + !abi_x86_x32? ( >=sys-libs/ncurses-5.9-r3:0=[abi_x86_32(-)] ) + ) + X? ( x11-libs/libX11 )" + +DEPEND="${RDEPEND} + X? ( + x11-base/xorg-proto + x11-misc/xbitmaps + )" +BDEPEND="virtual/pkgconfig" + +PATCHES="../${P}-linux22x-elf-glibc21.diff ../patch" + +src_prepare() { + default + + # Do not use the sandbox, or the dumped Emacs will be twice as large + sed -i -e 's:\./temacs.*dump:SANDBOX_ON=0 LD_PRELOAD= env &:' \ + src/ymakefile || die +} + +src_configure() { + # autoconf? What's autoconf? We are living in 1992. ;-) + local arch + case ${ARCH} in + amd64) + if use abi_x86_x32; then + arch=x86-x32 + multilib_toolchain_setup x32 + else + arch=intel386 + multilib_toolchain_setup x86 + fi + ;; + x86) arch=intel386 ;; + *) die "Architecture ${ARCH} not yet supported" ;; + esac + local cmd="s/\"s-.*\.h\"/\"s-linux.h\"/;s/\"m-.*\.h\"/\"m-${arch}.h\"/" + use X && cmd="${cmd};s/.*\(#define HAVE_X_WINDOWS\).*/\1/" + sed -e "${cmd}" src/config.h-dist >src/config.h || die + + cat <<-END >src/paths.h + #define PATH_LOADSEARCH "/usr/share/emacs/${PV}/lisp" + #define PATH_EXEC "/usr/share/emacs/${PV}/etc" + #define PATH_LOCK "/var/lib/emacs/lock/" + #define PATH_SUPERLOCK "/var/lib/emacs/lock/!!!SuperLock!!!" + END + + sed -i -e "s:/usr/lib/\([^ ]*\).o:/usr/$(get_libdir)/\1.o:g" \ + -e "s:-lncurses:$("$(tc-getPKG_CONFIG)" --libs ncurses):" \ + src/s-linux.h || die + + # -O3 and -finline-functions cause segmentation faults at run time. + # -Wno-implicit will quieten GCC 5; feel free to submit a patch + # adding all those missing prototypes. + strip-flags + filter-flags -finline-functions -fpie + append-flags -Wno-implicit + append-ldflags $(test-flags -no-pie) #639562 + replace-flags -O[3-9] -O2 +} + +src_compile() { + addpredict /var/lib/emacs/lock + emake --jobs=1 \ + CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Demacs" \ + LD="$(tc-getCC) -nostdlib" LDFLAGS="${LDFLAGS}" +} + +src_install() { + local basedir="/usr/share/emacs/${PV}" i + + dodir ${basedir} + dodir /usr/share/man/man1 + emake --jobs=1 \ + LIBDIR="${D}"${basedir} \ + BINDIR="${D}"/usr/bin \ + MANDIR="${D}"/usr/share/man/man1 \ + install + + rmdir "${D}"${basedir}/lock || die + find "${D}"${basedir} -type f \( -name "*.c" -o -name ChangeLog \ + -o -name COPYING ! -path "*/etc/COPYING" \) -exec rm "{}" + || die + fperms -R go-w ${basedir} + + # remove duplicate DOC file + rm "${D}"${basedir}/etc/DOC || die + + # move executables to the correct place + mv "${D}"/usr/bin/emacs{,-${SLOT}} || die + for i in etags ctags emacsclient; do + mv "${D}"/usr/bin/${i}{,-emacs-${SLOT}} || die + rm "${D}"${basedir}/etc/${i} || die + done + + dodir /usr/libexec/emacs/${PV} + for i in wakeup digest-doc sorted-doc movemail cvtmail fakemail \ + yow env server + do + mv "${D}"${basedir}/etc/${i} "${D}"/usr/libexec/emacs/${PV}/${i} || die + dosym ../../../../libexec/emacs/${PV}/${i} ${basedir}/etc/${i} + done + for i in test-distrib make-docfile; do + rm "${D}"${basedir}/etc/${i} || die + done + + # move man page + mv "${D}"/usr/share/man/man1/emacs{,-${SLOT}}.1 || die + + # move Info files + dodir /usr/share/info + mv "${D}"${basedir}/info "${D}"/usr/share/info/emacs-${SLOT} || die + dosym ../../info/emacs-${SLOT} "${basedir}"/info + docompress -x /usr/share/info + + # move Info dir to avoid collisions with the dir file generated by portage + mv "${D}"/usr/share/info/emacs-${SLOT}/dir{,.orig} || die + touch "${D}"/usr/share/info/emacs-${SLOT}/.keepinfodir + + dodir /var/lib/emacs + diropts -m0777 + keepdir /var/lib/emacs/lock + + dodoc README PROBLEMS +} + +pkg_preinst() { + # move Info dir file to correct name + if [[ -d "${D}"/usr/share/info ]]; then + mv "${D}"/usr/share/info/emacs-${SLOT}/dir{.orig,} || die + fi +} + +pkg_postinst() { + eselect emacs update ifunset +} + +pkg_postrm() { + eselect emacs update ifunset +} |