SUMMARY="An extensible, customizable, free/libre text editor — and more" DESCRIPTION="An extensible, customizable, free/libre text editor — and more. At its core is an interpreter for Emacs Lisp, a dialect of the Lisp programming language with \ extensions to support text editing. * Content-aware editing modes, including syntax coloring, for many file types. * Complete built-in documentation, including a tutorial for new users. * Full Unicode support for nearly all human scripts. * Highly customizable, using Emacs Lisp code or a graphical interface. * An entire ecosystem of functionality beyond text editing, including a project planner, mail and \ news reader, debugger interface, calendar, and more. * A packaging system for downloading and installing extensions." HOMEPAGE="https://gnu.org/s/emacs/" COPYRIGHT="2001-2025 Free Software Foundation, Inc." LICENSE="GNU GPL v3" REVISION="1" SOURCE_URI="http://ftpmirror.gnu.org/emacs/emacs-$portVersion.tar.gz" CHECKSUM_SHA256="54404782ea5de37e8fcc4391fa9d4a41359a4ba9689b541f6bc97dd1ac283f6c" ADDITIONAL_FILES="emacs.rdef.in" PATCHES="emacs-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" # On x86_gcc2 we don't want to install the commands in bin//, but in bin/. commandSuffix=$secondaryArchSuffix commandBinDir=$binDir if [ "$targetArchitecture" = x86_gcc2 ]; then commandSuffix= commandBinDir=$prefix/bin fi PROVIDES=" emacs$secondaryArchSuffix = $portVersion app:Emacs = $portVersion cmd:ctags.emacs$commandSuffix = $portVersion cmd:ebrowse$commandSuffix = $portVersion cmd:emacs$commandSuffix = $portVersion cmd:emacsclient$commandSuffix = $portVersion cmd:emacs_$portVersion$commandSuffix = $portVersion cmd:etags$commandSuffix = $portVersion " REQUIRES=" haiku$secondaryArchSuffix lib:libexecinfo$secondaryArchSuffix lib:libgccjit$secondaryArchSuffix lib:libgio_2.0$secondaryArchSuffix lib:libglib_2.0$secondaryArchSuffix lib:libgmp$secondaryArchSuffix lib:libgnutls$secondaryArchSuffix lib:libgobject_2.0$secondaryArchSuffix lib:libintl$secondaryArchSuffix lib:libncurses$secondaryArchSuffix lib:libsqlite3$secondaryArchSuffix lib:libtree_sitter$secondaryArchSuffix lib:libxml2$secondaryArchSuffix lib:libz$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libexecinfo$secondaryArchSuffix devel:libgccjit$secondaryArchSuffix devel:libgio_2.0$secondaryArchSuffix devel:libglib_2.0$secondaryArchSuffix devel:libgmp$secondaryArchSuffix devel:libgnutls$secondaryArchSuffix devel:libgobject_2.0$secondaryArchSuffix devel:libintl$secondaryArchSuffix devel:libncurses$secondaryArchSuffix devel:libsqlite3$secondaryArchSuffix devel:libtree_sitter$secondaryArchSuffix devel:libxml2$secondaryArchSuffix devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:aclocal cmd:autoconf cmd:autoreconf cmd:awk cmd:find cmd:gcc$secondaryArchSuffix cmd:g++$secondaryArchSuffix cmd:grep cmd:gzip cmd:install_info cmd:make cmd:makeinfo cmd:pkg_config$secondaryArchSuffix " defineDebugInfoPackage emacs$secondaryArchSuffix \ $appsDir/Emacs \ $commandBinDir/ctags.emacs \ $commandBinDir/emacs-$portVersion \ $commandBinDir/emacsclient \ $commandBinDir/etags BUILD() { autoreconf -vfi -I m4 runConfigure --omit-dirs "binDir sbinDir" ./configure \ --bindir="$commandBinDir" \ --sbindir="$commandBinDir" \ --with-file-notification=gfile \ --with-be-app make $jobArgs } INSTALL() { # 'make install' assumes this directory already exists mkdir -p $appsDir make install # clean up files that aren't useful on Haiku rm -rf \ $dataDir/applications \ $dataDir/icons \ $dataDir/metainfo \ $libDir/systemd # rename ctags so that the official ctags can be installed alongside without conflicting mv $commandBinDir/ctags $commandBinDir/ctags.emacs mv $manDir/man1/ctags.1.gz $manDir/man1/ctags.emacs.1.gz # add our version and vector icon resources local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2`" sed \ -e "s|@MAJOR@|$MAJOR|" \ -e "s|@MIDDLE@|$MIDDLE|" \ -e "s|@MINOR@|0|" \ $portDir/additional-files/emacs.rdef.in > emacs.rdef addResourcesToBinaries emacs.rdef $appsDir/Emacs addAppDeskbarSymlink $appsDir/Emacs Emacs } TEST() { make check }