mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
dev-libs/libslz: new recipe (#2106)
This commit is contained in:
79
dev-libs/libslz/libslz-1.1.0.recipe
Normal file
79
dev-libs/libslz/libslz-1.1.0.recipe
Normal file
@@ -0,0 +1,79 @@
|
||||
SUMMARY="A stateless, zlib-compatible, and very fast compression library"
|
||||
DESCRIPTION="SLZ is a fast and memory-less stream compressor which produces an \
|
||||
output that can be decompressed with zlib or gzip. It does not implement \
|
||||
decompression at all, zlib is perfectly fine for this.
|
||||
|
||||
The purpose is to use SLZ in situations where a zlib-compatible stream is \
|
||||
needed and zlib's resource usage would be too high while the compression ratio \
|
||||
is not critical. The typical use case is in HTTP servers and gateways which \
|
||||
have to compress many streams in parallel with little CPU resources to assign \
|
||||
to this task, and without having to thottle the compression ratio due to the \
|
||||
memory usage. In such an environment, the server's memory usage can easily be \
|
||||
divided by 10 and the CPU usage by 3. In addition its high performance made it \
|
||||
fill a gap in network backup applications."
|
||||
HOMEPAGE="http://www.libslz.org/"
|
||||
COPYRIGHT="2013-2015 Willy Tarreau"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://git.1wt.eu/web?p=libslz.git;a=snapshot;h=v$portVersion;sf=tbz2"
|
||||
CHECKSUM_SHA256="cf6b2c00066890d3c7f40ef00e6620784b9dc4662e9a3b35f2059997037be728"
|
||||
SOURCE_FILENAME="libslz-$portVersion.tar.bz2"
|
||||
SOURCE_DIR="libslz"
|
||||
PATCHES="libslz-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="${portVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
libslz$secondaryArchSuffix = $portVersion
|
||||
cmd:zdec$secondaryArchSuffix = $portVersion
|
||||
cmd:zenc$secondaryArchSuffix = $portVersion
|
||||
lib:libslz$secondaryArchSuffix = $libVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libslz${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libslz$secondaryArchSuffix = $libVersion
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libslz$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
defineDebugInfoPackage libslz$secondaryArchSuffix \
|
||||
"$binDir"/z{dec,enc} \
|
||||
"$libDir/libslz.so.$libVersion"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
install -d -m 755 "$binDir" "$libDir" "$includeDir"
|
||||
|
||||
# header
|
||||
install -t "$includeDir" -m 644 src/slz.h
|
||||
# lib
|
||||
install -t "$libDir" -m 755 libslz.so.$libVersion
|
||||
ln -s libslz.so.$libVersion "$libDir/libslz.so"
|
||||
install -t "$libDir" -m 644 libslz.a
|
||||
# bins
|
||||
install -t "$binDir" -m 755 zdec zenc
|
||||
|
||||
prepareInstalledDevelLib libslz
|
||||
packageEntries devel "$developDir"
|
||||
}
|
||||
23
dev-libs/libslz/patches/libslz-1.1.0.patchset
Normal file
23
dev-libs/libslz/patches/libslz-1.1.0.patchset
Normal file
@@ -0,0 +1,23 @@
|
||||
From d0b409f13ee2ac0ce4cb45246b26b948f1442548 Mon Sep 17 00:00:00 2001
|
||||
From: Leorize <alaviss@users.noreply.github.com>
|
||||
Date: Fri, 12 Jan 2018 12:01:57 +0700
|
||||
Subject: zenc: don't include glibc headers on Haiku
|
||||
|
||||
|
||||
diff --git a/src/zenc.c b/src/zenc.c
|
||||
index 736819c..15ea636 100644
|
||||
--- a/src/zenc.c
|
||||
+++ b/src/zenc.c
|
||||
@@ -32,7 +32,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/user.h>
|
||||
+#endif
|
||||
#include <fcntl.h>
|
||||
#include "slz.h"
|
||||
|
||||
--
|
||||
2.15.0
|
||||
|
||||
Reference in New Issue
Block a user