commit:     4312bd73b0f1f01f656820a241658b78e6fd42e8
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  5 10:08:48 2020 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Sat Sep  5 10:08:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4312bd73

media-gfx/nvidia-texture-tools: add some build options

Use recommended upstream options for shared flag
libsquish has build options for sse2 and openmp
Disable old gconf schema installation (triggers sandbox failure)

Closes: https://bugs.gentoo.org/740430
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 .../nvidia-texture-tools/nvidia-texture-tools-2.1.2.ebuild  | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.1.2.ebuild 
b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.1.2.ebuild
index 335938d3103..b2db5d4e20c 100644
--- a/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.1.2.ebuild
+++ b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.1.2.ebuild
@@ -12,7 +12,7 @@ 
SRC_URI="https://github.com/castano/nvidia-texture-tools/archive/${PV}.tar.gz ->
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="cpu_flags_x86_sse2 openmp"
 
 RDEPEND="
        media-libs/ilmbase:=
@@ -29,11 +29,20 @@ DEPEND="${RDEPEND}
 PATCHES=( "${FILESDIR}"/${P}-cmake.patch )
 DOCS=( ChangeLog README.md )
 
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
+               tc-has-openmp || die "Please switch to an openmp compatible 
compiler"
+       fi
+}
+
 src_configure() {
        # May be able to restore CUDA, but needs an old gcc
        local mycmakeargs=(
                -DCUDA_FOUND=OFF
-               -DNVTT_SHARED=TRUE
+               -DGCONFTOOL2=OFF
+               -DNVTT_SHARED=0
+               -DBUILD_SQUISH_WITH_OPENMP=$(usex openmp)
+               -DBUILD_SQUISH_WITH_SSE2=$(usex cpu_flags_x86_sse2)
        )
        cmake_src_configure
 }

Reply via email to