summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-arch/brotli/Manifest1
-rw-r--r--app-arch/brotli/brotli-1.0.2.ebuild67
-rw-r--r--app-arch/brotli/brotli-9999.ebuild66
-rw-r--r--app-arch/brotli/files/brotli-1.0.2-no-rpath.patch21
4 files changed, 155 insertions, 0 deletions
diff --git a/app-arch/brotli/Manifest b/app-arch/brotli/Manifest
index 4a16121683b6..d83d5e4e6587 100644
--- a/app-arch/brotli/Manifest
+++ b/app-arch/brotli/Manifest
@@ -1 +1,2 @@
DIST brotli-0.6.0.tar.gz 19838761 BLAKE2B 0630e9afcb04ecfd7cc6ba8dcbbe10c5ff16d9a975e13f48bd9b519bcf006afdd672aed542768590e2c5481e808e4f49c520e8a0294ce15e72cb3810a576fdde SHA512 36caa277790efeb5bff0fdc090cdcf00fd9995c4e81a60ed31d36af2e13848ec1afe5d84e6926eebbee013525191e9404e112cb7fbede16097221c5bc3dfb5d5
+DIST brotli-1.0.2.tar.gz 23736359 BLAKE2B c5467dc52f97942d790b835d5e2c06d2046c3df249446b775d58e56feeb5d5fdd3e1e8e42c5eff92df2bc2b47afabd36389e14afead5fd376e18c8517d1e67f7 SHA512 b3ec98159e63b4169dea3e958d60d89247dc1c0f78aab27bfffb2ece659fa024df990d410aa15c12b2082d42e3785e32ec248dce2b116c7f34e98bb6337f9fc9
diff --git a/app-arch/brotli/brotli-1.0.2.ebuild b/app-arch/brotli/brotli-1.0.2.ebuild
new file mode 100644
index 000000000000..b2991a9b89aa
--- /dev/null
+++ b/app-arch/brotli/brotli-1.0.2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2018 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"
+
+SLOT="0/${PV}"
+
+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 )
+
+if [[ ${PV} == "9999" ]] ; then
+ SRC_URI=""
+ EGIT_REPO_URI="https://github.com/google/${PN}.git"
+ inherit git-r3
+else
+ PATCHES=( "${FILESDIR}"/${P}-no-rpath.patch )
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+ SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+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/brotli-9999.ebuild b/app-arch/brotli/brotli-9999.ebuild
new file mode 100644
index 000000000000..5b876796ed3c
--- /dev/null
+++ b/app-arch/brotli/brotli-9999.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2018 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"
+
+SLOT="0/${PV}"
+
+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 )
+
+if [[ ${PV} == "9999" ]] ; then
+ SRC_URI=""
+ EGIT_REPO_URI="https://github.com/google/${PN}.git"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+ SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+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-1.0.2-no-rpath.patch b/app-arch/brotli/files/brotli-1.0.2-no-rpath.patch
new file mode 100644
index 000000000000..779b5e66bd98
--- /dev/null
+++ b/app-arch/brotli/files/brotli-1.0.2-no-rpath.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ac55f6b3..2dc7232c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -24,16 +24,6 @@ mark_as_advanced(BROTLI_BUNDLED_MODE)
+
+ 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
+-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()
+-
+ # 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