mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 15:08:57 +02:00
96 lines
2.6 KiB
Bash
96 lines
2.6 KiB
Bash
SUMMARY="Reference implementation of the ZIM specification"
|
|
DESCRIPTION="The Libzim is the reference implementation for the ZIM file format.
|
|
It's a software library to read and write ZIM files on many systems and architectures.
|
|
More information about the ZIM format and the openZIM project at https://openzim.org/."
|
|
HOMEPAGE="https://github.com/openzim/libzim"
|
|
COPYRIGHT="2016-2023 openZIM and contributors"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="1"
|
|
SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="7c6e7fcaf5bc82447edb12c6c573779af6d77b3b79227da57586e81c4e13f1bf"
|
|
SOURCE_FILENAME="libzim-$portVersion.tar.gz"
|
|
SOURCE_URI_2="https://github.com/openzim/zim-testing-suite/archive/refs/tags/0.6.0.tar.gz"
|
|
CHECKSUM_SHA256_2="00b12c151f7485df9fef4cc0d8ffdf3d42be2a429f60d69be3d5100e829b7973"
|
|
SOURCE_FILENAME_2="zim-testing-suite-$portVersion.tar.gz"
|
|
PATCHES="libzim-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
libzim$secondaryArchSuffix = $portVersion
|
|
lib:libzim$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libicui18n$secondaryArchSuffix
|
|
lib:libicuuc$secondaryArchSuffix
|
|
lib:liblzma$secondaryArchSuffix
|
|
lib:libxapian$secondaryArchSuffix
|
|
lib:libzstd$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libzim${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libzim$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
libzim$secondaryArchSuffix == $portVersion base
|
|
devel:libicui18n$secondaryArchSuffix >= 74
|
|
devel:libicuuc$secondaryArchSuffix >= 74
|
|
devel:liblzma$secondaryArchSuffix
|
|
devel:libxapian$secondaryArchSuffix
|
|
devel:libzstd$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libgtest$secondaryArchSuffix
|
|
devel:libicui18n$secondaryArchSuffix >= 74
|
|
devel:libicuuc$secondaryArchSuffix >= 74
|
|
devel:liblzma$secondaryArchSuffix
|
|
devel:libxapian$secondaryArchSuffix
|
|
devel:libzstd$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:meson
|
|
cmd:ninja
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
meson build --buildtype=release \
|
|
-D default_library=shared \
|
|
--prefix=$prefix \
|
|
--includedir=$includeDir \
|
|
--libdir=$libDir \
|
|
-Dwerror=false
|
|
ninja -v -C build
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
ninja -C build install
|
|
|
|
prepareInstalledDevelLib \
|
|
libzim
|
|
fixPkgconfig
|
|
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# 5 crashing tests on 32bit
|
|
unset meson
|
|
cp -r $sourceDir2/zim-testing-suite-0.6.0/data $sourceDir/build/test
|
|
SKIP_BIG_MEMORY_TEST=1 meson test -Cbuild --print-errorlogs
|
|
}
|