From 81b8f20732954c4508baf2f77472b5435e3f851f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 14 Sep 2022 11:10:11 +0100 Subject: gentoo auto-resync : 14:09:2022 - 11:10:10 --- app-editors/emacs/Manifest | 10 +- app-editors/emacs/emacs-28.1.90-r2.ebuild | 452 -------------------------- app-editors/emacs/emacs-28.1.91-r1.ebuild | 507 ----------------------------- app-editors/emacs/emacs-28.1.9999.ebuild | 509 ----------------------------- app-editors/emacs/emacs-28.2.9999.ebuild | 519 ++++++++++++++++++++++++++++++ app-editors/emacs/emacs-28.2.ebuild | 517 +++++++++++++++++++++++++++++ app-editors/emacs/emacs-29.0.9999.ebuild | 14 +- 7 files changed, 1052 insertions(+), 1476 deletions(-) delete mode 100644 app-editors/emacs/emacs-28.1.90-r2.ebuild delete mode 100644 app-editors/emacs/emacs-28.1.91-r1.ebuild delete mode 100644 app-editors/emacs/emacs-28.1.9999.ebuild create mode 100644 app-editors/emacs/emacs-28.2.9999.ebuild create mode 100644 app-editors/emacs/emacs-28.2.ebuild (limited to 'app-editors/emacs') diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest index 04fbe1ee1c36..f59c117f4817 100644 --- a/app-editors/emacs/Manifest +++ b/app-editors/emacs/Manifest @@ -11,9 +11,8 @@ DIST emacs-26.3.tar.xz 44415140 BLAKE2B aa8434e6431992ee40402f03a890dd2c49784ee7 DIST emacs-27.2-patches-3.tar.xz 7776 BLAKE2B c03947780518ebf86994b1af20cc24377094c55c783e3cbb0230da5ecb4c92613c4e6d599cefe51b297cc117e3a832c6b34365cc983da0630a9ca6f39b58d10e SHA512 a72af0dd47989b5e4ceecc48d8dfd1a362cdda17070a6a5a9c53c0448a7bceed3b27efd0dd78a0cbe3eb503015b1475cd52fc01c5aca10a52ad30635f385b190 DIST emacs-27.2.tar.xz 44624480 BLAKE2B 245ea96004b90f81ac74de74521cbbe086caf1176937e08157eae12cdde5a0f35fc77f7119272ed812974358e5e95abb05e1c2e4f3b501cf5401ea9274f62156 SHA512 0f63a5a8709b113ef790c1a64845dad05ead096f93f62164ff221c517a35b91ea7bced75a992d794981a85382cda03cca7338da2f5ef8f6ef1459b88018a4ce9 DIST emacs-28.1-patches-1.tar.xz 960 BLAKE2B a717923a1b022ff4dafaa27a7198a287b7d5ea5765cef9b719e17c622796707dce855d12d634f836aa1196557e7f780b884027ccc4467fb56d48d710fdd2b82e SHA512 67a393891c3834855b05d4722026bce9da6e68cc15143a7887884e8aba4f78d8daca7d3796b25c68e23f19c300a036db9b91961c50aff901e5d9da448c9c72e9 -DIST emacs-28.1.90.tar.xz 47712688 BLAKE2B 00aa886946de3247954ad3b113d8f5861ffe4d46757ff4d33f4a88d688e9ffa86733316ae73809dd3017d4f8c3fe755bca658a752975a4c1ca716dcc4c206528 SHA512 50452ad29919f63d11b751ac4bc082e877e5792dc53f27ff90c22924f2b504f1049d138a8a31072cab0542bb552f9ecb356a04a570fd7754f285cfe494c0bea2 -DIST emacs-28.1.91.tar.xz 47726940 BLAKE2B 98445c49d8709f0262a98f904828e604094f4f703548993e5d090c214e4bc7d19c174098f40a003aa2fe1f92aa8e44657d7b4ead9c81f0299cb25b7f5c78bc16 SHA512 4c8505c90f65d410ae11877b6873e0d45f40ab0253592a93d9deb335009c4306b533c7c8ca5c0980ceb5ea8d64c72be3f503f249f1d30f856d6ac33f6e63d149 DIST emacs-28.1.tar.xz 47699512 BLAKE2B 42a12bec2dc74f4838ae79b5589fb7439ff415d8ddd34f2ff7a8c503f909ddd4144ad35ae19c758d8627cfa9ed29276b326c5bec3853a77cd179e9fb17d22ad7 SHA512 c146ff7086aba49fa6c18adf4e485a59eb4c6525fddb9d385034446830b8bb0ac9e6fb76e7b6d94a9fddc41643415f36acad57a1ae16a841c97f61bc211459d9 +DIST emacs-28.2.tar.xz 47722600 BLAKE2B a7e4990658b5e7306510f8dded93aaf0b82cdd9306df8b786526d038c3249ef9579287075f2235eb01a71ae1699db555254f137b86ab2d2305b45895053df552 SHA512 a7cec7e3e82367815a1442f69af54102dbfc434069810a9dec5938a6660cb8b076e6f1fb0bfff9695b15603dbbe05eb9c7dfd92e90cf40fc4d1e5746bce83bd8 EBUILD emacs-18.59-r14.ebuild 4426 BLAKE2B 836c0e10eb9bee637d215bc13d695a631ba495728b5c8da1a2b6a29e31f17be8de4bb0aebe6401fecaee8488da0d5302b898b1a8b528eb18a0ebb46b3ed04e43 SHA512 4540d9bb492309c983c75c2cfb2f3aad2653252303d7d25c5d59723f43b9ece3ee43a216e3775c86f75714b29d2387371aab734c94cbe59d29cde64e077f27cf EBUILD emacs-23.4-r21.ebuild 11040 BLAKE2B 5743514f4e5be8649ed1b2a8bafaa873876c71e5035632f61bc4ef808e540edf144af1277c355bbb215f922be7dd7ac843af34a42f6b6109aaecb2ef2027a6dd SHA512 049dfb3eff159a1cfe6e62e4ecbe04df614b5cbb79b9a8619bb9793e08191754270e36295124e6fa6fe79832c2d20e55138d42080d5cf7fc4dce5bbd8ad6fe54 EBUILD emacs-24.5-r11.ebuild 10781 BLAKE2B 436f02959a1aa71165682f8e133dc0d7964cf7742b3d3a15906ac0f702e6ba42a3828d5b3beec1e84e4c5b9c74316e421bb6fe2392df9680b85efb23868b88f1 SHA512 61ef707e3d26d4d303754bc854834e915f09956ec2f9cfbf0f4916faf4a12f1922f0581c5f1baa93c5fa4ac6acbffe494f0e8d6ef8f0a904b9aa5d546a5f4d9e @@ -22,8 +21,7 @@ EBUILD emacs-26.3-r7.ebuild 11779 BLAKE2B 69ef04e1707478913d6d574cc9569e1b7eece4 EBUILD emacs-27.2-r5.ebuild 14310 BLAKE2B 8875ffdd3002c88240d58891d67c840ea67bba108009e7fbf5963050a36b9e4f1cc4903e38c37a7456c3becf9a5c42c29bb910e8797940b9389b3fad8747948d SHA512 e47f5035c3d687b7a58ef3a05952ec301a00d17ae7633a9d5055c15f8fe9631d7d60927966eaf0b3e9fb1a3f0d892e3830269dc995efc2ff3400aad23815df1c EBUILD emacs-28.1-r2.ebuild 14926 BLAKE2B 75ad1e8fc9566d3f0b76878306640c26ff8d58ca0ac8cb45472a1fbc4e4edd5415b8e01b9a07b9770b303b2288fdc6169e4e0df40d50fba81860393363eeec44 SHA512 cf259ec995064385d9e4f3e02eb2f9d86e8550ef1842f64a81ea6902e61a0d58cdcc49b800e9f7e8ad412c752ddaf6e341dfaa02a820325e6bcf9fad40e509ec EBUILD emacs-28.1-r3.ebuild 15011 BLAKE2B dd646d6c697403a00294aabd72d55841a4d886c034ae1d47ce118de4f0ad2b301fd27c91ab7fdc56a3825f97793044da624ab95bf576df8a26d22785731c39e6 SHA512 b09a22af3bf5f4e9a2632168cde59071285ce5748237dd8e40fd2437831a69bb0b35c9c55a647c0bb0a44e9d40639da06a92e020926d70ebd43b680a673a8eb4 -EBUILD emacs-28.1.90-r2.ebuild 14940 BLAKE2B b6bb7cf14803f2649554168191d2533a2912212d399a31c1095c1b463356a7284ce135d648b1378042f20ae780cadac6b848efacecc1cda5c190fa2f925fb7aa SHA512 b7d7852e3f7367f18500132317ab0c95a076ace63080cfa805ed638266cbd7171ddd6814911bed3532f0c5740300689f2773790744e9cccbc426ac7d1867c2af -EBUILD emacs-28.1.91-r1.ebuild 16599 BLAKE2B 442892edf344ff28768308c73c164d07ab05bdd5ab4c94bb0d4912203f44ff62ee1ab9b77335d9a6cba9b139e6fc8804746e9c7c9d0fc0cfbc691c067ba679a4 SHA512 13c0d00a4773845b6200ef9cea5c591fcfea6e85a5a46acae092fd98b5953f6535591255ac45d4b14099225346733c25f4d07e53f9546715c1dd3e2a9c5f3dcc -EBUILD emacs-28.1.9999.ebuild 16696 BLAKE2B 3f97d528aad2b8a2a4055c9dc26adfd1fece38ba27254dfd9024372fcddbb9703b3de664bf2a19808e3f618b612a1b7a6af6c5be7637e5bfc7e963ee904dee89 SHA512 6d3681d77257401d642b8e61c69cf37f02d170b5374efefaff888250ad8127fa1f320c6121452a5d4a34388d55bc6f5d24669dc4d14d5d772bd7a65ca308e339 -EBUILD emacs-29.0.9999.ebuild 17961 BLAKE2B d20f144afb955359706cad3dffafff20c7870af4e68f7c5351db934dbce070ca385b6b9aeb76ea1d29f9761d9d1c97c3ef8efc9daa947bd3624fa2c85035136b SHA512 c43a97b545e0b34e5f2fe974f7be737099ec7fe1c8935a6b2fa53801e2fceb0653aec0f7591da73387e901159e60be642e37b246f59c2eb4796cf0f249c36fc1 +EBUILD emacs-28.2.9999.ebuild 16866 BLAKE2B ffb4feb9f4e4b5b5a7f1cebc2ff0ca76e5024795cf8114bde6ac7bf0add8a174911009b00b233b8ef2e6cce9c99f315ab3a9d429b06e5fa442bc33635d6b63a8 SHA512 8039bf67573e183784b46bb9743a0f6878184abd7a0df915e1c95541a656e1a2e653ba6ee3623d21a904effd4dc1c39acd691141a7dcdef4e4bae16433bf2336 +EBUILD emacs-28.2.ebuild 16769 BLAKE2B 1f74cfb6d96910ca629cf2bcefa92a3d2762fb33326fa4ede17e0fd3f91fd2c037b887ca87dc532072c384665a3df276efaf7ba743352dd330a4afa60e738f77 SHA512 fa633027cf224778646f6cac8704a9cff855868d65820c1b865d0ab3614b78ab4680d9e15bac86d1a1504e3e25746613e2cab3236bb60c2333d94a368c42e6cf +EBUILD emacs-29.0.9999.ebuild 18131 BLAKE2B 710aa0af16501be75a9cf3c6064fab85c4679f400390bc9bb2c7cdac98d9b5637a220cf8913c1a85dadea6ef5af095ed20b5496535d52d8ce06b203adae15655 SHA512 5f5f9189d003474e399551b657d3b6d2f72d357e39c7094d029b3aa5b77f0c8fc9378e651d4f7b333ef22b1e78180119fd7ed5f1fce7f716c319e45bf3fb36da MISC metadata.xml 3130 BLAKE2B 162f49aa253a87b89e80dcbc961cacf659220c16c5b9d83e96b1eb90c40f828b87830173a80fb24cbfae50efb2ddfe51aed3e334c8c0f8e5cd30b63569e991cb SHA512 71a1b4b298ae915a33c7876a20892799c3c7b39f913b7b2606c18e6c14a4169b60f17c41742cdaab870cb60bceee14c0d10ea6f345739b1e9c3d07a14d9d60ee diff --git a/app-editors/emacs/emacs-28.1.90-r2.ebuild b/app-editors/emacs/emacs-28.1.90-r2.ebuild deleted file mode 100644 index 52d3b54aba86..000000000000 --- a/app-editors/emacs/emacs-28.1.90-r2.ebuild +++ /dev/null @@ -1,452 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools elisp-common 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/${PN}-28.1-patches-1.tar.xz" - PATCHES=("${WORKDIR}/patch") - SLOT="${PV%%.*}" - [[ ${PV} == *.*.* ]] && SLOT+="-vcs" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 wide-int Xaw3d xft +xpm xwidgets zlib" -RESTRICT="test" - -RDEPEND="app-emacs/emacs-common[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(-)] ) - 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 ) - 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:0 ) - xpm? ( x11-libs/libXpm ) - imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= ) - xft? ( - media-libs/fontconfig - media-libs/freetype - x11-libs/libXft - x11-libs/libXrender - cairo? ( >=x11-libs/cairo-1.12.18 ) - harfbuzz? ( media-libs/harfbuzz:0= ) - m17n-lib? ( - >=dev-libs/libotf-0.9.4 - >=dev-libs/m17n-lib-1.5.1 - ) - ) - gtk? ( - x11-libs/gtk+:3 - xwidgets? ( - net-libs/webkit-gtk:4= - x11-libs/libXcomposite - ) - ) - !gtk? ( - motif? ( - >=x11-libs/motif-2.3:0 - x11-libs/libXpm - x11-libs/libXmu - x11-libs/libXt - ) - !motif? ( - Xaw3d? ( - x11-libs/libXaw3d - x11-libs/libXmu - x11-libs/libXt - ) - !Xaw3d? ( athena? ( - x11-libs/libXaw - x11-libs/libXmu - x11-libs/libXt - ) ) - ) - ) - ) )" - -DEPEND="${RDEPEND} - gui? ( !aqua? ( x11-base/xorg-proto ) )" - -BDEPEND="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" - -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 - # 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/.*" - - # gccjit doesn't play well with ccache or distcc #801580 - # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ - | sed -n '/^libraries:/{s:^[^/]*::;p}') - 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() { - local myconf - - if use alsa; then - use sound || ewarn \ - "USE flag \"alsa\" overrides \"-sound\"; enabling sound support." - myconf+=" --with-sound=alsa" - else - myconf+=" --with-sound=$(usex sound oss)" - fi - - if ! use gui; then - einfo "Configuring to build without window system support" - myconf+=" --without-x --without-ns" - elif use aqua; then - einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" - myconf+=" --with-ns --disable-ns-self-contained" - myconf+=" --without-x" - else - myconf+=" --with-x --without-ns" - myconf+=" --without-gconf" - myconf+=" $(use_with gsettings)" - myconf+=" $(use_with toolkit-scroll-bars)" - myconf+=" $(use_with gif)" - myconf+=" $(use_with jpeg)" - myconf+=" $(use_with png)" - myconf+=" $(use_with svg rsvg)" - myconf+=" $(use_with tiff)" - myconf+=" $(use_with xpm)" - myconf+=" $(use_with imagemagick)" - - if use xft; then - myconf+=" --with-xft" - myconf+=" $(use_with cairo)" - myconf+=" $(use_with harfbuzz)" - myconf+=" $(use_with m17n-lib libotf)" - myconf+=" $(use_with m17n-lib m17n-flt)" - else - myconf+=" --without-xft" - myconf+=" --without-cairo" - myconf+=" --without-libotf --without-m17n-flt" - use cairo && ewarn \ - "USE flag \"cairo\" has no effect if \"xft\" is not set." - use m17n-lib && ewarn \ - "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." - fi - - local f line - if use gtk; then - einfo "Configuring to build with GIMP Toolkit (GTK+)" - while read line; do ewarn "${line}"; done <<-EOF - Your version of GTK+ will have problems with closing open - displays. This is no problem if you just use one display, but - if you use more than one and close one of them Emacs may crash. - See and - . - 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 $(use_with xwidgets)" - for f in motif Xaw3d athena; do - use ${f} && ewarn \ - "USE flag \"${f}\" has no effect if \"gtk\" is set." - done - elif use motif; then - einfo "Configuring to build with Motif toolkit" - myconf+=" --with-x-toolkit=motif" - for f in Xaw3d athena; do - use ${f} && ewarn \ - "USE flag \"${f}\" has no effect if \"motif\" is set." - done - elif use athena || use Xaw3d; then - einfo "Configuring to build with Athena/Lucid toolkit" - myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" - else - einfo "Configuring to build with no toolkit" - myconf+=" --with-x-toolkit=no" - fi - ! use gtk && use xwidgets && ewarn \ - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." - fi - - if tc-is-cross-compiler; then - # Configure a CBUILD directory when cross-compiling to make tools - mkdir "${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 \ - --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) \ - $(use_with zlib) \ - ${myconf} -} - -src_compile() { - 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}.metainfo.xml || die - - # move info dir to avoid collisions with the dir file generated by portage - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die - touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir - docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig - - # 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 /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 systemd; then - insinto /usr/lib/systemd/user - sed -e "/^##/d" \ - -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ - -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ - etc/emacs.service | newins - ${EMACS_SUFFIX}.service - assert - fi - - if use gzip-el; then - # compress .el files when a corresponding .elc exists - find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ - -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n - assert "gzip .el failed" - fi - - local cdir - if use source; then - cdir="/usr/share/emacs/${FULL_VERSION}/src" - insinto "${cdir}" - # This is not meant to install all the source -- just the - # C source you might find via find-function - doins src/*.{c,h,m} - elif has installsources ${FEATURES}; then - cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" - fi - - sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die - X - ;;; ${EMACS_SUFFIX} site-lisp configuration - X - (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) - Y (setq find-function-C-source-directory - Y "${EPREFIX}${cdir}") - X (let ((path (getenv "INFOPATH")) - X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") - X (re "\\\\\`${EPREFIX}/usr/share\\\\>")) - X (and path - X ;; move Emacs Info dir before anything else in /usr/share - X (let* ((p (cons nil (split-string path ":" t))) (q p)) - X (while (and (cdr q) (not (string-match re (cadr q)))) - X (setq q (cdr q))) - X (setcdr q (cons dir (delete dir (cdr q)))) - X (setq Info-directory-list (prune-directory-list (cdr p))))))) - EOF - elisp-site-file-install "${T}/${SITEFILE}" || die - - dodoc README BUGS CONTRIBUTE - - if use 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() { - # move Info dir file to correct name - if [[ -d ${ED}/usr/share/info ]]; then - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die - fi -} - -pkg_postinst() { - elisp-site-regen - readme.gentoo_print_elog - - if use livecd; then - # force an update of the emacs symlink for the livecd/dvd, - # because some microemacs packages set it with USE=livecd - eselect emacs update - else - eselect emacs update ifunset - fi -} - -pkg_postrm() { - elisp-site-regen - eselect emacs update ifunset -} diff --git a/app-editors/emacs/emacs-28.1.91-r1.ebuild b/app-editors/emacs/emacs-28.1.91-r1.ebuild deleted file mode 100644 index de0ccc6dce2f..000000000000 --- a/app-editors/emacs/emacs-28.1.91-r1.ebuild +++ /dev/null @@ -1,507 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools elisp-common 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/${PN}-28.1-patches-1.tar.xz" - PATCHES=("${WORKDIR}/patch") - SLOT="${PV%%.*}" - [[ ${PV} == *.*.* ]] && SLOT+="-vcs" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 wide-int Xaw3d xft +xpm xwidgets zlib" - -RDEPEND="app-emacs/emacs-common[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(-)] ) - 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 ) - 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:0 ) - xpm? ( x11-libs/libXpm ) - imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= ) - xft? ( - media-libs/fontconfig - media-libs/freetype - x11-libs/libXft - x11-libs/libXrender - cairo? ( >=x11-libs/cairo-1.12.18 ) - harfbuzz? ( media-libs/harfbuzz:0= ) - m17n-lib? ( - >=dev-libs/libotf-0.9.4 - >=dev-libs/m17n-lib-1.5.1 - ) - ) - gtk? ( - x11-libs/gtk+:3 - xwidgets? ( - net-libs/webkit-gtk:4= - x11-libs/libXcomposite - ) - ) - !gtk? ( - motif? ( - >=x11-libs/motif-2.3:0 - x11-libs/libXpm - x11-libs/libXmu - x11-libs/libXt - ) - !motif? ( - Xaw3d? ( - x11-libs/libXaw3d - x11-libs/libXmu - x11-libs/libXt - ) - !Xaw3d? ( athena? ( - x11-libs/libXaw - x11-libs/libXmu - x11-libs/libXt - ) ) - ) - ) - ) )" - -DEPEND="${RDEPEND} - gui? ( !aqua? ( x11-base/xorg-proto ) )" - -BDEPEND="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" - -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/.*" - - # gccjit doesn't play well with ccache or distcc #801580 - # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ - | sed -n '/^libraries:/{s:^[^/]*::;p}') - 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() { - local myconf - - # Prevents e.g. tests interfering with running Emacs. - unset EMACS_SOCKET_NAME - - if use alsa; then - use sound || ewarn \ - "USE flag \"alsa\" overrides \"-sound\"; enabling sound support." - myconf+=" --with-sound=alsa" - else - myconf+=" --with-sound=$(usex sound oss)" - fi - - if ! use gui; then - einfo "Configuring to build without window system support" - myconf+=" --without-x --without-ns" - elif use aqua; then - einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" - myconf+=" --with-ns --disable-ns-self-contained" - myconf+=" --without-x" - else - myconf+=" --with-x --without-ns" - myconf+=" --without-gconf" - myconf+=" $(use_with gsettings)" - myconf+=" $(use_with toolkit-scroll-bars)" - myconf+=" $(use_with gif)" - myconf+=" $(use_with jpeg)" - myconf+=" $(use_with png)" - myconf+=" $(use_with svg rsvg)" - myconf+=" $(use_with tiff)" - myconf+=" $(use_with xpm)" - myconf+=" $(use_with imagemagick)" - - if use xft; then - myconf+=" --with-xft" - myconf+=" $(use_with cairo)" - myconf+=" $(use_with harfbuzz)" - myconf+=" $(use_with m17n-lib libotf)" - myconf+=" $(use_with m17n-lib m17n-flt)" - else - myconf+=" --without-xft" - myconf+=" --without-cairo" - myconf+=" --without-libotf --without-m17n-flt" - use cairo && ewarn \ - "USE flag \"cairo\" has no effect if \"xft\" is not set." - use m17n-lib && ewarn \ - "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." - fi - - local f line - if use gtk; then - einfo "Configuring to build with GIMP Toolkit (GTK+)" - while read line; do ewarn "${line}"; done <<-EOF - Your version of GTK+ will have problems with closing open - displays. This is no problem if you just use one display, but - if you use more than one and close one of them Emacs may crash. - See and - . - 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 $(use_with xwidgets)" - for f in motif Xaw3d athena; do - use ${f} && ewarn \ - "USE flag \"${f}\" has no effect if \"gtk\" is set." - done - elif use motif; then - einfo "Configuring to build with Motif toolkit" - myconf+=" --with-x-toolkit=motif" - for f in Xaw3d athena; do - use ${f} && ewarn \ - "USE flag \"${f}\" has no effect if \"motif\" is set." - done - elif use athena || use Xaw3d; then - einfo "Configuring to build with Athena/Lucid toolkit" - myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" - else - einfo "Configuring to build with no toolkit" - myconf+=" --with-x-toolkit=no" - fi - ! use gtk && use xwidgets && ewarn \ - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." - fi - - if tc-is-cross-compiler; then - # Configure a CBUILD directory when cross-compiling to make tools - mkdir "${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 \ - --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) \ - $(use_with zlib) \ - ${myconf} -} - -src_compile() { - 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: fails if bubblewrap (bwrap) is installed - # "bwrap: setting up uid map: Permission denied" - # - # bytecomp-tests--dest-mountpoint - %lisp/emacs-lisp/bytecomp-tests.el - ) - - # See test/README for possible options - emake \ - EMACS_TEST_VERBOSE=1 \ - EXCLUDE_TESTS="${exclude_tests[*]}" \ - 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 - - # move info dir to avoid collisions with the dir file generated by portage - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die - touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir - docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig - - # 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 /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 systemd; then - insinto /usr/lib/systemd/user - sed -e "/^##/d" \ - -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ - -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ - etc/emacs.service | newins - ${EMACS_SUFFIX}.service - assert - fi - - if use gzip-el; then - # compress .el files when a corresponding .elc exists - find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ - -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n - assert "gzip .el failed" - fi - - local cdir - if use source; then - cdir="/usr/share/emacs/${FULL_VERSION}/src" - insinto "${cdir}" - # This is not meant to install all the source -- just the - # C source you might find via find-function - doins src/*.{c,h,m} - elif has installsources ${FEATURES}; then - cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" - fi - - sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die - X - ;;; ${EMACS_SUFFIX} site-lisp configuration - X - (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) - Y (setq find-function-C-source-directory - Y "${EPREFIX}${cdir}") - X (let ((path (getenv "INFOPATH")) - X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") - X (re "\\\\\`${EPREFIX}/usr/share\\\\>")) - X (and path - X ;; move Emacs Info dir before anything else in /usr/share - X (let* ((p (cons nil (split-string path ":" t))) (q p)) - X (while (and (cdr q) (not (string-match re (cadr q)))) - X (setq q (cdr q))) - X (setcdr q (cons dir (delete dir (cdr q)))) - X (setq Info-directory-list (prune-directory-list (cdr p))))))) - EOF - elisp-site-file-install "${T}/${SITEFILE}" || die - - dodoc README BUGS CONTRIBUTE - - if use 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() { - # move Info dir file to correct name - if [[ -d ${ED}/usr/share/info ]]; then - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die - fi -} - -pkg_postinst() { - elisp-site-regen - readme.gentoo_print_elog - - if use livecd; then - # force an update of the emacs symlink for the livecd/dvd, - # because some microemacs packages set it with USE=livecd - eselect emacs update - else - eselect emacs update ifunset - fi -} - -pkg_postrm() { - elisp-site-regen - eselect emacs update ifunset -} diff --git a/app-editors/emacs/emacs-28.1.9999.ebuild b/app-editors/emacs/emacs-28.1.9999.ebuild deleted file mode 100644 index 8b050ba1f509..000000000000 --- a/app-editors/emacs/emacs-28.1.9999.ebuild +++ /dev/null @@ -1,509 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools elisp-common 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 - SLOT="${PV%%.*}" - [[ ${PV} == *.*.* ]] && SLOT+="-vcs" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 wide-int Xaw3d xft +xpm xwidgets zlib" - -RDEPEND="app-emacs/emacs-common[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(-)] ) - 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 ) - 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:0 ) - xpm? ( x11-libs/libXpm ) - imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= ) - xft? ( - media-libs/fontconfig - media-libs/freetype - x11-libs/libXft - x11-libs/libXrender - cairo? ( >=x11-libs/cairo-1.12.18 ) - harfbuzz? ( media-libs/harfbuzz:0= ) - m17n-lib? ( - >=dev-libs/libotf-0.9.4 - >=dev-libs/m17n-lib-1.5.1 - ) - ) - gtk? ( - x11-libs/gtk+:3 - xwidgets? ( - net-libs/webkit-gtk:4= - x11-libs/libXcomposite - ) - ) - !gtk? ( - motif? ( - >=x11-libs/motif-2.3:0 - x11-libs/libXpm - x11-libs/libXmu - x11-libs/libXt - ) - !motif? ( - Xaw3d? ( - x11-libs/libXaw3d - x11-libs/libXmu - x11-libs/libXt - ) - !Xaw3d? ( athena? ( - x11-libs/libXaw - x11-libs/libXmu - x11-libs/libXt - ) ) - ) - ) - ) )" - -DEPEND="${RDEPEND} - gui? ( !aqua? ( x11-base/xorg-proto ) )" - -BDEPEND="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" - -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/.*" - - # gccjit doesn't play well with ccache or distcc #801580 - # For now, work around the problem with an explicit LIBRARY_PATH - has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ - && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ - | sed -n '/^libraries:/{s:^[^/]*::;p}') - fi - - default - - # 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 - - AT_M4DIR=m4 eautoreconf -} - -src_configure() { - local myconf - - # Prevents e.g. tests interfering with running Emacs. - unset EMACS_SOCKET_NAME - - if use alsa; then - use sound || ewarn \ - "USE flag \"alsa\" overrides \"-sound\"; enabling sound support." - myconf+=" --with-sound=alsa" - else - myconf+=" --with-sound=$(usex sound oss)" - fi - - if ! use gui; then - einfo "Configuring to build without window system support" - myconf+=" --without-x --without-ns" - elif use aqua; then - einfo "Configuring to build with Nextstep (Macintosh Cocoa) support" - myconf+=" --with-ns --disable-ns-self-contained" - myconf+=" --without-x" - else - myconf+=" --with-x --without-ns" - myconf+=" --without-gconf" - myconf+=" $(use_with gsettings)" - myconf+=" $(use_with toolkit-scroll-bars)" - myconf+=" $(use_with gif)" - myconf+=" $(use_with jpeg)" - myconf+=" $(use_with png)" - myconf+=" $(use_with svg rsvg)" - myconf+=" $(use_with tiff)" - myconf+=" $(use_with xpm)" - myconf+=" $(use_with imagemagick)" - - if use xft; then - myconf+=" --with-xft" - myconf+=" $(use_with cairo)" - myconf+=" $(use_with harfbuzz)" - myconf+=" $(use_with m17n-lib libotf)" - myconf+=" $(use_with m17n-lib m17n-flt)" - else - myconf+=" --without-xft" - myconf+=" --without-cairo" - myconf+=" --without-libotf --without-m17n-flt" - use cairo && ewarn \ - "USE flag \"cairo\" has no effect if \"xft\" is not set." - use m17n-lib && ewarn \ - "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." - fi - - local f line - if use gtk; then - einfo "Configuring to build with GIMP Toolkit (GTK+)" - while read line; do ewarn "${line}"; done <<-EOF - Your version of GTK+ will have problems with closing open - displays. This is no problem if you just use one display, but - if you use more than one and close one of them Emacs may crash. - See and - . - 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 $(use_with xwidgets)" - for f in motif Xaw3d athena; do - use ${f} && ewarn \ - "USE flag \"${f}\" has no effect if \"gtk\" is set." - done - elif use motif; then - einfo "Configuring to build with Motif toolkit" - myconf+=" --with-x-toolkit=motif" - for f in Xaw3d athena; do - use ${f} && ewarn \ - "USE flag \"${f}\" has no effect if \"motif\" is set." - done - elif use athena || use Xaw3d; then - einfo "Configuring to build with Athena/Lucid toolkit" - myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" - else - einfo "Configuring to build with no toolkit" - myconf+=" --with-x-toolkit=no" - fi - ! use gtk && use xwidgets && ewarn \ - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." - fi - - if tc-is-cross-compiler; then - # Configure a CBUILD directory when cross-compiling to make tools - mkdir "${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 \ - --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) \ - $(use_with zlib) \ - ${myconf} -} - -src_compile() { - 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: fails if bubblewrap (bwrap) is installed - # "bwrap: setting up uid map: Permission denied" - # - # bytecomp-tests--dest-mountpoint - %lisp/emacs-lisp/bytecomp-tests.el - ) - - # See test/README for possible options - emake \ - EMACS_TEST_VERBOSE=1 \ - EXCLUDE_TESTS="${exclude_tests[*]}" \ - 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 - - # move info dir to avoid collisions with the dir file generated by portage - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die - touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir - docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig - - # 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 /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 systemd; then - insinto /usr/lib/systemd/user - sed -e "/^##/d" \ - -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ - -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ - etc/emacs.service | newins - ${EMACS_SUFFIX}.service - assert - fi - - if use gzip-el; then - # compress .el files when a corresponding .elc exists - find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ - -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n - assert "gzip .el failed" - fi - - local cdir - if use source; then - cdir="/usr/share/emacs/${FULL_VERSION}/src" - insinto "${cdir}" - # This is not meant to install all the source -- just the - # C source you might find via find-function - doins src/*.{c,h,m} - elif has installsources ${FEATURES}; then - cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" - fi - - sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die - X - ;;; ${EMACS_SUFFIX} site-lisp configuration - X - (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) - Y (setq find-function-C-source-directory - Y "${EPREFIX}${cdir}") - X (let ((path (getenv "INFOPATH")) - X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") - X (re "\\\\\`${EPREFIX}/usr/share\\\\>")) - X (and path - X ;; move Emacs Info dir before anything else in /usr/share - X (let* ((p (cons nil (split-string path ":" t))) (q p)) - X (while (and (cdr q) (not (string-match re (cadr q)))) - X (setq q (cdr q))) - X (setcdr q (cons dir (delete dir (cdr q)))) - X (setq Info-directory-list (prune-directory-list (cdr p))))))) - EOF - elisp-site-file-install "${T}/${SITEFILE}" || die - - dodoc README BUGS CONTRIBUTE - - if use 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() { - # move Info dir file to correct name - if [[ -d ${ED}/usr/share/info ]]; then - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die - fi -} - -pkg_postinst() { - elisp-site-regen - readme.gentoo_print_elog - - if use livecd; then - # force an update of the emacs symlink for the livecd/dvd, - # because some microemacs packages set it with USE=livecd - eselect emacs update - else - eselect emacs update ifunset - fi -} - -pkg_postrm() { - elisp-site-regen - eselect emacs update ifunset -} diff --git a/app-editors/emacs/emacs-28.2.9999.ebuild b/app-editors/emacs/emacs-28.2.9999.ebuild new file mode 100644 index 000000000000..86750792fff3 --- /dev/null +++ b/app-editors/emacs/emacs-28.2.9999.ebuild @@ -0,0 +1,519 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools elisp-common 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 + SLOT="${PV%%.*}" + [[ ${PV} == *.*.* ]] && SLOT+="-vcs" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 wide-int Xaw3d xft +xpm xwidgets zlib" + +RDEPEND="app-emacs/emacs-common[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 ) + 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:0 ) + xpm? ( x11-libs/libXpm ) + imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXft + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18 ) + harfbuzz? ( media-libs/harfbuzz:0= ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( + x11-libs/gtk+:3 + xwidgets? ( + net-libs/webkit-gtk:4= + x11-libs/libXcomposite + ) + ) + !gtk? ( + motif? ( + >=x11-libs/motif-2.3:0 + x11-libs/libXpm + x11-libs/libXmu + x11-libs/libXt + ) + !motif? ( + Xaw3d? ( + x11-libs/libXaw3d + x11-libs/libXmu + x11-libs/libXt + ) + !Xaw3d? ( athena? ( + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libXt + ) ) + ) + ) + ) )" + +DEPEND="${RDEPEND} + gui? ( !aqua? ( x11-base/xorg-proto ) )" + +BDEPEND="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" + +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/.*" + + # gccjit doesn't play well with ccache or distcc #801580 + # For now, work around the problem with an explicit LIBRARY_PATH + has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ + && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + | sed -n '/^libraries:/{s:^[^/]*::;p}') + fi + + default + + # 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 + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + local myconf + + # Prevents e.g. tests interfering with running Emacs. + unset EMACS_SOCKET_NAME + + if use alsa; then + use sound || ewarn \ + "USE flag \"alsa\" overrides \"-sound\"; enabling sound support." + myconf+=" --with-sound=alsa" + else + myconf+=" --with-sound=$(usex sound oss)" + fi + + if use 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" + myconf+=" --without-x" + else + myconf+=" --with-x --without-ns" + myconf+=" --without-gconf" + myconf+=" $(use_with gsettings)" + myconf+=" $(use_with toolkit-scroll-bars)" + myconf+=" $(use_with gif)" + myconf+=" $(use_with jpeg)" + myconf+=" $(use_with png)" + myconf+=" $(use_with svg rsvg)" + myconf+=" $(use_with tiff)" + myconf+=" $(use_with xpm)" + myconf+=" $(use_with imagemagick)" + + if use xft; then + myconf+=" --with-xft" + myconf+=" $(use_with cairo)" + myconf+=" $(use_with harfbuzz)" + myconf+=" $(use_with m17n-lib libotf)" + myconf+=" $(use_with m17n-lib m17n-flt)" + else + myconf+=" --without-xft" + myconf+=" --without-cairo" + myconf+=" --without-libotf --without-m17n-flt" + use cairo && ewarn \ + "USE flag \"cairo\" has no effect if \"xft\" is not set." + use m17n-lib && ewarn \ + "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." + fi + + local f line + if use gtk; then + einfo "Configuring to build with GIMP Toolkit (GTK+)" + while read line; do ewarn "${line}"; done <<-EOF + Your version of GTK+ will have problems with closing open + displays. This is no problem if you just use one display, but + if you use more than one and close one of them Emacs may crash. + See and + . + 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 $(use_with xwidgets)" + for f in motif Xaw3d athena; do + use ${f} && ewarn \ + "USE flag \"${f}\" has no effect if \"gtk\" is set." + done + elif use motif; then + einfo "Configuring to build with Motif toolkit" + myconf+=" --with-x-toolkit=motif" + for f in Xaw3d athena; do + use ${f} && ewarn \ + "USE flag \"${f}\" has no effect if \"motif\" is set." + done + elif use athena || use Xaw3d; then + einfo "Configuring to build with Athena/Lucid toolkit" + myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" + else + einfo "Configuring to build with no toolkit" + myconf+=" --with-x-toolkit=no" + fi + ! use gtk && use xwidgets && ewarn \ + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." + fi + + if tc-is-cross-compiler; then + # Configure a CBUILD directory when cross-compiling to make tools + mkdir "${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 \ + --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) \ + ${myconf} +} + +src_compile() { + 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: fails if bubblewrap (bwrap) is installed + # "bwrap: setting up uid map: Permission denied" + # + # bytecomp-tests--dest-mountpoint + %lisp/emacs-lisp/bytecomp-tests.el + ) + + # See test/README for possible options + emake \ + EMACS_TEST_VERBOSE=1 \ + EXCLUDE_TESTS="${exclude_tests[*]}" \ + 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 + + # move info dir to avoid collisions with the dir file generated by portage + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig + + # 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 /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 systemd; then + insinto /usr/lib/systemd/user + sed -e "/^##/d" \ + -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ + -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ + etc/emacs.service | newins - ${EMACS_SUFFIX}.service + assert + fi + + if use gzip-el; then + # compress .el files when a corresponding .elc exists + find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ + -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n + assert "gzip .el failed" + fi + + local cdir + if use source; then + cdir="/usr/share/emacs/${FULL_VERSION}/src" + insinto "${cdir}" + # This is not meant to install all the source -- just the + # C source you might find via find-function + doins src/*.{c,h,m} + elif has installsources ${FEATURES}; then + cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" + fi + + sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die + X + ;;; ${EMACS_SUFFIX} site-lisp configuration + X + (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) + Y (setq find-function-C-source-directory + Y "${EPREFIX}${cdir}") + X (let ((path (getenv "INFOPATH")) + X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") + X (re "\\\\\`${EPREFIX}/usr/share\\\\>")) + X (and path + X ;; move Emacs Info dir before anything else in /usr/share + X (let* ((p (cons nil (split-string path ":" t))) (q p)) + X (while (and (cdr q) (not (string-match re (cadr q)))) + X (setq q (cdr q))) + X (setcdr q (cons dir (delete dir (cdr q)))) + X (setq Info-directory-list (prune-directory-list (cdr p))))))) + EOF + elisp-site-file-install "${T}/${SITEFILE}" || die + + dodoc README BUGS CONTRIBUTE + + if use 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() { + # move Info dir file to correct name + if [[ -d ${ED}/usr/share/info ]]; then + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die + fi +} + +pkg_postinst() { + elisp-site-regen + readme.gentoo_print_elog + + if use livecd; then + # force an update of the emacs symlink for the livecd/dvd, + # because some microemacs packages set it with USE=livecd + eselect emacs update + else + eselect emacs update ifunset + fi +} + +pkg_postrm() { + elisp-site-regen + eselect emacs update ifunset +} diff --git a/app-editors/emacs/emacs-28.2.ebuild b/app-editors/emacs/emacs-28.2.ebuild new file mode 100644 index 000000000000..34a77555a2dc --- /dev/null +++ b/app-editors/emacs/emacs-28.2.ebuild @@ -0,0 +1,517 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools elisp-common 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/${PN}-28.1-patches-1.tar.xz" + PATCHES=("${WORKDIR}/patch") + SLOT="${PV%%.*}" + [[ ${PV} == *.*.* ]] && SLOT+="-vcs" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 wide-int Xaw3d xft +xpm xwidgets zlib" + +RDEPEND="app-emacs/emacs-common[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 ) + 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:0 ) + xpm? ( x11-libs/libXpm ) + imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= ) + xft? ( + media-libs/fontconfig + media-libs/freetype + x11-libs/libXft + x11-libs/libXrender + cairo? ( >=x11-libs/cairo-1.12.18 ) + harfbuzz? ( media-libs/harfbuzz:0= ) + m17n-lib? ( + >=dev-libs/libotf-0.9.4 + >=dev-libs/m17n-lib-1.5.1 + ) + ) + gtk? ( + x11-libs/gtk+:3 + xwidgets? ( + net-libs/webkit-gtk:4= + x11-libs/libXcomposite + ) + ) + !gtk? ( + motif? ( + >=x11-libs/motif-2.3:0 + x11-libs/libXpm + x11-libs/libXmu + x11-libs/libXt + ) + !motif? ( + Xaw3d? ( + x11-libs/libXaw3d + x11-libs/libXmu + x11-libs/libXt + ) + !Xaw3d? ( athena? ( + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libXt + ) ) + ) + ) + ) )" + +DEPEND="${RDEPEND} + gui? ( !aqua? ( x11-base/xorg-proto ) )" + +BDEPEND="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" + +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/.*" + + # gccjit doesn't play well with ccache or distcc #801580 + # For now, work around the problem with an explicit LIBRARY_PATH + has ccache ${FEATURES} || has distcc ${FEATURES} && tc-is-gcc \ + && export LIBRARY_PATH=$("$(tc-getCC)" -print-search-dirs \ + | sed -n '/^libraries:/{s:^[^/]*::;p}') + 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() { + local myconf + + # Prevents e.g. tests interfering with running Emacs. + unset EMACS_SOCKET_NAME + + if use alsa; then + use sound || ewarn \ + "USE flag \"alsa\" overrides \"-sound\"; enabling sound support." + myconf+=" --with-sound=alsa" + else + myconf+=" --with-sound=$(usex sound oss)" + fi + + if use 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" + myconf+=" --without-x" + else + myconf+=" --with-x --without-ns" + myconf+=" --without-gconf" + myconf+=" $(use_with gsettings)" + myconf+=" $(use_with toolkit-scroll-bars)" + myconf+=" $(use_with gif)" + myconf+=" $(use_with jpeg)" + myconf+=" $(use_with png)" + myconf+=" $(use_with svg rsvg)" + myconf+=" $(use_with tiff)" + myconf+=" $(use_with xpm)" + myconf+=" $(use_with imagemagick)" + + if use xft; then + myconf+=" --with-xft" + myconf+=" $(use_with cairo)" + myconf+=" $(use_with harfbuzz)" + myconf+=" $(use_with m17n-lib libotf)" + myconf+=" $(use_with m17n-lib m17n-flt)" + else + myconf+=" --without-xft" + myconf+=" --without-cairo" + myconf+=" --without-libotf --without-m17n-flt" + use cairo && ewarn \ + "USE flag \"cairo\" has no effect if \"xft\" is not set." + use m17n-lib && ewarn \ + "USE flag \"m17n-lib\" has no effect if \"xft\" is not set." + fi + + local f line + if use gtk; then + einfo "Configuring to build with GIMP Toolkit (GTK+)" + while read line; do ewarn "${line}"; done <<-EOF + Your version of GTK+ will have problems with closing open + displays. This is no problem if you just use one display, but + if you use more than one and close one of them Emacs may crash. + See and + . + 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 $(use_with xwidgets)" + for f in motif Xaw3d athena; do + use ${f} && ewarn \ + "USE flag \"${f}\" has no effect if \"gtk\" is set." + done + elif use motif; then + einfo "Configuring to build with Motif toolkit" + myconf+=" --with-x-toolkit=motif" + for f in Xaw3d athena; do + use ${f} && ewarn \ + "USE flag \"${f}\" has no effect if \"motif\" is set." + done + elif use athena || use Xaw3d; then + einfo "Configuring to build with Athena/Lucid toolkit" + myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" + else + einfo "Configuring to build with no toolkit" + myconf+=" --with-x-toolkit=no" + fi + ! use gtk && use xwidgets && ewarn \ + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set." + fi + + if tc-is-cross-compiler; then + # Configure a CBUILD directory when cross-compiling to make tools + mkdir "${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 \ + --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) \ + ${myconf} +} + +src_compile() { + 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: fails if bubblewrap (bwrap) is installed + # "bwrap: setting up uid map: Permission denied" + # + # bytecomp-tests--dest-mountpoint + %lisp/emacs-lisp/bytecomp-tests.el + ) + + # See test/README for possible options + emake \ + EMACS_TEST_VERBOSE=1 \ + EXCLUDE_TESTS="${exclude_tests[*]}" \ + 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 + + # move info dir to avoid collisions with the dir file generated by portage + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig + + # 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 /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 systemd; then + insinto /usr/lib/systemd/user + sed -e "/^##/d" \ + -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \ + -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \ + etc/emacs.service | newins - ${EMACS_SUFFIX}.service + assert + fi + + if use gzip-el; then + # compress .el files when a corresponding .elc exists + find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \ + -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n + assert "gzip .el failed" + fi + + local cdir + if use source; then + cdir="/usr/share/emacs/${FULL_VERSION}/src" + insinto "${cdir}" + # This is not meant to install all the source -- just the + # C source you might find via find-function + doins src/*.{c,h,m} + elif has installsources ${FEATURES}; then + cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" + fi + + sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die + X + ;;; ${EMACS_SUFFIX} site-lisp configuration + X + (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) + Y (setq find-function-C-source-directory + Y "${EPREFIX}${cdir}") + X (let ((path (getenv "INFOPATH")) + X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") + X (re "\\\\\`${EPREFIX}/usr/share\\\\>")) + X (and path + X ;; move Emacs Info dir before anything else in /usr/share + X (let* ((p (cons nil (split-string path ":" t))) (q p)) + X (while (and (cdr q) (not (string-match re (cadr q)))) + X (setq q (cdr q))) + X (setcdr q (cons dir (delete dir (cdr q)))) + X (setq Info-directory-list (prune-directory-list (cdr p))))))) + EOF + elisp-site-file-install "${T}/${SITEFILE}" || die + + dodoc README BUGS CONTRIBUTE + + if use 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() { + # move Info dir file to correct name + if [[ -d ${ED}/usr/share/info ]]; then + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die + fi +} + +pkg_postinst() { + elisp-site-regen + readme.gentoo_print_elog + + if use livecd; then + # force an update of the emacs symlink for the livecd/dvd, + # because some microemacs packages set it with USE=livecd + eselect emacs update + else + eselect emacs update ifunset + fi +} + +pkg_postrm() { + elisp-site-regen + eselect emacs update ifunset +} diff --git a/app-editors/emacs/emacs-29.0.9999.ebuild b/app-editors/emacs/emacs-29.0.9999.ebuild index c88004a9780d..c016b6f1546a 100644 --- a/app-editors/emacs/emacs-29.0.9999.ebuild +++ b/app-editors/emacs/emacs-29.0.9999.ebuild @@ -101,7 +101,10 @@ RDEPEND="app-emacs/emacs-common[games?,gui(-)?] gmp? ( dev-libs/gmp:0= ) gpm? ( sys-libs/gpm ) !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) ) - jit? ( sys-devel/gcc:=[jit(-)] ) + jit? ( + sys-devel/gcc:=[jit(-)] + sys-libs/zlib + ) json? ( dev-libs/jansson:= ) kerberos? ( virtual/krb5 ) lcms? ( media-libs/lcms:2 ) @@ -222,6 +225,14 @@ src_configure() { # Athena (Lucid), or no toolkit. They are enabled (in order of # preference) with the "gtk", "motif", "Xaw3d", and "athena" flags. + 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-pgtk --without-ns" @@ -353,7 +364,6 @@ src_configure() { $(use_with systemd libsystemd) \ $(use_with threads) \ $(use_with wide-int) \ - $(use_with zlib) \ ${myconf} } -- cgit v1.2.3