--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit toolchain-funcs multilib-minimal
+
+DESCRIPTION="stateless, zlib-compatible, and very fast compression library"
+HOMEPAGE="http://1wt.eu/projects/libslz"
+SRC_URI="http://git.1wt.eu/web?p=${PN}.git;a=snapshot;h=v${PV};sf=tgz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/1"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="static-libs tools"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ default
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ local -a opts=(
+ CC="$(tc-getCC)" \
+ OPT_CFLAGS="${CFLAGS}" \
+ USR_LFLAGS="${LDFLAGS}" \
+ shared \
+ $(usex static-libs static '')
+ )
+
+ if multilib_is_native_abi ; then
+ opts+=(
+ $(usex tools tools '')
+ )
+ fi
+
+ emake "${opts[@]}"
+}
+
+multilib_src_install() {
+ local -a opts=(
+ STRIP=":" \
+ DESTDIR="${ED}" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="$(get_libdir)" \
+ install-headers
+ install-shared \
+ $(usex static-libs install-static '')
+ )
+
+ if multilib_is_native_abi ; then
+ einstalldocs
+
+ opts+=(
+ $(usex tools install-tools '')
+ )
+ fi
+
+ emake "${opts[@]}"
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bertrand@jacquin.bzh</email>
+ <name>Bertrand Jacquin</name>
+ </maintainer>
+ <longdescription>
+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
+ </longdescription>
+ <use>
+ <flag name="tools">Install additional tools (zenc, zdec)</flag>
+ </use>
+</pkgmetadata>