diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-03-11 01:49:36 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-03-11 01:49:36 +0000 |
commit | cf7807d7aea23a99a144afceaba961cfed652b5f (patch) | |
tree | ffd2c781c27e0b7e72152a685a04938a2b7966f0 /app-editors | |
parent | 7c5ebaf83da4c538dd11b56fdd5dfdf39dcbc096 (diff) |
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/Manifest.gz | bin | 13942 -> 13931 bytes | |||
-rw-r--r-- | app-editors/aee/Manifest | 4 | ||||
-rw-r--r-- | app-editors/aee/aee-2.2.22.ebuild | 69 | ||||
-rw-r--r-- | app-editors/aee/metadata.xml | 9 | ||||
-rw-r--r-- | app-editors/emacs/Manifest | 9 | ||||
-rw-r--r-- | app-editors/emacs/emacs-26.3-r23.ebuild | 368 | ||||
-rw-r--r-- | app-editors/emacs/emacs-27.2-r21.ebuild | 438 | ||||
-rw-r--r-- | app-editors/emacs/emacs-28.2-r17.ebuild | 549 | ||||
-rw-r--r-- | app-editors/emacs/emacs-29.4-r3.ebuild | 639 | ||||
-rw-r--r-- | app-editors/emacs/emacs-30.1-r1.ebuild | 616 | ||||
-rw-r--r-- | app-editors/emacs/emacs-30.1.9999.ebuild | 11 | ||||
-rw-r--r-- | app-editors/emacs/emacs-31.0.9999.ebuild | 11 | ||||
-rw-r--r-- | app-editors/moe/Manifest | 6 | ||||
-rw-r--r-- | app-editors/moe/files/moe-respect-user-flags.patch (renamed from app-editors/moe/files/moe-1.14-respect-user-flags.patch) | 0 | ||||
-rw-r--r-- | app-editors/moe/moe-1.14.ebuild | 4 | ||||
-rw-r--r-- | app-editors/moe/moe-1.15.ebuild | 27 |
16 files changed, 2730 insertions, 30 deletions
diff --git a/app-editors/Manifest.gz b/app-editors/Manifest.gz Binary files differindex de058b29c66d..4d24f9b80353 100644 --- a/app-editors/Manifest.gz +++ b/app-editors/Manifest.gz diff --git a/app-editors/aee/Manifest b/app-editors/aee/Manifest index 9dc3eca6ffda..55d12e55a677 100644 --- a/app-editors/aee/Manifest +++ b/app-editors/aee/Manifest @@ -2,5 +2,7 @@ AUX aee-Wformat-security.patch 225 BLAKE2B 0e3846a9e616ed9cef7a9f2b01bf6f71f080d AUX aee-ae-location.patch 2755 BLAKE2B 8b75ee712b5f717c82a073c0e35ceccdc0ed27d6b9c8f64841d6c246cd6761b5d42d121e78374029b0c0252c479ca56ab072c7612d0ef758641cefb1d32459f9 SHA512 48ded083b407d1fb94764967358dc6c858421a3586e56fca1803980912b90404dcbfcadfc5a041b0959e2e10b3a5224751671ec067687b2e361eb2e27eb86cfa AUX aee-gcc-10.patch 706 BLAKE2B e969db928f0327a070ceaa9808cdae3cdafb3588e94fd8414fbca7b27e0c17bb12e542531f162c2de135a88bc09168bd77c9a2ee2368499a39ce7760f99aa0f8 SHA512 bd560e541af9323feeda9f9138bf28c21af6d0099fda7f014ae82dd988f3fd6f9d2abf1c4883610a20b3708d48d8392bc3e60a01c3798604e6c6dd60f8f838f9 DIST aee-2.2.21.tar.gz 186304 BLAKE2B 2d41678e07f6590023f428e042686c92377200826f86ebb28fe93ec1e5f07290de6eef765dbae91efcef01d32896127c044f20c204b50ed50894fd743cb1fc19 SHA512 c052ef97b18fa9900e9bf0c5894e05cbbf775d7de4ad4c14cb9e3e7758983c84e4768995a98398c05e30173464e6f7994e7f476522a314bc25dac5a84831155a +DIST aee-2.2.22.tar.bz2 142490 BLAKE2B 2a707ebb89b98bc46e9b67d5f91404211f26ca968356f9a5f639a886099bfeed2cdd23527abb5d4ab01de0b73c5a0dacbe4abade6a456634237b54541f3dbaae SHA512 3b13105997e00d7e1e6f8a7bbfecaa7869fcb825532bddd7299ea011ecd5af64c9390fcdea4358a12443e8d6cf7acb4facdd7e6a55b645f0af55401bda619159 EBUILD aee-2.2.21.ebuild 1350 BLAKE2B 7ee8f9d723256ce7c4b02ea3829ad23b28dcfaf1458bb7b686579c129c2c40ee1d0e038d8f61de2dbee26946e9c041fdbac9f878ee5ea2eb4b507dbf81f28766 SHA512 82f92ee029450a74685e79f1fff73cb070a18e9914da7442db5c786db59f8c49dcfe355f8abb5f79e0dcfda32f210437c81e807190eb48255b6cfda84a1be739 -MISC metadata.xml 222 BLAKE2B 425bba0db7c4bc483eddcb51bb4151324b62afc42496047413bf9d0480fd731ea78201a8b99c42d9adfa9b20614f9507e8e89a87e9afce32aa9db82f42f827ed SHA512 7ae4d3d64e85fb01194d31b41843c10e3bf6a782e9f308cbe3f0a75c0a07d6af2a88013549b5840b3cd5e766d5044f0da290c31a4800d1823f6eca4028b082da +EBUILD aee-2.2.22.ebuild 1399 BLAKE2B 22af0efbbc8aeabe30ddb235efef019385547d33ce27f4830b3bfa70ea1780a82636e9ce926ffd74fa1dece3271284cf9b0abc5642fc876db6f5f12c522b7cc5 SHA512 bc4f520f1a448cb282e146a1cfd5928d8d024aac838a12bba5ff091c30f31c765dff52d6f39e0b9e52d649dcae5734720e23ea3b15605e52f34fef66cf534d72 +MISC metadata.xml 293 BLAKE2B 833b3024b6253ab489bc1aa5ea4b21ef39311d08bb5dbb1808d446f69e5290f0f556b9bdf7c7f6517c7e5caea3cb987ed3c10cf9ed2b950d50bbb74c8c03f9d4 SHA512 6214854dafccfaef62999517c5b3d9c469c89a8a166e48d4589b65bf5548faef95ebc01008ed86380f6962359793294bcbe6334b14e8fe5948d61a82c7147579 diff --git a/app-editors/aee/aee-2.2.22.ebuild b/app-editors/aee/aee-2.2.22.ebuild new file mode 100644 index 000000000000..de61735027b5 --- /dev/null +++ b/app-editors/aee/aee-2.2.22.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit prefix toolchain-funcs + +DESCRIPTION="An easy to use text editor" +HOMEPAGE="https://gitlab.com/ports1/aee" +SRC_URI="https://gitlab.com/ports1/aee/-/archive/${PV}/${P}.tar.bz2" + +LICENSE="Artistic" +SLOT="0" +KEYWORDS="~amd64 ~riscv ~x86 ~amd64-linux" +IUSE="X" + +RDEPEND="X? ( x11-libs/libX11 )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-ae-location.patch + "${FILESDIR}"/${PN}-gcc-10.patch +) +DOCS=( Changes README.${PN} ${PN}.i18n.guide ${PN}.msg ) + +src_prepare() { + sed -i \ + -e "s/make -/\$(MAKE) -/g" \ + -e "/^buildaee/s/$/ localaee/" \ + -e "/^buildxae/s/$/ localxae/" \ + Makefile || die + + sed -i \ + -e "s/\([\t ]\)cc /\1\\\\\$(CC) /" \ + -e "/CFLAGS =/s/\" >/ \\\\\$(LDFLAGS)\" >/" \ + -e "/other_cflag/s/ \${strip_option}//" \ + -e "s/-lcurses/$($(tc-getPKG_CONFIG) --libs ncurses)/" \ + create.mk.{aee,xae} || die + + hprefixify create.mk.{aee,xae} + + # https://gitlab.com/ports1/aee/-/merge_requests/1 + chmod +x create.mk.{aee,xae} || die + + default +} + +src_compile() { + local target="aee" + use X && target="both" + + emake CC="$(tc-getCC)" ${target} +} + +src_install() { + dobin ${PN} + dosym ${PN} /usr/bin/rae + doman ${PN}.1 + einstalldocs + + insinto /usr/share/${PN} + doins help.ae + + if use X; then + dobin xae + dosym xae /usr/bin/rxae + fi +} diff --git a/app-editors/aee/metadata.xml b/app-editors/aee/metadata.xml index 9a97f3478d31..a0865a082c9a 100644 --- a/app-editors/aee/metadata.xml +++ b/app-editors/aee/metadata.xml @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>hattya@gentoo.org</email> - </maintainer> + <maintainer type="person"> + <email>hattya@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="gitlab">ports1/aee</remote-id> + </upstream> </pkgmetadata> diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest index 7f015c11a312..adb29e4027a7 100644 --- a/app-editors/emacs/Manifest +++ b/app-editors/emacs/Manifest @@ -16,13 +16,18 @@ DIST emacs-30.1.tar.xz 54978160 BLAKE2B ad502a2e15a04618f4766ec6e285739cb5bb6f19 EBUILD emacs-18.59-r15.ebuild 4499 BLAKE2B 8a6a25d16e06d108b6d2ac81c32bfcc6ee0a86685102fb53f63bf7eb98e570bbc1d6419bd6216a7bfe4eb652c151d5df4a9d9e58342005688f46b0a90b643057 SHA512 bd51c8ac4550370db9d35537aa516f8dd1a890565d70d837d3b2ef9e37978e9b7ff491bf4b5a17d9639aca033527eae8089464e88f4c096d771facd37d2289d9 EBUILD emacs-26.3-r19.ebuild 11823 BLAKE2B 0ddb554f48e9f62d06cd6df2a840436d516b2ed1301cd639ce19584ea9350d7ec765cf249fcfa7a1e7ff139f135bcd96aaacd2e20d450aee126d0d7c02915ec1 SHA512 10475df4b0c9685f0f3f491ecc625524146af1e850e60425ebdad46c288f2f7be57f0c98e899086cb7ee3a405f25c3c79b03f0dc4deee9b24e560690e6426354 EBUILD emacs-26.3-r22.ebuild 11739 BLAKE2B 09a7449386939a3f7b84690ddd91bb0077f36a4215ae1a7a85187856d0f80f6f3dd251c6fe88e6ad0cfd4b735d579dfa86f659ede061da499faa8ef6bcf2c35a SHA512 2c5451382e7c72414819160748e438624cbbe40d70a9bfae3631ea7e1cc35a807f4df65732401297dffb8e036464bd08263c7500444e98ca269f0ed85585bb8f +EBUILD emacs-26.3-r23.ebuild 11458 BLAKE2B 80d88ebd703404ca5e0aeda488b60853ac379e34c32775163e2a57737d2f69c81848cd20f9952aef12072586615dea8496e5769a3ca1df3b054fa55cd0c68f27 SHA512 01eb51fecee9014aa929ac1778c7550e8d370f86d87e401800a87357a8c77fae4f8b4fcdd1e09f7fb8fe9ce7a31f61f885db3087710b82dd290e524c84576984 EBUILD emacs-27.2-r17.ebuild 14555 BLAKE2B ec5198f984a704f270f95c574405b9621d5a7d8028b56a41ed0f8871ca1980a32079d944f79648ac40713cefbf7efc233e972a386f48fd77c8f3af12d0500e72 SHA512 a3b046c085fb41bc3d7979992d67b92c4f9124e23a6f98f3417a179029b05311a4ce3a7d718009bbb76e121e533793988f8c6f567c24f0ba2b52fc9f932a2224 EBUILD emacs-27.2-r20.ebuild 14392 BLAKE2B 0ad701ee8a2ede1e7d973d8bdfa939e2cf0fd151144233fced3b1cda423f32bcb7aafea378d9697212dee2159d425003cf601ba9804efef4696fdd8f640b694d SHA512 bae6365e61843ef38c65ca6fc91bf4b93cffd9baa16574a89c64da593396a4bfe5b9d9f1558084f60238b103cbf9606de184a8aa6549fd04ed79f2fba9a5a3b4 +EBUILD emacs-27.2-r21.ebuild 14111 BLAKE2B 472b651a9cbf4d9bc6eb8ba1085e29275f370632ab2c92f1d84fdf61c1f017e9fdb861c11e7ffb68a267d395075180721d8988517388b9301b997bb108b2a594 SHA512 1a5df439d85c9d8abcdee86644bbb0d6a9875a3766d339d2c4315294cf3111bae154697345ddec907008ba0b35539d6d387fc49b0b4ee3675791918691a7ae6a EBUILD emacs-28.2-r13.ebuild 17522 BLAKE2B df13974f748f4b0b9c59e857c40b00625b21a2e541814ed4de745bae9dbd7213fdc25bbea690ca70b57fd2a35a0f884b282ea7c1707c6e6fbd672f8e8845f239 SHA512 97a04f0c3e505c85471825f97f0955dbaa01b8702e40b9a15e83c276ea9ad90865c804b86f766a0bd393ea892e0b11e57b151e8ff8cdc79539954cbe3262c2d1 EBUILD emacs-28.2-r16.ebuild 17902 BLAKE2B 912f38ded00db7f1983daa0f560f34ec8a216924576804bbd75ec0948656a4d2905dd5dc6ecd3fe7278a3f0faf88f276c6963ebe4cfb5cd1e28a6e91f156c4f6 SHA512 58ae5d63a935ab305b370dde75fa8ea923398ac3278e9f466921aacb716911a93dc0f648e2bc2a042567ef4149d57989803e69f9c4545c46ed0a9b4caa43536a +EBUILD emacs-28.2-r17.ebuild 17621 BLAKE2B 676f88a21b3aa3fe32b12085cacebf92d76a2544dad8b351da6ce61c630d5f2b6c336cbb03ca8758b3ee6620785974f42fdbfe81fcfe7f6091fb1611c14937dd SHA512 9024359251c75d863889ce6334d8374fc6c7f34828e3c4c41b754366cfd6511c14512707c47ecf03dccdbf307e5a0a44457ec254dc2dd4698ad1e44bc342c889 EBUILD emacs-29.4-r2.ebuild 20615 BLAKE2B 0d1f0089f8c3ec8eeac8f981d8bf2e67f2536c604322ad73cf04ee419c7d6a393406576a001d2f63a1eae22457faa89b8ff141e4755db8153d7d237c11e13adf SHA512 4575420e96128d26babc913d8832a607e5015a27804ef6e81b30e274491979a0459b4edb03a3428c4989d592869577abade6f0b863cffb127fd45a3a5693ff34 +EBUILD emacs-29.4-r3.ebuild 20334 BLAKE2B e0d2dd32d9c787071e742349772afb5b575b93010f01efd419eeacbdf8430d05da1daf641be040c5e12a01455822bda7d60a073c80cccd1ab32122324e82b326 SHA512 6d2b95b7b84b2b46b7affbdb120044522f52ca528c95d77b62b82151c9ffc937c4b905d5259a21ad1cc08df6c97293106159fece392acea96cd3f8168cf68167 EBUILD emacs-29.4.ebuild 20313 BLAKE2B 1bed634eb42caf03b67df68474bf7d8b02b0f2086e8bbe820dd82096b81630af01fa184201fbc6c7b3797ff125ccf45b5dd465eae64443854781e9588acbd4d3 SHA512 d0ba494964d39737ed536e7e00a33212f215820971a449401ca6b60d7dc51715ae39f7fe6910e5673d7eba62683a1cc7d7dc20ef50e5dc5bb71c334f70387261 -EBUILD emacs-30.1.9999.ebuild 19721 BLAKE2B d733e8dfe2d50c378d9623318511261b3126ded86343e394b45c42f5ca7367c38f3c59951ad780f801cd8112e17a28bb5b3f79eb3f1d1efef91cd3faf18c04d7 SHA512 1fd1b140211aa5b9caf181818318f8a5b8e6b1230b1503f6ba47e7dac92e9d3cc1e1adec27d47f8a15c7ae2b9bc708db43dae7c2220c265008380c0f04fd594d +EBUILD emacs-30.1-r1.ebuild 19586 BLAKE2B a863844b2b48104330fcbfb0e14e926f5f114e251f035536622d76d0ea490e386d9c09db6dec6fda78c5de213d27c11f3e3ce51130bc34bcc9baee62a1c3caa8 SHA512 a1a60eca431b65f923a612d59805b97051297c116a7a48341a49aef9f1754675381dd2897d152e30d052864a5169c921a85e47ca195bfe63309350780db2b723 +EBUILD emacs-30.1.9999.ebuild 19434 BLAKE2B 93c7f5b14ab4164cf30cccd155915d18298ef9165e2c60e9b1b2f1df2595fd3cf6ae515e0e54b495b73eafbebfa9491baf7fad9621ea6cc5b785d04778b65d86 SHA512 44be563121636f3e0749538aeb0e2f4f109c5446d90ef880653df56abca1042c02cee0d29d75afc3836f8b1518714481702c3b6b9f04989477967d8a13d7a837 EBUILD emacs-30.1.ebuild 19873 BLAKE2B 9523f49a91d7e36eb6f40a8e73b66f023613881a7f5528334423f92e7cdd3b7622feae3a3205503f83fb6a385eee32003f0d3c6893aa10642c480ee42ddc39a0 SHA512 678e9717c26187b9a6cbd30434e17f5ec74124c9c0d30ddb217b07cae45e826b28d1b5c643552007b053ab83fa5408083e2a1e569517b1328c2a9f4dbb93954f -EBUILD emacs-31.0.9999.ebuild 19719 BLAKE2B 02ca89e7f39c627f25cee7e7dbf71e5bf809d6373068fc8e07d205ec66558b6296dcc9c1f87ca5201b65cb07423b8eca6f4028bdd9f974a08f851b33c6309f57 SHA512 3fd7ffe69635347ab061764b55fab6d4093a7f5389899257e24fbbb28ecf8219ab521348017f39aa344d3ba09eb39c903a1bb3ecac559de0d4f7d382f529d5bc +EBUILD emacs-31.0.9999.ebuild 19432 BLAKE2B 333ade406d9a5ac2d9e2237174ea064504299ad3949a72f0ad21e753e6b0f4c6c9aa993e27b5cf510f1c28902ed43467070f2bfe1096fb537a6e76419b8df312 SHA512 04690f3b9d826959f0f9ce8cc87fdfc3138e7535fc37e5375c6e1678b7d895afd10132c408736bf5a0ddf5cc59821a37a6123e4fd9828e93bdb96946e6f820ae MISC metadata.xml 3434 BLAKE2B aaeef31ce265ae3b3c67ddfe01b3b41724b6fed7353e83f3efa1fe401944707391f3160d7cfea423802c67e78830387e210966f5fdc03a5a0a20b0e38f493b6d SHA512 2ad8128bfe05cbef0cdf19840e809918331c5e98976fb1af14127e0cb7adfba597ff83457a45079d1facd571953210c1650eb11b87d9bce2352e9ca865ebcc38 diff --git a/app-editors/emacs/emacs-26.3-r23.ebuild b/app-editors/emacs/emacs-26.3-r23.ebuild new file mode 100644 index 000000000000..4c8b484977e3 --- /dev/null +++ b/app-editors/emacs/emacs-26.3-r23.ebuild @@ -0,0 +1,368 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools eapi9-pipestatus 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-12.tar.xz" +# 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}" + +LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" +SLOT="26" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gfile gif gpm gsettings gtk 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 valgrind wide-int Xaw3d xft +xpm zlib" + +RDEPEND=">=app-emacs/emacs-common-1.11[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? ( acct-group/mail net-libs/liblockfile ) + selinux? ( sys-libs/libselinux ) + ssl? ( net-libs/gnutls:0= ) + systemd? ( sys-apps/systemd ) + valgrind? ( dev-debug/valgrind ) + 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 + gsettings? ( >=dev-libs/glib-2.28.6 ) + gif? ( media-libs/giflib:0= ) + jpeg? ( media-libs/libjpeg-turbo:0= ) + png? ( >=media-libs/libpng-1.4:0= ) + svg? ( >=gnome-base/librsvg-2.0 ) + tiff? ( media-libs/tiff:= ) + xpm? ( x11-libs/libXpm ) + imagemagick? ( media-gfx/imagemagick:0=[jpeg?,png?,svg?,tiff?] ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXft + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18[X] ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( 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="virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +IDEPEND="app-eselect/eselect-emacs" + +RDEPEND+=" ${IDEPEND}" + +EMACS_SUFFIX="emacs-${SLOT}" +SITEFILE="20${EMACS_SUFFIX}-gentoo.el" +PATCHES=("${WORKDIR}/patch") + +# Suppress false positive QA warnings #898304 +QA_CONFIG_IMPL_DECL_SKIP=( malloc_{get,set}_state ) + +src_prepare() { + default + + # 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 + replace-flags "-O[3-9]" -O2 #839405 + + # We want floating-point arithmetic to be correct #933380 + replace-flags -Ofast -O2 + append-flags -fno-fast-math -ffp-contract=off + + local myconf=( + --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) + ) + + 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 no) ) + 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 + --without-x + ) + else + myconf+=( + --with-x --without-ns + --without-gconf + $(use_with gsettings) + $(use_with toolkit-scroll-bars) + $(use_with gif) + $(use_with jpeg) + $(use_with png) + $(use_with svg rsvg) + $(use_with tiff) + $(use_with xpm) + $(use_with imagemagick) + ) + + if use xft; then + myconf+=( + --with-xft + $(use_with cairo) + $(use_with m17n-lib libotf) + $(use_with m17n-lib m17n-flt) + ) + else + myconf+=( + --without-xft + --without-cairo + --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 <https://gitlab.gnome.org/GNOME/gtk/-/issues/221> and + <https://gitlab.gnome.org/GNOME/gtk/-/issues/2315>. + 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=gtk3 --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 + fi + + econf "${myconf[@]}" +} + +src_compile() { + export ac_cv_header_valgrind_valgrind_h=$(usex valgrind) + + # 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 BLESSMAIL_TARGET= 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 + + # dissuade Portage from removing our dir file #257260 + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir + + # movemail must be setgid mail + if ! use mailutils; then + fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fi + + # avoid collision between slots, see bug #169033 e.g. + rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el || die + rm -rf "${ED}"/usr/share/{applications,icons} || die + rm -rf "${ED}/usr/$(get_libdir)" || die + rm -rf "${ED}"/var || die + + # remove unused <version>/site-lisp dir + rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp || die + + # remove COPYING file (except for etc/COPYING used by describe-copying) + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING || die + + 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 + pipestatus || die "gzip .el pipeline 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-equal emacs-version "${FULL_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 (setenv "INFOPATH" (mapconcat #'identity (cdr p) ":")))))) + EOF + elisp-site-file-install "${T}/${SITEFILE}" || die + + dodoc README BUGS CONTRIBUTE + + if use gui && use aqua; then + dodir /Applications/Gentoo + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + 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." + if use gui; then + 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." + fi + readme.gentoo_create_doc +} + +pkg_preinst() { + # verify that the PM hasn't removed our Info directory index #257260 + local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}" + [[ -f ${infodir}/dir || ! -d ${infodir} ]] || die +} + +pkg_postinst() { + elisp-site-regen + readme.gentoo_print_elog + + # Force an update of the emacs symlink for the livecd/dvd, + # because some microemacs packages set it with USE=livecd. + # Otherwise, create it only when it is not yet set. + eselect --root="${ROOT}" emacs update $(usev !livecd ifunset) +} + +pkg_postrm() { + elisp-site-regen + eselect --root="${ROOT}" emacs update ifunset +} diff --git a/app-editors/emacs/emacs-27.2-r21.ebuild b/app-editors/emacs/emacs-27.2-r21.ebuild new file mode 100644 index 000000000000..145352804803 --- /dev/null +++ b/app-editors/emacs/emacs-27.2-r21.ebuild @@ -0,0 +1,438 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools eapi9-pipestatus elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs + +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="https://alpha.gnu.org/gnu/emacs/pretest/${PN}-${PV/_/-}.tar.xz" + fi + # Patchset from proj/emacs-patches.git + SRC_URI+=" https://dev.gentoo.org/~ulm/emacs/${P}-patches-12.tar.xz" + PATCHES=("${WORKDIR}/patch") + SLOT="${PV%%.*}" + [[ ${PV} == *.*.* ]] && SLOT+="-vcs" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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 gfile gif +gmp gpm gsettings gtk 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 valgrind wide-int Xaw3d xft +xpm zlib" +RESTRICT="test" + +RDEPEND=">=app-emacs/emacs-common-1.11[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? ( acct-group/mail net-libs/liblockfile ) + selinux? ( sys-libs/libselinux ) + ssl? ( net-libs/gnutls:0= ) + systemd? ( sys-apps/systemd ) + valgrind? ( dev-debug/valgrind ) + 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 + gsettings? ( >=dev-libs/glib-2.28.6 ) + gif? ( media-libs/giflib:0= ) + jpeg? ( media-libs/libjpeg-turbo:0= ) + png? ( >=media-libs/libpng-1.4:0= ) + svg? ( >=gnome-base/librsvg-2.0 ) + tiff? ( media-libs/tiff:= ) + xpm? ( x11-libs/libXpm ) + imagemagick? ( media-gfx/imagemagick:0=[jpeg?,png?,svg?,tiff?] ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18[X] ) + !cairo? ( x11-libs/libXft ) + harfbuzz? ( media-libs/harfbuzz:0= ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( 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="sys-apps/texinfo + virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +IDEPEND="app-eselect/eselect-emacs" + +RDEPEND+=" ${IDEPEND}" + +EMACS_SUFFIX="emacs-${SLOT}" +SITEFILE="20${EMACS_SUFFIX}-gentoo.el" + +# Suppress false positive QA warnings #898304 #925449 +QA_CONFIG_IMPL_DECL_SKIP=( malloc_{get,set}_state statvfs64 ) + +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 + + default + + # 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() { + replace-flags "-O[3-9]" -O2 #839405 + + # We want floating-point arithmetic to be correct #933380 + replace-flags -Ofast -O2 + append-flags -fno-fast-math -ffp-contract=off + + local myconf=( + --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) + --with-pdumper + $(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) + ) + + 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 no) ) + 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 + --without-x + ) + else + myconf+=( + --with-x --without-ns + --without-gconf + $(use_with gsettings) + $(use_with toolkit-scroll-bars) + $(use_with gif) + $(use_with jpeg) + $(use_with png) + $(use_with svg rsvg) + $(use_with tiff) + $(use_with xpm) + $(use_with imagemagick) + ) + + if use xft; then + myconf+=( + --with-xft + $(use_with cairo) + $(use_with harfbuzz) + $(use_with m17n-lib libotf) + $(use_with m17n-lib m17n-flt) + ) + else + myconf+=( + --without-xft + --without-cairo + --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 <https://gitlab.gnome.org/GNOME/gtk/-/issues/221> and + <https://gitlab.gnome.org/GNOME/gtk/-/issues/2315>. + 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=gtk3 --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 + fi + + if tc-is-cross-compiler; then + # Configure a CBUILD directory when cross-compiling to make tools + mkdir -p "${S}-build" && pushd "${S}-build" >/dev/null || die + ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit + popd >/dev/null || die + # Don't try to execute the binary for dumping during the build + myconf+=( --with-dumping=none ) + elif use m68k; then + # Workaround for https://debbugs.gnu.org/44531 + myconf+=( --with-dumping=unexec ) + else + myconf+=( --with-dumping=pdumper ) + fi + + econf "${myconf[@]}" +} + +src_compile() { + export ac_cv_header_valgrind_valgrind_h=$(usex valgrind) + + if tc-is-cross-compiler; then + # Build native tools for compiling lisp etc. + emake -C "${S}-build" src + emake lib # Cross-compile dependencies first for timestamps + # Save native build tools in the cross-directory + cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die + # Specify the native Emacs to compile lisp + emake -C lisp all EMACS="${S}-build/src/emacs" + fi + + emake +} + +src_install() { + emake DESTDIR="${D}" NO_BIN_LINK=t BLESSMAIL_TARGET= 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 + + # dissuade Portage from removing our dir file #257260 + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir + + # movemail must be setgid mail + if ! use mailutils; then + fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fi + + # avoid collision between slots, see bug #169033 e.g. + rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el || die + rm -rf "${ED}"/usr/share/{applications,icons} || die + rm -rf "${ED}/usr/$(get_libdir)" || die + rm -rf "${ED}"/var || die + + # remove unused <version>/site-lisp dir + rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp || die + + # remove COPYING file (except for etc/COPYING used by describe-copying) + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING || die + + 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 + pipestatus || die "gzip .el pipeline 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-equal emacs-version "${FULL_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 (setenv "INFOPATH" (mapconcat #'identity (cdr p) ":")))))) + EOF + elisp-site-file-install "${T}/${SITEFILE}" || die + + dodoc README BUGS CONTRIBUTE + + if use gui && use aqua; then + dodir /Applications/Gentoo + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + 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." + if use gui; then + 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." + fi + tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write + a portable dump file due to being cross-compiled. + To create this file at run time, execute the following command: + \\n${EMACS_SUFFIX} --batch -Q --eval='(dump-emacs-portable + \"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'" + readme.gentoo_create_doc +} + +pkg_preinst() { + # verify that the PM hasn't removed our Info directory index #257260 + local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}" + [[ -f ${infodir}/dir || ! -d ${infodir} ]] || die +} + +pkg_postinst() { + elisp-site-regen + readme.gentoo_print_elog + + # Force an update of the emacs symlink for the livecd/dvd, + # because some microemacs packages set it with USE=livecd. + # Otherwise, create it only when it is not yet set. + eselect --root="${ROOT}" emacs update $(usev !livecd ifunset) +} + +pkg_postrm() { + elisp-site-regen + eselect --root="${ROOT}" emacs update ifunset +} diff --git a/app-editors/emacs/emacs-28.2-r17.ebuild b/app-editors/emacs/emacs-28.2-r17.ebuild new file mode 100644 index 000000000000..6060644a39f3 --- /dev/null +++ b/app-editors/emacs/emacs-28.2-r17.ebuild @@ -0,0 +1,549 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools eapi9-pipestatus elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs + +if [[ ${PV##*.} = 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git" + EGIT_BRANCH="emacs-28" + 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="https://alpha.gnu.org/gnu/emacs/pretest/${PN}-${PV/_/-}.tar.xz" + fi + # Patchset from proj/emacs-patches.git + SRC_URI+=" https://dev.gentoo.org/~ulm/emacs/${P}-patches-11.tar.xz" + PATCHES=("${WORKDIR}/patch") + SLOT="${PV%%.*}" + [[ ${PV} == *.*.* ]] && SLOT+="-vcs" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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 gfile gif +gmp gpm gsettings gtk gui gzip-el harfbuzz imagemagick +inotify jit jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars valgrind wide-int Xaw3d xft +xpm zlib" + +RDEPEND=">=app-emacs/emacs-common-1.11[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 ) ) + jit? ( + sys-devel/gcc:=[jit(-)] + sys-libs/zlib + ) + 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? ( acct-group/mail net-libs/liblockfile ) + selinux? ( sys-libs/libselinux ) + ssl? ( net-libs/gnutls:0= ) + systemd? ( sys-apps/systemd ) + valgrind? ( dev-debug/valgrind ) + 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 + gsettings? ( >=dev-libs/glib-2.28.6 ) + gif? ( media-libs/giflib:0= ) + jpeg? ( media-libs/libjpeg-turbo:0= ) + png? ( >=media-libs/libpng-1.4:0= ) + svg? ( >=gnome-base/librsvg-2.0 ) + tiff? ( media-libs/tiff:= ) + xpm? ( x11-libs/libXpm ) + imagemagick? ( media-gfx/imagemagick:0=[jpeg?,png?,svg?,tiff?] ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18[X] ) + !cairo? ( x11-libs/libXft ) + harfbuzz? ( media-libs/harfbuzz:0= ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( 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="sys-apps/texinfo + virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +IDEPEND="app-eselect/eselect-emacs" + +RDEPEND+=" ${IDEPEND}" + +EMACS_SUFFIX="emacs-${SLOT}" +SITEFILE="20${EMACS_SUFFIX}-gentoo.el" + +# Suppress false positive QA warnings #898304 #925449 +QA_CONFIG_IMPL_DECL_SKIP=( malloc_{get,set}_state statvfs64 ) + +src_prepare() { + if [[ ${PV##*.} = 9999 ]]; then + FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\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 + + if use jit; then + export NATIVE_FULL_AOT=1 + find lisp -type f -name "*.elc" -delete || die + + # These files ignore LDFLAGS. We assign the variable here, because + # for live ebuilds FULL_VERSION doesn't exist in global scope + QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + + # gccjit doesn't play well with ccache or distcc #801580 + # For now, work around the problem with an explicit LIBRARY_PATH + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi + fi + + default + + # Fix filename reference in redirected man page + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die + + # Tests that use bubblewrap don't work in the sandbox: + # "bwrap: setting up uid map: Permission denied" + # So, disrupt the search for the bwrap executable. + sed -i -e 's/(executable-find "bwrap")/nil/' test/src/emacs-tests.el \ + test/lisp/emacs-lisp/bytecomp-tests.el || die + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + replace-flags "-O[3-9]" -O2 #839405 + + # We want floating-point arithmetic to be correct #933380 + replace-flags -Ofast -O2 + append-flags -fno-fast-math -ffp-contract=off + + # Prevents e.g. tests interfering with running Emacs. + unset EMACS_SOCKET_NAME + + local myconf=( + --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) + --with-pdumper + $(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 jit native-compilation) + $(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) + ) + + 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 no) ) + fi + + if use jit; then + use zlib || ewarn \ + "USE flag \"jit\" overrides \"-zlib\"; enabling zlib support." + myconf+=( --with-zlib ) + else + myconf+=( $(use_with zlib) ) + 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 + --without-x + ) + else + myconf+=( + --with-x --without-ns + --without-gconf + $(use_with gsettings) + $(use_with toolkit-scroll-bars) + $(use_with gif) + $(use_with jpeg) + $(use_with png) + $(use_with svg rsvg) + $(use_with tiff) + $(use_with xpm) + $(use_with imagemagick) + ) + + if use xft; then + myconf+=( + --with-xft + $(use_with cairo) + $(use_with harfbuzz) + $(use_with m17n-lib libotf) + $(use_with m17n-lib m17n-flt) + ) + else + myconf+=( + --without-xft + --without-cairo + --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 <https://gitlab.gnome.org/GNOME/gtk/-/issues/221> and + <https://gitlab.gnome.org/GNOME/gtk/-/issues/2315>. + 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=gtk3 --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 + fi + + if tc-is-cross-compiler; then + # Configure a CBUILD directory when cross-compiling to make tools + mkdir -p "${S}-build" && pushd "${S}-build" >/dev/null || die + ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit + popd >/dev/null || die + # Don't try to execute the binary for dumping during the build + myconf+=( --with-dumping=none ) + elif use m68k; then + # Workaround for https://debbugs.gnu.org/44531 + myconf+=( --with-dumping=unexec ) + else + myconf+=( --with-dumping=pdumper ) + fi + + econf "${myconf[@]}" +} + +src_compile() { + export ac_cv_header_valgrind_valgrind_h=$(usex valgrind) + append-cppflags -DUSE_VALGRIND=$(usex valgrind) + + if tc-is-cross-compiler; then + # Build native tools for compiling lisp etc. + emake -C "${S}-build" src + emake lib # Cross-compile dependencies first for timestamps + # Save native build tools in the cross-directory + cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die + # Specify the native Emacs to compile lisp + emake -C lisp all EMACS="${S}-build/src/emacs" + fi + + emake +} + +src_test() { + # List .el test files with a comment above listing the exact + # subtests which caused failure. Elements should begin with a %. + # e.g. %lisp/gnus/mml-sec-tests.el. + local exclude_tests=( + # Reason: not yet known + # mml-secure-en-decrypt-{1,2,3,4} + # mml-secure-find-usable-keys-{1,2} + # mml-secure-key-checks + # mml-secure-select-preferred-keys-4 + # mml-secure-sign-verify-1 + %lisp/gnus/mml-sec-tests.el + + # Reason: race condition + # Looks like it should be fixed in 29.x at least: + # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55706 + # files-tests-file-name-non-special-file-in-directory-p + %lisp/files-tests.el + + # Reason: permission denied on /nonexistent + # (vc-*-bzr only fails if breezy is installed, as they + # try to access cache dirs under /nonexistent) + # + # rmail-undigest-test-multipart-mixed-digest + # rmail-undigest-test-rfc1153-less-strict-digest + # rmail-undigest-test-rfc1153-sloppy-digest + # rmail-undigest-test-rfc934-digest + # vc-test-bzr02-state + # vc-test-bzr05-rename-file + # vc-test-bzr06-version-diff + # vc-bzr-test-bug9781 + %lisp/mail/undigest-tests.el + %lisp/vc/vc-tests.el + %lisp/vc/vc-bzr-tests.el + + # Reason: some copyright years differ + %lisp/emacs-lisp/copyright-tests.el + + # Reason: quoting issues (fixed in Emacs 29) + %lib-src/emacsclient-tests.el + + # Reason: tries to access network + # internet-is-working + %src/process-tests.el + ) + use elibc_musl && exclude_tests+=( + # Reason: newlocale(3) lenient locale validation #906012 + # fns-tests-collate-strings + %src/fns-tests.el + ) + use threads || exclude_tests+=( + %src/emacs-module-tests.el + %src/keyboard-tests.el + %src/thread-tests.el + ) + + # See test/README for possible options + emake \ + EMACS_TEST_VERBOSE=1 \ + EXCLUDE_TESTS="${exclude_tests[*]}" \ + TERM=dumb \ + TEST_BACKTRACE_LINE_LENGTH=nil \ + check +} + +src_install() { + emake DESTDIR="${D}" NO_BIN_LINK=t BLESSMAIL_TARGET= 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}.metainfo.xml || die + + # dissuade Portage from removing our dir file #257260 + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir + + # movemail must be setgid mail + if ! use mailutils; then + fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fi + + # avoid collision between slots, see bug #169033 e.g. + rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el || die + rm -rf "${ED}"/usr/share/{applications,icons} || die + rm -rf "${ED}/usr/$(get_libdir)/systemd" || die + rm -rf "${ED}"/var || die + + # remove unused <version>/site-lisp dir + rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp || die + + # remove COPYING file (except for etc/COPYING used by describe-copying) + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING || die + + 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 + pipestatus || die "gzip .el pipeline 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-equal emacs-version "${FULL_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 (setenv "INFOPATH" (mapconcat #'identity (cdr p) ":")))))) + EOF + elisp-site-file-install "${T}/${SITEFILE}" || die + + dodoc README BUGS CONTRIBUTE + + if use gui && use aqua; then + dodir /Applications/Gentoo + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + 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." + if use gui; then + 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." + fi + tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write + a portable dump file due to being cross-compiled. + To create this file at run time, execute the following command: + \\n${EMACS_SUFFIX} --batch -Q --eval='(dump-emacs-portable + \"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'" + readme.gentoo_create_doc +} + +pkg_preinst() { + # verify that the PM hasn't removed our Info directory index #257260 + local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}" + [[ -f ${infodir}/dir || ! -d ${infodir} ]] || die +} + +pkg_postinst() { + elisp-site-regen + readme.gentoo_print_elog + + # Force an update of the emacs symlink for the livecd/dvd, + # because some microemacs packages set it with USE=livecd. + # Otherwise, create it only when it is not yet set. + eselect --root="${ROOT}" emacs update $(usev !livecd ifunset) +} + +pkg_postrm() { + elisp-site-regen + eselect --root="${ROOT}" emacs update ifunset +} diff --git a/app-editors/emacs/emacs-29.4-r3.ebuild b/app-editors/emacs/emacs-29.4-r3.ebuild new file mode 100644 index 000000000000..bb4ba8bcca52 --- /dev/null +++ b/app-editors/emacs/emacs-29.4-r3.ebuild @@ -0,0 +1,639 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools eapi9-pipestatus elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs + +if [[ ${PV##*.} = 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git" + EGIT_BRANCH="emacs-29" + 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="https://alpha.gnu.org/gnu/emacs/pretest/${PN}-${PV/_/-}.tar.xz" + fi + # Patchset from proj/emacs-patches.git + SRC_URI+=" https://dev.gentoo.org/~ulm/emacs/${P}-patches-4.tar.xz" + PATCHES=("${WORKDIR}/patch") + SLOT="${PV%%.*}" + [[ ${PV} == *.*.* ]] && SLOT+="-vcs" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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 gfile gif +gmp gpm gsettings gtk gui gzip-el harfbuzz imagemagick +inotify jit jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source sqlite ssl svg systemd +threads tiff toolkit-scroll-bars tree-sitter valgrind webp wide-int +X Xaw3d xft +xpm zlib" + +X_DEPEND="x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libxcb + x11-libs/xcb-util + x11-misc/xbitmaps + xpm? ( x11-libs/libXpm ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18[X] ) + !cairo? ( x11-libs/libXft ) + harfbuzz? ( media-libs/harfbuzz:0= ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( 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 + ) ) + ) + )" + +RDEPEND=">=app-emacs/emacs-common-1.11[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 ) ) + jit? ( + sys-devel/gcc:=[jit(-)] + sys-libs/zlib + ) + 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? ( acct-group/mail net-libs/liblockfile ) + selinux? ( sys-libs/libselinux ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( net-libs/gnutls:0= ) + systemd? ( sys-apps/systemd ) + tree-sitter? ( dev-libs/tree-sitter:= ) + valgrind? ( dev-debug/valgrind ) + zlib? ( sys-libs/zlib ) + gui? ( + gif? ( media-libs/giflib:0= ) + jpeg? ( media-libs/libjpeg-turbo:0= ) + png? ( >=media-libs/libpng-1.4:0= ) + svg? ( >=gnome-base/librsvg-2.0 ) + tiff? ( media-libs/tiff:= ) + webp? ( media-libs/libwebp:0= ) + imagemagick? ( media-gfx/imagemagick:0=[jpeg?,png?,svg?,tiff?] ) + !aqua? ( + gsettings? ( + app-emacs/emacs-common[gsettings(-)] + >=dev-libs/glib-2.28.6 + ) + gtk? ( !X? ( + media-libs/fontconfig + media-libs/freetype + >=x11-libs/cairo-1.12.18 + x11-libs/gtk+:3 + harfbuzz? ( media-libs/harfbuzz:0= ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) ) + !gtk? ( ${X_DEPEND} ) + X? ( ${X_DEPEND} ) + ) + )" + +DEPEND="${RDEPEND} + gui? ( !aqua? ( + !gtk? ( x11-base/xorg-proto ) + X? ( x11-base/xorg-proto ) + ) )" + +BDEPEND="sys-apps/texinfo + virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +IDEPEND="app-eselect/eselect-emacs" + +RDEPEND+=" ${IDEPEND}" + +EMACS_SUFFIX="emacs-${SLOT}" +SITEFILE="20${EMACS_SUFFIX}-gentoo.el" + +# Suppress false positive QA warnings #898304 #925091 +QA_CONFIG_IMPL_DECL_SKIP=( malloc_{get,set}_state statvfs64 ) + +src_prepare() { + if [[ ${PV##*.} = 9999 ]]; then + FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\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 + + default + + if use jit; then + find lisp -type f -name "*.elc" -delete || die + + # These files ignore LDFLAGS. We assign the variable here, because + # for live ebuilds FULL_VERSION doesn't exist in global scope + QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + + # gccjit doesn't play well with ccache or distcc #801580 + # For now, work around the problem with an explicit LIBRARY_PATH + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi + fi + + # Fix filename reference in redirected man page + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die + + # libseccomp is detected by configure but doesn't appear to have any + # effect on the installed image. Suppress it by supplying pkg-config + # with a wrong library name. + sed -i -e "/CHECK_MODULES/s/libseccomp/DiSaBlE&/" configure.ac || die + + # Tests that use bubblewrap don't work in the sandbox: + # "bwrap: setting up uid map: Permission denied" + # So, disrupt the search for the bwrap executable. + sed -i -e 's/(executable-find "bwrap")/nil/' test/src/emacs-tests.el \ + test/lisp/emacs-lisp/bytecomp-tests.el || die + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + replace-flags "-O[3-9]" -O2 #839405 + + # We want floating-point arithmetic to be correct #933380 + replace-flags -Ofast -O2 + append-flags -fno-fast-math -ffp-contract=off + + # Prevents e.g. tests interfering with running Emacs. + unset EMACS_SOCKET_NAME + + local myconf=( + --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) + --with-pdumper + $(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 jit native-compilation aot) + $(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 sqlite sqlite3) + $(use_with ssl gnutls) + $(use_with systemd libsystemd) + $(use_with threads) + $(use_with tree-sitter) + $(use_with wide-int) + ) + + 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 no) ) + fi + + if use jit; then + use zlib || ewarn \ + "USE flag \"jit\" overrides \"-zlib\"; enabling zlib support." + myconf+=( --with-zlib ) + else + myconf+=( $(use_with zlib) ) + fi + + # Emacs supports these window systems: + # X11, pure GTK (without X11), or Nextstep (Aqua/Cocoa). + # General GUI support is enabled by the "gui" USE flag, then + # the window system is selected as follows: + # "aqua" -> Nextstep + # "gtk -X" -> pure GTK + # otherwise -> X11 + # For X11 there is the further choice of toolkits GTK, Motif, + # Athena (Lucid), or no toolkit. They are enabled (in order of + # preference) with the "gtk", "motif", "Xaw3d", and "athena" flags. + + if ! use gui; then + einfo "Configuring to build without window system support" + myconf+=( + --without-x --without-pgtk --without-ns + ) + elif use aqua; then + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" + myconf+=( + --with-ns --disable-ns-self-contained + --without-x --without-pgtk + ) + elif use gtk && ! use X; then + einfo "Configuring to build with pure GTK (without X11) support" + myconf+=( + --with-pgtk --without-x --without-ns + --with-toolkit-scroll-bars #836392 + --without-gconf + --without-xwidgets + $(use_with gsettings) + $(use_with harfbuzz) + $(use_with m17n-lib libotf) + $(use_with m17n-lib m17n-flt) + ) + else + # X11 + myconf+=( + --with-x --without-pgtk --without-ns + --without-gconf + $(use_with gsettings) + $(use_with toolkit-scroll-bars) + $(use_with xpm) + ) + + if use xft; then + myconf+=( + --with-xft + $(use_with cairo) + $(use_with harfbuzz) + $(use_with m17n-lib libotf) + $(use_with m17n-lib m17n-flt) + ) + else + myconf+=( + --without-xft + --without-cairo + --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 <https://gitlab.gnome.org/GNOME/gtk/-/issues/221> and + <https://gitlab.gnome.org/GNOME/gtk/-/issues/2315>. + 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=gtk3 --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 + fi + + if use gui; then + # Common flags recognised for all GUIs + myconf+=( + $(use_with gif) + $(use_with jpeg) + $(use_with png) + $(use_with svg rsvg) + $(use_with tiff) + $(use_with webp) + $(use_with imagemagick) + ) + fi + + if tc-is-cross-compiler; then + # Configure a CBUILD directory when cross-compiling to make tools + mkdir -p "${S}-build" && pushd "${S}-build" >/dev/null || die + ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit + popd >/dev/null || die + # Don't try to execute the binary for dumping during the build + myconf+=( --with-dumping=none ) + elif use m68k; then + # Workaround for https://debbugs.gnu.org/44531 + myconf+=( --with-dumping=unexec ) + else + myconf+=( --with-dumping=pdumper ) + fi + + econf "${myconf[@]}" +} + +src_compile() { + export ac_cv_header_valgrind_valgrind_h=$(usex valgrind) + append-cppflags -DUSE_VALGRIND=$(usex valgrind) + + if tc-is-cross-compiler; then + # Build native tools for compiling lisp etc. + emake -C "${S}-build" src + emake lib # Cross-compile dependencies first for timestamps + # Save native build tools in the cross-directory + cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die + # Specify the native Emacs to compile lisp + EMACS_EMAKE_ARGS=( EMACS="${S}-build/src/emacs" ) + emake "${EMACS_EMAKE_ARGS[@]}" actual-all + else + EMACS_EMAKE_ARGS=() + emake + fi +} + +src_test() { + # List .el test files with a comment above listing the exact + # subtests which caused failure. Elements should begin with a %. + # e.g. %lisp/gnus/mml-sec-tests.el. + local exclude_tests=( + # Reason: permission denied on /nonexistent + # (vc-*-bzr only fails if breezy is installed, as they + # try to access cache dirs under /nonexistent) + # + # rmail-undigest-test-multipart-mixed-digest + # rmail-undigest-test-rfc1153-less-strict-digest + # rmail-undigest-test-rfc1153-sloppy-digest + # rmail-undigest-test-rfc934-digest + # vc-test-bzr02-state + # vc-test-bzr05-rename-file + # vc-test-bzr06-version-diff + # vc-bzr-test-bug9781 + %lisp/mail/undigest-tests.el + %lisp/vc/vc-tests.el + %lisp/vc/vc-bzr-tests.el + + # Reason: tries to access network + # internet-is-working + %src/process-tests.el + + # Reason: fails with stable version of tree-sitter-json due to + # ast changes. Bug #922525 + %src/treesit-tests.log + + # Reason: test is not skipped if tree-sitter-tsx is not installed + # Bug #922525 + %lisp/progmodes/typescript-ts-mode-tests.el + ) + use elibc_musl && exclude_tests+=( + # Reason: newlocale(3) lenient locale validation #906012 + # fns-tests-collate-strings + %src/fns-tests.el + ) + use threads || exclude_tests+=( + %lisp/server-tests.el + %lisp/progmodes/eglot-tests.el + %src/emacs-module-tests.el + %src/keyboard-tests.el + ) + use xpm || exclude_tests+=( %src/image-tests.el ) + + # Some tests hang with gnupg-2.2.42 + local gpgver=$(best_version app-crypt/gnupg) + gpgver=${gpgver#*gnupg-} + [[ -n ${gpgver} ]] \ + && ver_test "${gpgver}" -ge 2.2.42 && ver_test "${gpgver}" -lt 2.3 \ + && exclude_tests+=( + %lisp/epg-tests.el + %lisp/gnus/mml-sec-tests.el + ) + + # Redirect GnuPG's sockets, in order not to exceed the 108 char limit + # for socket paths on Linux. + mkdir -p "${T}"/gpg || die + local f + for f in browser extra ssh; do + printf "%%Assuan%%\nsocket=%s\n" "${T}/gpg/S.${f}" \ + > "test/lisp/gnus/mml-sec-resources/S.gpg-agent.${f}" || die + done + + # See test/README for possible options + emake \ + EMACS_TEST_VERBOSE=1 \ + EXCLUDE_TESTS="${exclude_tests[*]}" \ + TERM=dumb \ + TEST_BACKTRACE_LINE_LENGTH=nil \ + check +} + +src_install() { + emake \ + "${EMACS_EMAKE_ARGS[@]}" \ + DESTDIR="${D}" \ + NO_BIN_LINK=t \ + BLESSMAIL_TARGET="" \ + 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}.metainfo.xml || die + + # dissuade Portage from removing our dir file #257260 + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir + + # movemail must be setgid mail + if ! use mailutils; then + fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fi + + # avoid collision between slots, see bug #169033 e.g. + rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el || die + rm -rf "${ED}"/usr/share/{applications,icons} || die + rm -rf "${ED}"/usr/share/glib-2.0 || die #911117 + rm -rf "${ED}/usr/$(get_libdir)/systemd" || die + rm -rf "${ED}"/var || die + + # remove unused <version>/site-lisp dir + rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp || die + + # remove COPYING file (except for etc/COPYING used by describe-copying) + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING || die + + 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 + pipestatus || die "gzip .el pipeline 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-equal emacs-version "${FULL_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 (setenv "INFOPATH" (mapconcat #'identity (cdr p) ":")))))) + EOF + elisp-site-file-install "${T}/${SITEFILE}" || die + + dodoc README BUGS CONTRIBUTE + + if use gui && use aqua; then + dodir /Applications/Gentoo + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + 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." + if use gui; then + 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." + fi + if ! use mailutils; then + DOC_CONTENTS+="\\n\\nThe mailutils USE flag is disabled. If Emacs' + own e-mail features are going to be used as an e-mail client + (e.g. Rmail), you are strongly encouraged to enable it. If not, + Emacs will use its own implementation of movemail; which has + fewer features and is less secure. For more information see: + https://www.gnu.org/software/emacs/manual/html_node/emacs/Movemail.html" + fi + tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write + a portable dump file due to being cross-compiled. + To create this file at run time, execute the following command: + \\n${EMACS_SUFFIX} --batch -Q --eval='(dump-emacs-portable + \"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'" + readme.gentoo_create_doc +} + +pkg_preinst() { + # verify that the PM hasn't removed our Info directory index #257260 + local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}" + [[ -f ${infodir}/dir || ! -d ${infodir} ]] || die +} + +pkg_postinst() { + elisp-site-regen + readme.gentoo_print_elog + + # Force an update of the emacs symlink for the livecd/dvd, + # because some microemacs packages set it with USE=livecd. + # Otherwise, create it only when it is not yet set. + eselect --root="${ROOT}" emacs update $(usev !livecd ifunset) +} + +pkg_postrm() { + elisp-site-regen + eselect --root="${ROOT}" emacs update ifunset +} diff --git a/app-editors/emacs/emacs-30.1-r1.ebuild b/app-editors/emacs/emacs-30.1-r1.ebuild new file mode 100644 index 000000000000..8cf6f74d807e --- /dev/null +++ b/app-editors/emacs/emacs-30.1-r1.ebuild @@ -0,0 +1,616 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools eapi9-pipestatus elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs + +if [[ ${PV##*.} = 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git" + EGIT_BRANCH="emacs-30" + 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="https://alpha.gnu.org/gnu/emacs/pretest/${PN}-${PV/_/-}.tar.xz" + fi + SLOT="${PV%%.*}" + [[ ${PV} == *.*.* ]] && SLOT+="-vcs" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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 gfile gif +gmp gpm gsettings gtk gui gzip-el harfbuzz imagemagick +inotify jit jpeg kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source sqlite ssl svg systemd +threads tiff toolkit-scroll-bars tree-sitter valgrind webp wide-int +X xattr Xaw3d xft +xpm zlib" + +X_DEPEND="x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXinerama + x11-libs/libXrandr + x11-libs/libxcb + x11-libs/xcb-util + x11-misc/xbitmaps + xpm? ( x11-libs/libXpm ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18[X] ) + !cairo? ( x11-libs/libXft ) + harfbuzz? ( media-libs/harfbuzz:0= ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( 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 + ) ) + ) + )" + +RDEPEND=">=app-emacs/emacs-common-1.11[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 ) ) + jit? ( + sys-devel/gcc:=[jit(-)] + sys-libs/zlib + ) + kerberos? ( virtual/krb5 ) + lcms? ( media-libs/lcms:2 ) + libxml2? ( >=dev-libs/libxml2-2.2.0 ) + mailutils? ( net-mail/mailutils[clients] ) + !mailutils? ( acct-group/mail net-libs/liblockfile ) + selinux? ( sys-libs/libselinux ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( net-libs/gnutls:0= ) + systemd? ( sys-apps/systemd ) + tree-sitter? ( dev-libs/tree-sitter:= ) + valgrind? ( dev-debug/valgrind ) + xattr? ( sys-apps/attr ) + zlib? ( sys-libs/zlib ) + gui? ( + gif? ( media-libs/giflib:0= ) + jpeg? ( media-libs/libjpeg-turbo:0= ) + png? ( >=media-libs/libpng-1.4:0= ) + svg? ( >=gnome-base/librsvg-2.0 ) + tiff? ( media-libs/tiff:= ) + webp? ( media-libs/libwebp:0= ) + imagemagick? ( media-gfx/imagemagick:0=[jpeg?,png?,svg?,tiff?] ) + !aqua? ( + gsettings? ( + app-emacs/emacs-common[gsettings(-)] + >=dev-libs/glib-2.28.6 + ) + gtk? ( !X? ( + media-libs/fontconfig + media-libs/freetype + >=x11-libs/cairo-1.12.18 + x11-libs/gtk+:3 + harfbuzz? ( media-libs/harfbuzz:0= ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) ) + !gtk? ( ${X_DEPEND} ) + X? ( ${X_DEPEND} ) + ) + )" + +DEPEND="${RDEPEND} + gui? ( !aqua? ( + !gtk? ( x11-base/xorg-proto ) + X? ( x11-base/xorg-proto ) + ) )" + +BDEPEND="sys-apps/texinfo + virtual/pkgconfig + gzip-el? ( app-arch/gzip )" + +IDEPEND="app-eselect/eselect-emacs" + +RDEPEND+=" ${IDEPEND}" + +EMACS_SUFFIX="emacs-${SLOT}" +SITEFILE="20${EMACS_SUFFIX}-gentoo.el" + +# Suppress false positive QA warnings #898304 #925091 +QA_CONFIG_IMPL_DECL_SKIP=( malloc_{get,set}_state statvfs64 ) + +src_prepare() { + if [[ ${PV##*.} = 9999 ]]; then + FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[^0-9.]*\([0-9.]*\).*/\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 + + default + + if use jit; then + find lisp -type f -name "*.elc" -delete || die + + # These files ignore LDFLAGS. We assign the variable here, because + # for live ebuilds FULL_VERSION doesn't exist in global scope + QA_FLAGS_IGNORED="usr/$(get_libdir)/emacs/${FULL_VERSION}/native-lisp/.*" + + # The build system requires gcc for native compilation #874657 + if ! tc-is-gcc; then + ewarn "Emacs must be built with gcc[jit] if USE=jit is enabled." + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar NM=${CHOST}-gcc-nm \ + RANLIB=${CHOST}-gcc-ranlib + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + + # gccjit doesn't play well with ccache or distcc #801580 + # For now, work around the problem with an explicit LIBRARY_PATH + if has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc; then + export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi + fi + + # Fix filename reference in redirected man page + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die + + # libseccomp is detected by configure but doesn't appear to have any + # effect on the installed image. Suppress it by supplying pkg-config + # with a wrong library name. + sed -i -e "/CHECK_MODULES/s/libseccomp/DiSaBlE&/" configure.ac || die + + # Tests that use bubblewrap don't work in the sandbox: + # "bwrap: setting up uid map: Permission denied" + # So, disrupt the search for the bwrap executable. + sed -i -e 's/(executable-find "bwrap")/nil/' test/src/emacs-tests.el \ + test/lisp/emacs-lisp/bytecomp-tests.el || die + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + replace-flags "-O[3-9]" -O2 #839405 + + # We want floating-point arithmetic to be correct #933380 + replace-flags -Ofast -O2 + append-flags -fno-fast-math -ffp-contract=off + + # Prevents e.g. tests interfering with running Emacs. + unset EMACS_SOCKET_NAME + + local myconf=( + --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) + --with-pdumper + $(use_enable acl) + $(use_enable xattr) + $(use_with dbus) + $(use_with dynamic-loading modules) + $(use_with games gameuser ":gamestat") + $(use_with gmp libgmp) + $(use_with gpm) + $(use_with jit native-compilation aot) + $(use_with kerberos) $(use_with kerberos kerberos5) + $(use_with lcms lcms2) + $(use_with libxml2 xml2) + $(use_with mailutils) + $(use_with selinux) + $(use_with sqlite sqlite3) + $(use_with ssl gnutls) + $(use_with systemd libsystemd) + $(use_with threads) + $(use_with tree-sitter) + $(use_with wide-int) + ) + + 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 no) ) + fi + + if use jit; then + use zlib || ewarn \ + "USE flag \"jit\" overrides \"-zlib\"; enabling zlib support." + myconf+=( --with-zlib ) + else + myconf+=( $(use_with zlib) ) + fi + + # Emacs supports these window systems: + # X11, pure GTK (without X11), or Nextstep (Aqua/Cocoa). + # General GUI support is enabled by the "gui" USE flag, then + # the window system is selected as follows: + # "aqua" -> Nextstep + # "gtk -X" -> pure GTK + # otherwise -> X11 + # For X11 there is the further choice of toolkits GTK, Motif, + # Athena (Lucid), or no toolkit. They are enabled (in order of + # preference) with the "gtk", "motif", "Xaw3d", and "athena" flags. + + if ! use gui; then + einfo "Configuring to build without window system support" + myconf+=( + --without-x --without-pgtk --without-ns + ) + elif use aqua; then + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" + myconf+=( + --with-ns --disable-ns-self-contained + --without-x --without-pgtk + ) + elif use gtk && ! use X; then + einfo "Configuring to build with pure GTK (without X11) support" + myconf+=( + --with-pgtk --without-x --without-ns + --with-toolkit-scroll-bars #836392 + --without-gconf + --without-xwidgets + $(use_with gsettings) + $(use_with harfbuzz) + $(use_with m17n-lib libotf) + $(use_with m17n-lib m17n-flt) + ) + else + # X11 + myconf+=( + --with-x --without-pgtk --without-ns + --without-gconf + $(use_with gsettings) + $(use_with toolkit-scroll-bars) + $(use_with xpm) + ) + + if use xft; then + myconf+=( + --with-xft + $(use_with cairo) + $(use_with harfbuzz) + $(use_with m17n-lib libotf) + $(use_with m17n-lib m17n-flt) + ) + else + myconf+=( + --without-xft + --without-cairo + --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 <https://gitlab.gnome.org/GNOME/gtk/-/issues/221> and + <https://gitlab.gnome.org/GNOME/gtk/-/issues/2315>. + 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=gtk3 --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 + fi + + if use gui; then + # Common flags recognised for all GUIs + myconf+=( + $(use_with gif) + $(use_with jpeg) + $(use_with png) + $(use_with svg rsvg) + $(use_with tiff) + $(use_with webp) + $(use_with imagemagick) + ) + fi + + if tc-is-cross-compiler; then + # Configure a CBUILD directory when cross-compiling to make tools + mkdir -p "${S}-build" && pushd "${S}-build" >/dev/null || die + ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit + popd >/dev/null || die + # Don't try to execute the binary for dumping during the build + myconf+=( --with-dumping=none ) + elif use m68k; then + # Workaround for https://debbugs.gnu.org/44531 + myconf+=( --with-dumping=unexec ) + else + myconf+=( --with-dumping=pdumper ) + fi + + econf "${myconf[@]}" +} + +src_compile() { + export ac_cv_header_valgrind_valgrind_h=$(usex valgrind) + append-cppflags -DUSE_VALGRIND=$(usex valgrind) + + if tc-is-cross-compiler; then + # Build native tools for compiling lisp etc. + emake -C "${S}-build" src + emake lib # Cross-compile dependencies first for timestamps + # Save native build tools in the cross-directory + cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die + # Specify the native Emacs to compile lisp + EMACS_EMAKE_ARGS=( EMACS="${S}-build/src/emacs" ) + emake "${EMACS_EMAKE_ARGS[@]}" actual-all + else + EMACS_EMAKE_ARGS=() + emake + fi +} + +src_test() { + # List .el test files with a comment above listing the exact + # subtests which caused failure. Elements should begin with a %. + # e.g. %lisp/gnus/mml-sec-tests.el. + local exclude_tests=( + # Reason: permission denied on /nonexistent + # (vc-*-bzr only fails if breezy is installed, as they + # try to access cache dirs under /nonexistent) + # + # rmail-undigest-test-multipart-mixed-digest + # rmail-undigest-test-rfc1153-less-strict-digest + # rmail-undigest-test-rfc1153-sloppy-digest + # rmail-undigest-test-rfc934-digest + # vc-test-bzr02-state + # vc-test-bzr05-rename-file + # vc-test-bzr06-version-diff + # vc-bzr-test-bug9781 + %lisp/mail/undigest-tests.el + %lisp/vc/vc-tests.el + %lisp/vc/vc-bzr-tests.el + + # Reason: tries to access network + # internet-is-working + %src/process-tests.el + ) + use elibc_musl && exclude_tests+=( + # Reason: newlocale(3) lenient locale validation #906012 + # fns-tests-collate-strings + %src/fns-tests.el + ) + use threads || exclude_tests+=( + %lisp/progmodes/eglot-tests.el + %src/emacs-module-tests.el + %src/keyboard-tests.el + ) + + # Redirect GnuPG's sockets, in order not to exceed the 108 char limit + # for socket paths on Linux. + mkdir -p "${T}"/gpg || die + local f + for f in browser extra ssh; do + printf "%%Assuan%%\nsocket=%s\n" "${T}/gpg/S.${f}" \ + > "test/lisp/gnus/mml-sec-resources/S.gpg-agent.${f}" || die + done + + # See test/README for possible options + emake \ + EMACS_TEST_VERBOSE=1 \ + EXCLUDE_TESTS="${exclude_tests[*]}" \ + TERM=dumb \ + TEST_BACKTRACE_LINE_LENGTH=nil \ + check +} + +src_install() { + emake \ + "${EMACS_EMAKE_ARGS[@]}" \ + DESTDIR="${D}" \ + NO_BIN_LINK=t \ + BLESSMAIL_TARGET="" \ + 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}.metainfo.xml || die + + # dissuade Portage from removing our dir file #257260 + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir + + # movemail must be setgid mail + if ! use mailutils; then + fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail + fi + + # avoid collision between slots, see bug #169033 e.g. + rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el || die + rm -rf "${ED}"/usr/share/{applications,icons} || die + rm -rf "${ED}"/usr/share/glib-2.0 || die #911117 + rm -rf "${ED}/usr/$(get_libdir)/systemd" || die + rm -rf "${ED}"/var || die + + # remove unused <version>/site-lisp dir + rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp || die + + # remove COPYING file (except for etc/COPYING used by describe-copying) + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING || die + + 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 + pipestatus || die "gzip .el pipeline 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-equal emacs-version "${FULL_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 (setenv "INFOPATH" (mapconcat #'identity (cdr p) ":")))))) + EOF + elisp-site-file-install "${T}/${SITEFILE}" || die + + dodoc README BUGS CONTRIBUTE + + if use gui && use aqua; then + dodir /Applications/Gentoo + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die + 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." + if use gui; then + 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." + fi + if ! use mailutils; then + DOC_CONTENTS+="\\n\\nThe mailutils USE flag is disabled. If Emacs' + own e-mail features are going to be used as an e-mail client + (e.g. Rmail), you are strongly encouraged to enable it. If not, + Emacs will use its own implementation of movemail; which has + fewer features and is less secure. For more information see: + https://www.gnu.org/software/emacs/manual/html_node/emacs/Movemail.html" + fi + tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write + a portable dump file due to being cross-compiled. + To create this file at run time, execute the following command: + \\n${EMACS_SUFFIX} --batch -Q --eval='(dump-emacs-portable + \"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'" + readme.gentoo_create_doc +} + +pkg_preinst() { + # verify that the PM hasn't removed our Info directory index #257260 + local infodir="${ED}/usr/share/info/${EMACS_SUFFIX}" + [[ -f ${infodir}/dir || ! -d ${infodir} ]] || die +} + +pkg_postinst() { + elisp-site-regen + readme.gentoo_print_elog + + # Force an update of the emacs symlink for the livecd/dvd, + # because some microemacs packages set it with USE=livecd. + # Otherwise, create it only when it is not yet set. + eselect --root="${ROOT}" emacs update $(usev !livecd ifunset) +} + +pkg_postrm() { + elisp-site-regen + eselect --root="${ROOT}" emacs update ifunset +} diff --git a/app-editors/emacs/emacs-30.1.9999.ebuild b/app-editors/emacs/emacs-30.1.9999.ebuild index c41918367fa9..b4501aac7198 100644 --- a/app-editors/emacs/emacs-30.1.9999.ebuild +++ b/app-editors/emacs/emacs-30.1.9999.ebuild @@ -89,7 +89,7 @@ X_DEPEND="x11-libs/libICE ) )" -RDEPEND="app-emacs/emacs-common[games?,gui(-)?] +RDEPEND=">=app-emacs/emacs-common-1.11[games?,gui(-)?] sys-libs/ncurses:0= acl? ( virtual/acl ) alsa? ( media-libs/alsa-lib ) @@ -508,15 +508,6 @@ src_install() { # remove COPYING file (except for etc/COPYING used by describe-copying) rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING || die - 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 - pipestatus || die - fi - if use gzip-el; then # compress .el files when a corresponding .elc exists find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ diff --git a/app-editors/emacs/emacs-31.0.9999.ebuild b/app-editors/emacs/emacs-31.0.9999.ebuild index 5646bc84b384..520cd319d3fb 100644 --- a/app-editors/emacs/emacs-31.0.9999.ebuild +++ b/app-editors/emacs/emacs-31.0.9999.ebuild @@ -89,7 +89,7 @@ X_DEPEND="x11-libs/libICE ) )" -RDEPEND="app-emacs/emacs-common[games?,gui(-)?] +RDEPEND=">=app-emacs/emacs-common-1.11[games?,gui(-)?] sys-libs/ncurses:0= acl? ( virtual/acl ) alsa? ( media-libs/alsa-lib ) @@ -508,15 +508,6 @@ src_install() { # remove COPYING file (except for etc/COPYING used by describe-copying) rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING || die - 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 - pipestatus || die - fi - if use gzip-el; then # compress .el files when a corresponding .elc exists find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ diff --git a/app-editors/moe/Manifest b/app-editors/moe/Manifest index dea7fd1593bf..517c77e4b790 100644 --- a/app-editors/moe/Manifest +++ b/app-editors/moe/Manifest @@ -1,4 +1,6 @@ -AUX moe-1.14-respect-user-flags.patch 412 BLAKE2B 643726d90ce174a684a3bb0daa61c73d5c86c196633f652eddad1b2e2beadb226b655ed0f1aae695fe9d6a840a6fab7f80eaafdaa6526fecec1728554f7927da SHA512 bc883f822b5b8a7b0d1fccd0be25646b9c22dd721268b86f3f892a6b5b331b1b87c4aa361a8d6a03c83cc383ff15880ff080ffc0f4185c30aac0c28a81591b69 +AUX moe-respect-user-flags.patch 412 BLAKE2B 643726d90ce174a684a3bb0daa61c73d5c86c196633f652eddad1b2e2beadb226b655ed0f1aae695fe9d6a840a6fab7f80eaafdaa6526fecec1728554f7927da SHA512 bc883f822b5b8a7b0d1fccd0be25646b9c22dd721268b86f3f892a6b5b331b1b87c4aa361a8d6a03c83cc383ff15880ff080ffc0f4185c30aac0c28a81591b69 DIST moe-1.14.tar.lz 92905 BLAKE2B c4adb3ca00f48c6a36547da063aa1ce9327823fed26eb9e0ac25d837b5df207988c2259156bb841727463b74de450d2cb0475746a0e19d926aeb65ac38079561 SHA512 db45f7c05b9a1a06085b2604eb8e9857caeb7d3a56a4815df208806bbbf19cc47b19776619635c70860142cb8bb775c0eaf31b9b07698cc83b74f1c6d6f47d5c -EBUILD moe-1.14.ebuild 599 BLAKE2B af84f8909850a783b4d20fd3114add55bed0c22db027d022f109f74103d0d0f4a52b402782cc00006f0fc3a486b1c6ea6cae704ed851590599240bee84ff2d22 SHA512 00065e068092de9f734b69c4172d766a591d209611c46b7ac004ff86d6847a5af26ffe780363f40ed0696d18dccc099f3e55d83c2ee532743b89d29d3409aabe +DIST moe-1.15.tar.lz 93995 BLAKE2B e70c8ebb2171bde3c229e9ac5ed5c6957e5ec6fae256fb152ce40f7a20042cdc69ca48d7db26adae4850af7c93c294291980cc4c49a1e4b987e320bc707bd825 SHA512 3e7ddac70e0298070db98c2e366f4bac0884c08c9200beee0c380cc75068c6469f9f60da6ccdf541ed0729cb685782ed41464ca690bd804b1ab9654168636c26 +EBUILD moe-1.14.ebuild 600 BLAKE2B 215f69cdf1541e4612e1c3d1bcb9d4ac8c2ebd146095f6b469841627bbcfbbb93fd3f4987dd0508febf67f8225b33bdc7561a606602ab0ade097b69f0511d36b SHA512 2e360a17ddf8edf29fb24cbcc453d8962003438b6b64d3488f3b3ef07d1f74cd6f25347e5013d79275a823f75eb057cff69801f4ca8ff5d4a1f741a7d594afb6 +EBUILD moe-1.15.ebuild 603 BLAKE2B b24efa2b05650f06db726450011933d8c4b08ca5238e898dafb093031b2b571e41a53bb9058a3b803ee425c36a3e45ebfbb12f54bc56c0135dda604c19805e20 SHA512 bfe041ece6c6f70cf0a6c36151d535a80562b8d4bcdfb99cbf6aa928fc3707dfcab320e425748da8e4b7cf837bc8b4fbca45a31a1d0ff4bb94178bd71e85a739 MISC metadata.xml 243 BLAKE2B a46ba05f2d1a94db30012e9efe4e18f76923a80308c2dfb6bafdb1288e153c105e68dfea8b817514add26aab6e4136029c9335000c309afc1adfd1c09d3d9e2a SHA512 dd9449d3e58e44932db7e1da02498e61929e11c523429f340c5182408d4c1db5a20b352442973214458410b732aee31b67d9720d5122b622883b5d613712d774 diff --git a/app-editors/moe/files/moe-1.14-respect-user-flags.patch b/app-editors/moe/files/moe-respect-user-flags.patch index 8616c8095962..8616c8095962 100644 --- a/app-editors/moe/files/moe-1.14-respect-user-flags.patch +++ b/app-editors/moe/files/moe-respect-user-flags.patch diff --git a/app-editors/moe/moe-1.14.ebuild b/app-editors/moe/moe-1.14.ebuild index 17f43c616d53..ab94f5815de6 100644 --- a/app-editors/moe/moe-1.14.ebuild +++ b/app-editors/moe/moe-1.14.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -19,7 +19,7 @@ BDEPEND=" $(unpacker_src_uri_depends) virtual/pkgconfig" -PATCHES=( "${FILESDIR}"/${P}-respect-user-flags.patch ) +PATCHES=( "${FILESDIR}"/${PN}-respect-user-flags.patch ) src_configure() { tc-export CXX PKG_CONFIG diff --git a/app-editors/moe/moe-1.15.ebuild b/app-editors/moe/moe-1.15.ebuild new file mode 100644 index 000000000000..191bb22b518a --- /dev/null +++ b/app-editors/moe/moe-1.15.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs unpacker + +DESCRIPTION="Powerful and user-friendly console text editor" +HOMEPAGE="https://www.gnu.org/software/moe/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.lz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~riscv ~x86 ~amd64-linux ~x86-linux" + +RDEPEND="sys-libs/ncurses:=" +DEPEND="${RDEPEND}" +BDEPEND=" + $(unpacker_src_uri_depends) + virtual/pkgconfig" + +PATCHES=( "${FILESDIR}"/${PN}-respect-user-flags.patch ) + +src_configure() { + tc-export CXX PKG_CONFIG + default +} |