Files
haikuports/sys-libs/libedit/libedit-20210910_3.1.recipe
2022-12-12 20:44:00 -05:00

92 lines
2.1 KiB
Bash

SUMMARY="A BSD licensed replacement for the GNU readline library"
DESCRIPTION="This is an autotool- and libtoolized port of the NetBSD Editline library \
(libedit). This Berkeley-style licensed command line editor library provides \
generic line editing, history, and tokenization functions, similar to those \
found in GNU Readline."
HOMEPAGE="http://thrysoee.dk/editline/"
COPYRIGHT="1992-2021 The NetBSD Foundation, Inc."
LICENSE="BSD (3-clause)"
REVISION="3"
SOURCE_URI="http://thrysoee.dk/editline/libedit-${portVersion/_/-}.tar.gz"
SOURCE_DIR="libedit-${portVersion/_/-}"
CHECKSUM_SHA256="6792a6a992050762edcca28ff3318cdb7de37dccf7bc30db59fcd7017eed13c5"
PATCHES="libedit-${portVersion/_/-}.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="0.0.68"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libedit$secondaryArchSuffix = $portVersion
lib:libedit$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
"
PROVIDES_devel="
libedit${secondaryArchSuffix}_devel = $portVersion
devel:libedit$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libedit$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libncurses$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoreconf
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:m4
cmd:make
cmd:sed
"
defineDebugInfoPackage libedit$secondaryArchSuffix \
"$libDir"/libedit.so.$libVersion
BUILD()
{
autoreconf --force --install
runConfigure ./configure --enable-examples=no \
--enable-widec \
--disable-static
make $jobArgs
}
INSTALL()
{
make install
# remove libtool file
rm -f "$libDir"/libedit.la
if [ -n "$secondaryArchSuffix" ]; then
rm -rf "$documentationDir"
maybe_manDir_man3=
else
maybe_manDir_man3="$manDir"/man3
fi
prepareInstalledDevelLib libedit
fixPkgconfig
# devel package
packageEntries devel \
"$developDir" \
${maybe_manDir_man3:+"$maybe_manDir_man3"}
}
TEST()
{
make check
}