diff --git a/app-editors/emacs/emacs-25.2.recipe b/app-editors/emacs/emacs-25.2.recipe new file mode 100644 index 000000000..00fc535c2 --- /dev/null +++ b/app-editors/emacs/emacs-25.2.recipe @@ -0,0 +1,130 @@ +SUMMARY="The famous text editor" +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-2017 Free Software Foundation, Inc." +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="http://www.artfiles.org/gnu.org/emacs/emacs-$portVersion.tar.xz" +CHECKSUM_SHA256="59b55194c9979987c5e9f1a1a4ab5406714e80ffcfd415cc6b9222413bc073fa" +PATCHES="emacs-$portVersion.patchset" + +ARCHITECTURES="?x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86" + +PROVIDES=" + emacs$secondaryArchSuffix = $portVersion + cmd:ctags.emacs = $portVersion + cmd:ebrowse = $portVersion + cmd:emacs = $portVersion + cmd:emacs_$portVersion + cmd:emacsclient = $portVersion + cmd:etags = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libgnutls$secondaryArchSuffix + lib:libncurses$secondaryArchSuffix + lib:libxml2$secondaryArchSuffix + lib:libz$secondaryArchSuffix +# lib:libpng$secondaryArchSuffix +# lib:libjpeg$secondaryArchSuffix +# lib:libtiff$secondaryArchSuffix +# lib:libxpm$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libiconv$secondaryArchSuffix + devel:libgnutls$secondaryArchSuffix + devel:libncurses$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + devel:libz$secondaryArchSuffix >= 1.2.8 +# devel:libpng$secondaryArchSuffix +# devel:libjpeg$secondaryArchSuffix +# devel:libtiff$secondaryArchSuffix +# devel:libxpm$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:autoconf + cmd:aclocal + cmd:gcc$secondaryArchSuffix + cmd:find + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:tar + cmd:which + cmd:makeinfo + " + +GLOBAL_WRITABLE_FILES=" + var/games/emacs/snake-scores keep-old + var/games/emacs/tetris-scores keep-old + " + +PATCH() +{ + # Hard link not supported on BFS. + sed -i 's/ln -f/ln -s/g' src/Makefile.in + + # mmaloc temporary fix. + sed -i 's/emacs_cv_sanitize_address=no/emacs_cv_sanitize_address=yes/g' configure.ac +} + +BUILD() +{ + export LDFLAGS="-lnetwork -lbsd" + CFLAGS="-D_BSD_SOURCE" + export HOME=/boot/home + + autoreconf -fi + + runConfigure ./configure \ + CANNOT_DUMP=yes # known bug in emacs + + make clean + + # known bug in emacs + mkdir -p $dataDir/emacs/$portVersion/lisp + cp -R lisp/* $dataDir/emacs/$portVersion/lisp + + make $jobArgs +} + +INSTALL() +{ + # Build fix + for f in emacs bootstrap-emacs; do + rm -rf src/$f + done + + make install + + # ctags fix + mv $binDir/ctags $binDir/ctags.emacs + + # Cleanup + strip $binDir/* + find $dataDir -type f -name "*.el.gz" -delete + + for f in appdata applications icons; do + rm -rf $dataDir/$f + done + + # Extra attribs + for f in $binDir/*; do + if [ -r "$f" ]; then + addattr SYS:ENV DISABLE_ASLR=1 $f + fi + done +} diff --git a/app-editors/emacs/patches/emacs-25.2.patchset b/app-editors/emacs/patches/emacs-25.2.patchset new file mode 100644 index 000000000..6d702450c --- /dev/null +++ b/app-editors/emacs/patches/emacs-25.2.patchset @@ -0,0 +1,38 @@ +From 382d51023f5e54b5c380ec7edb44cc7ea402c403 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 28 May 2017 12:53:20 +0200 +Subject: Introduce Haiku as supported platform + + +diff --git a/configure.ac b/configure.ac +index 5853cbb..f816111 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -710,6 +710,7 @@ case "${canonical}" in + *-sysv4.2uw* ) opsys=unixware ;; + *-sysv5uw* ) opsys=unixware ;; + *-sysv5OpenUNIX* ) opsys=unixware ;; ++ *-haiku* ) opsys=haiku ;; + ## Otherwise, we'll fall through to the generic opsys code at the bottom. + esac + ;; +@@ -722,6 +723,7 @@ case "${canonical}" in + # MinGW overrides and adds some system headers in nt/inc. + GCC_TEST_OPTIONS="-I $srcdir/nt/inc" + ;; ++ *-haiku* ) opsys=haiku ;; + ## Otherwise, we'll fall through to the generic opsys code at the bottom. + esac + ;; +@@ -4465,7 +4467,7 @@ case $opsys in + AC_DEFINE(PTY_TTY_NAME_SPRINTF, []) + ;; + +- gnu | openbsd ) ++ gnu | openbsd | haiku ) + AC_DEFINE(FIRST_PTY_LETTER, ['p']) + ;; + +-- +2.12.2 +