Files
haikuports/media-gfx/chafa/chafa-1.14.4.recipe
2024-12-10 19:00:54 +01:00

104 lines
2.5 KiB
Bash

SUMMARY="Versatile and fast Unicode/ASCII/ANSI graphics renderer"
DESCRIPTION="Chafa is a command-line utility that converts all kinds of \
images, including animated GIFs, into sixel or ANSI/Unicode character output \
that can be displayed in a terminal.
It is highly configurable, with support for alpha transparency and multiple \
color modes and color spaces, combining selectable ranges of Unicode \
characters to produce the desired output."
HOMEPAGE="https://hpjansson.org/chafa/"
COPYRIGHT="2018-2022 Hans Petter Jansson et al
2004 Richard Wilson
2008 Sean Fox"
LICENSE="GNU GPL v3
GNU LGPL v3"
REVISION="1"
SOURCE_URI="https://github.com/hpjansson/chafa/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="65b084173eb904c3e0b4eafd561cf0f676a17fe19b0d47b98118808f0646c92e"
ARCHITECTURES="all !x86_gcc2"
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
libVersion="0.9.4"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
chafa$secondaryArchSuffix = $portVersion
cmd:chafa$commandSuffix = $portVersion
lib:libchafa$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libMagickWand_7.Q16HDRI$secondaryArchSuffix
"
PROVIDES_devel="
chafa${secondaryArchSuffix}_devel = $portVersion
devel:libchafa$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
chafa$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfreetype$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libMagickWand_7.Q16HDRI$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoreconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:gtkdocize
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:which
"
defineDebugInfoPackage chafa$secondaryArchSuffix \
$libDir/libchafa.so.$libVersion
BUILD()
{
mkdir -p m4
NOCONFIGURE=1 ./autogen.sh
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
--disable-static
make $jobArgs OBJ_DIR=objects
}
INSTALL()
{
make install
# remove libtool file
rm $libDir/libchafa.la
prepareInstalledDevelLib libchafa
fixPkgconfig
packageEntries devel \
$developDir
}
TEST()
{
make check
}