summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD17
-rw-r--r--qt-option.patch16
3 files changed, 30 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 357d450b3d84..f6e1ab2ca92b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = libqglviewer
pkgdesc = C++ library based on Qt that eases the creation of OpenGL 3D viewers
pkgver = 2.9.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/GillesDebunne/libQGLViewer
arch = i686
arch = x86_64
@@ -15,6 +15,8 @@ pkgbase = libqglviewer
depends = libglvnd
conflicts = libqglviewer-qt4
source = libqglviewer-2.9.1.tar.gz::https://github.com/GillesDebunne/libQGLViewer/archive/refs/tags/v2.9.1.tar.gz
+ source = qt-option.patch
sha256sums = ea4f9ac627c136a6851ffd3763b154f21c87a58bcec4e5d5b2d07e65a403096b
+ sha256sums = 7501d3fe3b2b280cf4a5cd3b5cc7b0198bd9bbeae6f960cd4d20e9c94a9310a5
pkgname = libqglviewer
diff --git a/PKGBUILD b/PKGBUILD
index 9eee37042833..3b109f1caec7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=libqglviewer
_pkgname=libQGLViewer
pkgver=2.9.1
-pkgrel=1
+pkgrel=2
pkgdesc="C++ library based on Qt that eases the creation of OpenGL 3D viewers"
url="https://github.com/GillesDebunne/libQGLViewer"
arch=('i686' 'x86_64' 'aarch64')
@@ -14,15 +14,20 @@ depends=('qt6-base' 'glu' 'libglvnd')
makedepends=('cmake')
conflicts=('libqglviewer-qt4')
license=('GPL2' 'GPL3' 'custom')
-source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
-sha256sums=('ea4f9ac627c136a6851ffd3763b154f21c87a58bcec4e5d5b2d07e65a403096b')
-
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
+"qt-option.patch"
+)
+sha256sums=('ea4f9ac627c136a6851ffd3763b154f21c87a58bcec4e5d5b2d07e65a403096b'
+ '7501d3fe3b2b280cf4a5cd3b5cc7b0198bd9bbeae6f960cd4d20e9c94a9310a5')
+prepare(){
+ cd ${_pkgname}-${pkgver}
+ patch --strip=1 < ../qt-option.patch
+}
build()
{
-
cmake -B build -S ${_pkgname}-${pkgver} \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=None
+ -DCMAKE_BUILD_TYPE=None -DQT6=ON
cmake --build build
}
diff --git a/qt-option.patch b/qt-option.patch
new file mode 100644
index 000000000000..bdc3cc1b91a1
--- /dev/null
+++ b/qt-option.patch
@@ -0,0 +1,16 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 034e560..218cf3d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,8 +17,9 @@ set(CMAKE_AUTOMOC ON)
+ set(CMAKE_AUTOUIC ON)
+
+ # This will find the Qt files.
+-find_package(Qt6 COMPONENTS Core Widgets Xml OpenGL OpenGLWidgets)
+-if (Qt6_FOUND)
++option(QT6 "use Qt6 instead of Qt5" ON)
++if (QT6)
++ find_package(Qt6 COMPONENTS Core Widgets Xml OpenGL OpenGLWidgets)
+ message("Building with Qt6")
+ set(QtLibs Qt::Core Qt::Widgets Qt::Xml Qt::OpenGL Qt::OpenGLWidgets)
+ else()