Files
haikuports/sys-libs/zlib/zlib-1.3.1.recipe
OscarL 9eda77394a zlib: build without cmake. (#11162)
Should help with circular build dependencies (as current CMake recipe requires zlib).

Also, switch source URI to github.
2024-10-11 07:31:16 +02:00

90 lines
2.3 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="4"
SOURCE_URI="
https://zlib.net/fossils/zlib-$portVersion.tar.gz
https://github.com/madler/zlib/releases/download/v$portVersion/zlib-$portVersion.tar.gz
"
CHECKSUM_SHA256="9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"
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:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
"
BUILD()
{
export mandir=$manDir # ./configure won't accept --mandir, but respects $mandir
export CFLAGS="-O2 -g -DNDEBUG" # similar to cmake's "RelWithDebugInfo" as used before.
./configure \
--prefix=$prefix \
--libdir=$libDir \
--includedir=$includeDir \
--sharedlibdir=$libDir
make $jobArgs
}
INSTALL()
{
make install
# remove static library
rm $libDir/libz.a
prepareInstalledDevelLib libz
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$documentationDir
}
TEST()
{
make test
}