Files
haikuports/sys-libs/ncurses/ncurses6-6.0.recipe
Jérôme Duval 454940d466 Bump revisions for x86_64 rebuild after time_t change.
* make gawk compatible with version 3.
* add some prerequisites for icu.
2017-06-12 17:40:24 -04:00

224 lines
6.7 KiB
Bash

SUMMARY="New curses library"
HOMEPAGE="http://www.gnu.org/software/ncurses/ncurses.html"
SOURCE_URI="http://ftp.gnu.org/pub/gnu/ncurses/ncurses-$portVersion.tar.gz"
CHECKSUM_SHA256="f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260"
SOURCE_DIR="ncurses-$portVersion"
LICENSE="MIT"
COPYRIGHT="1998-2015 Free Software Foundation, Inc."
REVISION="3"
ARCHITECTURES="x86_gcc2 x86 x86_64 arm"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PATCHES="ncurses-6.0.patchset"
PROVIDES="
ncurses6$secondaryArchSuffix = $portVersion compat >= 6
lib:libform$secondaryArchSuffix = $portVersion compat >= 6
lib:libformw$secondaryArchSuffix = $portVersion compat >= 6
lib:libmenu$secondaryArchSuffix = $portVersion compat >= 6
lib:libmenuw$secondaryArchSuffix = $portVersion compat >= 6
lib:libncurses$secondaryArchSuffix = $portVersion compat >= 6
lib:libncursesw$secondaryArchSuffix = $portVersion compat >= 6
lib:libncurses++$secondaryArchSuffix = $portVersion compat >= 6
lib:libncurses++w$secondaryArchSuffix = $portVersion compat >= 6
lib:libpanel$secondaryArchSuffix = $portVersion compat >= 6
lib:libpanelw$secondaryArchSuffix = $portVersion compat >= 6
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:captoinfo = $portVersion compat >= 5
cmd:clear = $portVersion compat >= 5
cmd:infocmp = $portVersion compat >= 5
cmd:infotocap = $portVersion compat >= 5
cmd:reset = $portVersion compat >= 5
cmd:tabs = $portVersion compat >= 5
cmd:tic = $portVersion compat >= 5
cmd:toe = $portVersion compat >= 5
cmd:tput = $portVersion compat >= 5
cmd:tset = $portVersion compat >= 5
"
fi
REQUIRES="
haiku$secondaryArchSuffix
"
if [ -n "$secondaryArchSuffix" ]; then
REQUIRES="$REQUIRES
ncurses6 == $portVersion base
"
fi
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:libtool
cmd:make
cmd:sed
"
PATCH()
{
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
sed -i 's/=stdc++/=stdc++.r4/' aclocal.m4 configure
fi
}
doBuild()
{
if [ $# -lt 1 ]; then
echo >&2 "Usage: doBuild <targetDir> [ <configureFlags> ... ]"
exit 1
fi
targetDir=$(pwd)/$1
shift 1
# Parse additional arguments. "--libs-only" means we only want the
# libraries, nothing else. "--without-progs" means no programs and no
# terminfo DB (requires tic).
local noData
local libsOnly
local configureArgs
local arg
for arg in $@; do
case "$arg" in
--libs-only)
noData=1
libsOnly=1
arg="--without-progs"
;;
--without-progs)
noData=1
;;
esac
configureArgs="$configureArgs $arg"
done
rm -rf $targetDir
mkdir $targetDir
runConfigure \
--omit-dirs "dataRootDir docDir" ./configure \
--with-libtool \
--enable-termcap \
--enable-hard-tabs \
--enable-pc-files \
$configureArgs
make $jobArgs
if [ -z "$noData" ]; then
# We need LIBRARY_PATH to include the library installation directory,
# since the installation process for the terminfo database will run tic
# and the built-in rpath doesn't consider the DESTDIR we're using.
LIBRARY_PATH="$targetDir/$prefix/lib:$LIBRARY_PATH" \
make install DESTDIR=$targetDir
else
make install.libs DESTDIR=$targetDir
if [ -z "$libsOnly" ]; then
make install.includes DESTDIR=$targetDir
make install.man DESTDIR=$targetDir
fi
fi
# clean up for the next build
make clean
}
BUILD()
{
# Unfortunately building only works in the source directory. So we build
# two times -- once without and once with wide-char support -- installing in
# temporary directories from which we copy to the actual installation
# directory in INSTALL().
# For the secondary architecture we don't want the programs nor the
# terminfo DB. The main package will depend on the primary package which
# provides all this.
local withoutProgramArgs
if [ -n "$secondaryArchSuffix" ]; then
withoutProgramArgs="--without-progs"
fi
doBuild build-nowidec $withoutProgramArgs
doBuild build-widec --enable-widec --libs-only
}
INSTALL()
{
cp -ra build-nowidec/$prefix/. $prefix
cp -ra build-widec/$prefix/. $prefix
# remove libtool files
rm $libDir/lib*.la
# copy pkg-config files
mkdir -p $libDir/pkgconfig
cp build-*/*.pc $libDir/pkgconfig
# prepare develop/lib
prepareInstalledDevelLibs \
libform libmenu libncurses libncurses++ libpanel \
libformw libmenuw libncursesw libncurses++w libpanelw
fixPkgconfig
# fix ncurses[w]6-config
fixDevelopLibDirReferences $binDir/ncurses6-config $binDir/ncursesw6-config
# devel package
packageEntries devel \
$binDir/ncurses6-config \
$binDir/ncursesw6-config \
$developDir \
$manDir/man3
# For the secondary architecture package clean up stuff we don't need, since
# we make it depend on the primary architecture package.
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $binDir
rm -rf $documentationDir
fi
}
DESCRIPTION="
The Ncurses (new curses) library is a free software emulation of curses in \
System V Release 4.0, and more. It uses Terminfo format, supports pads and \
color and multiple highlights and forms characters and function-key mapping, \
and has all the other SYSV-curses enhancements over BSD Curses.
The ncurses code was developed under GNU/Linux. It has been in use for some \
time with OpenBSD as the system curses library, and on FreeBSD and NetBSD as \
an external package. It should port easily to any ANSI/POSIX-conforming UNIX. \
It has even been ported to OS/2 Warp!
The distribution includes the library and support utilities, including a \
terminfo compiler tic, a decompiler infocmp, clear, tput, tset, and a termcap \
conversion tool captoinfo. Full manual pages are provided for the library and \
tools.
"
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
ncurses6${secondaryArchSuffix}_devel = $portVersion compat >= 6
cmd:ncurses6_config${secondaryArchSuffix} = $portVersion compat >= 6
cmd:ncursesw6_config${secondaryArchSuffix} = $portVersion compat >= 6
devel:libform${secondaryArchSuffix} = $portVersion compat >= 6
devel:libformw${secondaryArchSuffix} = $portVersion compat >= 6
devel:libmenu${secondaryArchSuffix} = $portVersion compat >= 6
devel:libmenuw${secondaryArchSuffix} = $portVersion compat >= 6
devel:libncurses${secondaryArchSuffix} = $portVersion compat >= 6
devel:libncursesw${secondaryArchSuffix} = $portVersion compat >= 6
devel:libncurses++${secondaryArchSuffix} = $portVersion compat >= 6
devel:libncurses++w${secondaryArchSuffix} = $portVersion compat >= 6
devel:libpanel${secondaryArchSuffix} = $portVersion compat >= 6
devel:libpanelw${secondaryArchSuffix} = $portVersion compat >= 6
"
REQUIRES_devel="
ncurses6${secondaryArchSuffix} == $portVersion base
"
CONFLICTS_devel="
ncurses${secondaryArchSuffix}_devel
"