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