From nobody Sun Apr 03 07:37:57 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D8DCD1A41ADB; Sun, 3 Apr 2022 07:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KWQjx5lZNz4TBN; Sun, 3 Apr 2022 07:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648971477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/GwwV4hiLUmXOtsb0Nz7G0HQnOLZ7jZDhh2ywfQbzYo=; b=jilDlD0KvgANF9CgDm2Rc2qOhXYJX7N07YGxctmvpYUF5a0yMWwEXROy7ArprOb5AdzC9D PldiObdXjxKIhrTGAUy5XkKPP4IkAISQ+NuIC+T5rWVPqPSkukAyFuvdx9CMN7LJ08nl5q qEH24KEsUKZ5aZhcb6wjCG1SKCq+kHlbWrHXQHhzYjghzEk8omvoFpa/pIfc7CBTi1l1ng WSOTSjBL6j0hZ3aLZEUINIuCci68BFYpIX89ifCzNHcA4senpgTLM0n07QeJRRinpH3d7/ AOXSkVmmyPWHKGu873RpenTEJ6X9a63wRKyWru9XfuczV6fQrOCzzUk6FdrY/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A496A19526; Sun, 3 Apr 2022 07:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2337bv4P063333; Sun, 3 Apr 2022 07:37:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2337bvhc063332; Sun, 3 Apr 2022 07:37:57 GMT (envelope-from git) Date: Sun, 3 Apr 2022 07:37:57 GMT Message-Id: <202204030737.2337bvhc063332@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mikael Urankar Subject: git: 31efc7fa161a - main - graphics/tesseract: Fix build on armv6/armv7 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mikael X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31efc7fa161a0da4982f5a3bf687e6bee405395f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648971477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/GwwV4hiLUmXOtsb0Nz7G0HQnOLZ7jZDhh2ywfQbzYo=; b=m3ZrFy90xmSZnrSkm2kT0HEcwHMtPpzuB28dWQ+czYSAYCQIwfKMncISWMLIq6YiTZgRrM ffnd4BVptUqWc045mJPeqw8DV91F2xQ/tKYf2s49R75+5XWk29u30w4l9K3CptAg+QCPgd 2FXjM4Q4crQn7eugY81pp5Tn82q7SJ1Di4qLTXpHhmwwTAhFw3ud6quK9kbP1ROSpoxYHj kMS5V2F1yLmHiZrl19mh+5Bc1wsW1f0YCS6sT59ct00tO28vmx4mUyOKwFpXLOcIXmNxui 5Z887tdJSsmy6tB/bGwvKwGP8ZvyqwJodR1lg0XYMRiZmoS3WWmMeo4Q1YrtkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648971477; a=rsa-sha256; cv=none; b=U/qwavlDDt1WRQxZey3tlzYmhrW86DQrf5cPa/eW9MmaQjm7SniqV0eZ+Vrld3bSP+JKwK dwD16pTBN+u9QDOU0G27YjBwD+nmXMmKCegEzfZ/urXh9nd7p/9eYh4IxFiaMRutJUeqW2 I9WX8WpM3xDapOUmpr+IL4W7XNrQN/pFs+HYEluNm8yrYgKH25lrAazoXRz74k28GnCxLF 8n7ZGo4Zzj59IHH+i8WZedLdIBhzo0eV+kpF+UKQ8ApelAZrtQyFCzvUHHFig6SQzEq5qC kYOc2v1XALUMj1fJpL54jjM8vQOjMUdWC7cYYWXehANyxA7FiYS42xOvCrkD4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mikael: URL: https://cgit.FreeBSD.org/ports/commit/?id=31efc7fa161a0da4982f5a3bf687e6bee405395f commit 31efc7fa161a0da4982f5a3bf687e6bee405395f Author: Robert Clausecker AuthorDate: 2022-04-02 13:54:54 +0000 Commit: Mikael Urankar CommitDate: 2022-04-03 07:37:54 +0000 graphics/tesseract: Fix build on armv6/armv7 Tesseract requires the header to detect the availability of NEON instructions on armv7. This commit adds a patch to use the appropriate FreeBSD interface for this purpose. This issue has already been reported to up stream. See also: https://github.com/tesseract-ocr/tesseract/pull/3782 See also: PR #263003 PR: 263004 Approved by: portmgr (build fix blanket) --- .../tesseract/files/patch-src_arch_simddetect.cpp | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/graphics/tesseract/files/patch-src_arch_simddetect.cpp b/graphics/tesseract/files/patch-src_arch_simddetect.cpp new file mode 100644 index 000000000000..2e645a041b2e --- /dev/null +++ b/graphics/tesseract/files/patch-src_arch_simddetect.cpp @@ -0,0 +1,41 @@ +--- src/arch/simddetect.cpp.orig 2022-04-02 13:06:33 UTC ++++ src/arch/simddetect.cpp +@@ -55,10 +55,12 @@ + #if defined(HAVE_NEON) && !defined(__aarch64__) + # ifdef ANDROID + # include +-# else +-/* Assume linux */ ++# elif defined(__linux__) + # include + # include ++# elif defined(__FreeBSD__) ++# include ++# include + # endif + #endif + +@@ -85,7 +87,7 @@ SIMDDetect SIMDDetect::detector; + bool SIMDDetect::neon_available_ = true; + #elif defined(HAVE_NEON) + // If true, then Neon has been detected. +-bool SIMDDetect::neon_available_; ++bool SIMDDetect::neon_available_ = false; + #else + // If true, then AVX has been detected. + bool SIMDDetect::avx_available_; +@@ -216,9 +218,12 @@ SIMDDetect::SIMDDetect() { + if (family == ANDROID_CPU_FAMILY_ARM) + neon_available_ = (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON); + } +-# else +- /* Assume linux */ ++# elif defined(__linux__) + neon_available_ = getauxval(AT_HWCAP) & HWCAP_NEON; ++# elif defined(__FreeBSD__) ++ unsigned long hwcap = 0; ++ elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap); ++ neon_available_ = hwcap & HWCAP_NEON; + # endif + #endif +