zlib-ng: new recipe (#5934)

This commit is contained in:
extrowerk
2021-05-20 20:13:30 +02:00
committed by GitHub
parent 87b52c8e15
commit 15546e15a6
2 changed files with 109 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu

View File

@@ -0,0 +1,88 @@
SUMMARY="Fork of the zlib data compression library"
DESCRIPTION="Zlib replacement with optimizations for next generation systems"
HOMEPAGE="https://github.com/zlib-ng/zlib-ng"
COPYRIGHT="1995-2013 Jean-loup Gailly and Mark Adler"
LICENSE="Zlib"
REVISION="1"
SOURCE_URI="https://github.com/zlib-ng/zlib-ng/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="30305bd1551e3454bddf574f9863caf7137dde0fdbd4dcd7094eacfbb23955a0"
SOURCE_DIR="zlib-ng-$portVersion"
ARCHITECTURES="x86_gcc2 x86 x86_64 arm ?ppc sparc m68k"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
libVersion="2.0.3"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
zlib_ng$secondaryArchSuffix = $portVersion
lib:libz_ng$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
zlib_ng${secondaryArchSuffix}_devel = $portVersion
devel:libz_ng$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
zlib_ng$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage zlib_ng$secondaryArchSuffix \
$libDir/libz-ng.so.$libVersion
BUILD()
{
rm -rf build
cmake -B build -S . \
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-DINC_INSTALL_DIR=$includeDir \
-DZLIB_ENABLE_TESTS=ON \
-DWITH_OPTIM=ON \
-DWITH_UNALIGNED=OFF \
-DWITH_AVX2=OFF \
-DWITH_SSSE3=OFF \
-DWITH_SSE4=OFF \
-DWITH_PCLMULQDQ=OFF \
-DAVX2_SLIDEHASH=OFF \
-DAVX_CHUNKSET=OFF \
-DAVX2_COMPARE258=OFF \
-DAVX2_ADLER32=OFF \
-DSSE42_CRC=OFF \
-DSSE42_COMPARE258=OFF \
-DSSSE3_ADLER32=OFF \
-DPCLMUL_CRC=OFF \
-DWITH_NATIVE_INSTRUCTIONS=OFF
make $jobArgs -C build
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libz-ng
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}
TEST()
{
make -C build test
}