pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/wm/obconf-qt
Module Name: pkgsrc
Committed By: pin
Date: Sun Aug 18 07:44:24 UTC 2024
Modified Files:
pkgsrc/wm/obconf-qt: Makefile distinfo
Added Files:
pkgsrc/wm/obconf-qt/patches: patch-CMakeLists.txt
patch-src_CMakeLists.txt patch-src_desktops.cpp patch-src_dock.cpp
patch-src_margins.cpp patch-src_mouse.cpp patch-src_moveresize.cpp
patch-src_obconf-qt.cpp patch-src_tree.cpp patch-src_windows.cpp
Log Message:
wm/obconf-qt: port to Qt6
Fix build with Qt6 using:
https://github.com/lxqt/obconf-qt/pull/230
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 pkgsrc/wm/obconf-qt/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/wm/obconf-qt/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/wm/obconf-qt/patches/patch-CMakeLists.txt \
pkgsrc/wm/obconf-qt/patches/patch-src_CMakeLists.txt \
pkgsrc/wm/obconf-qt/patches/patch-src_desktops.cpp \
pkgsrc/wm/obconf-qt/patches/patch-src_dock.cpp \
pkgsrc/wm/obconf-qt/patches/patch-src_margins.cpp \
pkgsrc/wm/obconf-qt/patches/patch-src_mouse.cpp \
pkgsrc/wm/obconf-qt/patches/patch-src_moveresize.cpp \
pkgsrc/wm/obconf-qt/patches/patch-src_obconf-qt.cpp \
pkgsrc/wm/obconf-qt/patches/patch-src_tree.cpp \
pkgsrc/wm/obconf-qt/patches/patch-src_windows.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/wm/obconf-qt/Makefile
diff -u pkgsrc/wm/obconf-qt/Makefile:1.31 pkgsrc/wm/obconf-qt/Makefile:1.32
--- pkgsrc/wm/obconf-qt/Makefile:1.31 Wed May 29 16:34:46 2024
+++ pkgsrc/wm/obconf-qt/Makefile Sun Aug 18 07:44:23 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.31 2024/05/29 16:34:46 adam Exp $
+# $NetBSD: Makefile,v 1.32 2024/08/18 07:44:23 pin Exp $
DISTNAME= obconf-qt-0.16.4
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= wm
MASTER_SITES= ${MASTER_SITE_GITHUB:=lxqt/}
GITHUB_RELEASE= ${PKGVERSION_NOREV}
@@ -16,19 +16,13 @@ USE_CMAKE= yes
USE_TOOLS+= pkg-config perl
USE_LANGUAGES= c c++
-CONFIGURE_DIRS= build
-CMAKE_ARG_PATH= ..
+CMAKE_ARGS+= -DCMAKE_PREFIX_PATH:PATH=${PREFIX}/qt6
-CMAKE_ARGS+= -DCMAKE_PREFIX_PATH:PATH=${PREFIX}/qt5
+TOOL_DEPENDS+= lxqt-build-tools>=2.0.0:../../devel/lxqt-build-tools
+TOOL_DEPENDS+= qt6-qttools-[0-9]*:../../devel/qt6-qttools
-pre-configure:
- ${MKDIR} -p ${WRKSRC}/build
-
-TOOL_DEPENDS+= lxqt-build-tools>=0.9:../../devel/lxqt-build-tools
-TOOL_DEPENDS+= qt5-qttools-[0-9]*:../../x11/qt5-qttools
-
-.include "../../x11/qt5-qtx11extras/buildlink3.mk"
-.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../x11/qt6-qtbase/buildlink3.mk"
.include "../../wm/openbox/buildlink3.mk"
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/wm/obconf-qt/distinfo
diff -u pkgsrc/wm/obconf-qt/distinfo:1.9 pkgsrc/wm/obconf-qt/distinfo:1.10
--- pkgsrc/wm/obconf-qt/distinfo:1.9 Tue Feb 6 02:30:52 2024
+++ pkgsrc/wm/obconf-qt/distinfo Sun Aug 18 07:44:23 2024
@@ -1,5 +1,15 @@
-$NetBSD: distinfo,v 1.9 2024/02/06 02:30:52 gutteridge Exp $
+$NetBSD: distinfo,v 1.10 2024/08/18 07:44:23 pin Exp $
BLAKE2s (obconf-qt-0.16.4.tar.xz) = 9a84c9001d75ddd9f5d8503287dfb46113f2e69fee51078158c6a51acfca74f8
SHA512 (obconf-qt-0.16.4.tar.xz) = 4f75a5275e14cd7e8f0abc1bfcd40b4d860d613bc37c06c0e68d6f622ed126dce2fea98b5dd8e629b5de472ab5e668a5b0af7f6621d09fcb0b2287a11b0fb662
Size (obconf-qt-0.16.4.tar.xz) = 118780 bytes
+SHA1 (patch-CMakeLists.txt) = 2cc9ba4c9c8bdfd85cbf8831284313e1799b07ef
+SHA1 (patch-src_CMakeLists.txt) = 51852e8bd7a9984a380ca57704e5ae6ee98b48a8
+SHA1 (patch-src_desktops.cpp) = f92c518008645d91494c74d3a63130c1a4a3aa45
+SHA1 (patch-src_dock.cpp) = 5e41b80dc0c0a85be9c60200693fc76ae1cb8dc9
+SHA1 (patch-src_margins.cpp) = bfdcf63b9965f2cb3acdfbb5dbb102372e207086
+SHA1 (patch-src_mouse.cpp) = 898b82fee81e666b7f901097bfb740a491b50455
+SHA1 (patch-src_moveresize.cpp) = ac2a3725ff25f98d9e24fef0b68a96fdbae7d2b4
+SHA1 (patch-src_obconf-qt.cpp) = 86c283ef92bdf4abb0b14a6d7db84fab8068a3a5
+SHA1 (patch-src_tree.cpp) = 687aed57bac907a34db59af748464e27941357c7
+SHA1 (patch-src_windows.cpp) = 2eba8627f4cae786f8e7e15d2ea7329d1233f2dc
Added files:
Index: pkgsrc/wm/obconf-qt/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-CMakeLists.txt:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-CMakeLists.txt Sun Aug 18 07:44:23 2024
@@ -0,0 +1,33 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- CMakeLists.txt.orig 2024-01-14 11:02:54.000000000 +0000
++++ CMakeLists.txt
+@@ -13,8 +13,8 @@ include(GNUInstallDirs)
+
+ # Minimum Versions
+ set(GLIB_MINIMUM_VERSION "2.50.0")
+-set(LXQTBT_MINIMUM_VERSION "0.8.0")
+-set(QT_MINIMUM_VERSION "5.12.0")
++set(LXQTBT_MINIMUM_VERSION "2.0.0")
++set(QT_MINIMUM_VERSION "6.6.0")
+
+ set(OBCONFQT_MAJOR_VERSION 0)
+ set(OBCONFQT_MINOR_VERSION 16)
+@@ -26,12 +26,11 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+ set(CMAKE_AUTOMOC ON)
+
+-find_package(Qt5Widgets ${QT_MINIMUM_VERSION} REQUIRED)
+-find_package(Qt5X11Extras ${QT_MINIMUM_VERSION} REQUIRED)
+-find_package(Qt5LinguistTools ${QT_MINIMUM_VERSION} REQUIRED)
++find_package(Qt6Widgets ${QT_MINIMUM_VERSION} REQUIRED)
++find_package(Qt6LinguistTools ${QT_MINIMUM_VERSION} REQUIRED)
+ message(STATUS "Building with Qt${Qt5Core_VERSION}")
+
+-find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
++find_package(lxqt2-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
+
+ find_package(GLIB ${GLIB_MINIMUM_VERSION} REQUIRED)
+
Index: pkgsrc/wm/obconf-qt/patches/patch-src_CMakeLists.txt
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-src_CMakeLists.txt:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-src_CMakeLists.txt Sun Aug 18 07:44:23 2024
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_CMakeLists.txt,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- src/CMakeLists.txt.orig 2024-01-14 11:02:54.000000000 +0000
++++ src/CMakeLists.txt
+@@ -2,7 +2,7 @@
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_KEYWORDS")
+
+ set(QTX_INCLUDE_DIRS "")
+-set(QTX_LIBRARIES Qt5::Widgets Qt5::X11Extras)
++set(QTX_LIBRARIES Qt6::Widgets)
+
+ include_directories(
+ ${QTX_INCLUDE_DIRS}
+@@ -31,7 +31,7 @@ set(obconf-qt_UIS
+ obconf.ui
+ )
+
+-qt5_wrap_ui(obconf-qt_UI_H ${obconf-qt_UIS})
++qt6_wrap_ui(obconf-qt_UI_H ${obconf-qt_UIS})
+
+ set_property(SOURCE ${obconf-qt_UI_H} PROPERTY SKIP_AUTOMOC ON)
+
Index: pkgsrc/wm/obconf-qt/patches/patch-src_desktops.cpp
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-src_desktops.cpp:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-src_desktops.cpp Sun Aug 18 07:44:23 2024
@@ -0,0 +1,63 @@
+$NetBSD: patch-src_desktops.cpp,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- src/desktops.cpp.orig 2024-01-14 11:02:54.000000000 +0000
++++ src/desktops.cpp
+@@ -20,11 +20,11 @@
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
++#include <QApplication>
+ #include "maindialog.h"
+ #include <obrender/render.h>
+ #include "tree.h"
+
+-#include <QX11Info>
+ #include <X11/Xlib.h>
+
+ using namespace Obconf;
+@@ -123,26 +123,37 @@ void MainDialog::desktops_write_names()
+ }
+
+ tree_apply();
++
++ auto x11NativeInterface = qApp->nativeInterface<QNativeInterface::QX11Application>();
++ auto display = x11NativeInterface->display();
++ auto appRootWindow = XDefaultRootWindow(x11NativeInterface->display());
++
+ /* make openbox re-set the property */
+- XDeleteProperty(QX11Info::display(), QX11Info::appRootWindow(),
+- XInternAtom(QX11Info::display(), "_NET_DESKTOP_NAMES", False));
++ XDeleteProperty(display, appRootWindow,
++ XInternAtom(display, "_NET_DESKTOP_NAMES", False));
+ }
+
+ void MainDialog::desktops_write_number() {
++
++ auto x11NativeInterface = qApp->nativeInterface<QNativeInterface::QX11Application>();
++ auto display = x11NativeInterface->display();
++ auto appRootWindow = XDefaultRootWindow(x11NativeInterface->display());
++
+ XEvent ce;
+ tree_set_int("desktops/number", num_desktops);
+ ce.xclient.type = ClientMessage;
+ ce.xclient.message_type =
+- XInternAtom(QX11Info::display(), "_NET_NUMBER_OF_DESKTOPS", False);
+- ce.xclient.display = QX11Info::display();
+- ce.xclient.window = QX11Info::appRootWindow();
++ XInternAtom(display, "_NET_NUMBER_OF_DESKTOPS", False);
++ ce.xclient.display = display;
++ ce.xclient.window = appRootWindow;
+ ce.xclient.format = 32;
+ ce.xclient.data.l[0] = num_desktops;
+ ce.xclient.data.l[1] = 0;
+ ce.xclient.data.l[2] = 0;
+ ce.xclient.data.l[3] = 0;
+ ce.xclient.data.l[4] = 0;
+- XSendEvent(QX11Info::display(), QX11Info::appRootWindow(), FALSE,
++
++ XSendEvent(display, appRootWindow, FALSE,
+ SubstructureNotifyMask | SubstructureRedirectMask,
+ &ce);
+ }
Index: pkgsrc/wm/obconf-qt/patches/patch-src_dock.cpp
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-src_dock.cpp:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-src_dock.cpp Sun Aug 18 07:44:23 2024
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_dock.cpp,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- src/dock.cpp.orig 2024-01-14 11:02:54.000000000 +0000
++++ src/dock.cpp
+@@ -24,7 +24,6 @@
+ #include <obrender/render.h>
+ #include "tree.h"
+
+-#include <QX11Info>
+ // FIXME: how to support XCB or Wayland?
+ #include <X11/Xlib.h>
+
Index: pkgsrc/wm/obconf-qt/patches/patch-src_margins.cpp
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-src_margins.cpp:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-src_margins.cpp Sun Aug 18 07:44:23 2024
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_margins.cpp,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- src/margins.cpp.orig 2024-01-14 11:02:54.000000000 +0000
++++ src/margins.cpp
+@@ -24,7 +24,6 @@
+ #include <obrender/render.h>
+ #include "tree.h"
+
+-#include <QX11Info>
+ // FIXME: how to support XCB or Wayland?
+ #include <X11/Xlib.h>
+
Index: pkgsrc/wm/obconf-qt/patches/patch-src_mouse.cpp
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-src_mouse.cpp:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-src_mouse.cpp Sun Aug 18 07:44:23 2024
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_mouse.cpp,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- src/mouse.cpp.orig 2024-01-14 11:02:54.000000000 +0000
++++ src/mouse.cpp
+@@ -24,7 +24,6 @@
+ #include <obrender/render.h>
+ #include "tree.h"
+
+-#include <QX11Info>
+ // FIXME: how to support XCB or Wayland?
+ #include <X11/Xlib.h>
+
Index: pkgsrc/wm/obconf-qt/patches/patch-src_moveresize.cpp
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-src_moveresize.cpp:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-src_moveresize.cpp Sun Aug 18 07:44:23 2024
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_moveresize.cpp,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- src/moveresize.cpp.orig 2024-01-14 11:02:54.000000000 +0000
++++ src/moveresize.cpp
+@@ -24,7 +24,6 @@
+ #include <obrender/render.h>
+ #include "tree.h"
+
+-#include <QX11Info>
+ // FIXME: how to support XCB or Wayland?
+ #include <X11/Xlib.h>
+
Index: pkgsrc/wm/obconf-qt/patches/patch-src_obconf-qt.cpp
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-src_obconf-qt.cpp:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-src_obconf-qt.cpp Sun Aug 18 07:44:23 2024
@@ -0,0 +1,81 @@
+$NetBSD: patch-src_obconf-qt.cpp,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- src/obconf-qt.cpp.orig 2024-01-14 11:02:54.000000000 +0000
++++ src/obconf-qt.cpp
+@@ -24,7 +24,6 @@
+ #include <QTranslator>
+ #include <QLibraryInfo>
+ #include <QLocale>
+-#include <QX11Info>
+ #include <QMessageBox>
+ #include "maindialog.h"
+ #include <X11/Xlib.h>
+@@ -124,7 +123,8 @@ static gboolean get_all(Window win, Atom
+ gint ret_size;
+ gulong ret_items, bytes_left;
+
+- res = XGetWindowProperty(QX11Info::display(), win, prop, 0l, G_MAXLONG,
++ auto display = qApp->nativeInterface<QNativeInterface::QX11Application>()->display();
++ res = XGetWindowProperty(display, win, prop, 0l, G_MAXLONG,
+ FALSE, type, &ret_type, &ret_size,
+ &ret_items, &bytes_left, &xdata);
+
+@@ -163,7 +163,8 @@ static gboolean prop_get_string_utf8(Win
+ gchar* str;
+ guint num;
+
+- if(get_all(win, prop, XInternAtom(QX11Info::display(), "UTF8_STRING", 0), 8, (guchar**)&raw, &num)) {
++ auto display = qApp->nativeInterface<QNativeInterface::QX11Application>()->display();
++ if(get_all(win, prop, XInternAtom(display, "UTF8_STRING", 0), 8, (guchar**)&raw, &num)) {
+ str = g_strndup(raw, num); /* grab the first string from the list */
+ g_free(raw);
+
+@@ -180,18 +181,19 @@ static gboolean prop_get_string_utf8(Win
+
+ int main(int argc, char** argv) {
+ QApplication app(argc, argv);
+- app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
+
+ // load translations
+ QTranslator qtTranslator, translator;
+
+ // install the translations built-into Qt itself
+- qtTranslator.load(QStringLiteral("qt_") + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+- app.installTranslator(&qtTranslator);
++ if(qtTranslator.load(QStringLiteral("qt_") + QLocale::system().name(), QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
++ app.installTranslator(&qtTranslator);
++ }
+
+ // install our own tranlations
+- translator.load(QStringLiteral("obconf-qt_") + QLocale::system().name(), QStringLiteral(PACKAGE_DATA_DIR) + QStringLiteral("/translations"));
+- app.installTranslator(&translator);
++ if(translator.load(QStringLiteral("obconf-qt_") + QLocale::system().name(), QStringLiteral(PACKAGE_DATA_DIR) + QStringLiteral("/translations"))) {
++ app.installTranslator(&translator);
++ }
+
+ // load configurations
+
+@@ -204,12 +206,17 @@ int main(int argc, char** argv) {
+
+ paths = obt_paths_new();
+ parse_i = obt_xml_instance_new();
+- int screen = QX11Info::appScreen();
+- rrinst = RrInstanceNew(QX11Info::display(), screen);
++
++ auto x11NativeInterface = qApp->nativeInterface<QNativeInterface::QX11Application>();
++ auto display = x11NativeInterface->display();
++ auto appRootWindow = XDefaultRootWindow(x11NativeInterface->display());
++
++ int screen = DefaultScreen(display);
++ rrinst = RrInstanceNew(display, screen);
+ if(!obc_config_file) {
+ gchar* p;
+- if(prop_get_string_utf8(QX11Info::appRootWindow(screen),
+- XInternAtom(QX11Info::display(), "_OB_CONFIG_FILE", 0), &p)) {
++ if(prop_get_string_utf8(appRootWindow,
++ XInternAtom(display, "_OB_CONFIG_FILE", 0), &p)) {
+ obc_config_file = g_filename_from_utf8(p, -1, NULL, NULL, NULL);
+ g_free(p);
+ }
Index: pkgsrc/wm/obconf-qt/patches/patch-src_tree.cpp
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-src_tree.cpp:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-src_tree.cpp Sun Aug 18 07:44:23 2024
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_tree.cpp,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- src/tree.cpp.orig 2024-01-14 11:02:54.000000000 +0000
++++ src/tree.cpp
+@@ -16,7 +16,7 @@
+ See the COPYING file for a copy of the GNU General Public License.
+ */
+
+-#include <QX11Info>
++#include <QApplication>
+ #include <QMessageBox>
+
+ #include "tree.h"
+@@ -115,12 +115,16 @@ void tree_apply()
+ g_free(p);
+
+ if (!err) {
++ auto x11NativeInterface = qApp->nativeInterface<QNativeInterface::QX11Application>();
++ auto display = x11NativeInterface->display();
++ auto appRootWindow = XDefaultRootWindow(x11NativeInterface->display());
++
+ XEvent ce;
+
+ ce.xclient.type = ClientMessage;
+- ce.xclient.display = QX11Info::display();
++ ce.xclient.display = display;
+ ce.xclient.message_type = XInternAtom(ce.xclient.display, "_OB_CONTROL", false);
+- Window root = QX11Info::appRootWindow();
++ Window root = appRootWindow;
+ ce.xclient.window = root;
+ ce.xclient.format = 32;
+ ce.xclient.data.l[0] = 1; /* reconfigure */
Index: pkgsrc/wm/obconf-qt/patches/patch-src_windows.cpp
diff -u /dev/null pkgsrc/wm/obconf-qt/patches/patch-src_windows.cpp:1.1
--- /dev/null Sun Aug 18 07:44:24 2024
+++ pkgsrc/wm/obconf-qt/patches/patch-src_windows.cpp Sun Aug 18 07:44:23 2024
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_windows.cpp,v 1.1 2024/08/18 07:44:23 pin Exp $
+
+Port to Qt6.
+
+--- src/windows.cpp.orig 2024-01-14 11:02:54.000000000 +0000
++++ src/windows.cpp
+@@ -24,7 +24,6 @@
+ #include <obrender/render.h>
+ #include "tree.h"
+
+-#include <QX11Info>
+ // FIXME: how to support XCB or Wayland?
+ #include <X11/Xlib.h>
+
Home |
Main Index |
Thread Index |
Old Index