Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] x265: add options for altivec and assembly
Date: Tue, 07 May 2019 17:30:27 +0200	[thread overview]
Message-ID: <20190507153027.GtFEQAbxlSZTu0FzHkeVUmgKuIL85R08Ca8PTCnh4iM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-11540@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-ppc64/void-packages x265
https://github.com/void-linux/void-packages/pull/11540

x265: add options for altivec and assembly
This lets the user choose whether to build them in. Default to on for altivec on ppc64le (because that's always power8 or better) and off on ppc64 (because we support old hardware), assembly is on for ARM and x86 and off for everything else.

A patch file from https://github.com/void-linux/void-packages/pull/11540.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-x265-11540.patch --]
[-- Type: application/text/x-diff, Size: 2382 bytes --]

From 7ef62eb8ca742ce03d7f1a5452180b02882ab5a0 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 7 May 2019 17:02:24 +0200
Subject: [PATCH] x265: add options for altivec and assembly

This lets the user choose whether to build them in. Default to
on for altivec on ppc64le (because that's always power8 or better)
and off on ppc64 (because we support old hardware), assembly is
on for ARM and x86 and off for everything else.

Also use the proper assembler (nasm instead of yasm), x265 does
not take yasm and will just disable the assembly implicitly.
---
 srcpkgs/x265/template | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/x265/template b/srcpkgs/x265/template
index 80561b477a4..92b6694d685 100644
--- a/srcpkgs/x265/template
+++ b/srcpkgs/x265/template
@@ -1,12 +1,11 @@
 # Template file for 'x265'
 pkgname=x265
 version=3.0
-revision=1
+revision=2
 wrksrc="x265_${version}"
 build_wrksrc=source
 build_style=cmake
 configure_args="-DENABLE_PIC=1"
-hostmakedepends="yasm"
 short_desc="Open Source H.265/HEVC video encoder"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -14,8 +13,33 @@ homepage="http://x265.org/"
 distfiles="https://bitbucket.org/multicoreware/x265/downloads/x265_${version}.tar.gz"
 checksum=c5b9fc260cabbc4a81561a448f4ce9cad7218272b4011feabc3a6b751b2f0662
 
+build_options="altivec assembly"
+
+desc_option_altivec="Enable AltiVec support on ppc64 (POWER8 and higher only)"
+desc_option_assembly="Enable assembly support on x86/ARM"
+
+case "$XBPS_TARGET_MACHINE" in
+	ppc64le*) build_options_default="altivec" ;;
+	# on ARM, enabling it currently fails with undefined reference to
+	# x265::setupAssemblyPrimitives(x265::EncoderPrimitives&, int)
+	x86_64*|i686*) build_options_default="assembly" ;;
+	*) ;;
+esac
+
+if [ "$build_option_assembly" ]; then
+	case "$XBPS_TARGET_MACHINE" in
+		x86_64*|i686*) hostmakedepends+=" nasm" ;;
+		*) ;;
+	esac
+fi
+
 case "$XBPS_TARGET_MACHINE" in
-	ppc64|ppc64-musl) configure_args+=" -DCPU_POWER8=OFF -DENABLE_ALTIVEC=OFF";;
+	ppc64*)
+		# altivec does not build without power8 being enabled
+		configure_args+=" -DENABLE_ALTIVEC=$(vopt_if altivec ON OFF)
+		 -DCPU_POWER8=$(vopt_if altivec ON OFF)"
+		;;
+	*) configure_args+=" -DENABLE_ASSEMBLY=$(vopt_if assembly ON OFF)" ;;
 esac
 
 pre_configure() {

  parent reply	other threads:[~2019-05-07 15:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07 15:05 [PR PATCH] " voidlinux-github
2019-05-07 15:09 ` [PR PATCH] [Updated] " voidlinux-github
2019-05-07 15:09 ` voidlinux-github
2019-05-07 15:10 ` voidlinux-github
2019-05-07 15:10 ` voidlinux-github
2019-05-07 15:22 ` voidlinux-github
2019-05-07 15:22 ` voidlinux-github
2019-05-07 15:24 ` voidlinux-github
2019-05-07 15:30 ` voidlinux-github [this message]
2019-05-07 15:30 ` [PR PATCH] [Updated] " voidlinux-github
2019-05-07 15:30 ` voidlinux-github
2019-05-07 15:45 ` voidlinux-github
2019-05-07 16:07 ` [PR PATCH] [Merged]: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190507153027.GtFEQAbxlSZTu0FzHkeVUmgKuIL85R08Ca8PTCnh4iM@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).