From 183d079fd681df544b67cf2f03c7d1d5aa7853fc Mon Sep 17 00:00:00 2001 From: Dima Panov Date: Sun, 19 Dec 2021 17:04:58 +0300 Subject: [PATCH] graphics/qt5-q3d: convert AVX2 detection hack to OPTIONS (+) Force qt5-qmake to pass CXXFLAGS to cpu features test. Define AVX OPTION only amd64/i386 arches due to cpu used. Off by default to keep out-of-box behavior and allow to build qt5-q3d and its consumes on any old processors. Necromages, go forward! :) PR: 255753 With hat: desktop Sponsored by: Netzkommune GmbH --- devel/qt5-qmake/Makefile | 2 +- devel/qt5-qmake/files/patch-config.tests_arch_arch.pro | 6 ++++++ graphics/qt5-3d/Makefile | 8 +++++++- ..._configure.json => extrapatch-src_core_configure.json} | 0 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 devel/qt5-qmake/files/patch-config.tests_arch_arch.pro rename graphics/qt5-3d/files/{patch-src_core_configure.json => extrapatch-src_core_configure.json} (100%) diff --git a/devel/qt5-qmake/Makefile b/devel/qt5-qmake/Makefile index 421d4694e8a4..c73de40c0aef 100644 --- a/devel/qt5-qmake/Makefile +++ b/devel/qt5-qmake/Makefile @@ -1,6 +1,6 @@ PORTNAME= qmake DISTVERSION= ${QT5_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel PKGNAMEPREFIX= qt5- diff --git a/devel/qt5-qmake/files/patch-config.tests_arch_arch.pro b/devel/qt5-qmake/files/patch-config.tests_arch_arch.pro new file mode 100644 index 000000000000..051a52f38555 --- /dev/null +++ b/devel/qt5-qmake/files/patch-config.tests_arch_arch.pro @@ -0,0 +1,6 @@ +--- config.tests/arch/arch.pro.orig 2021-05-26 21:40:42 UTC ++++ config.tests/arch/arch.pro +@@ -1,2 +1,3 @@ + SOURCES = arch.cpp ++QMAKE_CXXFLAGS += $$(CXXFLAGS) + include(write_info.pri) diff --git a/graphics/qt5-3d/Makefile b/graphics/qt5-3d/Makefile index 073c11b7d136..cbcda61880d6 100644 --- a/graphics/qt5-3d/Makefile +++ b/graphics/qt5-3d/Makefile @@ -1,6 +1,6 @@ PORTNAME= 3d DISTVERSION= ${QT5_VERSION} -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= graphics PKGNAMEPREFIX= qt5- @@ -12,6 +12,12 @@ LIB_DEPENDS= libassimp.so:multimedia/assimp USES= compiler:c++11-lang pkgconfig qmake:norecursive qt-dist:5,3d USE_QT= concurrent core declarative gui network buildtools_build +OPTIONS_DEFINE_amd64= AVX +OPTIONS_DEFINE_i386= AVX + +AVX_DESC= Build for Intel CPUs with AVX* support (Haswell+) +AVX_EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_core_configure.json + QT_BINARIES= yes .include diff --git a/graphics/qt5-3d/files/patch-src_core_configure.json b/graphics/qt5-3d/files/extrapatch-src_core_configure.json similarity index 100% rename from graphics/qt5-3d/files/patch-src_core_configure.json rename to graphics/qt5-3d/files/extrapatch-src_core_configure.json