mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-12 23:00:10 +02:00
112 lines
2.3 KiB
Bash
112 lines
2.3 KiB
Bash
SUMMARY="A C library for reading, creating, and modifying zip archives"
|
|
DESCRIPTION="libzip is a C library for reading, creating, and modifying zip \
|
|
archives."
|
|
HOMEPAGE="http://www.nih.at/libzip/"
|
|
COPYRIGHT="1999-2020 Dieter Baron and Thomas Klausner"
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="http://www.nih.at/libzip/libzip-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="fd6a7f745de3d69cf5603edc9cb33d2890f0198e415255d0987a0cf10d824c6f"
|
|
PATCHES="libzip-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
libzip$secondaryArchSuffix = $portVersion
|
|
lib:libzip$secondaryArchSuffix = 5.5.0 compat >= 5.0.0
|
|
"
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
PROVIDES="$PROVIDES
|
|
cmd:zipcmp
|
|
cmd:zipmerge
|
|
cmd:ziptool
|
|
"
|
|
fi
|
|
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
# lib:libbz2$secondaryArchSuffix
|
|
# lib:liblzma$secondaryArchSuffix
|
|
# lib:libnettle$secondaryArchSuffix
|
|
lib:libssl$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
# lib:libzstd$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libzip${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libzip$secondaryArchSuffix = 5.5.0 compat >= 5.0.0
|
|
"
|
|
REQUIRES_devel="
|
|
libzip$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
# devel:libbz2$secondaryArchSuffix
|
|
# devel:liblzma$secondaryArchSuffix
|
|
# devel:libnettle$secondaryArchSuffix
|
|
devel:libssl$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
# devel:libzstd$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:grep
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:perl
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:sed
|
|
"
|
|
|
|
TEST_REQUIRES="
|
|
cmd:diff
|
|
cmd:find
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
rm -rf build
|
|
cmake -B build -S . \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_INCLUDEDIR=$includeDir \
|
|
-DDOCUMENTATION_FORMAT=man \
|
|
${secondaryArchSuffix:+'-DBUILD_TOOLS=OFF'} \
|
|
$cmakeDirArgs
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
# Move zipconf.h from include/ to develop/headers/
|
|
mv $prefix/include/zipconf.h $includeDir
|
|
rm -rf $prefix/include
|
|
|
|
prepareInstalledDevelLibs libzip
|
|
fixPkgconfig
|
|
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
maybe_manDir_man3=$manDir/man3
|
|
else
|
|
maybe_manDir_man3=
|
|
rm -rf $prefix/bin
|
|
rm -rf $documentationDir
|
|
fi
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir \
|
|
$libDir/cmake \
|
|
$maybe_manDir_man3
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make -C build check
|
|
}
|