NAME="emacs" VERSION="28.0.90" RELEASE="7" HOMEPAGE="http://www.gnu.org/software/emacs/" CATEGORY="Editors Interpreters" DESCRIPTION="Emacs is a powerful, customizable, self-documenting, modeless text editor. Emacs contains special code editing features, a scripting language (elisp), and the capability to read mail, news, and more without leaving the editor." # emacs-basic is alphabetically first among the binary packages and so # will be selected by setup if the user installs emacs but doesn't # choose a binary package. PKG_NAMES="${PN} ${PN}-common ${PN}-basic ${PN}-gtk ${PN}-lucid ${PN}-w32" emacs_CATEGORY="${CATEGORY} Virtual" emacs_CONTENTS="" emacs_REQUIRES="emacs-bin" emacs_SUMMARY="The extensible, customizable, self-documenting real-time display editor" emacs_basic_SUMMARY="Emacs binaries with no GUI" emacs_basic_REQUIRES="emacs-common" emacs_basic_PROVIDES="emacs-bin" emacs_basic_DESCRIPTION="${DESCRIPTION} This package provides binaries for a non-GUI emacs." EMACS_EXECDIR=usr/libexec/emacs/${VERSION}/${ARCH}-pc-cygwin emacs_common_SUMMARY="Common files needed for all Emacs binaries" emacs_common_OBSOLETES="emacs-el" emacs_common_REQUIRES="terminfo-extra mailutils" emacs_common_DESCRIPTION="${DESCRIPTION} This package contains files and documentation needed by the binary packages emacs-basic, emacs-gtk, emacs-lucid, and emacs-w32." # /etc/postinstall/emacs.sh is created by cygport because of the # presence of an icon. emacs_common_CONTENTS=" etc/postinstall/emacs.sh usr/bin/ebrowse.exe usr/bin/emacs.ico usr/bin/make-emacs-shortcut usr/bin/set-emacs-default.sh usr/include/ usr/lib/systemd/ ${EMACS_EXECDIR}/hexl.exe ${EMACS_EXECDIR}/rcs2log usr/share/ var/lib/rebase/dynpath.d/emacs" # Use package lists for the remaining packages so we can add the # appropriate native-lisp directory at compile time. emacs_gtk_SUMMARY="Emacs binaries using the X11 GUI with the GTK+ toolkit" emacs_gtk_OBSOLETES="emacs-X11" emacs_gtk_REQUIRES="emacs-common bitstream-vera-fonts" emacs_gtk_PROVIDES="emacs-bin" emacs_gtk_DESCRIPTION="${DESCRIPTION} This package provides binaries for an gtk emacs with the GTK+ toolkit. Install it if you want to run emacs using the X window system and GTK+ for display. The binaries also can be used in non-gtk mode." emacs_lucid_SUMMARY="Emacs binaries using the X11 GUI with the Lucid toolkit" emacs_lucid_REQUIRES="emacs-common bitstream-vera-fonts" emacs_lucid_PROVIDES="emacs-bin" emacs_lucid_DESCRIPTION="${DESCRIPTION} This package provides binaries for an X11 emacs with the Lucid toolkit. Install it if you want to run emacs using the X window system and Lucid for display. The binaries also can be used in non-X11 mode." emacs_w32_SUMMARY="Emacs binaries using the native Windows GUI" emacs_w32_REQUIRES="emacs-common" emacs_w32_PROVIDES="emacs-bin" emacs_w32_DESCRIPTION="${DESCRIPTION} This package provides emacs binaries that use the native Windows GUI for display." # SRC_URI="mirror://gnu/emacs/emacs-${VERSION}.tar.xz" SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/emacs-${VERSION}.tar.xz" # SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/emacs-${VERSION}-rc2.tar.xz" # Can generate a source tarball by running './make-dist --snapshot # --xz --tests' in git repo. Note: It’s possible to have an # outdated loaddefs.el in this way. See admin/make-tarball.txt for # more careful instructions on making the tarball. It might suffice # to run ’make -C lisp autoloads’ first. # GIT_URI="git://git.savannah.gnu.org/emacs.git" # GIT_BRANCH="emacs-28" # GIT_REV=fa0b34b716 # inherit git SRC_URI+=" make-emacs-shortcut set-emacs-default.sh README.Cygwin " PATCH_URI="bt.patch" PATCH_URI+=" no_dialog_on_abort.patch" PATCH_URI+=" 0001-Avoid-delays-waiting-for-input-on-systems-without-SI.patch" PATCH_URI+=" 0002-Make-process_pending_signals-useful-on-systems-witho.patch" PATCH_URI+=" 0001-Make-the-installed-pmdp-file-use-a-fingerprint.patch" PATCH_URI+=" 0001-Change-fingerprint-to-output-to-stdout.patch" DOCS="README.Cygwin" # For emacs-29 we'll also want libfribidi-devel, libwebp-devel, and # libsqlite3-devel. BUILD_REQUIRES=" \ libSM-devel \ libX11-devel \ libX11-xcb-devel \ libXaw3d-devel \ libXft-devel \ libXpm-devel \ libXpm-noX-devel \ libXrender-devel \ libdbus1-devel \ libfontconfig-devel \ libfreetype-devel \ libgccjit0 \ libgif-devel \ libglib2.0-devel \ libgnutls-devel \ libgtk3-devel \ libharfbuzz-devel \ libiconv-devel \ libjansson-devel \ libjpeg-devel \ liblcms2-devel \ libm17n-devel \ libncurses-devel \ libotf-devel \ libpng-devel \ librsvg2-devel \ libtiff-devel \ libxml2-devel" DIFF_EXCLUDES="loaddefs.el config.in *.elc loaddefs.el~ subdirs.el~ config.in~ emacs.1 *.info" ACLOCAL_FLAGS='-I m4' # NATIVE_COMP=yes NATIVE_COMP=no if [ ${NATIVE_COMP} = yes ] then CYGCONF_ARGS="--with-native-compilation" fi WANT_AUTOCONF=2.7 src_compile() { cd ${S} cygautoreconf # ./autogen.sh cd ${B} for t in basic w32 gtk lucid do mkdir ../build-${t} cat > ${C}/emacs-${t}.list <<-EOF usr/bin/emacs-${t}.exe usr/bin/emacsclient-${t}.exe usr/bin/set-emacs-default-${t}.sh etc/postinstall/emacs-${t}.sh etc/preremove/emacs-${t}.sh EOF done cd ${B}/../build-w32 cygconf --with-w32 cygmake echo "${EMACS_EXECDIR}/emacs-$(src/emacs --fingerprint).pdmp" \ >> ${C}/emacs-w32.list if [ ${NATIVE_COMP} = yes ] then echo "usr/lib/emacs/${VERSION}/native-lisp/$(ls native-lisp)" \ >> ${C}/emacs-w32.list fi cd ${B}/../build-gtk cygconf cygmake echo "${EMACS_EXECDIR}/emacs-$(src/emacs --fingerprint).pdmp" \ >> ${C}/emacs-gtk.list if [ ${NATIVE_COMP} = yes ] then echo "usr/lib/emacs/${VERSION}/native-lisp/$(ls native-lisp)" \ >> ${C}/emacs-gtk.list fi cd ${B}/../build-lucid cygconf --with-x-toolkit=lucid cygmake echo "${EMACS_EXECDIR}/emacs-$(src/emacs --fingerprint).pdmp" \ >> ${C}/emacs-lucid.list if [ ${NATIVE_COMP} = yes ] then echo "usr/lib/emacs/${VERSION}/native-lisp/$(ls native-lisp)" \ >> ${C}/emacs-lucid.list fi cd ${B}/../build-basic cygconf --with-x=no cygmake echo "${EMACS_EXECDIR}/emacs-$(src/emacs --fingerprint).pdmp" \ >> ${C}/emacs-basic.list if [ ${NATIVE_COMP} = yes ] then echo "usr/lib/emacs/${VERSION}/native-lisp/$(ls native-lisp)" \ >> ${C}/emacs-basic.list fi } src_install() { cd ${B}/../build-basic cyginstall rm -fv \ ${D}/usr/bin/emacs.exe \ ${D}/usr/bin/ctags.exe \ ${D}/usr/bin/etags.exe \ ${D}/usr/share/man/man1/ctags* \ ${D}/usr/share/man/man1/etags* mv ${D}/usr/bin/{${P}.exe,emacs-basic.exe} mv ${D}/usr/bin/{emacsclient.exe,emacsclient-basic.exe} if [ ${NATIVE_COMP} = yes ] then dodir /usr/lib/emacs/${VERSION}/native-lisp fi insinto /${EMACS_EXECDIR} for t in w32 gtk lucid do newbin ${B}/../build-${t}/src/emacs.exe emacs-${t}.exe newbin ${B}/../build-${t}/lib-src/emacsclient.exe emacsclient-${t}.exe fingerprint=$(${B}/../build-${t}/src/emacs --fingerprint) newins ${B}/../build-${t}/src/emacs.pdmp emacs-${fingerprint}.pdmp if [ ${NATIVE_COMP} = yes ] then cp -R ${B}/../build-${t}/native-lisp/${VERSION}-* \ ${D}/usr/lib/emacs/${VERSION}/native-lisp fi done cd ${S} dobin make-emacs-shortcut dobin set-emacs-default.sh insinto /usr/bin doins nt/icons/emacs.ico insinto /usr/share/${PN}/${PV}/etc doins src/.gdbinit for t in basic w32 gtk lucid do dosym set-emacs-default.sh /usr/bin/set-emacs-default-${t}.sh done dodir /etc/postinstall priority=0 for t in basic w32 gtk lucid do priority=$(( priority + 10 )) cat > ${D}/etc/postinstall/emacs-${t}.sh < ${D}/etc/preremove/emacs-${t}.sh < ${D}/var/lib/rebase/dynpath.d/emacs } src_test() { cd ${B} make check } # SCALLYWAG="deploy notest" SCALLYWAG="nobuild" # SCALLYWAG="notest"