Date: Tuesday, April 20, 2021 @ 19:58:37
  Author: arojas
Revision: 920355

Update to 1.2, switch to cmake

Added:
  qt5ct/trunk/qt5ct-datadir.patch
Modified:
  qt5ct/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   25 +++++++++++++++----------
 qt5ct-datadir.patch |   14 ++++++++++++++
 2 files changed, 29 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2021-04-20 19:58:19 UTC (rev 920354)
+++ PKGBUILD    2021-04-20 19:58:37 UTC (rev 920355)
@@ -3,7 +3,7 @@
 # Contributor: Zatherz <zatherz at linux dot pl>
 
 pkgname=qt5ct
-pkgver=1.1
+pkgver=1.2
 pkgrel=1
 pkgdesc="Qt5 Configuration Utility"
 arch=(x86_64)
@@ -10,20 +10,25 @@
 url="https://qt5ct.sourceforge.io/";
 license=(BSD)
 depends=(qt5-svg)
-makedepends=(qt5-tools)
-source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.bz2";)
-sha256sums=('af77c4dbf7f9ba97fe0218648167395bca7bcb2b9c1886a9c98b1e343127ddd2')
+makedepends=(cmake qt5-tools)
+source=(https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.bz2
+        qt5ct-datadir.patch)
+sha256sums=('1de3f06e6d5d0746bf19a949e56cc04b53bdbc18294f38cb20759f35006b872e'
+            '58422b0fff7de20ba45744d0a7610da5685142daf5db12414d3fed8fd91b152f')
 
+prepare() {
+  patch -d $pkgname-$pkgver -p1 < qt5ct-datadir.patch # Fix data install dir
+}
+
 build() {
-  cd $pkgname-$pkgver
-  qmake-qt5 $pkgname.pro 
-  make
+  cmake -B build -S $pkgname-$pkgver \
+    -DCMAKE_INSTALL_PREFIX=/usr
+  cmake --build build
 }
 
 package() {
-  cd $pkgname-$pkgver
-  make INSTALL_ROOT="$pkgdir" install
+  DESTDIR="$pkgdir" cmake --install build
 
-  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  install -Dm644 $pkgname-$pkgver/COPYING 
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 } 
 

Added: qt5ct-datadir.patch
===================================================================
--- qt5ct-datadir.patch                         (rev 0)
+++ qt5ct-datadir.patch 2021-04-20 19:58:37 UTC (rev 920355)
@@ -0,0 +1,14 @@
+diff -ru qt5ct-1.2/CMakeLists.txt qt5ct-1.2.orig/CMakeLists.txt
+--- qt5ct-1.2.orig/CMakeLists.txt      2021-04-20 21:29:54.000000000 +0200
++++ qt5ct-1.2/CMakeLists.txt   2021-04-20 21:53:46.049860142 +0200
+@@ -54,8 +54,8 @@
+ add_subdirectory(src/qt5ct-qtplugin)
+ add_subdirectory(src/qt5ct-style)
+ 
+-install(DIRECTORY qss DESTINATION ${CMAKE_INSTALL_DATADIR})
+-install(DIRECTORY colors DESTINATION ${CMAKE_INSTALL_DATADIR})
++install(DIRECTORY qss DESTINATION ${CMAKE_INSTALL_DATADIR}/qt5ct)
++install(DIRECTORY colors DESTINATION ${CMAKE_INSTALL_DATADIR}/qt5ct)
+ 
+ if(UNIX)
+     add_custom_target(distclean @echo cleaning for source distribution)

Reply via email to