From b17a3ef12038de50228bade1f05502c74e135321 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 2 Sep 2020 14:09:07 +0100 Subject: gentoo resync : 02.09.2020 --- app-editors/emacs/Manifest | 19 +- app-editors/emacs/emacs-18.59-r12.ebuild | 166 ----------- app-editors/emacs/emacs-18.59-r13.ebuild | 165 +++++++++++ app-editors/emacs/emacs-23.4-r18.ebuild | 353 ----------------------- app-editors/emacs/emacs-23.4-r19.ebuild | 351 +++++++++++++++++++++++ app-editors/emacs/emacs-24.5-r7.ebuild | 347 ---------------------- app-editors/emacs/emacs-24.5-r8.ebuild | 347 ++++++++++++++++++++++ app-editors/emacs/emacs-25.3-r6.ebuild | 357 ----------------------- app-editors/emacs/emacs-25.3-r7.ebuild | 357 +++++++++++++++++++++++ app-editors/emacs/emacs-26.3-r1.ebuild | 383 ------------------------- app-editors/emacs/emacs-26.3-r2.ebuild | 383 +++++++++++++++++++++++++ app-editors/emacs/emacs-27.1-r1.ebuild | 426 ++++++++++++++++++++++++++++ app-editors/emacs/emacs-27.1.9999-r1.ebuild | 28 +- app-editors/emacs/emacs-27.1.ebuild | 426 ---------------------------- app-editors/emacs/emacs-28.0.9999.ebuild | 28 +- 15 files changed, 2066 insertions(+), 2070 deletions(-) delete mode 100644 app-editors/emacs/emacs-18.59-r12.ebuild create mode 100644 app-editors/emacs/emacs-18.59-r13.ebuild delete mode 100644 app-editors/emacs/emacs-23.4-r18.ebuild create mode 100644 app-editors/emacs/emacs-23.4-r19.ebuild delete mode 100644 app-editors/emacs/emacs-24.5-r7.ebuild create mode 100644 app-editors/emacs/emacs-24.5-r8.ebuild delete mode 100644 app-editors/emacs/emacs-25.3-r6.ebuild create mode 100644 app-editors/emacs/emacs-25.3-r7.ebuild delete mode 100644 app-editors/emacs/emacs-26.3-r1.ebuild create mode 100644 app-editors/emacs/emacs-26.3-r2.ebuild create mode 100644 app-editors/emacs/emacs-27.1-r1.ebuild delete mode 100644 app-editors/emacs/emacs-27.1.ebuild (limited to 'app-editors/emacs') diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest index d24842d56bba..18ce3059501e 100644 --- a/app-editors/emacs/Manifest +++ b/app-editors/emacs/Manifest @@ -1,5 +1,4 @@ -DIST emacs-18.59-linux22x-elf-glibc21.diff.gz 15671 BLAKE2B 0106fe8053b4f65f384d451ca85138991a57afaca16b32035585055bb877c039af826859fa58c4660ec80664d3bfb0ee7a757ad76381c150ebcb22cb333a98d6 SHA512 c6c6ea33850dadf08d68fff56fc6aacc80ad1aa36661260715d50b95438942d56e6244094427d50356cfe716f26559feb885254c436399bff7be639637d605b6 -DIST emacs-18.59-patches-12.tar.xz 22252 BLAKE2B 14cb456f83447b298b280e11920d486c8cbe824f329ed841ceaa3751e68123bc8c7eda1ed4e2070eaf479d0cf8f8319294ab9f2c31cacc7a9a822bab7a2c70d0 SHA512 24a259383b4fd303d267c9c1bce0e7c99ec8838a45b62ff16ea1f37879d240f000844cdd5e1de5ec6f87fee7cb42b23447dc6958e9fb4b2fc83e5f2d5c21a6b2 +DIST emacs-18.59-patches-13.tar.xz 33532 BLAKE2B 17682fb03c3606794743e702f8389a9476fe09a8c0cc970828aa515a5fc2b1d2df620cdc168d4727635492b38da81ab525c05e20cb77c86d5ae691976deb8d94 SHA512 912afbb4e42efb9e42df4e06c21bcf1d7e2f203d35edb2b410b80c9e25f2e4b37dbb28e6fa36691ce44c53da9f3eb57518da164ecca1599147072219244a8b35 DIST emacs-18.59.tar.gz 2962652 BLAKE2B d617636daff41e672af2dcda26ec24b2495cf0a3e6373561ee26a2a922b7252c074dd6b79289d771853a4720c60f084f5726b904bf65989718173232ac874b0b SHA512 03ce565e346e89b7aacb1852f4783e8907f394de7da0c543b475cb038eb89b87f980d0f7ca1841b1d2108b20f211e95113c7214e4a33e5767a1827ff43173f33 DIST emacs-23.4-patches-23.tar.xz 19932 BLAKE2B 941d939d1a66af162016eb7f4a34a3a6d19736ecbd06e2499ccb0bf8806b2b3583de324308698b00d0b47a3d0b8a046e5d5dcb2d681c2bba90ec40b58b4e9855 SHA512 83e2cef7ebe07fc69806d01946c6e96fa0e92b363e9c6531992593eeb29413518217fef05bba48729356af7d1326c3667748185aad971a625daccb803b2bfe58 DIST emacs-23.4.tar.bz2 38646508 BLAKE2B 33dac5d27a63b7aab6b4053964a0ecf7f7939c7aea5af15103f2da7bd34fbb18dba7a1bf44cc4fcc2e3fb1439cdf7085d8dfc4b0005f5485748996e75ca6872d SHA512 def7a95ecaefae24d8102b96b1d575a23def1b11a8f0bb17b68f7913bd118e2ea4449a8feee76c1bd649f099b70419f0d494ddd9bb32b26f92720cda842b0296 @@ -9,12 +8,12 @@ DIST emacs-25.3-patches-2.tar.xz 2488 BLAKE2B 93c6a18e7f729a5b4d299974581c99835e DIST emacs-25.3.tar.xz 42854740 BLAKE2B 4f4e2572bbef48b75c561497fc22046081e56099b6174725d79b15a5b16d5c886eaf8ff3f75cf561e989ebb092ab9e98ba7503e720a9db7560758b30d5116f23 SHA512 1cce656451b6ca8502ebb229e88bd3ef48b7f9444a10eeac4ea43bd5491b2efacd641dfa35227a33362c3866493d3449cf1df81606563eef44bba0ed668e457f DIST emacs-26.3.tar.xz 44415140 BLAKE2B aa8434e6431992ee40402f03a890dd2c49784ee76f437888efe61d66b9aa2bdb816eb0bfe1055e9e154a8bb3ed065fee71623741b474d465a96964618ec775e3 SHA512 4d5a4319253afb081e105a3697eb6eeb8d8a0da18cd41346e376ca5af1e180a26e641f76c64fad1b0253168f14a511f0a4d9d4141524fb1cf4d04f25b05a76e9 DIST emacs-27.1.tar.xz 43752012 BLAKE2B 433fbf234c711954269e7e10348abbd4a2bc4c357a59164c625a5ccee2de85a149636c70ad3fad3c09dbbd24900badfd2c0c645017bb33ab3e25d3decff72057 SHA512 dfb26531d2c19cf9fb56505f03d799654b45e5f9528e777900e8280ed2c1d21e04c52f510528e31e015977c471ae63164cedee6174b7439ebcf479a21fc18064 -EBUILD emacs-18.59-r12.ebuild 4461 BLAKE2B 894572f7e472d2f79ffa2baef17602763072c0b4fe20e511208a346dbe8a655e6674be680c96a96a9d1312d84eaed8647d8c194037c990869c954f5791ac4f30 SHA512 c5b153cc299fdb5568301794aea6943cd39be2a7b3dafa5d39c8d3debd6a3a48279592b9bd116f8079335105e691b52a3dfe10f94f8777b4a404af4678088d1a -EBUILD emacs-23.4-r18.ebuild 10977 BLAKE2B 8e44c5f9f219081485ad0e923400e31cac34f76eea114f7e1d1619e884383680bfa2926966664c3a298bdf75dbb85f3b90dfc94b51f1b7c7669978c7e630dabc SHA512 e1ae3906e405d95e724ca3b79655a7e27eb4881d7a5589a7df383caf96a24f26f275f043ce54c0478130a711b0e1d06108c3943613088969f976883ab5fd9e5c -EBUILD emacs-24.5-r7.ebuild 10764 BLAKE2B bb9a3be1061b105c1c4eee45ce983e80b0a914dd3848951bac2ae4ace4b7b7a830741169d1e75ea85753247310eae94066a739da76dfeb0bcf6c43b7b1418a3e SHA512 5079762e2e811379dfa5ab124b0574d93aa2c2a01998426e92bec83ed2fcae5b11a7efd49ffb23f95ed3dad5ee5b8d2cd60261c716ee4bce4082499acadcf273 -EBUILD emacs-25.3-r6.ebuild 11106 BLAKE2B 9e929e3ac144808109478312fb4977c472df10c677551ed9e69d43bf2ced0090df2dd0c6dee97a7491db64228e8972e0f00f2faba755425efaf64c9b15c6ccd2 SHA512 9249376d8b20d553ee6c09a7610315dc6a4c3c845d9e67505b54ddc4b21cf8b9502d30aa57255b109d0c28e8f18b5ca9e66f8b470761241a5de497eb4d0daee7 -EBUILD emacs-26.3-r1.ebuild 11893 BLAKE2B c51762efee73ded3fba50816ef9ca156b319af2325f9c88998fb4f3ca90248140f375b5b21f282cd8d49dc2d4fe474c788fc307029d10419c6b63cb4f476b942 SHA512 06ba725741f39b884dce1b183384173407f78dd72ecf3acad6900c1a2c49ec3dd0818ba3ce69a8aabc60d98498839002224f0cc7ee0caa6447e2ce59290924a4 -EBUILD emacs-27.1.9999-r1.ebuild 13402 BLAKE2B da1272c9cf8c419c078958f6256312572c0027d4a712a72075351f8700e51939853448989539cbddb21eec5c83ceb53b15fa40d3673ffd218d6638e7aeb59ec5 SHA512 cc08d78ee2fa1cb62e241490fbc225066683d84ce862523dbe619bebd3add1c8fbf6c55992681329fd82556d3a5f5a447c2c63101af1612b1221f321b2e96a82 -EBUILD emacs-27.1.ebuild 13445 BLAKE2B b6f97454b4678468d5c02b1c9b90ce453816329e90b02b48b5974dbd5194be7e9375bb1beda83c32d20fac36cd3f205b400dadcbd035460f1b1905df3abc31cd SHA512 2cde3a39baa1fb6ce36bde553f45c70b7d280409fd60e9838f107bad25d485a9a6bfca882d37689cd383d5d2ada220ebc8e3fea7639fa966735796dbc88aa4cd -EBUILD emacs-28.0.9999.ebuild 13373 BLAKE2B a874c9d10df48c2b4b2b151686d5099902be4d7c53e4d62ab2c4151ce4c355d3338faed03509dabfecf6f57ef0338ffc61b39874e345c1a338ce68ef41828b77 SHA512 48fa433032d421a1cd64bb1188e6265748f0946c71a732a80f8c52fa87cfe89b7bd438785fac849f8bfa160db52ad924c318b1eff962a5a58520d6fa7fc05cce +EBUILD emacs-18.59-r13.ebuild 4354 BLAKE2B 0c7713a041659ddda2794957a830532fc31ad9a4dca38dc3f662be580f4f4a24b97e8c7de6cbbd5230524934e2e7d59f5aa263815996e3c51343504a4701f237 SHA512 97c565fcd3d4dab90e1967ec071d93a993aacfdac020137b19e7b063b384aadb86f2131aa45a48fff4b8730427b9d81fd51f9d4b66a3dc0334deb2fb0c21f4d6 +EBUILD emacs-23.4-r19.ebuild 10987 BLAKE2B 9837cedc2675773c59e583f40f4d3bbcdeac64235912569638e7aa879037b0d53a38fd25e81698f8993ce822562cb6ce9f3f6b8f6a404945caab9dec24c3cbe9 SHA512 dfa1b140f5ba8d9787d2e2b3a4c183c1657faabb73c4973aeaad1d911c293ead947374b674ae80e782d1b437a9d69ba574a0b231d2f6e30e72c18291e7973f17 +EBUILD emacs-24.5-r8.ebuild 10839 BLAKE2B 71f333423f8399ff9a4eb343d5c521c24f43705c84819d671396c90d94f691a13047afba7880e09d71a586110f1a2a911327c4d6b3fa3ae9e98ba924c2cbfc29 SHA512 dc1f984e87cc347dcc8708ba4c52d1b66e031ac19c0e203df28e940e64ac02aaca56c978d1cfbf553d7ddf3847a67c8ee54888f4beb1d0cdd7534035ce264c90 +EBUILD emacs-25.3-r7.ebuild 11181 BLAKE2B 1db9d77454b1390a8747b5cf63941554ec2e88430b13d36e95c2ba050356fdcc0084fec2c7b0b1320e206d901626e736c23e83911dd0ffe93d85d4370179fb1e SHA512 dda6dbfa227997eafa93d363779162b074766a9313774cd4aa4006e605ad9967f86f61b27d0b817d01afce9cc3148c40f63cb47dae9f1267122512cdc37454d1 +EBUILD emacs-26.3-r2.ebuild 11968 BLAKE2B 60a9d7c23bf25d6c1a8d6b8d65c3689891a86756d2b0ae2dbad1ff3671afdb7b2dff60eb0e2863bd834480910f41e9a3f04bd20368158686a64ca3281623defd SHA512 ca3729faa843ee6e7f0ca7140c9cc8425b1a62e98a2fdd2cb6ced64afbec0bf5e84fd0e1a8dc990de0f85cb53ad3ed4efb8faed059246f5aa7b3539083851763 +EBUILD emacs-27.1-r1.ebuild 13520 BLAKE2B 38f906039421dd516b2aaabbdd564ade2751ed09dc0b8e973cf78a52b8ba72e65bb88f3b57c9f8a913f6ee0e95cd6ddc567e4aab1de8cdf69b113b11607b79fa SHA512 5131994b3ee6032266232e8af49e15a4f9c1ab9e26a85a3c34c181583730694d0a20a6b099a734dca15308bfdcbdec18e9c33c4c654f7eb31ea78203b5670194 +EBUILD emacs-27.1.9999-r1.ebuild 13477 BLAKE2B 0331ea699d68acfff608efcc88f367e30633c0b115a04ed24328325786fb06730d7b063996a2b85ab01a74f8d790edbd706a8d6dc49e4f6ccab6c4d793e5c0b2 SHA512 e26cf52c1e67c57a9f9dec311a45e0ff6d8531e75774e55790bdeac257b9e03f189eeaa5ba82e09856e2ad892f0e4355e3f5010ee29812ec5ac99e6c3839de37 +EBUILD emacs-28.0.9999.ebuild 13448 BLAKE2B db0e9b950299594bd63f8a5b755bb52f8dfc47cbb10cca4ad71638d80e06bbbbb88e42bc5ec5c04ba96e86d56c2165a9ce153768dfe7be42462a5e67f50d837e SHA512 3cf9cdcb2b176472a0402d365119f674637a1218b35adab9edc14d67ce9e57d674a9932831b47e4367ff14f7f3efa74165b7350f0ca8a8971910a090aebf516d MISC metadata.xml 2990 BLAKE2B 226689581e5cdf7452a5b43b9b2a7ec05f4e4080e1b95f8ea0857223e074f6d05abd21c8c996ce77d33ce68f50146d99f63f7e6a64bda02f8c9317b8fa424faf SHA512 e70def35534dbc3b2803d60c5d1913a1f455b47e3f3e93a199f84b832e97eb87b9a1a43f5d2c3398496c1178437e9a2b70d18ed9802332f130b7950fdcdb71fb diff --git a/app-editors/emacs/emacs-18.59-r12.ebuild b/app-editors/emacs/emacs-18.59-r12.ebuild deleted file mode 100644 index 964b14b1384e..000000000000 --- a/app-editors/emacs/emacs-18.59-r12.ebuild +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# 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-12.tar.xz" - -LICENSE="GPL-1+ GPL-2+ BSD HPND" -SLOT="18" -KEYWORDS="amd64 x86" -IUSE="abi_x86_x32 X" - -RDEPEND="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="app-eselect/eselect-emacs - virtual/pkgconfig" - -RDEPEND="${RDEPEND} - app-eselect/eselect-emacs" - -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 #nowarn - 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 -} diff --git a/app-editors/emacs/emacs-18.59-r13.ebuild b/app-editors/emacs/emacs-18.59-r13.ebuild new file mode 100644 index 000000000000..4f56535c58dd --- /dev/null +++ b/app-editors/emacs/emacs-18.59-r13.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2020 Gentoo Authors +# 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 + https://dev.gentoo.org/~ulm/emacs/${P}-patches-13.tar.xz" + +LICENSE="GPL-1+ GPL-2+ BSD HPND" +SLOT="18" +KEYWORDS="amd64 x86" +IUSE="abi_x86_x32 gui" + +RDEPEND="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(-)] ) + ) + gui? ( x11-libs/libX11 )" + +DEPEND="${RDEPEND} + gui? ( + x11-base/xorg-proto + x11-misc/xbitmaps + )" + +BDEPEND="app-eselect/eselect-emacs + virtual/pkgconfig" + +RDEPEND="${RDEPEND} + app-eselect/eselect-emacs" + +PATCHES="../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 gui && 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 #nowarn + 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 +} diff --git a/app-editors/emacs/emacs-23.4-r18.ebuild b/app-editors/emacs/emacs-23.4-r18.ebuild deleted file mode 100644 index a84fad2f8d3a..000000000000 --- a/app-editors/emacs/emacs-23.4-r18.ebuild +++ /dev/null @@ -1,353 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -WANT_AUTOMAKE="none" - -inherit autotools elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs - -DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" -HOMEPAGE="https://www.gnu.org/software/emacs/" -SRC_URI="mirror://gnu/emacs/${P}.tar.bz2 - https://dev.gentoo.org/~ulm/emacs/${P}-patches-23.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 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" -IUSE="alsa aqua athena dbus games gconf gif gpm gtk gzip-el jpeg kerberos livecd m17n-lib motif png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm" -REQUIRED_USE="?? ( aqua X )" - -RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] - net-libs/liblockfile - sys-libs/ncurses:0= - kerberos? ( virtual/krb5 ) - alsa? ( media-libs/alsa-lib ) - games? ( acct-group/gamestat ) - gpm? ( sys-libs/gpm ) - dbus? ( sys-apps/dbus ) - X? ( - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-misc/xbitmaps - gconf? ( >=gnome-base/gconf-2.26.2 ) - gif? ( media-libs/giflib:0= ) - 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 - x11-libs/libXrender - 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 - x11-libs/libXpm - x11-libs/libXext - x11-libs/libXmu - x11-libs/libXt - ) - !motif? ( - Xaw3d? ( - x11-libs/libXaw3d - x11-libs/libXext - x11-libs/libXmu - x11-libs/libXt - ) - !Xaw3d? ( athena? ( - x11-libs/libXaw - x11-libs/libXext - x11-libs/libXmu - x11-libs/libXt - ) ) - ) - ) - )" - -DEPEND="${RDEPEND} - X? ( x11-base/xorg-proto )" - -BDEPEND="app-eselect/eselect-emacs - alsa? ( virtual/pkgconfig ) - dbus? ( virtual/pkgconfig ) - X? ( virtual/pkgconfig ) - gzip-el? ( app-arch/gzip )" - -RDEPEND="${RDEPEND} - app-eselect/eselect-emacs" - -EMACS_SUFFIX="emacs-${SLOT}" -SITEFILE="20${EMACS_SUFFIX}-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() { - eapply ../patch - eapply_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 - - mv configure.in configure.ac || die - eautoreconf - touch src/stamp-h.in || die -} - -src_configure() { - strip-flags - filter-flags -fstrict-aliasing -pie - append-flags $(test-flags -fno-strict-aliasing) - append-ldflags $(test-flags -no-pie) #639568 - - if use ia64; then - replace-flags "-O[2-9]" -O1 #325373 - else - replace-flags "-O[3-9]" -O2 - fi - - # Don't trigger a floating point exception for NaNs on alpha - use alpha && append-flags -mieee - - 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 - - # 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" \ - --without-hesiod \ - $(use_with kerberos) $(use_with kerberos kerberos5) \ - $(use_with gpm) \ - $(use_with dbus) \ - ${myconf} -} - -src_compile() { - # Disable sandbox when dumping. For the unbelievers, see bug #131505 - emake CC="$(tc-getCC)" \ - AR="$(tc-getAR) cq" \ - RANLIB="$(tc-getRANLIB)" \ - RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" -} - -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 /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 || die - X - ;;; ${EMACS_SUFFIX} 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\\\\>")) - X (and path - X ;; move Emacs Info dir before anything else in /usr/share - 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_SUFFIX^}.app - mv nextstep/Emacs.app \ - "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die - fi - - local 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\\n${EMACS_SUFFIX^}.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 - if [[ -d ${ED}/usr/share/info ]]; then - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die - 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-23.4-r19.ebuild b/app-editors/emacs/emacs-23.4-r19.ebuild new file mode 100644 index 000000000000..a7ebc3b34702 --- /dev/null +++ b/app-editors/emacs/emacs-23.4-r19.ebuild @@ -0,0 +1,351 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +WANT_AUTOMAKE="none" + +inherit autotools elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs + +DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" +HOMEPAGE="https://www.gnu.org/software/emacs/" +SRC_URI="mirror://gnu/emacs/${P}.tar.bz2 + https://dev.gentoo.org/~ulm/emacs/${P}-patches-23.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 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="alsa aqua athena dbus games gconf gif gpm gtk gui gzip-el jpeg kerberos livecd m17n-lib motif png sound source svg tiff toolkit-scroll-bars Xaw3d xft +xpm" + +RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?] + net-libs/liblockfile + sys-libs/ncurses:0= + kerberos? ( virtual/krb5 ) + alsa? ( media-libs/alsa-lib ) + games? ( acct-group/gamestat ) + gpm? ( sys-libs/gpm ) + dbus? ( sys-apps/dbus ) + gui? ( !aqua? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-misc/xbitmaps + gconf? ( >=gnome-base/gconf-2.26.2 ) + gif? ( media-libs/giflib:0= ) + 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 + x11-libs/libXrender + 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 + x11-libs/libXpm + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXt + ) + !motif? ( + Xaw3d? ( + x11-libs/libXaw3d + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXt + ) + !Xaw3d? ( athena? ( + x11-libs/libXaw + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXt + ) ) + ) + ) + ) )" + +DEPEND="${RDEPEND} + gui? ( !aqua? ( x11-base/xorg-proto ) )" + +BDEPEND="app-eselect/eselect-emacs + virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +RDEPEND="${RDEPEND} + app-eselect/eselect-emacs" + +EMACS_SUFFIX="emacs-${SLOT}" +SITEFILE="20${EMACS_SUFFIX}-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() { + eapply ../patch + eapply_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 + + mv configure.in configure.ac || die + eautoreconf + touch src/stamp-h.in || die +} + +src_configure() { + strip-flags + filter-flags -fstrict-aliasing -pie + append-flags $(test-flags -fno-strict-aliasing) + append-ldflags $(test-flags -no-pie) #639568 + + if use ia64; then + replace-flags "-O[2-9]" -O1 #325373 + else + replace-flags "-O[3-9]" -O2 + fi + + # Don't trigger a floating point exception for NaNs on alpha + use alpha && append-flags -mieee + + 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 gui; then + einfo "Configuring to build without window system support" + myconf+=" --without-x --without-ns" + elif use aqua; then + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" + myconf+=" --with-ns --disable-ns-self-contained" + myconf+=" --without-x" + else + 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 + fi + + # 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" \ + --without-hesiod \ + $(use_with kerberos) $(use_with kerberos kerberos5) \ + $(use_with gpm) \ + $(use_with dbus) \ + ${myconf} +} + +src_compile() { + # Disable sandbox when dumping. For the unbelievers, see bug #131505 + emake CC="$(tc-getCC)" \ + AR="$(tc-getAR) cq" \ + RANLIB="$(tc-getRANLIB)" \ + RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" +} + +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 /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 || die + X + ;;; ${EMACS_SUFFIX} 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\\\\>")) + X (and path + X ;; move Emacs Info dir before anything else in /usr/share + 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_SUFFIX^}.app + mv nextstep/Emacs.app \ + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + fi + + local 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 gui && 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\\n${EMACS_SUFFIX^}.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 + if [[ -d ${ED}/usr/share/info ]]; then + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die + 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.5-r7.ebuild b/app-editors/emacs/emacs-24.5-r7.ebuild deleted file mode 100644 index e82a60ec1c26..000000000000 --- a/app-editors/emacs/emacs-24.5-r7.ebuild +++ /dev/null @@ -1,347 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools elisp-common flag-o-matic readme.gentoo-r1 - -DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" -HOMEPAGE="https://www.gnu.org/software/emacs/" -SRC_URI="mirror://gnu/emacs/${P}.tar.xz - https://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 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="acl alsa aqua athena dbus games gconf gfile gif gpm gsettings gtk gtk2 gzip-el imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib" -REQUIRED_USE="?? ( aqua X )" - -RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] - net-libs/liblockfile - sys-libs/ncurses:0= - acl? ( virtual/acl ) - alsa? ( media-libs/alsa-lib ) - dbus? ( sys-apps/dbus ) - games? ( acct-group/gamestat ) - gpm? ( sys-libs/gpm ) - !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) - kerberos? ( virtual/krb5 ) - libxml2? ( >=dev-libs/libxml2-2.2.0 ) - selinux? ( sys-libs/libselinux ) - ssl? ( net-libs/gnutls:0= ) - zlib? ( sys-libs/zlib ) - X? ( - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXrandr - x11-misc/xbitmaps - gconf? ( >=gnome-base/gconf-2.26.2 ) - gsettings? ( >=dev-libs/glib-2.28.6 ) - gif? ( media-libs/giflib:0= ) - 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:0= ) - xft? ( - media-libs/fontconfig - media-libs/freetype - x11-libs/libXft - x11-libs/libXrender - m17n-lib? ( - >=dev-libs/libotf-0.9.4 - >=dev-libs/m17n-lib-1.5.1 - ) - ) - gtk? ( - gtk2? ( x11-libs/gtk+:2 ) - !gtk2? ( x11-libs/gtk+:3 ) - ) - !gtk? ( - motif? ( - >=x11-libs/motif-2.3:0 - x11-libs/libXpm - x11-libs/libXmu - x11-libs/libXt - ) - !motif? ( - Xaw3d? ( - x11-libs/libXaw3d - x11-libs/libXmu - x11-libs/libXt - ) - !Xaw3d? ( athena? ( - x11-libs/libXaw - x11-libs/libXmu - x11-libs/libXt - ) ) - ) - ) - )" - -DEPEND="${RDEPEND} - X? ( x11-base/xorg-proto )" - -BDEPEND="app-eselect/eselect-emacs - virtual/pkgconfig - gzip-el? ( app-arch/gzip )" - -RDEPEND="${RDEPEND} - app-eselect/eselect-emacs" - -EMACS_SUFFIX="emacs-${SLOT}" -SITEFILE="20${EMACS_SUFFIX}-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() { - eapply ../patch - eapply_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 - touch src/stamp-h.in || die -} - -src_configure() { - strip-flags - filter-flags -pie #526948 - append-ldflags $(test-flags -no-pie) #639570 - - if use ia64; then - replace-flags "-O[2-9]" -O1 #325373 - else - replace-flags "-O[3-9]" -O2 - fi - - # Don't trigger a floating point exception for NaNs on alpha - use alpha && append-flags -mieee - - 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 line - if use gtk; then - einfo "Configuring to build with GIMP Toolkit (GTK+)" - while read line; do ewarn "${line}"; done <<-EOF - Your version of GTK+ will have problems with closing open - displays. This is no problem if you just use one display, but - if you use more than one and close one of them Emacs may crash. - See . - If you intend to use more than one display, then it is strongly - recommended that you compile Emacs with the Athena/Lucid or the - Motif toolkit instead. - EOF - myconf+=" --with-x-toolkit=$(usex gtk2 gtk2 gtk3)" - 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 - ! use gtk && use gtk2 && ewarn \ - "USE flag \"gtk2\" has no effect if \"gtk\" is not set." - 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 - - 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 \ - --without-hesiod \ - --with-file-notification=$(usev inotify || usev gfile || echo no) \ - $(use_enable acl) \ - $(use_with dbus) \ - $(use_with gpm) \ - $(use_with kerberos) $(use_with kerberos kerberos5) \ - $(use_with libxml2 xml2) \ - $(use_with selinux) \ - $(use_with ssl gnutls) \ - $(use_with wide-int) \ - $(use_with zlib) \ - ${myconf} -} - -src_compile() { - # Disable sandbox when dumping. For the unbelievers, see bug #131505 - emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" -} - -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 /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 || die - X - ;;; ${EMACS_SUFFIX} 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\\\\>")) - X (and path - X ;; move Emacs Info dir before anything else in /usr/share - 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_SUFFIX^}.app - mv nextstep/Emacs.app \ - "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die - fi - - local 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\\n${EMACS_SUFFIX^}.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 - if [[ -d ${ED}/usr/share/info ]]; then - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die - 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.5-r8.ebuild b/app-editors/emacs/emacs-24.5-r8.ebuild new file mode 100644 index 000000000000..19dd854cd077 --- /dev/null +++ b/app-editors/emacs/emacs-24.5-r8.ebuild @@ -0,0 +1,347 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools elisp-common flag-o-matic readme.gentoo-r1 + +DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" +HOMEPAGE="https://www.gnu.org/software/emacs/" +SRC_URI="mirror://gnu/emacs/${P}.tar.xz + https://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 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="acl alsa aqua athena dbus games gconf gfile gif gpm gsettings gtk gtk2 gui gzip-el imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm zlib" + +RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?] + net-libs/liblockfile + sys-libs/ncurses:0= + acl? ( virtual/acl ) + alsa? ( media-libs/alsa-lib ) + dbus? ( sys-apps/dbus ) + games? ( acct-group/gamestat ) + gpm? ( sys-libs/gpm ) + !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) + kerberos? ( virtual/krb5 ) + libxml2? ( >=dev-libs/libxml2-2.2.0 ) + selinux? ( sys-libs/libselinux ) + ssl? ( net-libs/gnutls:0= ) + zlib? ( sys-libs/zlib ) + gui? ( !aqua? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXrandr + x11-misc/xbitmaps + gconf? ( >=gnome-base/gconf-2.26.2 ) + gsettings? ( >=dev-libs/glib-2.28.6 ) + gif? ( media-libs/giflib:0= ) + 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:0= ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXft + x11-libs/libXrender + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( + gtk2? ( x11-libs/gtk+:2 ) + !gtk2? ( x11-libs/gtk+:3 ) + ) + !gtk? ( + motif? ( + >=x11-libs/motif-2.3:0 + x11-libs/libXpm + x11-libs/libXmu + x11-libs/libXt + ) + !motif? ( + Xaw3d? ( + x11-libs/libXaw3d + x11-libs/libXmu + x11-libs/libXt + ) + !Xaw3d? ( athena? ( + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libXt + ) ) + ) + ) + ) )" + +DEPEND="${RDEPEND} + gui? ( !aqua? ( x11-base/xorg-proto ) )" + +BDEPEND="app-eselect/eselect-emacs + virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +RDEPEND="${RDEPEND} + app-eselect/eselect-emacs" + +EMACS_SUFFIX="emacs-${SLOT}" +SITEFILE="20${EMACS_SUFFIX}-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() { + eapply ../patch + eapply_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 + touch src/stamp-h.in || die +} + +src_configure() { + strip-flags + filter-flags -pie #526948 + append-ldflags $(test-flags -no-pie) #639570 + + if use ia64; then + replace-flags "-O[2-9]" -O1 #325373 + else + replace-flags "-O[3-9]" -O2 + fi + + # Don't trigger a floating point exception for NaNs on alpha + use alpha && append-flags -mieee + + 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 gui; then + einfo "Configuring to build without window system support" + myconf+=" --without-x --without-ns" + elif use aqua; then + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" + myconf+=" --with-ns --disable-ns-self-contained" + myconf+=" --without-x" + else + 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 line + if use gtk; then + einfo "Configuring to build with GIMP Toolkit (GTK+)" + while read line; do ewarn "${line}"; done <<-EOF + Your version of GTK+ will have problems with closing open + displays. This is no problem if you just use one display, but + if you use more than one and close one of them Emacs may crash. + See . + If you intend to use more than one display, then it is strongly + recommended that you compile Emacs with the Athena/Lucid or the + Motif toolkit instead. + EOF + myconf+=" --with-x-toolkit=$(usex gtk2 gtk2 gtk3)" + 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 + ! use gtk && use gtk2 && ewarn \ + "USE flag \"gtk2\" has no effect if \"gtk\" is not set." + 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=":gamestat" \ + --without-compress-install \ + --without-hesiod \ + --with-file-notification=$(usev inotify || usev gfile || echo no) \ + $(use_enable acl) \ + $(use_with dbus) \ + $(use_with gpm) \ + $(use_with kerberos) $(use_with kerberos kerberos5) \ + $(use_with libxml2 xml2) \ + $(use_with selinux) \ + $(use_with ssl gnutls) \ + $(use_with wide-int) \ + $(use_with zlib) \ + ${myconf} +} + +src_compile() { + # Disable sandbox when dumping. For the unbelievers, see bug #131505 + emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" +} + +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 /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 || die + X + ;;; ${EMACS_SUFFIX} 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\\\\>")) + X (and path + X ;; move Emacs Info dir before anything else in /usr/share + 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_SUFFIX^}.app + mv nextstep/Emacs.app \ + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + fi + + local 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 gui && 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\\n${EMACS_SUFFIX^}.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 + if [[ -d ${ED}/usr/share/info ]]; then + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die + 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-25.3-r6.ebuild b/app-editors/emacs/emacs-25.3-r6.ebuild deleted file mode 100644 index c5fbd04048e8..000000000000 --- a/app-editors/emacs/emacs-25.3-r6.ebuild +++ /dev/null @@ -1,357 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools elisp-common flag-o-matic readme.gentoo-r1 - -DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" -HOMEPAGE="https://www.gnu.org/software/emacs/" -SRC_URI="mirror://gnu/emacs/${P}.tar.xz - https://dev.gentoo.org/~ulm/emacs/${P}-patches-2.tar.xz" - -LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" -SLOT="25" -KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif gpm gsettings gtk gtk2 gzip-el imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib" -REQUIRED_USE="?? ( aqua X )" - -RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] - net-libs/liblockfile - sys-libs/ncurses:0= - acl? ( virtual/acl ) - alsa? ( media-libs/alsa-lib ) - dbus? ( sys-apps/dbus ) - games? ( acct-group/gamestat ) - gpm? ( sys-libs/gpm ) - !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) - kerberos? ( virtual/krb5 ) - libxml2? ( >=dev-libs/libxml2-2.2.0 ) - selinux? ( sys-libs/libselinux ) - ssl? ( net-libs/gnutls:0= ) - zlib? ( sys-libs/zlib ) - X? ( - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libxcb - x11-misc/xbitmaps - gconf? ( >=gnome-base/gconf-2.26.2 ) - gsettings? ( >=dev-libs/glib-2.28.6 ) - gif? ( media-libs/giflib:0= ) - 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:0= ) - xft? ( - media-libs/fontconfig - media-libs/freetype - x11-libs/libXft - x11-libs/libXrender - cairo? ( >=x11-libs/cairo-1.12.18 ) - m17n-lib? ( - >=dev-libs/libotf-0.9.4 - >=dev-libs/m17n-lib-1.5.1 - ) - ) - gtk? ( - gtk2? ( x11-libs/gtk+:2 ) - !gtk2? ( x11-libs/gtk+:3 ) - ) - !gtk? ( - motif? ( - >=x11-libs/motif-2.3:0 - x11-libs/libXpm - x11-libs/libXmu - x11-libs/libXt - ) - !motif? ( - Xaw3d? ( - x11-libs/libXaw3d - x11-libs/libXmu - x11-libs/libXt - ) - !Xaw3d? ( athena? ( - x11-libs/libXaw - x11-libs/libXmu - x11-libs/libXt - ) ) - ) - ) - )" - -DEPEND="${RDEPEND} - X? ( x11-base/xorg-proto )" - -BDEPEND="app-eselect/eselect-emacs - virtual/pkgconfig - gzip-el? ( app-arch/gzip )" - -RDEPEND="${RDEPEND} - !. - If you intend to use more than one display, then it is strongly - recommended that you compile Emacs with the Athena/Lucid or the - Motif toolkit instead. - EOF - myconf+=" --with-x-toolkit=$(usex gtk2 gtk2 gtk3)" - myconf+=" --without-xwidgets" - 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 - ! use gtk && use gtk2 && ewarn \ - "USE flag \"gtk2\" has no effect if \"gtk\" is not set." - 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 - - 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 \ - --without-hesiod \ - --with-file-notification=$(usev inotify || usev gfile || echo no) \ - $(use_enable acl) \ - $(use_with dbus) \ - $(use_with dynamic-loading modules) \ - $(use_with gpm) \ - $(use_with kerberos) $(use_with kerberos kerberos5) \ - $(use_with libxml2 xml2) \ - $(use_with selinux) \ - $(use_with ssl gnutls) \ - $(use_with wide-int) \ - $(use_with zlib) \ - ${myconf} -} - -src_compile() { - # Disable sandbox when dumping. For the unbelievers, see bug #131505 - emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" -} - -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 /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 || die - X - ;;; ${EMACS_SUFFIX} 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\\\\>")) - X (and path - X ;; move Emacs Info dir before anything else in /usr/share - 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_SUFFIX^}.app - mv nextstep/Emacs.app \ - "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die - fi - - local 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\\n${EMACS_SUFFIX^}.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 - if [[ -d ${ED}/usr/share/info ]]; then - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die - 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-25.3-r7.ebuild b/app-editors/emacs/emacs-25.3-r7.ebuild new file mode 100644 index 000000000000..d54d8a9d32f4 --- /dev/null +++ b/app-editors/emacs/emacs-25.3-r7.ebuild @@ -0,0 +1,357 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools elisp-common flag-o-matic readme.gentoo-r1 + +DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" +HOMEPAGE="https://www.gnu.org/software/emacs/" +SRC_URI="mirror://gnu/emacs/${P}.tar.xz + https://dev.gentoo.org/~ulm/emacs/${P}-patches-2.tar.xz" + +LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" +SLOT="25" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif gpm gsettings gtk gtk2 gui gzip-el imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm zlib" + +RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?] + net-libs/liblockfile + sys-libs/ncurses:0= + acl? ( virtual/acl ) + alsa? ( media-libs/alsa-lib ) + dbus? ( sys-apps/dbus ) + games? ( acct-group/gamestat ) + gpm? ( sys-libs/gpm ) + !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) + kerberos? ( virtual/krb5 ) + libxml2? ( >=dev-libs/libxml2-2.2.0 ) + selinux? ( sys-libs/libselinux ) + ssl? ( net-libs/gnutls:0= ) + zlib? ( sys-libs/zlib ) + gui? ( !aqua? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libxcb + x11-misc/xbitmaps + gconf? ( >=gnome-base/gconf-2.26.2 ) + gsettings? ( >=dev-libs/glib-2.28.6 ) + gif? ( media-libs/giflib:0= ) + 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:0= ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXft + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18 ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( + gtk2? ( x11-libs/gtk+:2 ) + !gtk2? ( x11-libs/gtk+:3 ) + ) + !gtk? ( + motif? ( + >=x11-libs/motif-2.3:0 + x11-libs/libXpm + x11-libs/libXmu + x11-libs/libXt + ) + !motif? ( + Xaw3d? ( + x11-libs/libXaw3d + x11-libs/libXmu + x11-libs/libXt + ) + !Xaw3d? ( athena? ( + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libXt + ) ) + ) + ) + ) )" + +DEPEND="${RDEPEND} + gui? ( !aqua? ( x11-base/xorg-proto ) )" + +BDEPEND="app-eselect/eselect-emacs + virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +RDEPEND="${RDEPEND} + !. + If you intend to use more than one display, then it is strongly + recommended that you compile Emacs with the Athena/Lucid or the + Motif toolkit instead. + EOF + myconf+=" --with-x-toolkit=$(usex gtk2 gtk2 gtk3)" + myconf+=" --without-xwidgets" + 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 + ! use gtk && use gtk2 && ewarn \ + "USE flag \"gtk2\" has no effect if \"gtk\" is not set." + 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=":gamestat" \ + --without-compress-install \ + --without-hesiod \ + --with-file-notification=$(usev inotify || usev gfile || echo no) \ + $(use_enable acl) \ + $(use_with dbus) \ + $(use_with dynamic-loading modules) \ + $(use_with gpm) \ + $(use_with kerberos) $(use_with kerberos kerberos5) \ + $(use_with libxml2 xml2) \ + $(use_with selinux) \ + $(use_with ssl gnutls) \ + $(use_with wide-int) \ + $(use_with zlib) \ + ${myconf} +} + +src_compile() { + # Disable sandbox when dumping. For the unbelievers, see bug #131505 + emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" +} + +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 /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 || die + X + ;;; ${EMACS_SUFFIX} 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\\\\>")) + X (and path + X ;; move Emacs Info dir before anything else in /usr/share + 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_SUFFIX^}.app + mv nextstep/Emacs.app \ + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + fi + + local 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 gui && 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\\n${EMACS_SUFFIX^}.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 + if [[ -d ${ED}/usr/share/info ]]; then + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die + 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-26.3-r1.ebuild b/app-editors/emacs/emacs-26.3-r1.ebuild deleted file mode 100644 index 334f327910fc..000000000000 --- a/app-editors/emacs/emacs-26.3-r1.ebuild +++ /dev/null @@ -1,383 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools elisp-common flag-o-matic readme.gentoo-r1 - -DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" -HOMEPAGE="https://www.gnu.org/software/emacs/" -SRC_URI="mirror://gnu/emacs/${P}.tar.xz" - -LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" -SLOT="26" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif gpm gsettings gtk gtk2 gzip-el imagemagick +inotify jpeg kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm xwidgets zlib" -REQUIRED_USE="?? ( aqua X )" - -RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] - sys-libs/ncurses:0= - acl? ( virtual/acl ) - alsa? ( media-libs/alsa-lib ) - dbus? ( sys-apps/dbus ) - games? ( acct-group/gamestat ) - gpm? ( sys-libs/gpm ) - !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) - kerberos? ( virtual/krb5 ) - lcms? ( media-libs/lcms:2 ) - libxml2? ( >=dev-libs/libxml2-2.2.0 ) - mailutils? ( net-mail/mailutils[clients] ) - !mailutils? ( net-libs/liblockfile ) - selinux? ( sys-libs/libselinux ) - ssl? ( net-libs/gnutls:0= ) - systemd? ( sys-apps/systemd ) - zlib? ( sys-libs/zlib ) - X? ( - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libxcb - x11-misc/xbitmaps - gconf? ( >=gnome-base/gconf-2.26.2 ) - gsettings? ( >=dev-libs/glib-2.28.6 ) - gif? ( media-libs/giflib:0= ) - 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:0= ) - xft? ( - media-libs/fontconfig - media-libs/freetype - x11-libs/libXft - x11-libs/libXrender - cairo? ( >=x11-libs/cairo-1.12.18 ) - m17n-lib? ( - >=dev-libs/libotf-0.9.4 - >=dev-libs/m17n-lib-1.5.1 - ) - ) - gtk? ( - gtk2? ( x11-libs/gtk+:2 ) - !gtk2? ( - x11-libs/gtk+:3 - xwidgets? ( - net-libs/webkit-gtk:4= - x11-libs/libXcomposite - ) - ) - ) - !gtk? ( - motif? ( - >=x11-libs/motif-2.3:0 - x11-libs/libXpm - x11-libs/libXmu - x11-libs/libXt - ) - !motif? ( - Xaw3d? ( - x11-libs/libXaw3d - x11-libs/libXmu - x11-libs/libXt - ) - !Xaw3d? ( athena? ( - x11-libs/libXaw - x11-libs/libXmu - x11-libs/libXt - ) ) - ) - ) - )" - -DEPEND="${RDEPEND} - X? ( x11-base/xorg-proto )" - -BDEPEND="app-eselect/eselect-emacs - virtual/pkgconfig - gzip-el? ( app-arch/gzip )" - -RDEPEND="${RDEPEND} - !. - If you intend to use more than one display, then it is strongly - recommended that you compile Emacs with the Athena/Lucid or the - Motif toolkit instead. - EOF - if use gtk2; then - myconf+=" --with-x-toolkit=gtk2 --without-xwidgets" - use xwidgets && ewarn \ - "USE flag \"xwidgets\" has no effect if \"gtk2\" is set." - else - myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)" - fi - 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 - if ! use gtk; then - use gtk2 && ewarn \ - "USE flag \"gtk2\" has no effect if \"gtk\" is not set." - use xwidgets && ewarn \ - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." - 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 - - econf \ - --program-suffix="-${EMACS_SUFFIX}" \ - --includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \ - --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ - --localstatedir="${EPREFIX}"/var \ - --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ - --without-compress-install \ - --without-hesiod \ - --without-pop \ - --with-file-notification=$(usev inotify || usev gfile || echo no) \ - $(use_enable acl) \ - $(use_with dbus) \ - $(use_with dynamic-loading modules) \ - $(use_with games gameuser ":gamestat") \ - $(use_with gpm) \ - $(use_with kerberos) $(use_with kerberos kerberos5) \ - $(use_with lcms lcms2) \ - $(use_with libxml2 xml2) \ - $(use_with mailutils) \ - $(use_with selinux) \ - $(use_with ssl gnutls) \ - $(use_with systemd libsystemd) \ - $(use_with threads) \ - $(use_with wide-int) \ - $(use_with zlib) \ - ${myconf} -} - -src_compile() { - # Disable sandbox when dumping. For the unbelievers, see bug #131505 - emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" -} - -src_install() { - emake DESTDIR="${D}" NO_BIN_LINK=t install - - mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die - mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die - mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die - - # move info dir to avoid collisions with the dir file generated by portage - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die - 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}/usr/$(get_libdir)" - rm -rf "${ED}"/var - - # remove unused /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 systemd; then - insinto /usr/lib/systemd/user - sed -e "/^##/d" \ - -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ - -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ - etc/emacs.service | newins - ${EMACS_SUFFIX}.service - assert - fi - - 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 || die - X - ;;; ${EMACS_SUFFIX} 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\\\\>")) - X (and path - X ;; move Emacs Info dir before anything else in /usr/share - 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_SUFFIX^}.app - mv nextstep/Emacs.app \ - "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die - fi - - local 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\\n${EMACS_SUFFIX^}.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 - if [[ -d ${ED}/usr/share/info ]]; then - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die - 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-26.3-r2.ebuild b/app-editors/emacs/emacs-26.3-r2.ebuild new file mode 100644 index 000000000000..764b1ea0cc7c --- /dev/null +++ b/app-editors/emacs/emacs-26.3-r2.ebuild @@ -0,0 +1,383 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools elisp-common flag-o-matic readme.gentoo-r1 + +DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" +HOMEPAGE="https://www.gnu.org/software/emacs/" +SRC_URI="mirror://gnu/emacs/${P}.tar.xz" + +LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" +SLOT="26" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif gpm gsettings gtk gtk2 gui gzip-el imagemagick +inotify jpeg kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm xwidgets zlib" + +RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?] + sys-libs/ncurses:0= + acl? ( virtual/acl ) + alsa? ( media-libs/alsa-lib ) + dbus? ( sys-apps/dbus ) + games? ( acct-group/gamestat ) + gpm? ( sys-libs/gpm ) + !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) + kerberos? ( virtual/krb5 ) + lcms? ( media-libs/lcms:2 ) + libxml2? ( >=dev-libs/libxml2-2.2.0 ) + mailutils? ( net-mail/mailutils[clients] ) + !mailutils? ( net-libs/liblockfile ) + selinux? ( sys-libs/libselinux ) + ssl? ( net-libs/gnutls:0= ) + systemd? ( sys-apps/systemd ) + zlib? ( sys-libs/zlib ) + gui? ( !aqua? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libxcb + x11-misc/xbitmaps + gconf? ( >=gnome-base/gconf-2.26.2 ) + gsettings? ( >=dev-libs/glib-2.28.6 ) + gif? ( media-libs/giflib:0= ) + 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:0= ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXft + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18 ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( + gtk2? ( x11-libs/gtk+:2 ) + !gtk2? ( + x11-libs/gtk+:3 + xwidgets? ( + net-libs/webkit-gtk:4= + x11-libs/libXcomposite + ) + ) + ) + !gtk? ( + motif? ( + >=x11-libs/motif-2.3:0 + x11-libs/libXpm + x11-libs/libXmu + x11-libs/libXt + ) + !motif? ( + Xaw3d? ( + x11-libs/libXaw3d + x11-libs/libXmu + x11-libs/libXt + ) + !Xaw3d? ( athena? ( + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libXt + ) ) + ) + ) + ) )" + +DEPEND="${RDEPEND} + gui? ( !aqua? ( x11-base/xorg-proto ) )" + +BDEPEND="app-eselect/eselect-emacs + virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +RDEPEND="${RDEPEND} + !. + If you intend to use more than one display, then it is strongly + recommended that you compile Emacs with the Athena/Lucid or the + Motif toolkit instead. + EOF + if use gtk2; then + myconf+=" --with-x-toolkit=gtk2 --without-xwidgets" + use xwidgets && ewarn \ + "USE flag \"xwidgets\" has no effect if \"gtk2\" is set." + else + myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)" + fi + 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 + if ! use gtk; then + use gtk2 && ewarn \ + "USE flag \"gtk2\" has no effect if \"gtk\" is not set." + use xwidgets && ewarn \ + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." + fi + fi + + econf \ + --program-suffix="-${EMACS_SUFFIX}" \ + --includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \ + --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ + --localstatedir="${EPREFIX}"/var \ + --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ + --without-compress-install \ + --without-hesiod \ + --without-pop \ + --with-file-notification=$(usev inotify || usev gfile || echo no) \ + $(use_enable acl) \ + $(use_with dbus) \ + $(use_with dynamic-loading modules) \ + $(use_with games gameuser ":gamestat") \ + $(use_with gpm) \ + $(use_with kerberos) $(use_with kerberos kerberos5) \ + $(use_with lcms lcms2) \ + $(use_with libxml2 xml2) \ + $(use_with mailutils) \ + $(use_with selinux) \ + $(use_with ssl gnutls) \ + $(use_with systemd libsystemd) \ + $(use_with threads) \ + $(use_with wide-int) \ + $(use_with zlib) \ + ${myconf} +} + +src_compile() { + # Disable sandbox when dumping. For the unbelievers, see bug #131505 + emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" +} + +src_install() { + emake DESTDIR="${D}" NO_BIN_LINK=t install + + mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die + mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die + mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die + + # move info dir to avoid collisions with the dir file generated by portage + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die + 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}/usr/$(get_libdir)" + rm -rf "${ED}"/var + + # remove unused /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 systemd; then + insinto /usr/lib/systemd/user + sed -e "/^##/d" \ + -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ + -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ + etc/emacs.service | newins - ${EMACS_SUFFIX}.service + assert + fi + + 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 || die + X + ;;; ${EMACS_SUFFIX} 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\\\\>")) + X (and path + X ;; move Emacs Info dir before anything else in /usr/share + 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_SUFFIX^}.app + mv nextstep/Emacs.app \ + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + fi + + local 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 gui && 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\\n${EMACS_SUFFIX^}.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 + if [[ -d ${ED}/usr/share/info ]]; then + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die + 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-27.1-r1.ebuild b/app-editors/emacs/emacs-27.1-r1.ebuild new file mode 100644 index 000000000000..b2548c76e2c3 --- /dev/null +++ b/app-editors/emacs/emacs-27.1-r1.ebuild @@ -0,0 +1,426 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools elisp-common flag-o-matic readme.gentoo-r1 + +if [[ ${PV##*.} = 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git" + EGIT_BRANCH="emacs-27" + EGIT_CHECKOUT_DIR="${WORKDIR}/emacs" + S="${EGIT_CHECKOUT_DIR}" + SLOT="${PV%%.*}-vcs" +else + # 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%%_*}" + SRC_URI="mirror://gnu/emacs/${P}.tar.xz" + S="${WORKDIR}/emacs-${FULL_VERSION}" + # PV can be in any of the following formats: + # 27.1 released version (slot 27) + # 27.1_rc1 upstream release candidate (27) + # 27.0.9999 live ebuild (slot 27-vcs) + # 27.0.90 upstream prerelease snapshot (27-vcs) + # 27.0.50_pre20191223 snapshot by Gentoo developer (27-vcs) + if [[ ${PV} == *_pre* ]]; then + SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz" + S="${WORKDIR}/emacs" + elif [[ ${PV//[0-9]} != "." ]]; then + SRC_URI="mirror://gnu-alpha/emacs/pretest/${PN}-${PV/_/-}.tar.xz" + fi + SLOT="${PV%%.*}" + [[ ${PV} == *.*.* ]] && SLOT+="-vcs" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +fi + +DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" +HOMEPAGE="https://www.gnu.org/software/emacs/" + +LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gui gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm xwidgets zlib" +RESTRICT="test" + +RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?] + sys-libs/ncurses:0= + acl? ( virtual/acl ) + alsa? ( media-libs/alsa-lib ) + dbus? ( sys-apps/dbus ) + games? ( acct-group/gamestat ) + gmp? ( dev-libs/gmp:0= ) + gpm? ( sys-libs/gpm ) + !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) + json? ( dev-libs/jansson ) + kerberos? ( virtual/krb5 ) + lcms? ( media-libs/lcms:2 ) + libxml2? ( >=dev-libs/libxml2-2.2.0 ) + mailutils? ( net-mail/mailutils[clients] ) + !mailutils? ( net-libs/liblockfile ) + selinux? ( sys-libs/libselinux ) + ssl? ( net-libs/gnutls:0= ) + systemd? ( sys-apps/systemd ) + zlib? ( sys-libs/zlib ) + gui? ( !aqua? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libxcb + x11-misc/xbitmaps + gconf? ( >=gnome-base/gconf-2.26.2 ) + gsettings? ( >=dev-libs/glib-2.28.6 ) + gif? ( media-libs/giflib:0= ) + 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:0= ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXft + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18 ) + harfbuzz? ( media-libs/harfbuzz:0= ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( + gtk2? ( x11-libs/gtk+:2 ) + !gtk2? ( + x11-libs/gtk+:3 + xwidgets? ( + net-libs/webkit-gtk:4= + x11-libs/libXcomposite + ) + ) + ) + !gtk? ( + motif? ( + >=x11-libs/motif-2.3:0 + x11-libs/libXpm + x11-libs/libXmu + x11-libs/libXt + ) + !motif? ( + Xaw3d? ( + x11-libs/libXaw3d + x11-libs/libXmu + x11-libs/libXt + ) + !Xaw3d? ( athena? ( + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libXt + ) ) + ) + ) + ) )" + +DEPEND="${RDEPEND} + gui? ( !aqua? ( x11-base/xorg-proto ) )" + +BDEPEND="app-eselect/eselect-emacs + sys-apps/texinfo + virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +RDEPEND="${RDEPEND} + !<=app-editors/emacs-27.1.9999-r0:27-vcs + !app-editors/emacs-vcs:27 + app-eselect/eselect-emacs" + +EMACS_SUFFIX="emacs-${SLOT}" +SITEFILE="20${EMACS_SUFFIX}-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 + + eapply_user + + # Fix filename reference in redirected man page + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die + + #AT_M4DIR=m4 eautoreconf +} + +src_configure() { + strip-flags + filter-flags -pie #526948 + + if 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 gui; then + einfo "Configuring to build without window system support" + myconf+=" --without-x --without-ns" + elif use aqua; then + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" + myconf+=" --with-ns --disable-ns-self-contained" + myconf+=" --without-x" + else + 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 cairo)" + myconf+=" $(use_with harfbuzz)" + myconf+=" $(use_with m17n-lib libotf)" + myconf+=" $(use_with m17n-lib m17n-flt)" + else + myconf+=" --without-xft" + myconf+=" --without-cairo" + myconf+=" --without-libotf --without-m17n-flt" + use cairo && ewarn \ + "USE flag \"cairo\" has no effect if \"xft\" is not set." + use m17n-lib && ewarn \ + "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." + fi + + local f line + if use gtk; then + einfo "Configuring to build with GIMP Toolkit (GTK+)" + while read line; do ewarn "${line}"; done <<-EOF + Your version of GTK+ will have problems with closing open + displays. This is no problem if you just use one display, but + if you use more than one and close one of them Emacs may crash. + See . + If you intend to use more than one display, then it is strongly + recommended that you compile Emacs with the Athena/Lucid or the + Motif toolkit instead. + EOF + if use gtk2; then + myconf+=" --with-x-toolkit=gtk2 --without-xwidgets" + use xwidgets && ewarn \ + "USE flag \"xwidgets\" has no effect if \"gtk2\" is set." + else + myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)" + fi + 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 + if ! use gtk; then + use gtk2 && ewarn \ + "USE flag \"gtk2\" has no effect if \"gtk\" is not set." + use xwidgets && ewarn \ + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." + fi + fi + + econf \ + --program-suffix="-${EMACS_SUFFIX}" \ + --includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \ + --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ + --localstatedir="${EPREFIX}"/var \ + --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ + --without-compress-install \ + --without-hesiod \ + --without-pop \ + --with-dumping=pdumper \ + --with-file-notification=$(usev inotify || usev gfile || echo no) \ + $(use_enable acl) \ + $(use_with dbus) \ + $(use_with dynamic-loading modules) \ + $(use_with games gameuser ":gamestat") \ + $(use_with gmp libgmp) \ + $(use_with gpm) \ + $(use_with json) \ + $(use_with kerberos) $(use_with kerberos kerberos5) \ + $(use_with lcms lcms2) \ + $(use_with libxml2 xml2) \ + $(use_with mailutils) \ + $(use_with selinux) \ + $(use_with ssl gnutls) \ + $(use_with systemd libsystemd) \ + $(use_with threads) \ + $(use_with wide-int) \ + $(use_with zlib) \ + ${myconf} +} + +#src_compile() { +# # Disable sandbox when dumping. For the unbelievers, see bug #131505 +# emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" +#} + +src_install() { + emake DESTDIR="${D}" NO_BIN_LINK=t install + + mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die + mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die + mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die + + # move info dir to avoid collisions with the dir file generated by portage + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die + 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}/usr/$(get_libdir)" + rm -rf "${ED}"/var + + # remove unused /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 systemd; then + insinto /usr/lib/systemd/user + sed -e "/^##/d" \ + -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ + -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ + etc/emacs.service | newins - ${EMACS_SUFFIX}.service + assert + fi + + 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 || die + X + ;;; ${EMACS_SUFFIX} 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\\\\>")) + X (and path + X ;; move Emacs Info dir before anything else in /usr/share + 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_SUFFIX^}.app + mv nextstep/Emacs.app \ + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + fi + + local 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 gui && 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\\n${EMACS_SUFFIX^}.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 + if [[ -d ${ED}/usr/share/info ]]; then + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die + 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-27.1.9999-r1.ebuild b/app-editors/emacs/emacs-27.1.9999-r1.ebuild index 78fc06dd7e03..bd826f2edf16 100644 --- a/app-editors/emacs/emacs-27.1.9999-r1.ebuild +++ b/app-editors/emacs/emacs-27.1.9999-r1.ebuild @@ -40,11 +40,10 @@ DESCRIPTION="The extensible, customizable, self-documenting real-time display ed HOMEPAGE="https://www.gnu.org/software/emacs/" LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" -IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm xwidgets zlib" -REQUIRED_USE="?? ( aqua X )" +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gui gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm xwidgets zlib" RESTRICT="test" -RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] +RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?] sys-libs/ncurses:0= acl? ( virtual/acl ) alsa? ( media-libs/alsa-lib ) @@ -63,7 +62,7 @@ RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] ssl? ( net-libs/gnutls:0= ) systemd? ( sys-apps/systemd ) zlib? ( sys-libs/zlib ) - X? ( + gui? ( !aqua? ( x11-libs/libICE x11-libs/libSM x11-libs/libX11 @@ -124,10 +123,10 @@ RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] ) ) ) ) - )" + ) )" DEPEND="${RDEPEND} - X? ( x11-base/xorg-proto )" + gui? ( !aqua? ( x11-base/xorg-proto ) )" BDEPEND="app-eselect/eselect-emacs sys-apps/texinfo @@ -181,7 +180,14 @@ src_configure() { myconf+=" --with-sound=$(usex sound oss)" fi - if use X; then + if ! use gui; then + einfo "Configuring to build without window system support" + myconf+=" --without-x --without-ns" + elif use aqua; then + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" + myconf+=" --with-ns --disable-ns-self-contained" + myconf+=" --without-x" + else myconf+=" --with-x --without-ns" myconf+=" $(use_with gconf)" myconf+=" $(use_with gsettings)" @@ -253,12 +259,6 @@ src_configure() { use xwidgets && ewarn \ "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." 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 econf \ @@ -385,7 +385,7 @@ src_install() { 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. + use gui && 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 diff --git a/app-editors/emacs/emacs-27.1.ebuild b/app-editors/emacs/emacs-27.1.ebuild deleted file mode 100644 index 9258d36369f9..000000000000 --- a/app-editors/emacs/emacs-27.1.ebuild +++ /dev/null @@ -1,426 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools elisp-common flag-o-matic readme.gentoo-r1 - -if [[ ${PV##*.} = 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git" - EGIT_BRANCH="emacs-27" - EGIT_CHECKOUT_DIR="${WORKDIR}/emacs" - S="${EGIT_CHECKOUT_DIR}" - SLOT="${PV%%.*}-vcs" -else - # 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%%_*}" - SRC_URI="mirror://gnu/emacs/${P}.tar.xz" - S="${WORKDIR}/emacs-${FULL_VERSION}" - # PV can be in any of the following formats: - # 27.1 released version (slot 27) - # 27.1_rc1 upstream release candidate (27) - # 27.0.9999 live ebuild (slot 27-vcs) - # 27.0.90 upstream prerelease snapshot (27-vcs) - # 27.0.50_pre20191223 snapshot by Gentoo developer (27-vcs) - if [[ ${PV} == *_pre* ]]; then - SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz" - S="${WORKDIR}/emacs" - elif [[ ${PV//[0-9]} != "." ]]; then - SRC_URI="mirror://gnu-alpha/emacs/pretest/${PN}-${PV/_/-}.tar.xz" - fi - SLOT="${PV%%.*}" - [[ ${PV} == *.*.* ]] && SLOT+="-vcs" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" -fi - -DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" -HOMEPAGE="https://www.gnu.org/software/emacs/" - -LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" -IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm xwidgets zlib" -REQUIRED_USE="?? ( aqua X )" -RESTRICT="test" - -RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] - sys-libs/ncurses:0= - acl? ( virtual/acl ) - alsa? ( media-libs/alsa-lib ) - dbus? ( sys-apps/dbus ) - games? ( acct-group/gamestat ) - gmp? ( dev-libs/gmp:0= ) - gpm? ( sys-libs/gpm ) - !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) - json? ( dev-libs/jansson ) - kerberos? ( virtual/krb5 ) - lcms? ( media-libs/lcms:2 ) - libxml2? ( >=dev-libs/libxml2-2.2.0 ) - mailutils? ( net-mail/mailutils[clients] ) - !mailutils? ( net-libs/liblockfile ) - selinux? ( sys-libs/libselinux ) - ssl? ( net-libs/gnutls:0= ) - systemd? ( sys-apps/systemd ) - zlib? ( sys-libs/zlib ) - X? ( - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXinerama - x11-libs/libXrandr - x11-libs/libxcb - x11-misc/xbitmaps - gconf? ( >=gnome-base/gconf-2.26.2 ) - gsettings? ( >=dev-libs/glib-2.28.6 ) - gif? ( media-libs/giflib:0= ) - 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:0= ) - xft? ( - media-libs/fontconfig - media-libs/freetype - x11-libs/libXft - x11-libs/libXrender - cairo? ( >=x11-libs/cairo-1.12.18 ) - harfbuzz? ( media-libs/harfbuzz:0= ) - m17n-lib? ( - >=dev-libs/libotf-0.9.4 - >=dev-libs/m17n-lib-1.5.1 - ) - ) - gtk? ( - gtk2? ( x11-libs/gtk+:2 ) - !gtk2? ( - x11-libs/gtk+:3 - xwidgets? ( - net-libs/webkit-gtk:4= - x11-libs/libXcomposite - ) - ) - ) - !gtk? ( - motif? ( - >=x11-libs/motif-2.3:0 - x11-libs/libXpm - x11-libs/libXmu - x11-libs/libXt - ) - !motif? ( - Xaw3d? ( - x11-libs/libXaw3d - x11-libs/libXmu - x11-libs/libXt - ) - !Xaw3d? ( athena? ( - x11-libs/libXaw - x11-libs/libXmu - x11-libs/libXt - ) ) - ) - ) - )" - -DEPEND="${RDEPEND} - X? ( x11-base/xorg-proto )" - -BDEPEND="app-eselect/eselect-emacs - sys-apps/texinfo - virtual/pkgconfig - gzip-el? ( app-arch/gzip )" - -RDEPEND="${RDEPEND} - !<=app-editors/emacs-27.1.9999-r0:27-vcs - !app-editors/emacs-vcs:27 - app-eselect/eselect-emacs" - -EMACS_SUFFIX="emacs-${SLOT}" -SITEFILE="20${EMACS_SUFFIX}-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 - - eapply_user - - # Fix filename reference in redirected man page - sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die - - #AT_M4DIR=m4 eautoreconf -} - -src_configure() { - strip-flags - filter-flags -pie #526948 - - if 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 cairo)" - myconf+=" $(use_with harfbuzz)" - myconf+=" $(use_with m17n-lib libotf)" - myconf+=" $(use_with m17n-lib m17n-flt)" - else - myconf+=" --without-xft" - myconf+=" --without-cairo" - myconf+=" --without-libotf --without-m17n-flt" - use cairo && ewarn \ - "USE flag \"cairo\" has no effect if \"xft\" is not set." - use m17n-lib && ewarn \ - "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." - fi - - local f line - if use gtk; then - einfo "Configuring to build with GIMP Toolkit (GTK+)" - while read line; do ewarn "${line}"; done <<-EOF - Your version of GTK+ will have problems with closing open - displays. This is no problem if you just use one display, but - if you use more than one and close one of them Emacs may crash. - See . - If you intend to use more than one display, then it is strongly - recommended that you compile Emacs with the Athena/Lucid or the - Motif toolkit instead. - EOF - if use gtk2; then - myconf+=" --with-x-toolkit=gtk2 --without-xwidgets" - use xwidgets && ewarn \ - "USE flag \"xwidgets\" has no effect if \"gtk2\" is set." - else - myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)" - fi - 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 - if ! use gtk; then - use gtk2 && ewarn \ - "USE flag \"gtk2\" has no effect if \"gtk\" is not set." - use xwidgets && ewarn \ - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." - 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 - - econf \ - --program-suffix="-${EMACS_SUFFIX}" \ - --includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \ - --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ - --localstatedir="${EPREFIX}"/var \ - --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ - --without-compress-install \ - --without-hesiod \ - --without-pop \ - --with-dumping=pdumper \ - --with-file-notification=$(usev inotify || usev gfile || echo no) \ - $(use_enable acl) \ - $(use_with dbus) \ - $(use_with dynamic-loading modules) \ - $(use_with games gameuser ":gamestat") \ - $(use_with gmp libgmp) \ - $(use_with gpm) \ - $(use_with json) \ - $(use_with kerberos) $(use_with kerberos kerberos5) \ - $(use_with lcms lcms2) \ - $(use_with libxml2 xml2) \ - $(use_with mailutils) \ - $(use_with selinux) \ - $(use_with ssl gnutls) \ - $(use_with systemd libsystemd) \ - $(use_with threads) \ - $(use_with wide-int) \ - $(use_with zlib) \ - ${myconf} -} - -#src_compile() { -# # Disable sandbox when dumping. For the unbelievers, see bug #131505 -# emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" -#} - -src_install() { - emake DESTDIR="${D}" NO_BIN_LINK=t install - - mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die - mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die - mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die - - # move info dir to avoid collisions with the dir file generated by portage - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die - 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}/usr/$(get_libdir)" - rm -rf "${ED}"/var - - # remove unused /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 systemd; then - insinto /usr/lib/systemd/user - sed -e "/^##/d" \ - -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ - -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ - etc/emacs.service | newins - ${EMACS_SUFFIX}.service - assert - fi - - 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 || die - X - ;;; ${EMACS_SUFFIX} 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\\\\>")) - X (and path - X ;; move Emacs Info dir before anything else in /usr/share - 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_SUFFIX^}.app - mv nextstep/Emacs.app \ - "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die - fi - - local 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\\n${EMACS_SUFFIX^}.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 - if [[ -d ${ED}/usr/share/info ]]; then - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die - 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-28.0.9999.ebuild b/app-editors/emacs/emacs-28.0.9999.ebuild index 8137dcdd89b8..478d84767fce 100644 --- a/app-editors/emacs/emacs-28.0.9999.ebuild +++ b/app-editors/emacs/emacs-28.0.9999.ebuild @@ -40,11 +40,10 @@ DESCRIPTION="The extensible, customizable, self-documenting real-time display ed HOMEPAGE="https://www.gnu.org/software/emacs/" LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" -IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm xwidgets zlib" -REQUIRED_USE="?? ( aqua X )" +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gui gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm xwidgets zlib" RESTRICT="test" -RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] +RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?] sys-libs/ncurses:0= acl? ( virtual/acl ) alsa? ( media-libs/alsa-lib ) @@ -63,7 +62,7 @@ RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] ssl? ( net-libs/gnutls:0= ) systemd? ( sys-apps/systemd ) zlib? ( sys-libs/zlib ) - X? ( + gui? ( !aqua? ( x11-libs/libICE x11-libs/libSM x11-libs/libX11 @@ -124,10 +123,10 @@ RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?] ) ) ) ) - )" + ) )" DEPEND="${RDEPEND} - X? ( x11-base/xorg-proto )" + gui? ( !aqua? ( x11-base/xorg-proto ) )" BDEPEND="app-eselect/eselect-emacs sys-apps/texinfo @@ -180,7 +179,14 @@ src_configure() { myconf+=" --with-sound=$(usex sound oss)" fi - if use X; then + if ! use gui; then + einfo "Configuring to build without window system support" + myconf+=" --without-x --without-ns" + elif use aqua; then + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" + myconf+=" --with-ns --disable-ns-self-contained" + myconf+=" --without-x" + else myconf+=" --with-x --without-ns" myconf+=" $(use_with gconf)" myconf+=" $(use_with gsettings)" @@ -252,12 +258,6 @@ src_configure() { use xwidgets && ewarn \ "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." 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 econf \ @@ -384,7 +384,7 @@ src_install() { 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. + use gui && 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 -- cgit v1.2.3