[arch-commits] Commit in libdbusmenu-qt/repos/extra-x86_64 (3 files)

Antonio Rojas arojas at gemini.archlinux.org
Wed Nov 3 16:11:16 UTC 2021


    Date: Wednesday, November 3, 2021 @ 16:11:16
  Author: arojas
Revision: 427057

archrelease: copy trunk to extra-x86_64

Added:
  libdbusmenu-qt/repos/extra-x86_64/PKGBUILD
    (from rev 427056, libdbusmenu-qt/trunk/PKGBUILD)
  libdbusmenu-qt/repos/extra-x86_64/libdbusmenu-qt6-cmake.patch
    (from rev 427056, libdbusmenu-qt/trunk/libdbusmenu-qt6-cmake.patch)
Deleted:
  libdbusmenu-qt/repos/extra-x86_64/PKGBUILD

-----------------------------+
 PKGBUILD                    |   81 +++++++++-------
 libdbusmenu-qt6-cmake.patch |  207 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 255 insertions(+), 33 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-03 16:11:03 UTC (rev 427056)
+++ PKGBUILD	2021-11-03 16:11:16 UTC (rev 427057)
@@ -1,33 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-
-pkgbase=libdbusmenu-qt
-pkgname=(libdbusmenu-qt5)
-pkgver=0.9.3+16.04.20160218
-pkgrel=5
-pkgdesc="A library that provides a Qt implementation of the DBusMenu spec"
-arch=(x86_64)
-url="https://launchpad.net/libdbusmenu-qt"
-license=(GPL)
-makedepends=(cmake doxygen qt5-base)
-source=("http://archive.ubuntu.com/ubuntu/pool/main/libd/$pkgbase/${pkgbase}_$pkgver.orig.tar.gz")
-sha256sums=('a8e6358a31c44ccdf1bfc46c95a77a6bfc7fc1f536aadb913ed4f4405c570cf6')
-
-prepare() {
-  mkdir -p build
-}
-
-build() {
-  cd build
-  cmake ../$pkgbase-$pkgver \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    -DCMAKE_INSTALL_LIBDIR=lib
-  make
-}
-
-package_libdbusmenu-qt5() {
-  depends=(qt5-base)
-
-  cd build
-  make DESTDIR="$pkgdir" install
-}

Copied: libdbusmenu-qt/repos/extra-x86_64/PKGBUILD (from rev 427056, libdbusmenu-qt/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-11-03 16:11:16 UTC (rev 427057)
@@ -0,0 +1,48 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+
+pkgbase=libdbusmenu-qt
+pkgname=(libdbusmenu-qt5 libdbusmenu-qt6)
+pkgver=0.9.3+16.04.20160218
+pkgrel=6
+pkgdesc='A library that provides a Qt implementation of the DBusMenu spec'
+arch=(x86_64)
+url='https://github.com/desktop-app/libdbusmenu-qt'
+license=(GPL)
+makedepends=(cmake doxygen qt5-base qt6-base)
+source=(http://archive.ubuntu.com/ubuntu/pool/main/libd/$pkgbase/${pkgbase}_$pkgver.orig.tar.gz
+        https://github.com/desktop-app/libdbusmenu-qt/commit/af9fa001.patch
+        libdbusmenu-qt6-cmake.patch)
+sha256sums=('a8e6358a31c44ccdf1bfc46c95a77a6bfc7fc1f536aadb913ed4f4405c570cf6'
+            'a853330e5d1edc12b5032d6826ba6c2c1ad1eb3d43cee913c9bc4b97d6fe5561'
+            'ccd4e73afb360229eb59661257476ce5a1137d43f1bb0c30e1786f4365160ac2')
+
+prepare() {
+  patch -d $pkgbase-$pkgver -p1 < af9fa001.patch # Support Qt6
+  patch -d $pkgbase-$pkgver -p1 < libdbusmenu-qt6-cmake.patch
+  sed -e '/tests/d' -i $pkgbase-$pkgver/CMakeLists.txt # Build fails with Qt6
+}
+
+build() {
+  cmake -B build5 $pkgbase-$pkgver \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DUSE_QT5=ON
+  cmake --build build5
+
+  cmake -B build6 $pkgbase-$pkgver \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DUSE_QT6=ON
+  cmake --build build6
+}
+
+package_libdbusmenu-qt5() {
+  depends=(qt5-base)
+
+  DESTDIR="$pkgdir" cmake --install build5
+}
+
+package_libdbusmenu-qt6() {
+  depends=(qt6-base)
+
+  DESTDIR="$pkgdir" cmake --install build6
+}

Copied: libdbusmenu-qt/repos/extra-x86_64/libdbusmenu-qt6-cmake.patch (from rev 427056, libdbusmenu-qt/trunk/libdbusmenu-qt6-cmake.patch)
===================================================================
--- libdbusmenu-qt6-cmake.patch	                        (rev 0)
+++ libdbusmenu-qt6-cmake.patch	2021-11-03 16:11:16 UTC (rev 427057)
@@ -0,0 +1,207 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 72cbc45..15b3ffe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -25,7 +25,7 @@ set(dbusmenu_qt_lib_PATCH_VERSION 0)
+ set(dbusmenu_qt_lib_VERSION ${dbusmenu_qt_lib_SOVERSION}.${dbusmenu_qt_lib_API_VERSION}.${dbusmenu_qt_lib_PATCH_VERSION})
+ 
+ # Check if we want to explicitly select the Qt version to be used or autodetect
+-if (NOT USE_QT4 AND NOT USE_QT5)
++if (NOT USE_QT4 AND NOT USE_QT5 AND NOT USE_QT6)
+     # Autodetect, prefering Qt5
+     message(STATUS "Autodetecting Qt version to use")
+     find_package(Qt5Widgets QUIET)
+@@ -35,7 +35,15 @@ if (NOT USE_QT4 AND NOT USE_QT5)
+ endif()
+ 
+ # Detect for which Qt version we're building
+-if (USE_QT5)
++if (USE_QT6)
++    find_package(Qt6 REQUIRED COMPONENTS Core Widgets DBus)
++    include_directories(${Qt5Widgets_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS})
++    set(CMAKE_AUTOMOC ON)
++    set(CMAKE_AUTOMOC_RELAXED_MODE ON)
++    set(CMAKE_POSITION_INDEPENDENT_CODE ON)
++
++    set(QT_SUFFIX "qt6")
++elseif (USE_QT5)
+     find_package(Qt5Widgets REQUIRED)
+     find_package(Qt5DBus REQUIRED)
+     include_directories(${Qt5Widgets_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS})
+@@ -69,9 +77,9 @@ if (__DBUSMENU_HAVE_W_OVERLOADED_VIRTUAL)
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual")
+ endif (__DBUSMENU_HAVE_W_OVERLOADED_VIRTUAL)
+ 
+-check_cxx_compiler_flag(-std=c++11 __DBUSMENU_HAVE_CXX11)
++check_cxx_compiler_flag(-std=c++17 __DBUSMENU_HAVE_CXX11)
+ if (__DBUSMENU_HAVE_CXX11)
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+ endif (__DBUSMENU_HAVE_CXX11)
+ 
+ include(CMakePackageConfigHelpers)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 2c4a4e8..e99d24a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -21,20 +21,23 @@ if (__DBUSMENU_HAVE_W_ALL)
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+ endif (__DBUSMENU_HAVE_W_ALL)
+ 
+-check_cxx_compiler_flag(-std=c++11 __DBUSMENU_HAVE_CXX11)
++check_cxx_compiler_flag(-std=c++17 __DBUSMENU_HAVE_CXX11)
+ if (__DBUSMENU_HAVE_CXX11)
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+ endif (__DBUSMENU_HAVE_CXX11)
+ 
+ # Check whether QIcon::name() exists. It was added in late Qt 4.7 cycle, and is
+ # not present in betas.
+ 
+-if (NOT USE_QT5)
++if (NOT USE_QT5 AND NOT USE_QT6)
+     set(CMAKE_REQUIRED_INCLUDES "${QT_INCLUDE_DIR}")
+     set(CMAKE_REQUIRED_LIBRARIES "${QT_QTGUI_LIBRARIES};${QT_QTCORE_LIBRARIES}")
+-else()
++elseif(USE_QT5)
+     set(CMAKE_REQUIRED_INCLUDES "${Qt5Gui_INCLUDE_DIRS};${Qt5Core_INCLUDE_DIRS}")
+     set(CMAKE_REQUIRED_LIBRARIES "${Qt5Gui_LIBRARIES};${Qt5Core_LIBRARIES}")
++else()
++    set(CMAKE_REQUIRED_INCLUDES "${Qt6Gui_INCLUDE_DIRS};${Qt6Core_INCLUDE_DIRS}")
++    set(CMAKE_REQUIRED_LIBRARIES "${Qt6Gui_LIBRARIES};${Qt6Core_LIBRARIES}")
+ endif()
+ check_cxx_source_compiles("
+ #include <QtGui/QIcon>
+@@ -64,17 +67,22 @@ include_directories(
+     ${CMAKE_BINARY_DIR}/src
+     )
+ 
+-if (NOT USE_QT5)
++if (NOT USE_QT5 AND NOT USE_QT6)
+     qt4_automoc(${dbusmenu_qt_SRCS})
+     qt4_add_dbus_adaptor(dbusmenu_qt_SRCS
+         ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.dbusmenu.xml
+         ${CMAKE_CURRENT_SOURCE_DIR}/dbusmenuexporterdbus_p.h DBusMenuExporterDBus
+         )
+-else()
++elseif(USE_QT5)
+     qt5_add_dbus_adaptor(dbusmenu_qt_SRCS
+         ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.dbusmenu.xml
+         ${CMAKE_CURRENT_SOURCE_DIR}/dbusmenuexporterdbus_p.h DBusMenuExporterDBus
+         )
++else()
++    qt6_add_dbus_adaptor(dbusmenu_qt_SRCS
++        ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.dbusmenu.xml
++        ${CMAKE_CURRENT_SOURCE_DIR}/dbusmenuexporterdbus_p.h DBusMenuExporterDBus
++        )
+ endif()
+ 
+ configure_file(dbusmenu_version.h.in
+@@ -88,7 +96,7 @@ set_target_properties(dbusmenu-${QT_SUFFIX} PROPERTIES
+     )
+ 
+ 
+-if (NOT USE_QT5)
++if (NOT USE_QT5 AND NOT USE_QT6)
+     target_link_libraries(dbusmenu-${QT_SUFFIX}
+         ${QT_QTGUI_LIBRARIES}
+         ${QT_QTDBUS_LIBRARIES}
+@@ -96,10 +104,10 @@ if (NOT USE_QT5)
+         )
+ else()
+     target_link_libraries(dbusmenu-${QT_SUFFIX}
+-        ${Qt5Gui_LIBRARIES}
+-        ${Qt5Core_LIBRARIES}
+-        ${Qt5DBus_LIBRARIES}
+-        ${Qt5Widgets_LIBRARIES}
++        Qt::Gui
++        Qt::Core
++        Qt::DBus
++        Qt::Widgets
+         )
+ endif()
+ 
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 6be27f5..4f21cb7 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,9 +1,9 @@
+-if (NOT USE_QT5)
++if (NOT USE_QT5 AND NOT USE_QT6)
+     qt4_automoc(slowmenu.cpp)
+ endif()
+ add_executable(slowmenu slowmenu.cpp)
+ 
+-if (NOT USE_QT5)
++if (NOT USE_QT5 AND NOT USE_QT6)
+     target_link_libraries(slowmenu
+         ${QT_QTGUI_LIBRARIES}
+         ${QT_QTDBUS_LIBRARIES}
+@@ -26,7 +26,7 @@ if (NOT USE_QT5)
+         ${QT_QTTEST_INCLUDE_DIR}
+         ${QT_QTDBUS_INCLUDE_DIR}
+         )
+-else()
++elseif(USE_QT5)
+     find_package(Qt5Test REQUIRED)
+ 
+     target_link_libraries(slowmenu
+@@ -51,6 +51,31 @@ else()
+         ${Qt5Test_INCLUDE_DIRS}
+         ${Qt5DBus_INCLUDE_DIRS}
+         )
++else()
++    find_package(Qt6Test REQUIRED)
++
++    target_link_libraries(slowmenu
++        ${Qt6Gui_LIBRARIES}
++        ${Qt6Core_LIBRARIES}
++        ${Qt6DBus_LIBRARIES}
++        dbusmenu-qt6
++    )
++
++    set(test_LIBRARIES
++        ${Qt6Gui_LIBRARIES}
++        ${Qt6Core_LIBRARIES}
++        ${Qt6DBus_LIBRARIES}
++        ${Qt6Test_LIBRARIES}
++        dbusmenu-qt6
++    )
++
++    include_directories(
++        ${CMAKE_CURRENT_SOURCE_DIR}/../src
++        ${CMAKE_CURRENT_BINARY_DIR}/../src
++        ${CMAKE_CURRENT_BINARY_DIR}
++        ${Qt6Test_INCLUDE_DIRS}
++        ${Qt6DBus_INCLUDE_DIRS}
++        )
+ endif()
+ 
+ # Macros to create "check" target
+@@ -77,7 +102,7 @@ set(dbusmenuexportertest_SRCS
+     testutils.cpp
+     )
+ 
+-if (NOT USE_QT5)
++if (NOT USE_QT5 AND NOT USE_QT6)
+     qt4_automoc(${dbusmenuexportertest_SRCS})
+ endif()
+ 
+@@ -94,7 +119,7 @@ set(dbusmenuimportertest_SRCS
+     testutils.cpp
+     )
+ 
+-if (NOT USE_QT5)
++if (NOT USE_QT5 AND NOT USE_QT6)
+     qt4_automoc(${dbusmenuimportertest_SRCS})
+ endif()
+ 
+@@ -110,7 +135,7 @@ set(dbusmenushortcuttest_SRCS
+     dbusmenushortcuttest.cpp
+     )
+ 
+-if (NOT USE_QT5)
++if (NOT USE_QT5 AND NOT USE_QT6)
+     qt4_automoc(${dbusmenushortcuttest_SRCS})
+ endif()
+ 



More information about the arch-commits mailing list