summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorChristoph Willing <chris.willing@linux.com>2019-03-13 07:56:00 +1000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-03-16 06:53:35 +0700
commit122763b13ae387d8646cccc777b8f188584af027 (patch)
tree5f3f58b0314060ff96aa0fa44c33979cdca9e99c /multimedia
parentfb86d862d42318a74c117838726f20318c8cee8b (diff)
downloadslackbuilds-122763b13ae387d8646cccc777b8f188584af027.tar.gz
multimedia/vlc: Restored support for OpenCV
Signed-off-by: Christoph Willing <chris.willing@linux.com>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/vlc/README14
-rw-r--r--multimedia/vlc/patch-opencv4.diff24
-rw-r--r--multimedia/vlc/vlc.SlackBuild19
3 files changed, 48 insertions, 9 deletions
diff --git a/multimedia/vlc/README b/multimedia/vlc/README
index d1ecfa9112..5170d9ca06 100644
--- a/multimedia/vlc/README
+++ b/multimedia/vlc/README
@@ -12,13 +12,13 @@ are detected at build time, they will be included. Conversely if
optional packages are not available at build time, vlc will generally
continue to build with a reduced feature set.
-Support for OpenCV is temporarily disabled by default due to build error.
-However it is possible to include opencv support using the somewhat
-older opencv-legacy SlackBuild rather than opencv. It then needs to
-be explicitly enabled by setting the the OPENCV environment variable
-to "yes" e.g.
- OPENCV=yes sh vlc.SlackBuild
-This requires the opencv-legacy package to be installed at build time.
+Support for OpenCV is supported using either the "default" opencv
+package or the opencv-legacy package (version 3.1.0) from SBo. Either
+package will be detected and used if already installed. If opencv support
+is not wanted despite the presence of opencv or opencv-legacy, it can be
+explicitly disabled by setting the the OPENCV environment variable
+to "no" e.g.
+ OPENCV=no sh vlc.SlackBuild
Support for Wayland is a special case. It is not supported by default
but can be enabled setting the WAYLAND environment variable to "yes"
diff --git a/multimedia/vlc/patch-opencv4.diff b/multimedia/vlc/patch-opencv4.diff
new file mode 100644
index 0000000000..da158371d7
--- /dev/null
+++ b/multimedia/vlc/patch-opencv4.diff
@@ -0,0 +1,24 @@
+--- configure.ac.prev 2019-03-10 13:15:05.033000000 +1000
++++ configure.ac 2019-03-10 13:19:03.840000000 +1000
+@@ -1848,7 +1848,7 @@
+ dnl
+ dnl OpenCV wrapper and example filters
+ dnl
+-PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv > 2.0], (OpenCV (computer vision) filter), [auto])
++PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_wrapper], [opencv4 > 4.0], (OpenCV (computer vision) filter), [auto])
+
+
+ dnl
+--- modules/video_filter/Makefile.am.orig 2017-11-25 01:29:18.000000000 +1000
++++ modules/video_filter/Makefile.am 2019-03-12 14:21:25.417000000 +1000
+@@ -147,8 +147,8 @@
+ libdeinterlace_plugin_la_LIBADD = libdeinterlace_common.la
+ video_filter_LTLIBRARIES += libdeinterlace_plugin.la
+
+-libopencv_wrapper_plugin_la_SOURCES = video_filter/opencv_wrapper.c
+-libopencv_wrapper_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENCV_CFLAGS)
++libopencv_wrapper_plugin_la_SOURCES = video_filter/opencv_wrapper.cpp
++libopencv_wrapper_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENCV_CFLAGS) -fpermissive
+ libopencv_wrapper_plugin_la_LIBADD = $(OPENCV_LIBS)
+ libopencv_wrapper_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(video_filterdir)'
+ video_filter_LTLIBRARIES += $(LTLIBopencv_wrapper)
diff --git a/multimedia/vlc/vlc.SlackBuild b/multimedia/vlc/vlc.SlackBuild
index bc3848345a..5d662da8b8 100644
--- a/multimedia/vlc/vlc.SlackBuild
+++ b/multimedia/vlc/vlc.SlackBuild
@@ -29,7 +29,7 @@
PRGNAM=vlc
VERSION=${VERSION:-3.0.6}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -60,7 +60,6 @@ SLKLDFLAGS="-lrt"
DOCS="ABOUT-NLS AUTHORS COPYING INSTALL NEWS README THANKS"
qtversion="--enable-qt=4" ; [ "${QTVERSION:-5}" != "4" ] && qtversion="--enable-qt=5"
wayland="--disable-wayland" ; [ "${WAYLAND:-no}" != "no" ] && wayland="--enable-wayland"
-opencv="--disable-opencv" ; [ "${OPENCV:-no}" != "no" ] && opencv="--enable-opencv"
# In an ordinary virtual machine, since a different kernal is running,
# a unique dbus id is needed.
@@ -85,6 +84,22 @@ cd $PRGNAM-$VERSION
patch -p0 < $CWD/patch-projectM-fontpath.diff
patch -p0 < $CWD/patch_vlc_cache_gen.diff
+opencv=""
+if [ "${OPENCV:-yes}" != "yes" ]; then
+ opencv="--disable-opencv" ;
+else
+ if pkg-config --exists opencv4 ; then
+ opencv="--enable-opencv"
+ patch -p0 < $CWD/patch-opencv4.diff
+ mv modules/video_filter/opencv_wrapper.c modules/video_filter/opencv_wrapper.cpp
+ elif pkg-config --exists opencv ; then
+ # opencv-legacy
+ opencv="--enable-opencv"
+ else
+ opencv="--disable-opencv"
+ fi
+fi
+
autoreconf -fiv
chown -R root:root .