mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
The quotes around $binDir and $prefix are not needed in the definitions of commandBinDir. There are over 120 recipes which define commandBinDir, and *most* of them don't have quotes in the lines defining commandBinDir and commandSuffix. 15 recipes were not consistent with the wiki. Now they are.
139 lines
3.7 KiB
Bash
139 lines
3.7 KiB
Bash
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-2018 Free Software Foundation, Inc."
|
|
LICENSE="GNU GPL v3"
|
|
REVISION="3"
|
|
SOURCE_URI="http://www.artfiles.org/gnu.org/emacs/emacs-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="1cf4fc240cd77c25309d15e18593789c8dbfba5c2b44d8f77c886542300fd32c"
|
|
PATCHES="emacs-$portVersion.patchset"
|
|
ADDITIONAL_FILES="emacs.rdef.in"
|
|
|
|
ARCHITECTURES="?x86_gcc2 x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="?x86"
|
|
|
|
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
PROVIDES="
|
|
emacs$secondaryArchSuffix = $portVersion
|
|
cmd:ctags.emacs$commandSuffix = $portVersion
|
|
cmd:ebrowse$commandSuffix = $portVersion
|
|
cmd:emacs$commandSuffix = $portVersion
|
|
cmd:emacs_$portVersion$commandSuffix = $portVersion
|
|
cmd:emacsclient$commandSuffix = $portVersion
|
|
cmd:etags$commandSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libexecinfo$secondaryArchSuffix
|
|
lib:libglib_2.0$secondaryArchSuffix
|
|
lib:libgnutls$secondaryArchSuffix
|
|
lib:libiconv$secondaryArchSuffix
|
|
lib:libintl$secondaryArchSuffix
|
|
lib:libncurses$secondaryArchSuffix
|
|
lib:libxml2$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libexecinfo$secondaryArchSuffix
|
|
devel:libglib_2.0$secondaryArchSuffix
|
|
devel:libgnutls$secondaryArchSuffix
|
|
devel:libiconv$secondaryArchSuffix
|
|
devel:libintl$secondaryArchSuffix
|
|
devel:libncurses$secondaryArchSuffix
|
|
devel:libxml2$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:aclocal
|
|
cmd:autoconf
|
|
cmd:find
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:makeinfo
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:tar
|
|
cmd:which
|
|
"
|
|
|
|
defineDebugInfoPackage emacs$secondaryArchSuffix \
|
|
$commandBinDir/ctags.emacs \
|
|
$commandBinDir/emacs-$portVersion \
|
|
$commandBinDir/emacsclient \
|
|
$commandBinDir/etags
|
|
|
|
PATCH()
|
|
{
|
|
# Hard links not supported on BFS.
|
|
sed -i 's/ln -f/ln -s/g' src/Makefile.in
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
export LDFLAGS="-lnetwork -lbsd"
|
|
CFLAGS="-D_BSD_SOURCE"
|
|
export HOME=/boot/home
|
|
|
|
autoreconf -fi
|
|
|
|
runConfigure --omit-dirs "binDir sbinDir" ./configure \
|
|
--bindir "$commandBinDir" \
|
|
--sbindir="$commandBinDir" \
|
|
--with-modules \
|
|
CANNOT_DUMP=yes # known bug in emacs
|
|
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
# Install fix, emacs is stupid
|
|
for f in emacs bootstrap-emacs; do
|
|
rm -rf src/$f
|
|
done
|
|
|
|
make install
|
|
|
|
# ctags fix
|
|
mv $commandBinDir/ctags $commandBinDir/ctags.emacs
|
|
|
|
# Cleanup
|
|
for f in appdata applications icons; do
|
|
rm -rf $dataDir/$f
|
|
done
|
|
rm -rf $libDir/systemd
|
|
|
|
# Icon
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
#local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local MINOR="`echo 0`"
|
|
|
|
sed \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
$portDir/additional-files/emacs.rdef.in > emacs.rdef
|
|
|
|
addResourcesToBinaries emacs.rdef \
|
|
$binDir/emacs
|
|
}
|