summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-09-01 08:29:46 +0100
committerSam James <sam@gentoo.org>2024-09-01 08:29:58 +0100
commita122be2eff3e44ef7c039d052ac47da8361fd6ae (patch)
tree5be44eed41fe0bdebe463b00c2eace798e8406d9 /app-text
parentdev-java/jclasslib: Stabilize 4.3.1 x86, #938860 (diff)
downloadgentoo-a122be2eff3e44ef7c039d052ac47da8361fd6ae.tar.gz
gentoo-a122be2eff3e44ef7c039d052ac47da8361fd6ae.tar.bz2
gentoo-a122be2eff3e44ef7c039d052ac47da8361fd6ae.zip
app-text/ghostscript-gpl: fix arm* build w/o neon
Bug: https://bugs.gentoo.org/924757 Closes: https://bugs.gentoo.org/926891 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r--app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.1-arm64-neon-tesseract.patch35
-rw-r--r--app-text/ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild1
2 files changed, 36 insertions, 0 deletions
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.1-arm64-neon-tesseract.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.1-arm64-neon-tesseract.patch
new file mode 100644
index 000000000000..4b64fff16f5e
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-10.03.1-arm64-neon-tesseract.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/926891
+https://bugs.gentoo.org/924757
+https://src.fedoraproject.org/rpms/tesseract/raw/rawhide/f/tesseract_neon.patch
+(See https://github.com/tesseract-ocr/tesseract/pull/4154 too)
+--- a/tesseract/CMakeLists.txt
++++ b/tesseract/CMakeLists.txt
+@@ -249,7 +249,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64.*|AARCH64.*")
+ set(HAVE_AVX512F FALSE)
+ set(HAVE_FMA FALSE)
+ set(HAVE_SSE4_1 FALSE)
+- set(HAVE_NEON TRUE)
++ check_cxx_compiler_flag("-mfpu=neon" HAVE_NEON)
+
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*")
+
+--- a/tesseract/src/arch/simddetect.cpp
++++ b/tesseract/src/arch/simddetect.cpp
+@@ -254,7 +254,7 @@ SIMDDetect::SIMDDetect() {
+ // SSE detected.
+ SetDotProduct(DotProductSSE, &IntSimdMatrix::intSimdMatrixSSE);
+ #endif
+-#if defined(HAVE_NEON) || defined(__aarch64__)
++#if defined(HAVE_NEON)
+ } else if (neon_available_) {
+ // NEON detected.
+ SetDotProduct(DotProductNEON, &IntSimdMatrix::intSimdMatrixNEON);
+@@ -311,7 +311,7 @@ void SIMDDetect::Update() {
+ } else if (dotproduct == "accelerate") {
+ SetDotProduct(DotProductAccelerate, IntSimdMatrix::intSimdMatrix);
+ #endif
+-#if defined(HAVE_NEON) || defined(__aarch64__)
++#if defined(HAVE_NEON)
+ } else if (dotproduct == "neon" && neon_available_) {
+ // NEON selected by config variable.
+ SetDotProduct(DotProductNEON, &IntSimdMatrix::intSimdMatrixNEON);
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild
index 54f3cdcf36f3..663558774565 100644
--- a/app-text/ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-10.03.1.ebuild
@@ -63,6 +63,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-10.03.0-c99.patch
+ "${FILESDIR}"/${PN}-10.03.1-arm64-neon-tesseract.patch
)
src_prepare() {