wok-next view opencv/receipt @ rev 21017

Some maintenance
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Oct 16 16:46:05 2018 +0300 (2018-10-16)
parents c9a7a7b42a86
children d5aab818505e
line source
1 # SliTaz package receipt v2.
3 PACKAGE="opencv"
4 VERSION="3.4.1"
5 CATEGORY="development"
6 SHORT_DESC="Open source computer vision library"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://opencv.org/"
10 LFS="http://www.linuxfromscratch.org/blfs/view/svn/general/opencv.html"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://github.com/opencv/opencv/archive/$VERSION.tar.gz"
14 WGET_URL2="https://raw.githubusercontent.com/opencv/opencv_3rdparty/\
15 dfe3162c237af211e98b8960018b564bc209261d/ippicv/\
16 ippicv_2017u3_lnx_intel64_general_20170822.tgz"
17 WGET_URL3="https://github.com/opencv/opencv_contrib/archive/$VERSION/\
18 opencv_contrib-$VERSION.tar.gz"
20 BUILD_DEPENDS="cmake python-dev python-numpy zlib-dev \
21 libjpeg-turbo-dev tiff-dev libpng16-dev libwebp-dev jasper-dev openexr-dev \
22 ilmbase-dev gtk2-dev glib-dev gstreamer1-dev gst1-plugins-base-dev \
23 libgphoto2-dev shared-mime-info xine-lib-dev protobuf-dev " # lapack-dev
24 SPLIT="opencv opencv-dev"
26 compile_rules() {
27 ipp_file=$SRC/$(basename $WGET_URL2)
28 if [ ! -e "$ipp_file" ]; then
29 wget -O $ipp_file $WGET_URL2
30 fi
31 ipp_hash=$(md5sum $ipp_file | cut -d" " -f1)
32 ipp_dir=.cache/ippicv
33 mkdir -p $ipp_dir
34 cp $ipp_file $ipp_dir/$ipp_hash-$(basename $ipp_file)
36 if [ ! -e "$SRC/$(basename $WGET_URL3)" ]; then
37 wget -P $SRC $WGET_URL3
38 fi
39 tar -xf $SRC/$(basename $WGET_URL3)
42 mkdir build
43 cd build
45 cmake \
46 -DCMAKE_INSTALL_PREFIX=/usr \
47 -DCMAKE_BUILD_TYPE=Release \
48 -DENABLE_CXX11=ON \
49 -DBUILD_PERF_TESTS=OFF \
50 -DWITH_XINE=ON \
51 -DBUILD_TESTS=OFF \
52 -DENABLE_PRECOMPILED_HEADERS=OFF \
53 -DCMAKE_SKIP_RPATH=ON \
54 -DBUILD_WITH_DEBUG_INFO=OFF \
55 -Wno-dev \
56 \
57 .. &&
58 make &&
59 make install || return 1
61 case $ARCH in
62 x86_64) a='intel64';;
63 *) a='ia32';;
64 esac
65 cp -v 3rdparty/ippicv/ippicv_lnx/lib/$a/libippicv.a $install/usr/lib
66 }
68 genpkg_rules() {
69 case $PACKAGE in
70 opencv)
71 copy @std
72 DEPENDS="cairo gdk-pixbuf glib gst1-plugins-base gstreamer1 gtk2 \
73 jasper libgphoto2 libjpeg-turbo libpng16 libwebp openexr tiff \
74 xine-lib zlib"
75 ;;
76 opencv-dev)
77 copy @dev
78 ;;
79 esac
80 }