Gentoo Archives: gentoo-commits

From: Sebastien Fabbro <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/brotli/files/, app-arch/brotli/
Date: Mon, 31 Jul 2017 18:12:45
Message-Id: 1501524705.d8d4a949b4d145d328b6a0faaf2cc1694c306912.bicatali@gentoo
1 commit: d8d4a949b4d145d328b6a0faaf2cc1694c306912
2 Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 29 18:46:47 2017 +0000
4 Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 31 18:11:45 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8d4a949
7
8 app-arch/brotli: initial import
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 app-arch/brotli/Manifest | 1 +
13 app-arch/brotli/brotli-0.6.0.ebuild | 61 +++++++++++++++++++++++
14 app-arch/brotli/files/brotli-0.6.0-no-rpath.patch | 32 ++++++++++++
15 app-arch/brotli/metadata.xml | 18 +++++++
16 4 files changed, 112 insertions(+)
17
18 diff --git a/app-arch/brotli/Manifest b/app-arch/brotli/Manifest
19 new file mode 100644
20 index 00000000000..ef5f0a98066
21 --- /dev/null
22 +++ b/app-arch/brotli/Manifest
23 @@ -0,0 +1 @@
24 +DIST brotli-0.6.0.tar.gz 19838761 SHA256 69cdbdf5709051dd086a2f020f5abf9e32519eafe0ad6be820c667c3a9c9ee0f SHA512 36caa277790efeb5bff0fdc090cdcf00fd9995c4e81a60ed31d36af2e13848ec1afe5d84e6926eebbee013525191e9404e112cb7fbede16097221c5bc3dfb5d5 WHIRLPOOL 2ffe1213ca430821dfdf1b21ae4cce91060a93a4a8ff4f867e48c4108373fe319abede11f9a524634997f8789cede11f30b2c7143c254b1da99f00f50b0817fd
25
26 diff --git a/app-arch/brotli/brotli-0.6.0.ebuild b/app-arch/brotli/brotli-0.6.0.ebuild
27 new file mode 100644
28 index 00000000000..91daf8320a8
29 --- /dev/null
30 +++ b/app-arch/brotli/brotli-0.6.0.ebuild
31 @@ -0,0 +1,61 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
38 +DISTUTILS_OPTIONAL="1"
39 +
40 +inherit cmake-utils distutils-r1
41 +
42 +DESCRIPTION="Generic-purpose lossless compression algorithm"
43 +HOMEPAGE="https://github.com/google/brotli"
44 +SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
45 +
46 +SLOT="0/${PV}"
47 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
48 +
49 +RDEPEND="python? ( ${PYTHON_DEPS} )"
50 +DEPEND="${RDEPEND}"
51 +
52 +IUSE="python test"
53 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
54 +
55 +LICENSE="MIT python? ( Apache-2.0 )"
56 +
57 +DOCS=( README.md CONTRIBUTING.md )
58 +
59 +PATCHES=( "${FILESDIR}"/${P}-no-rpath.patch )
60 +
61 +src_prepare() {
62 + cmake-utils_src_prepare
63 + use python && distutils-r1_src_prepare
64 +}
65 +
66 +src_configure() {
67 + local mycmakeargs=(
68 + -DBUILD_SHARED_LIBS=ON
69 + -DBUILD_TESTING="$(usex test)"
70 + )
71 + cmake-utils_src_configure
72 + use python && distutils-r1_src_configure
73 +}
74 +
75 +src_compile() {
76 + cmake-utils_src_compile
77 + use python && distutils-r1_src_compile
78 +}
79 +
80 +python_test(){
81 + esetup.py test || die
82 +}
83 +
84 +src_test() {
85 + cmake-utils_src_test
86 + use python && distutils-r1_src_test
87 +}
88 +
89 +src_install() {
90 + cmake-utils_src_install
91 + use python && distutils-r1_src_install
92 +}
93
94 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
95 new file mode 100644
96 index 00000000000..28e70d7acfe
97 --- /dev/null
98 +++ b/app-arch/brotli/files/brotli-0.6.0-no-rpath.patch
99 @@ -0,0 +1,32 @@
100 +From: Tomasz Buchert <tomasz@××××××.org>
101 +Date: Sat, 24 Jun 2017 14:40:16 +0200
102 +Subject: Do not set rpath on shared libs.
103 +
104 +---
105 + CMakeLists.txt | 13 -------------
106 + 1 file changed, 13 deletions(-)
107 +
108 +diff --git a/CMakeLists.txt b/CMakeLists.txt
109 +index ca612d1..bf70d69 100644
110 +--- a/CMakeLists.txt
111 ++++ b/CMakeLists.txt
112 +@@ -27,19 +27,6 @@ CMAKE_DEPENDENT_OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON "NOT BROTLI
113 +
114 + include(GNUInstallDirs)
115 +
116 +-# When building shared libraries it is important to set the correct rpath.
117 +-# See https://cmake.org/Wiki/CMake_RPATH_handling#Always_full_RPATH
118 +-if (BUILD_SHARED_LIBS)
119 +- add_definitions(-DBROTLI_SHARED_COMPILATION)
120 +- set(CMAKE_SKIP_BUILD_RPATH FALSE)
121 +- set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
122 +- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
123 +- list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_LIBDIR}" isSystemDir)
124 +- if ("${isSystemDir}" STREQUAL "-1")
125 +- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}")
126 +- endif()
127 +-endif()
128 +-
129 + # Parse version information from common/version.h. Normally we would
130 + # define these values here and write them out to configuration file(s)
131 + # (i.e., config.h), but in this case we parse them from
132
133 diff --git a/app-arch/brotli/metadata.xml b/app-arch/brotli/metadata.xml
134 new file mode 100644
135 index 00000000000..0a0fddcd4ed
136 --- /dev/null
137 +++ b/app-arch/brotli/metadata.xml
138 @@ -0,0 +1,18 @@
139 +<?xml version="1.0" encoding="UTF-8"?>
140 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
141 +<pkgmetadata>
142 + <maintainer type="person">
143 + <email>bicatali@g.o</email>
144 + <name>Sébastien Fabbro</name>
145 + </maintainer>
146 + <longdescription>
147 + Brotli is a generic-purpose lossless compression algorithm that
148 + compresses data using a combination of a modern variant of the
149 + LZ77 algorithm, Huffman coding and 2nd order context modeling,
150 + with a hight compression ratio. It is similar in speed with
151 + deflate but offers denser compression.
152 + </longdescription>
153 + <upstream>
154 + <remote-id type="github">google/brotli</remote-id>
155 + </upstream>
156 +</pkgmetadata>