commit:     6819e0f6f299cde6cc6bcf2cc1d84101abe80c67
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 28 21:37:22 2021 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Wed Apr 28 21:37:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6819e0f6

app-arch/brotli: add USE="static-libs"

Closes: https://bugs.gentoo.org/786558
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 .../brotli/{brotli-9999.ebuild => brotli-1.0.9-r2.ebuild}    | 12 +++++++++---
 app-arch/brotli/brotli-9999.ebuild                           |  5 +++--
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/app-arch/brotli/brotli-9999.ebuild 
b/app-arch/brotli/brotli-1.0.9-r2.ebuild
similarity index 83%
copy from app-arch/brotli/brotli-9999.ebuild
copy to app-arch/brotli/brotli-1.0.9-r2.ebuild
index d84bfa85b3e..9f152be136a 100644
--- a/app-arch/brotli/brotli-9999.ebuild
+++ b/app-arch/brotli/brotli-1.0.9-r2.ebuild
@@ -17,7 +17,7 @@ SLOT="0/$(ver_cut 1)"
 RDEPEND="python? ( ${PYTHON_DEPS} )"
 DEPEND="${RDEPEND}"
 
-IUSE="python test"
+IUSE="python static-libs test"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 LICENSE="MIT python? ( Apache-2.0 )"
@@ -29,11 +29,16 @@ if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="https://github.com/google/${PN}.git";
        inherit git-r3
 else
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 
~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
        SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
 fi
 
-RESTRICT="!test? ( test )"
+# tests are currently broken, see https://github.com/google/brotli/issues/850
+RESTRICT="test"
+
+PATCHES=(
+       "${FILESDIR}/${PV}-linker.patch"
+)
 
 src_prepare() {
        use python && distutils-r1_src_prepare
@@ -73,6 +78,7 @@ src_test() {
 
 multilib_src_install() {
        cmake-utils_src_install
+       use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a || die
 }
 multilib_src_install_all() {
        use python && distutils-r1_src_install

diff --git a/app-arch/brotli/brotli-9999.ebuild 
b/app-arch/brotli/brotli-9999.ebuild
index d84bfa85b3e..87affbe108c 100644
--- a/app-arch/brotli/brotli-9999.ebuild
+++ b/app-arch/brotli/brotli-9999.ebuild
@@ -17,7 +17,7 @@ SLOT="0/$(ver_cut 1)"
 RDEPEND="python? ( ${PYTHON_DEPS} )"
 DEPEND="${RDEPEND}"
 
-IUSE="python test"
+IUSE="python static-libs test"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 LICENSE="MIT python? ( Apache-2.0 )"
@@ -29,7 +29,7 @@ if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="https://github.com/google/${PN}.git";
        inherit git-r3
 else
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 
~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
        SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
 fi
 
@@ -73,6 +73,7 @@ src_test() {
 
 multilib_src_install() {
        cmake-utils_src_install
+       use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a || die
 }
 multilib_src_install_all() {
        use python && distutils-r1_src_install

Reply via email to