Files
haikuports/dev-util/dialog/dialog-1.3_20240619.recipe
2024-08-03 12:15:59 +02:00

83 lines
2.0 KiB
Bash

SUMMARY="Display TUI widgets for shell scripts"
DESCRIPTION="Dialog is an application used in shell scripts which displays \
text user interface widgets. It uses the curses or ncurses library."
HOMEPAGE="https://invisible-island.net/dialog/"
COPYRIGHT="1999-2014 Thomas E. Dickey"
LICENSE="GNU LGPL v2"
SOURCE_URI="https://invisible-island.net/archives/dialog/dialog-${portVersion/_/-}.tgz"
CHECKSUM_SHA256="5d8c4318963db3fd383525340276e0e05ee3dea9a6686c20779f5433b199547d"
SOURCE_DIR="dialog-${portVersion/_/-}"
REVISION="1"
PATCHES="dialog-$portVersion.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="15.0.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
dialog$secondaryArchSuffix = $portVersion
lib:libdialog$secondaryArchSuffix = $libVersionCompat
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:dialog = $portVersion
"
fi
REQUIRES="
haiku$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
"
PROVIDES_devel="
dialog${secondaryArchSuffix}_devel = $portVersion
cmd:dialog_config$secondaryArchSuffix = $portVersion
devel:libdialog$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
dialog$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libncurses$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
runConfigure --omit-dirs "docDir" ./configure \
--with-shared \
--with-ncursesw \
--with-libtool
make
}
INSTALL()
{
make install-full
# remove static library and libtool file
rm $libDir/libdialog.la
prepareInstalledDevelLib libdialog
# devel package
packageEntries devel \
$binDir/dialog-config \
$developDir \
$manDir/man3
# Remove stuff we don't need in the secondary architecture base package.
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $binDir $manDir
fi
}