diff options
author | Sébastien Fabbro <bicatali@gentoo.org> | 2017-07-29 18:46:47 +0000 |
---|---|---|
committer | Sébastien Fabbro <bicatali@gentoo.org> | 2017-07-31 18:11:45 +0000 |
commit | d8d4a949b4d145d328b6a0faaf2cc1694c306912 (patch) | |
tree | 7eaac7bb22b0a9cf4b26459ae3264c459b84e1b6 /app-arch/brotli | |
parent | dev-python/python-lzo: version bump (diff) | |
download | gentoo-d8d4a949b4d145d328b6a0faaf2cc1694c306912.tar.gz gentoo-d8d4a949b4d145d328b6a0faaf2cc1694c306912.tar.bz2 gentoo-d8d4a949b4d145d328b6a0faaf2cc1694c306912.zip |
app-arch/brotli: initial import
Package-Manager: Portage-2.3.6, Repoman-2.3.3
Diffstat (limited to 'app-arch/brotli')
-rw-r--r-- | app-arch/brotli/Manifest | 1 | ||||
-rw-r--r-- | app-arch/brotli/brotli-0.6.0.ebuild | 61 | ||||
-rw-r--r-- | app-arch/brotli/files/brotli-0.6.0-no-rpath.patch | 32 | ||||
-rw-r--r-- | app-arch/brotli/metadata.xml | 18 |
4 files changed, 112 insertions, 0 deletions
diff --git a/app-arch/brotli/Manifest b/app-arch/brotli/Manifest new file mode 100644 index 000000000000..ef5f0a98066f --- /dev/null +++ b/app-arch/brotli/Manifest @@ -0,0 +1 @@ +DIST brotli-0.6.0.tar.gz 19838761 SHA256 69cdbdf5709051dd086a2f020f5abf9e32519eafe0ad6be820c667c3a9c9ee0f SHA512 36caa277790efeb5bff0fdc090cdcf00fd9995c4e81a60ed31d36af2e13848ec1afe5d84e6926eebbee013525191e9404e112cb7fbede16097221c5bc3dfb5d5 WHIRLPOOL 2ffe1213ca430821dfdf1b21ae4cce91060a93a4a8ff4f867e48c4108373fe319abede11f9a524634997f8789cede11f30b2c7143c254b1da99f00f50b0817fd diff --git a/app-arch/brotli/brotli-0.6.0.ebuild b/app-arch/brotli/brotli-0.6.0.ebuild new file mode 100644 index 000000000000..91daf8320a8c --- /dev/null +++ b/app-arch/brotli/brotli-0.6.0.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy ) +DISTUTILS_OPTIONAL="1" + +inherit cmake-utils distutils-r1 + +DESCRIPTION="Generic-purpose lossless compression algorithm" +HOMEPAGE="https://github.com/google/brotli" +SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +RDEPEND="python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND}" + +IUSE="python test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +LICENSE="MIT python? ( Apache-2.0 )" + +DOCS=( README.md CONTRIBUTING.md ) + +PATCHES=( "${FILESDIR}"/${P}-no-rpath.patch ) + +src_prepare() { + cmake-utils_src_prepare + use python && distutils-r1_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DBUILD_TESTING="$(usex test)" + ) + cmake-utils_src_configure + use python && distutils-r1_src_configure +} + +src_compile() { + cmake-utils_src_compile + use python && distutils-r1_src_compile +} + +python_test(){ + esetup.py test || die +} + +src_test() { + cmake-utils_src_test + use python && distutils-r1_src_test +} + +src_install() { + cmake-utils_src_install + use python && distutils-r1_src_install +} diff --git a/app-arch/brotli/files/brotli-0.6.0-no-rpath.patch b/app-arch/brotli/files/brotli-0.6.0-no-rpath.patch new file mode 100644 index 000000000000..28e70d7acfe7 --- /dev/null +++ b/app-arch/brotli/files/brotli-0.6.0-no-rpath.patch @@ -0,0 +1,32 @@ +From: Tomasz Buchert <tomasz@debian.org> +Date: Sat, 24 Jun 2017 14:40:16 +0200 +Subject: Do not set rpath on shared libs. + +--- + CMakeLists.txt | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ca612d1..bf70d69 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,19 +27,6 @@ CMAKE_DEPENDENT_OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON "NOT BROTLI + + include(GNUInstallDirs) + +-# When building shared libraries it is important to set the correct rpath. +-# See https://cmake.org/Wiki/CMake_RPATH_handling#Always_full_RPATH +-if (BUILD_SHARED_LIBS) +- add_definitions(-DBROTLI_SHARED_COMPILATION) +- set(CMAKE_SKIP_BUILD_RPATH FALSE) +- set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +- list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_LIBDIR}" isSystemDir) +- if ("${isSystemDir}" STREQUAL "-1") +- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}") +- endif() +-endif() +- + # Parse version information from common/version.h. Normally we would + # define these values here and write them out to configuration file(s) + # (i.e., config.h), but in this case we parse them from diff --git a/app-arch/brotli/metadata.xml b/app-arch/brotli/metadata.xml new file mode 100644 index 000000000000..0a0fddcd4ed6 --- /dev/null +++ b/app-arch/brotli/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bicatali@gentoo.org</email> + <name>Sébastien Fabbro</name> + </maintainer> + <longdescription> + Brotli is a generic-purpose lossless compression algorithm that + compresses data using a combination of a modern variant of the + LZ77 algorithm, Huffman coding and 2nd order context modeling, + with a hight compression ratio. It is similar in speed with + deflate but offers denser compression. + </longdescription> + <upstream> + <remote-id type="github">google/brotli</remote-id> + </upstream> +</pkgmetadata> |