summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBalló György2020-07-06 11:18:53 +0000
committerBalló György2020-07-06 11:19:16 +0000
commit3c1f78746e0b0a02e0b714927d8d21044c28e07d (patch)
tree9a8c331e31476c6049f9dccb4c9a4a45a786cbda
parent6e172c5ce557513f21283a1713615c436823bb75 (diff)
downloadaur-3c1f78746e0b0a02e0b714927d8d21044c28e07d.tar.gz
Port to Qt5
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--qt5.patch49
3 files changed, 64 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 54abaf7abd5..72434aed13c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
pkgbase = v4l2ucp
pkgdesc = A universal control panel for Video for Linux Two (V4L2) devices
pkgver = 2.0.2
- pkgrel = 5
+ pkgrel = 6
url = http://v4l2ucp.sourceforge.net/
arch = x86_64
license = GPL2
makedepends = cmake
- depends = qt4
+ depends = qt5-base
depends = v4l-utils
optdepends = mplayer: video preview
source = https://downloads.sourceforge.net/sourceforge/v4l2ucp/v4l2ucp-2.0.2.tar.bz2
+ source = qt5.patch
sha512sums = 4c1e4e9fa5f8388a179632918edda2f5b84737370bf6eb67fe4b05215f0fc67f59df4749d7e86aa4da288da0eedf646978e0c84332054ec561a7c814b079fefc
+ sha512sums = 7c3e8bc6b9027a499871f411a357ddd44d0b109df6744c8484d0cc0ed0dde4007ad0c54ce38628ae3c609c1a136d057d2f654046598a9f24730704c6d9db13dd
pkgname = v4l2ucp
diff --git a/PKGBUILD b/PKGBUILD
index 039ea09c6bd..b84f25c82e4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,21 +5,28 @@
pkgname=v4l2ucp
pkgver=2.0.2
-pkgrel=5
+pkgrel=6
pkgdesc="A universal control panel for Video for Linux Two (V4L2) devices"
arch=('x86_64')
url="http://v4l2ucp.sourceforge.net/"
license=('GPL2')
-depends=('qt4' 'v4l-utils')
+depends=('qt5-base' 'v4l-utils')
optdepends=('mplayer: video preview')
makedepends=('cmake')
-source=("https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
-sha512sums=('4c1e4e9fa5f8388a179632918edda2f5b84737370bf6eb67fe4b05215f0fc67f59df4749d7e86aa4da288da0eedf646978e0c84332054ec561a7c814b079fefc')
+source=("https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ "qt5.patch")
+sha512sums=('4c1e4e9fa5f8388a179632918edda2f5b84737370bf6eb67fe4b05215f0fc67f59df4749d7e86aa4da288da0eedf646978e0c84332054ec561a7c814b079fefc'
+ '7c3e8bc6b9027a499871f411a357ddd44d0b109df6744c8484d0cc0ed0dde4007ad0c54ce38628ae3c609c1a136d057d2f654046598a9f24730704c6d9db13dd')
prepare() {
cd "${pkgname}-${pkgver}"
+
+ # port to Qt5
+ patch -Np1 -i ../qt5.patch
+
# use videodev2.h header
sed -i 's/videodev/&2/' src/v4l2ctrl.c
+
mkdir -vp build
}
diff --git a/qt5.patch b/qt5.patch
new file mode 100644
index 00000000000..467ddc1d214
--- /dev/null
+++ b/qt5.patch
@@ -0,0 +1,49 @@
+From 416f62ccf9a2d4037d1d71a4d51d78d38f3af960 Mon Sep 17 00:00:00 2001
+From: Sylvain Munaut <tnt@246tNt.com>
+Date: Fri, 27 Mar 2020 18:42:43 +0100
+Subject: [PATCH] cmake: Adapt to use Qt5 instead of Qt4
+
+Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
+---
+ CMakeLists.txt | 3 +--
+ src/CMakeLists.txt | 10 ++++++----
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4de2a0e..951ecfc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,8 +4,7 @@ project(v4l2ucp)
+ set(V4L2UCP_VERSION 2.0.2)
+
+ add_definitions(-Wall -DV4L2UCP_VERSION="${V4L2UCP_VERSION}")
+-find_package(Qt4 REQUIRED)
+-include( ${QT_USE_FILE} )
++find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
+
+ MESSAGE(STATUS "Looking for libv4l")
+ find_library(V4L2_LIBRARY v4l2)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 6604878..89735d9 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -2,13 +2,15 @@ set(SOURCES mainWindow.cpp previewSettings.cpp v4l2controls.cpp v4l2ucp.cpp)
+ set(HEADERS mainWindow.h previewSettings.h v4l2controls.h)
+ set(UI_FILES previewSettings.ui)
+ set(RCS v4l2ucp.qrc)
+-qt4_wrap_cpp(MOC_SOURCES ${HEADERS})
+-qt4_wrap_ui(UI_HEADERS ${UI_FILES})
+-qt4_add_resources(RC_SOURCES ${RCS})
++
++set(CMAKE_AUTOMOC ON)
++set(CMAKE_AUTORCC ON)
++set(CMAKE_AUTOUIC ON)
++
+ include_directories(${CMAKE_BINARY_DIR}/src)
+
+ add_executable(v4l2ucp ${SOURCES} ${MOC_SOURCES} ${UI_HEADERS} ${RC_SOURCES})
+-target_link_libraries(v4l2ucp ${QT_LIBRARIES} ${V4L2_LIBRARY})
++target_link_libraries(v4l2ucp Qt5::Widgets ${V4L2_LIBRARY})
+
+ add_executable(v4l2ctrl v4l2ctrl.c)
+ target_link_libraries(v4l2ctrl ${V4L2_LIBRARY})