diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest index ff62d9457261f..6feef36199760 100644 --- a/app-editors/emacs/Manifest +++ b/app-editors/emacs/Manifest @@ -9,7 +9,5 @@ DIST emacs-28.2.tar.xz 47722600 BLAKE2B a7e4990658b5e7306510f8dded93aaf0b82cdd93 DIST emacs-29.4-patches-4.tar.xz 6872 BLAKE2B ad701863650ac7ccd7bd77e73083c62e71b64c547ad05a1b7cc4384f9636a82d1218a5cfae11d8404e0d59c13632a975caa48851b004b9ad55d7f04fa2500f9d SHA512 659edf90ec73e424a635399155413c0c98e45a33d83c353c0e029333761354fa3008ed0b586c64e0b8afe5f5dd85bdeb3b3bfc731afd6869d24d653af5e1c8bf DIST emacs-29.4-patches-5.tar.xz 7504 BLAKE2B c0169a58fbe1a69f9b51c3c0d1bd963e2f2f0ee9db1385676efc446c6c4eae2deedaab032ddf206263152c400bd649a556038ad840cdbbfcae5b8f7a21bc9ef6 SHA512 90fbc758549cf3d1dc80fd415dbb91903176aab315a009a23b7c43b1b456324b01678da699ef30df913c35c57b2345a0d83752a10c119774b25a219102e1de76 DIST emacs-29.4.tar.xz 52210344 BLAKE2B 825fd2665b6427dbc3cb618b40df2f71fa6b08883bdd07be6d8acf0039df2aeebd294e679e98f4c64a9dd9bdad93589fc7c176cf3860d4fb823fce23f7f2b3cd SHA512 66b38081cb01d2c46ff7beefb45986cc225b4c922c30712ad0d456c6cae5507176ed99418c8f26948c5375c8afde4e4b2507d23ed997dbb5392d12150a121d80 -DIST emacs-30.1.tar.xz 54978160 BLAKE2B ad502a2e15a04618f4766ec6e285739cb5bb6f19c5065c3aed03b3e50df590cee382a0331f382de6f13523f1362a4355f65961ce45504f7d33419ea6d04e326f SHA512 511a6a1d2a170a207913692e1349344b70a0b5202b8d1ae27dc7256e589c77ae9e35da16fc2a098bf9f1b8d0f60233f452ed8d6744b70b907f3484c42f2d7d7f -DIST emacs-30.2-patches-1.tar.xz 1488 BLAKE2B a188186782dca4f006842b7da34a6fcf96f352ef6bb0c10f6f747b6b2b59854c536078b390b81da79713ace777fad8392d350dba0a121111ae2316267d1e6bd9 SHA512 f2e45a55629cca17b5b0e6835c02ee1fb4efd4e9c393e7781fee757f9414d78156a60dfa63a2ceabb2dc61fa12157c4dad801e0ef031b8a0dc5e318903ed69ac DIST emacs-30.2-patches-2.tar.xz 4228 BLAKE2B 2904ec6e2c94418835b98d08017d1876f6d4e6f56ef84e97f4f0e1fea74432c01cebf99e9fcc6dc0c30cee3fe4a3b429128ff9d3751212cbcb9fb2591c836406 SHA512 633bcde5e623140683b6dca085be9ad6b3e9be4300ec25caa55921d58937cb834cb7ad3e34d60d7bcf62ee0860952e7cb9298d08f7d4613b328cafb98a0dc41c DIST emacs-30.2.tar.xz 55320324 BLAKE2B 9163ba6bfab1010a156c669ac085ad363545d73e3ffac21c710b14b618df61a4c6a80a50fd3fa81d852c2ccace5080e614b679606fa584e28509f99ad6196784 SHA512 313432d11e95c74f8cd35c5b1da442e6223f5d40f9173c55883c0339ecbfb97a0bedf79177ef8902afd3e33c078a233777bed01f5caffa1e7524f17d58bfc9a2 diff --git a/app-editors/emacs/emacs-29.4-r6.ebuild b/app-editors/emacs/emacs-29.4-r6.ebuild index ccfb0028da2cf..23db9ddd46dfb 100644 --- a/app-editors/emacs/emacs-29.4-r6.ebuild +++ b/app-editors/emacs/emacs-29.4-r6.ebuild @@ -115,7 +115,7 @@ RDEPEND=">=app-emacs/emacs-common-1.11[games?,gui?] sqlite? ( dev-db/sqlite:3 ) ssl? ( net-libs/gnutls:0= ) systemd? ( sys-apps/systemd ) - tree-sitter? ( dev-libs/tree-sitter:= ) + tree-sitter? ( 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 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 --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() { - 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 /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 - ;;; ${EMACS_SUFFIX} site-lisp configuration -*-lexical-binding:t-*- - 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 the - Info node '(emacs)Movemail' in the Emacs manual." - 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.2-r1.ebuild b/app-editors/emacs/emacs-30.2-r1.ebuild index 2f6b60f93ee25..300c35e9061f0 100644 --- a/app-editors/emacs/emacs-30.2-r1.ebuild +++ b/app-editors/emacs/emacs-30.2-r1.ebuild @@ -111,7 +111,7 @@ RDEPEND=">=app-emacs/emacs-common-1.11[games?,gui?] sqlite? ( dev-db/sqlite:3 ) ssl? ( net-libs/gnutls:0= ) systemd? ( sys-apps/systemd ) - tree-sitter? ( dev-libs/tree-sitter:= ) + tree-sitter? ( 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 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 --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() { - unset SHELL #965834 - - 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: malformed html tag in test, https://bugs.gnu.org/79041 - # shr-test/zoom-image - %lisp/net/shr-tests.el - - %lisp/progmodes/eglot-tests.el #966957 - - # 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 - ) - - # 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 /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 - ;;; ${EMACS_SUFFIX} site-lisp configuration -*-lexical-binding:t-*- - 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 the - Info node '(emacs)Movemail' in the Emacs manual." - 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.2.9999.ebuild b/app-editors/emacs/emacs-30.2.9999.ebuild index d9506c62dd250..0074108cd86bb 100644 --- a/app-editors/emacs/emacs-30.2.9999.ebuild +++ b/app-editors/emacs/emacs-30.2.9999.ebuild @@ -111,7 +111,7 @@ RDEPEND=">=app-emacs/emacs-common-1.11[games?,gui?] sqlite? ( dev-db/sqlite:3 ) ssl? ( net-libs/gnutls:0= ) systemd? ( sys-apps/systemd ) - tree-sitter? ( dev-libs/tree-sitter:= ) + tree-sitter? ( + +-#if !defined(LINUX) && !defined(__FreeBSD__) && !defined(NOTPARMDECL) ++#if !defined(__gnu_hurd__) && !defined(LINUX) && !defined(__FreeBSD__) && !defined(NOTPARMDECL) + extern char *tparm(); + #endif + diff --git a/games-roguelike/nethack/files/nethack-3.6.7-no-define-warn-unused-result.patch b/games-roguelike/nethack/files/nethack-3.6.7-no-define-warn-unused-result.patch new file mode 100644 index 0000000000000..378c55687c74f --- /dev/null +++ b/games-roguelike/nethack/files/nethack-3.6.7-no-define-warn-unused-result.patch @@ -0,0 +1,17 @@ +GCC (as of 15.2.1_p20260214) seems to fail, specifically for GNU Hurd (as seen +by the !defined (__linux__) bit), as gcc's __attribute__ expects an argument +there. It seems rather old (and quite undesirable), so for now, we will just +disable the snippet of code. + +diff '--color=auto' -ru NetHack-3.6.7/include/tradstdc.h NetHack-3.6.7-fix/include/tradstdc.h +--- NetHack-3.6.7/include/tradstdc.h 2023-02-15 16:52:57.000000000 -0500 ++++ NetHack-3.6.7-fix/include/tradstdc.h 2026-03-24 00:48:35.740547092 -0400 +@@ -429,7 +429,7 @@ + #if __GNUC__ >= 3 + #define UNUSED __attribute__((unused)) + #define NORETURN __attribute__((noreturn)) +-#if !defined(__linux__) || defined(GCC_URWARN) ++#if 0 + /* disable gcc's __attribute__((__warn_unused_result__)) since explicitly + discarding the result by casting to (void) is not accepted as a 'use' */ + #define __warn_unused_result__ /*empty*/ diff --git a/games-roguelike/nethack/files/nethack-3.6.7-path-max.patch b/games-roguelike/nethack/files/nethack-3.6.7-path-max.patch new file mode 100644 index 0000000000000..3d1f6bfb618aa --- /dev/null +++ b/games-roguelike/nethack/files/nethack-3.6.7-path-max.patch @@ -0,0 +1,15 @@ +diff '--color=auto' -ru NetHack-3.6.7/src/files.c NetHack-3.6.7-fix/src/files.c +--- NetHack-3.6.7/src/files.c 2023-02-15 16:52:57.000000000 -0500 ++++ NetHack-3.6.7-fix/src/files.c 2026-03-29 17:25:31.135961712 -0400 +@@ -4020,6 +4020,11 @@ + #ifndef PATH_MAX + #include + #endif ++ ++/* the Hurd still doesn't define PATH_MAX */ ++#ifndef PATH_MAX ++#define PATH_MAX 2048 ++#endif + #endif + + void diff --git a/games-roguelike/nethack/nethack-3.6.7-r1.ebuild b/games-roguelike/nethack/nethack-3.6.7-r1.ebuild new file mode 100644 index 0000000000000..64c4e9f31f109 --- /dev/null +++ b/games-roguelike/nethack/nethack-3.6.7-r1.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop flag-o-matic toolchain-funcs + +DESCRIPTION="The ultimate old-school single player dungeon exploration game" +HOMEPAGE="https://www.nethack.org/" +SRC_URI="https://nethack.org/download/${PV}/nethack-${PV//.}-src.tgz -> ${P}.tar.gz" +S="${WORKDIR}/NetHack-${PV}" + +LICENSE="nethack" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86" +IUSE="X" + +RDEPEND=" + acct-group/gamestat + sys-libs/ncurses:0= + X? ( + x11-libs/libX11 + x11-libs/libXaw + x11-libs/libXpm + x11-libs/libXt + ) +" +DEPEND=" + ${RDEPEND} + X? ( x11-base/xorg-proto ) +" +BDEPEND=" + virtual/pkgconfig + app-alternatives/lex + app-alternatives/yacc + X? ( + x11-apps/bdftopcf + x11-apps/mkfontscale + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-3.6.3-recover.patch" + "${FILESDIR}/${PN}-3.6.6-clang16.patch" + "${FILESDIR}/${PN}-3.6.7-no-define-warn-unused-result.patch" + "${FILESDIR}/${PN}-3.6.7-path-max.patch" + "${FILESDIR}/${PN}-3.6.7-hurd-tparm.patch" +) + +src_prepare() { + default + + cp "${FILESDIR}/${PN}-3.6.3-hint-$(usex X x11 tty)" hint || die "Failed to copy hint file" + sys/unix/setup.sh hint || die "Failed to run setup.sh" +} + +src_compile() { + append-cflags -std=gnu89 # old codebase, incompatible with c2x + append-cflags -I../include -DDLB -DSECURE -DTIMED_DELAY -DVISION_TABLES -DDUMPLOG -DSCORE_ON_BOTL + append-cflags '-DCOMPRESS=\"${EPREFIX}/bin/gzip\"' '-DCOMPRESS_EXTENSION=\".gz\"' + append-cflags "-DHACKDIR=\\\"${EPREFIX}/usr/$(get_libdir)/nethack\\\"" + append-cflags "-DVAR_PLAYGROUND=\\\"${EPREFIX}/var/games/nethack\\\"" + append-cflags "-DDEF_PAGER=\\\"${PAGER}\\\"" + append-cflags -DSYSCF "-DSYSCF_FILE=\\\"${EPREFIX}/etc/nethack.sysconf\\\"" + + if use X; then + append-cflags -DX11_GRAPHICS -DUSE_XPM + + # XtErrorHandler usage seems right, but headers "may" add ((noreturn)) + # giving an incompatible type error with clang-16 (could alternatively + # use private _X_NORETURN but this may be fragile) + append-cflags -Wno-error=incompatible-pointer-types #874462 + fi + + LOCAL_MAKEOPTS=( + CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LFLAGS="${LDFLAGS}" + WINTTYLIB="$($(tc-getPKG_CONFIG) --libs ncurses)" + HACKDIR="${EPREFIX}/usr/$(get_libdir)/nethack" + ) + + emake "${LOCAL_MAKEOPTS[@]}" nethack recover spec_levs + # XXX: Lots of troff errors on Hurd, so don't build the Guidebook there for now. + ! use kernel_Hurd && emake "${LOCAL_MAKEOPTS[@]}" Guidebook + + # Upstream still has some parallel compilation bugs + emake -j1 "${LOCAL_MAKEOPTS[@]}" all +} + +src_install() { + emake \ + "${LOCAL_MAKEOPTS[@]}" \ + INSTDIR="${ED}/usr/$(get_libdir)/nethack" \ + SHELLDIR="${ED}/usr/bin" \ + VARDIR="${ED}/var/games/nethack" \ + install + + mv "${ED}/usr/$(get_libdir)/nethack/recover" "${ED}/usr/bin/recover-nethack" || die "Failed to move recover-nethack" + + doman doc/nethack.6 + newman doc/recover.6 recover-nethack.6 + dodoc doc/Guidebook.txt + + insinto /etc + newins sys/unix/sysconf nethack.sysconf + + insinto /etc/skel + newins "${FILESDIR}/${PN}-3.6.0-nethackrc" .nethackrc + + if use X ; then + cd "${S}/win/X11" || die "Failed to enter win/X11 directory" + + mkdir -p "${ED}/etc/X11/app-defaults/" || die "Failed to make app-defaults directory" + mv "${ED}/usr/$(get_libdir)/nethack/NetHack.ad" "${ED}/etc/X11/app-defaults/" || die "Failed to move NetHack.ad" + + newicon nh_icon.xpm nethack.xpm + make_desktop_entry ${PN} Nethack + + # install nethack fonts + bdftopcf -o nh10.pcf nh10.bdf || die "Converting fonts failed" + bdftopcf -o ibm.pcf ibm.bdf || die "Converting fonts failed" + insinto "/usr/$(get_libdir)/nethack/fonts" + doins *.pcf + mkfontdir "${ED}/usr/$(get_libdir)/nethack/fonts" || die "mkfontdir failed" + fi + + rm -r "${ED}/var/games/nethack" || die "Failed to clean var/games/nethack" + keepdir /var/games/nethack/save +} + +pkg_preinst() { + fowners root:gamestat /var/games/nethack /var/games/nethack/save + fperms 2770 /var/games/nethack /var/games/nethack/save + + fowners root:gamestat "/usr/$(get_libdir)/nethack/nethack" + fperms g+s "/usr/$(get_libdir)/nethack/nethack" +} + +pkg_postinst() { + cd "${EROOT}/var/games/nethack" || die "Failed to enter ${EROOT}/var/games/nethack directory" + + # Transition mechanism for