summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-10-15 16:13:08 +0200
committerAlexis Ballier <aballier@gentoo.org>2015-10-15 16:13:17 +0200
commit710c78a3b906aef5f9e3f8312436434c49b15c21 (patch)
tree2e5923986cac215f516d9386f2508f672873e270
parentsys-fs/loop-aes: version bump (diff)
downloadgentoo-710c78a3b906aef5f9e3f8312436434c49b15c21.tar.gz
gentoo-710c78a3b906aef5f9e3f8312436434c49b15c21.tar.bz2
gentoo-710c78a3b906aef5f9e3f8312436434c49b15c21.zip
media-libs/x265: Add pic useflag to disable asm on x86.
It is the best we can do unless upstream writes PIC safe x86 asm. https://bugs.gentoo.org/show_bug.cgi?id=528202 Package-Manager: portage-2.2.23
-rw-r--r--media-libs/x265/metadata.xml1
-rw-r--r--media-libs/x265/x265-1.8.ebuild7
-rw-r--r--media-libs/x265/x265-9999.ebuild7
3 files changed, 13 insertions, 2 deletions
diff --git a/media-libs/x265/metadata.xml b/media-libs/x265/metadata.xml
index e4623460933e..5178f6fafcb6 100644
--- a/media-libs/x265/metadata.xml
+++ b/media-libs/x265/metadata.xml
@@ -7,5 +7,6 @@
</maintainer>
<use>
<flag name="10bit">Set output bit depth to 10</flag>
+ <flag name="pic">Disable optimized assembly code that is not PIC friendly</flag>
</use>
</pkgmetadata>
diff --git a/media-libs/x265/x265-1.8.ebuild b/media-libs/x265/x265-1.8.ebuild
index 8138afcc4b0e..d5b67b240d17 100644
--- a/media-libs/x265/x265-1.8.ebuild
+++ b/media-libs/x265/x265-1.8.ebuild
@@ -22,7 +22,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/68"
-IUSE="+10bit test"
+IUSE="+10bit pic test"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
RDEPEND=""
@@ -58,6 +58,11 @@ multilib_src_configure() {
if [[ ${ABI} = x86 ]] ; then
use 10bit && ewarn "Disabling 10bit support on x86 as it does not build (or requires to disable assembly optimizations)"
mycmakeargs+=( -DHIGH_BIT_DEPTH=OFF )
+ # Bug #528202
+ if use pic ; then
+ ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
elif [[ ${ABI} = x32 ]] ; then
# bug #510890
mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild
index 5b0348cfe2a3..1298033d279a 100644
--- a/media-libs/x265/x265-9999.ebuild
+++ b/media-libs/x265/x265-9999.ebuild
@@ -22,7 +22,7 @@ HOMEPAGE="http://x265.org/"
LICENSE="GPL-2"
# subslot = libx265 soname
SLOT="0/75"
-IUSE="+10bit test"
+IUSE="+10bit pic test"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
RDEPEND=""
@@ -54,6 +54,11 @@ multilib_src_configure() {
if [[ ${ABI} = x86 ]] ; then
use 10bit && ewarn "Disabling 10bit support on x86 as it does not build (or requires to disable assembly optimizations)"
mycmakeargs+=( -DHIGH_BIT_DEPTH=OFF )
+ # Bug #528202
+ if use pic ; then
+ ewarn "PIC has been requested but x86 asm is not PIC-safe, disabling it."
+ mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )
+ fi
elif [[ ${ABI} = x32 ]] ; then
# bug #510890
mycmakeargs+=( -DENABLE_ASSEMBLY=OFF )