Prevent building with march=native
authorPeter Michael Green <plugwash@raspbian.org>
Thu, 4 Feb 2021 20:51:18 +0000 (21:51 +0100)
committerPaul Gevers <elbrus@debian.org>
Thu, 4 Feb 2021 20:57:47 +0000 (21:57 +0100)
configure.ac
debian/changelog
debian/control
debian/patches/no-march-native [new file with mode: 0644]
debian/patches/series
debian/rules

index 31971a76e5f7c96913a41cbc09eedaa8509b20fb..85263326843697051068e3249dfe80b226d892f8 100644 (file)
@@ -136,7 +136,7 @@ AM_CONDITIONAL([FMA_OPT], $fma)
 AX_CHECK_COMPILE_FLAG([-msse4.1], [sse41=true], [sse41=false], [$WERROR])
 AM_CONDITIONAL([SSE41_OPT], $sse41)
 
-AX_CHECK_COMPILE_FLAG([-march=native], [arch_native=true], [arch_native=false], [$WERROR])
+AX_CHECK_COMPILE_FLAG([-march=native], [arch_native=false], [arch_native=false], [$WERROR])
 AM_CONDITIONAL([MARCH_NATIVE_OPT], $arch_native)
 
 AC_ARG_WITH([extra-includes],
index 18311d32981afee36a8212fbf7895d3dc51d5aaa..1e976fb24a0f2cc2e73a2567c30454cbc8197c9f 100644 (file)
@@ -1,3 +1,11 @@
+tesseract (4.1.1-2.1) unstable; urgency=medium
+
+  [ Peter Green ]
+  * Edit configure.ac to disable -march=native (Closes: #949638)
+  * Edit control/rules to enable autoreconf.
+
+ -- Paul Gevers <elbrus@debian.org>  Thu, 04 Feb 2021 21:49:33 +0100
+
 tesseract (4.1.1-2) unstable; urgency=medium
 
   * Update debian/control:
index e4a1d5c5c479b82a587f94072b22899e5fe6aec3..7b59f661925da80cab5e49ad2e7730311a40cd59 100644 (file)
@@ -5,7 +5,7 @@ Maintainer: Alexander Pozdnyakov <almipo@mail.ru>
 Build-Depends: debhelper (>= 9), libleptonica-dev (>= 1.75.3),
                automake, libtool, libarchive-dev, libpango1.0-dev, libcairo2-dev, libicu-dev,
                libpng-dev, libjpeg-dev, libtiff-dev, zlib1g-dev, git, autoconf-archive, asciidoc,
-               xsltproc, docbook-xsl, docbook-xml, tesseract-ocr-eng (>= 4.00~)
+               xsltproc, docbook-xsl, docbook-xml, tesseract-ocr-eng (>= 4.00~), dh-autoreconf
 Standards-Version: 4.4.1
 Homepage: https://github.com/tesseract-ocr/
 Vcs-Git: https://github.com/AlexanderP/tesseract-debian.git
diff --git a/debian/patches/no-march-native b/debian/patches/no-march-native
new file mode 100644 (file)
index 0000000..aeed875
--- /dev/null
@@ -0,0 +1,28 @@
+Description:  Edit configure.ac to disable -march=native
+ -march=native is inappropriate for a binary distribution like Debian.
+Author: Peter Michael Green <plugwash@raspbian.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: 2020-01-23
+
+--- tesseract-4.1.1.orig/configure.ac
++++ tesseract-4.1.1/configure.ac
+@@ -136,7 +136,7 @@ AM_CONDITIONAL([FMA_OPT], $fma)
+ AX_CHECK_COMPILE_FLAG([-msse4.1], [sse41=true], [sse41=false], [$WERROR])
+ AM_CONDITIONAL([SSE41_OPT], $sse41)
+-AX_CHECK_COMPILE_FLAG([-march=native], [arch_native=true], [arch_native=false], [$WERROR])
++AX_CHECK_COMPILE_FLAG([-march=native], [arch_native=false], [arch_native=false], [$WERROR])
+ AM_CONDITIONAL([MARCH_NATIVE_OPT], $arch_native)
+ AC_ARG_WITH([extra-includes],
index 22431bc2594935a6699465f2e13e01e1f7eaf7c1..4bbee719d722ae1bb0e2f443122887e3a0a537a2 100644 (file)
@@ -2,3 +2,4 @@
 #fix-up-headers
 helptext
 #shebang.diff
+no-march-native
index 18dc1c599c417177218134f5e71937ce1cc808d3..f2b70dd2fe5f6ac3cc0f9b4c30ca45e3d35504cd 100755 (executable)
@@ -16,7 +16,7 @@ ifeq (,$(NUMJOBS))
 endif
 
 %:
-       dh $@ --parallel
+       dh $@ --parallel --with autoreconf
 
 override_dh_auto_build:
        make -j$(NUMJOBS)