Files
haikuports/sys-libs/zlib/zlib-1.3.recipe
PulkoMandy 3c0ddaa369 Remove "untested for PowerPC" from a few recipes
The older versions were removed, so, if the latest version is marked as
untested, there is nothing to build. This allows to run the bootstrap
build a bit further.
2024-07-21 16:40:05 +02:00

92 lines
2.4 KiB
Bash

SUMMARY="A massively spiffy yet delicately unobtrusive compression library"
DESCRIPTION="Zlib is designed to be a free, general-purpose, legally \
unencumbered -- that is, not covered by any patents -- lossless \
data-compression library for use on virtually any computer hardware and \
operating system. The zlib data format is itself portable across platforms.
Unlike the LZW compression method used in Unix compress(1) and in the GIF \
image format, the compression method currently used in zlib essentially never \
expands the data. (LZW can double or triple the file size in extreme cases.) \
zlib's memory footprint is also independent of the input data and can be \
reduced, if necessary, at some cost in compression."
HOMEPAGE="http://www.zlib.net/"
COPYRIGHT="1995-2017 Jean-loup Gailly and Mark Adler"
LICENSE="Zlib"
REVISION="3"
SOURCE_URI="https://zlib.net/fossils/zlib-$portVersion.tar.gz"
CHECKSUM_SHA256="ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e"
PATCHES="zlib-$portVersion.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
zlib$secondaryArchSuffix = $libVersionCompat
lib:libz$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
SUMMARY_devel="The zlib development files"
PROVIDES_devel="
zlib${secondaryArchSuffix}_devel = $libVersionCompat
devel:libz$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
zlib$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
"
PATCH()
{
sed -i 's,${CMAKE_INSTALL_PREFIX}/bin',$binDir, CMakeLists.txt
sed -i 's,${CMAKE_INSTALL_PREFIX}/include',$includeDir, CMakeLists.txt
sed -i 's,${CMAKE_INSTALL_PREFIX}/lib',$libDir, CMakeLists.txt
sed -i 's,${CMAKE_INSTALL_PREFIX}/share/man',$manDir, CMakeLists.txt
sed -i 's,${CMAKE_INSTALL_PREFIX}/share/pkgconfig',$developLibDir/pkgconfig, \
CMakeLists.txt
}
BUILD()
{
cmake -S. -Bbuild \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX:PATH=$prefix
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# remove static library
rm $libDir/libz.a
prepareInstalledDevelLib libz
# devel package
packageEntries devel \
$developDir \
$documentationDir
}
TEST()
{
make -C build test
}