Browse Source

l/opencv: Upgraded to opencv-4.1.2.

current-20191101
Damien Goutte-Gattat 2 years ago
parent
commit
d59d9f966b
  1. 1
      l/opencv/OpenCV-2.4.13.tar.gz.sha1
  2. 1
      l/opencv/OpenCV-4.1.2.tar.gz.sha256
  3. 34
      l/opencv/opencv.SlackBuild

1
l/opencv/OpenCV-2.4.13.tar.gz.sha1

@ -1 +0,0 @@
5022f51933d8888965c5f7a3b78813a41ec0b72d OpenCV-2.4.13.tar.gz

1
l/opencv/OpenCV-4.1.2.tar.gz.sha256

@ -0,0 +1 @@
385dd0a9c25e67ef0dd60e022d2a2d7b17e2f36819cf3cb46aa8cdff5c5282c9 OpenCV-4.1.2.tar.gz

34
l/opencv/opencv.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2011,2013,2014,2016 Damien Goutte-Gattat
# Copyright (C) 2011,2013,2014,2016,2019 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -23,12 +23,14 @@
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest OpenCV sourcecode is available at: <http://opencv.org/>.
#
# Depends: l/libatlas
# Source package infos
NAMESRC=${NAMESRC:-OpenCV}
VERSION=${VERSION:-2.4.13}
VERSION=${VERSION:-4.1.2}
ARCHIVE=${ARCHIVE:-$NAMESRC-${VERSION}.tar.gz}
WGET=${WGET:-https://github.com/Itseez/opencv/archive/$VERSION.tar.gz}
WGET=${WGET:-https://github.com/opencv/opencv/archive/$VERSION.tar.gz}
# Build infos
NAMEPKG=${NAMEPKG:-opencv}
@ -75,7 +77,7 @@ if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
@ -88,19 +90,31 @@ CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DWITH_CUDA=OFF \
-DBUILD_DOCS=OFF \
-DBUILD_JAVA=OFF \
-DBUILD_TESTS=OFF \
..
make -j $JOBS
make install DESTDIR=$PKG
make install/strip DESTDIR=$PKG
# On x86_64, Python modules are wrongly installed in /usr/lib
if [ "x$ARCH" = xx86_64 ]; then
mv $PKG/usr/lib/python* $PKG/usr/lib64
rmdir $PKG/usr/lib
fi
# Strip binaries
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Move licenses to /usr/doc
mkdir -p $PKG/usr/doc
mv $PKG/usr/share/licenses/opencv4 $PKG/usr/doc/$NAME
rmdir $PKG/usr/share/licenses
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Add dependency infos
cat <<EOF > $PKG/install/slack-required
libatlas
EOF
# Package the tree
cd $PKG
mkdir -p $OUT

Loading…
Cancel
Save