mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
130 lines
3.2 KiB
Bash
130 lines
3.2 KiB
Bash
SUMMARY="Free Lossless Image Format"
|
|
DESCRIPTION="FLIF is a lossless image format based on MANIAC compression. \
|
|
MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding) is a variant of \
|
|
CABAC (context-adaptive binary arithmetic coding), where the contexts are \
|
|
nodes of decision trees which are dynamically learned at encode time.
|
|
|
|
FLIF outperforms PNG, FFV1, lossless WebP, lossless BPG and lossless \
|
|
JPEG2000 in terms of compression ratio.
|
|
|
|
Moreover, FLIF supports a form of progressive interlacing (essentially a \
|
|
generalization/improvement of PNG's Adam7) which means that any prefix \
|
|
(e.g. partial download) of a compressed file can be used as a reasonable \
|
|
lossy encoding of the entire image."
|
|
HOMEPAGE="https://flif.info/"
|
|
COPYRIGHT="2016 Jon Sneyers
|
|
Pieter Wuille"
|
|
LICENSE="Apache v2
|
|
GNU GPL v3
|
|
GNU LGPL v3"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/FLIF-hub/FLIF/archive/refs/tags/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="cc98313ef0dbfef65d72bc21f730edf2a97a414f14bd73ad424368ce032fdb7f"
|
|
SOURCE_DIR="FLIF-$portVersion"
|
|
PATCHES="flif-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
commandBinDir=$binDir
|
|
commandSuffix=$secondaryArchSuffix
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
PROVIDES="
|
|
flif$secondaryArchSuffix = $portVersion
|
|
cmd:apng2flif$commandSuffix = $portVersion
|
|
cmd:dflif$commandSuffix = $portVersion
|
|
cmd:flif$commandSuffix = $portVersion
|
|
cmd:gif2flif$commandSuffix = $portVersion
|
|
lib:libflif$secondaryArchSuffix = 0
|
|
lib:libflif_dec$secondaryArchSuffix = 0
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libGL$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libltdl$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
flif${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libflif$secondaryArchSuffix = 0
|
|
devel:libflif_dec$secondaryArchSuffix = 0
|
|
"
|
|
REQUIRES_devel="
|
|
flif$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
PROVIDES_tools="
|
|
flif${secondaryArchSuffix}_tools
|
|
cmd:viewflif$commandSuffix = $portVersion
|
|
"
|
|
REQUIRES_tools="
|
|
flif$secondaryArchSuffix == $portVersion base
|
|
haiku$secondaryArchSuffix
|
|
lib:libGL$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libSDL2_2.0$secondaryArchSuffix
|
|
lib:libltdl$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libpng16$secondaryArchSuffix
|
|
devel:libSDL2_2.0$secondaryArchSuffix
|
|
devel:libltdl$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:convert
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -Bbuild -Ssrc -DCMAKE_BUILD_TYPE=Release \
|
|
$cmakeDirArgs \
|
|
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
|
-DBUILD_STATIC_LIBS=OFF
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
prepareInstalledDevelLibs libflif libflif_dec
|
|
|
|
mkdir -p "$developLibDir"/pkgconfig
|
|
cat > "$developLibDir"/pkgconfig/flif.pc << EOF
|
|
prefix=${prefix}
|
|
exec_prefix=${prefix}
|
|
libdir=${libDir}
|
|
includedir=${includeDir}
|
|
|
|
Name: flif
|
|
Description: Free Lossless Image Format
|
|
Version: ${portVersion}
|
|
Libs: -L${developLibDir} -lflif -lflif_dec
|
|
Cflags: -I${includeDir}
|
|
EOF
|
|
|
|
packageEntries devel \
|
|
$developDir
|
|
|
|
packageEntries tools \
|
|
$commandBinDir/viewflif
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make -C build test
|
|
}
|