summaryrefslogtreecommitdiff
path: root/src/stage4/patches/generic/opencv.patch
diff options
context:
space:
mode:
Diffstat (limited to 'src/stage4/patches/generic/opencv.patch')
-rw-r--r--src/stage4/patches/generic/opencv.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/stage4/patches/generic/opencv.patch b/src/stage4/patches/generic/opencv.patch
new file mode 100644
index 0000000..9a269d8
--- /dev/null
+++ b/src/stage4/patches/generic/opencv.patch
@@ -0,0 +1,47 @@
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-06-09 16:23:25.502035556 +0200
++++ b/PKGBUILD 2018-06-09 16:26:36.342037461 +0200
+@@ -14,19 +14,20 @@ arch=('i686' 'x86_64' 'armv7h')
+ license=('BSD')
+ url="http://opencv.org/"
+ depends=('intel-tbb' 'openexr' 'xine-lib' 'libdc1394' 'cblas' 'lapack' 'libgphoto2' 'jasper')
+-makedepends=('cmake' 'python-numpy' 'python2-numpy' 'mesa' 'eigen' 'hdf5' 'lapacke' 'gtkglext')
++makedepends=('cmake' 'python-numpy' 'python2-numpy' 'mesa' 'eigen' 'hdf5' 'lapacke')
+ optdepends=('opencv-samples'
+- 'gtkglext: for the HighGUI module'
+ 'hdf5: support for HDF5 format'
+ 'opencl-icd-loader: For coding with OpenCL'
+ 'python-numpy: Python 3 interface'
+ 'python2-numpy: Python 2 interface')
+ mksource=("$pkgbase-$pkgver.zip::https://github.com/opencv/opencv/archive/$pkgver.zip"
+ "opencv_contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz")
+-source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.zip")
++source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.zip"
++ "https://github.com/google/protobuf/pull/3955/commits/642e1ac635f2563b4a14c255374f02645ae85dac.patch")
+ mksha256sums=('24bda432eaace9e992322dcc3d30144cefa5314c2424d4aa02e5fe3fa9dd17bd'
+ '298c69ee006d7675e1ff9d371ba8b0d9e7e88374bb7ba0f9d0789851d352ec6e')
+-sha256sums=('e5b34f29622d044e07163ed8d806bce5ff208531c1cdd5be24a9ec0255633396')
++sha256sums=('e5b34f29622d044e07163ed8d806bce5ff208531c1cdd5be24a9ec0255633396'
++ '74b368bc17ddbe056f73748c5557ff1709d03da67e3ebfaabcb9423e5507f65c')
+
+ _cmakeopts=('-D WITH_OPENCL=ON'
+ '-D WITH_OPENGL=ON'
+@@ -42,6 +43,7 @@ _cmakeopts=('-D WITH_OPENCL=ON'
+ '-D CMAKE_INSTALL_PREFIX=/usr'
+ '-D CMAKE_INSTALL_LIBDIR=lib'
+ '-D WITH_IPP=OFF'
++ '-D ENABLE_PRECOMPILED_HEADERS=OFF'
+ )
+
+ # SSE only available from Pentium 3 onwards (i686 is way older)
+@@ -69,6 +71,10 @@ prepare() {
+
+ # remove nonfree SIFT and SURF references
+ rm -rv modules/xfeatures2d
++
++ # fix generic atomics on 64bit
++ cd "$srcdir/opencv-$pkgver/3rdparty/protobuf"
++ patch -Np1 -i "$srcdir"/642e1ac635f2563b4a14c255374f02645ae85dac.patch
+ }
+
+ build() {