diff -pruN 0.1.6-2/debian/changelog 0.1.6-2ubuntu1/debian/changelog
--- 0.1.6-2/debian/changelog	2019-04-09 17:51:06.000000000 +0000
+++ 0.1.6-2ubuntu1/debian/changelog	2024-10-17 00:01:52.000000000 +0000
@@ -1,3 +1,9 @@
+2048-qt (0.1.6-2ubuntu1) plucky; urgency=medium
+
+  * Port to Qt 6.
+
+ -- Simon Quigley <tsimonq2@ubuntu.com>  Wed, 16 Oct 2024 19:01:52 -0500
+
 2048-qt (0.1.6-2) unstable; urgency=medium
 
   * d/control:
diff -pruN 0.1.6-2/debian/compat 0.1.6-2ubuntu1/debian/compat
--- 0.1.6-2/debian/compat	2019-04-09 17:51:06.000000000 +0000
+++ 0.1.6-2ubuntu1/debian/compat	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-12
diff -pruN 0.1.6-2/debian/control 0.1.6-2ubuntu1/debian/control
--- 0.1.6-2/debian/control	2019-04-09 17:51:06.000000000 +0000
+++ 0.1.6-2ubuntu1/debian/control	2024-10-17 00:01:52.000000000 +0000
@@ -1,21 +1,23 @@
 Source: 2048-qt
 Section: games
 Priority: optional
-Maintainer: Alejandro Garrido Mota <alejandro@debian.org>
-Build-Depends: debhelper (>= 12~),
-               qtbase5-dev,
-               qtdeclarative5-dev
-Standards-Version: 4.3.0
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Alejandro Garrido Mota <alejandro@debian.org>
+Build-Depends: debhelper-compat (= 13),
+               qmake6,
+               qt6-base-dev,
+               qt6-declarative-dev
+Standards-Version: 4.7.0
 Homepage: https://github.com/xiaoyong/2048-Qt
 Vcs-Git: https://salsa.debian.org/alejandro/2048-qt.git
 Vcs-Browser: https://salsa.debian.org/alejandro/2048-qt
 
 Package: 2048-qt
 Architecture: any
-Depends: ${shlibs:Depends},
+Depends: qml6-module-qtquick-controls,
+         qml6-module-qtquick-dialogs,
          ${misc:Depends},
-         qml-module-qtquick-controls,
-         qml-module-qtquick-dialogs
+         ${shlibs:Depends}
 Description: mathematics based puzzle game
  2048 puzzle is mathematics based puzzle game where you have to slide
  tiles on a grid to combine them and create a tile with the number 2048.
diff -pruN 0.1.6-2/debian/patches/qt6-port.patch 0.1.6-2ubuntu1/debian/patches/qt6-port.patch
--- 0.1.6-2/debian/patches/qt6-port.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.1.6-2ubuntu1/debian/patches/qt6-port.patch	2024-10-17 00:00:39.000000000 +0000
@@ -0,0 +1,410 @@
+--- a/2048-qt.pro
++++ b/2048-qt.pro
+@@ -32,6 +32,6 @@ HEADERS += \
+ 
+ TRANSLATIONS = ts/2048-qt_de_DE.ts ts/2048-qt_fr_FR.ts ts/2048-qt_pl_PL.ts ts/2048-qt_ru_RU.ts ts/2048-qt_zh_CN.ts
+ 
+-VERSION = 0.1.6
++VERSION = 0.2.0
+ 
+ DEFINES += APP_VERSION=\\\"$${VERSION}\\\"
+--- a/README.md
++++ b/README.md
+@@ -37,7 +37,7 @@ All required Qt libraries have been pack
+ 
+ ### Linux
+ 
+-The Qt libraries (version >= 5.2.1) are required. Make sure that they are installed on your system.
++The Qt libraries (version >= 6) are required. Make sure that they are installed on your system.
+ 
+ ### Arch Linux
+ 
+--- a/qml/Tile.qml
++++ b/qml/Tile.qml
+@@ -1,4 +1,4 @@
+-import QtQuick 2.2
++import QtQuick
+ 
+ Rectangle {
+     id: tileContainer
+--- a/qml/main.qml
++++ b/qml/main.qml
+@@ -1,8 +1,8 @@
+-import QtQuick 2.2
+-import QtQuick.Controls 1.1
+-import QtQuick.Controls.Styles 1.1
+-import QtQuick.Dialogs 1.1
+-import QtQuick.Window 2.1
++import QtQuick
++import QtQuick.Controls
++import QtQuick.Controls.Material
++import QtQuick.Dialogs
++import QtQuick.Window
+ import "2048.js" as MyScript
+ 
+ ApplicationWindow {
+@@ -13,21 +13,25 @@ ApplicationWindow {
+     title: qsTr("2048 Game");
+ //    flags: Qt.Window | Qt.WindowTitleHint  | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint | Qt.CustomizeWindowHint
+ 
+-    ExclusiveGroup { id: labelSettingsGroup }
+-    ExclusiveGroup { id: languageSettingsGroup }
++    ButtonGroup { id: labelSettingsGroup }
++    ButtonGroup { id: languageSettingsGroup }
+ 
+-    menuBar: MenuBar {
++    MenuBar {
+         Menu {
+             title: qsTr("File")
+             MenuItem {
+-                text: qsTr("New Game")
+-                shortcut: "Ctrl+N"
+-                onTriggered: MyScript.startupFunction();
++                action: Action {
++                    text: qsTr("New Game")
++                    shortcut: "Ctrl+N"
++                    onTriggered: MyScript.startupFunction()
++                }
+             }
+             MenuItem {
+-                text: qsTr("Exit")
+-                shortcut: "Ctrl+Q"
+-                onTriggered: MyScript.cleanUpAndQuit();
++                action: Action {
++                    text: qsTr("Exit")
++                    shortcut: "Ctrl+Q"
++                    onTriggered: MyScript.cleanUpAndQuit()
++                }
+             }
+         }
+ 
+@@ -36,50 +40,54 @@ ApplicationWindow {
+             Menu {
+                 title: qsTr("Labeling")
+                 MenuItem {
+-                    text: qsTr("2048")
+-                    checkable: true
+-                    exclusiveGroup: labelSettingsGroup
+-                    checked: MyScript.label === MyScript.labelOptions[0] ? true : false
+-                    onTriggered: {
+-                        if (MyScript.label !== MyScript.labelOptions[0]) {
+-                            MyScript.label = MyScript.labelOptions[0];
+-                            MyScript.startupFunction();
++                    action: Action {
++                        text: qsTr("2048")
++                        checkable: true
++                        checked: MyScript.label === MyScript.labelOptions[0]
++                        onTriggered: {
++                            if (MyScript.label !== MyScript.labelOptions[0]) {
++                                MyScript.label = MyScript.labelOptions[0]
++                                MyScript.startupFunction()
++                            }
+                         }
+                     }
+                 }
+                 MenuItem {
+-                    text: qsTr("Degree")
+-                    checkable: true
+-                    exclusiveGroup: labelSettingsGroup
+-                    checked: MyScript.label === MyScript.labelOptions[1] ? true : false
+-                    onTriggered: {
+-                        if (MyScript.label !== MyScript.labelOptions[1]) {
+-                            MyScript.label = MyScript.labelOptions[1];
+-                            MyScript.startupFunction();
++                    action: Action {
++                        text: qsTr("Degree")
++                        checkable: true
++                        checked: MyScript.label === MyScript.labelOptions[1]
++                        onTriggered: {
++                            if (MyScript.label !== MyScript.labelOptions[1]) {
++                                MyScript.label = MyScript.labelOptions[1]
++                                MyScript.startupFunction()
++                            }
+                         }
+                     }
+                 }
+                 MenuItem {
+-                    text: qsTr("Military Rank")
+-                    checkable: true
+-                    exclusiveGroup: labelSettingsGroup
+-                    checked: MyScript.label === MyScript.labelOptions[2] ? true : false
+-                    onTriggered: {
+-                        if (MyScript.label !== MyScript.labelOptions[2]) {
+-                            MyScript.label = MyScript.labelOptions[2];
+-                            MyScript.startupFunction();
++                    action: Action {
++                        text: qsTr("Military Rank")
++                        checkable: true
++                        checked: MyScript.label === MyScript.labelOptions[2]
++                        onTriggered: {
++                            if (MyScript.label !== MyScript.labelOptions[2]) {
++                                MyScript.label = MyScript.labelOptions[2]
++                                MyScript.startupFunction()
++                            }
+                         }
+                     }
+                 }
+                 MenuItem {
+-                    text: qsTr("PRC")
+-                    checkable: true
+-                    exclusiveGroup: labelSettingsGroup
+-                    checked: MyScript.label === MyScript.labelOptions[3] ? true : false
+-                    onTriggered: {
+-                        if (MyScript.label !== MyScript.labelOptions[3]) {
+-                            MyScript.label = MyScript.labelOptions[3];
+-                            MyScript.startupFunction();
++                    action: Action {
++                        text: qsTr("PRC")
++                        checkable: true
++                        checked: MyScript.label === MyScript.labelOptions[3]
++                        onTriggered: {
++                            if (MyScript.label !== MyScript.labelOptions[3]) {
++                                MyScript.label = MyScript.labelOptions[3]
++                                MyScript.startupFunction()
++                            }
+                         }
+                     }
+                 }
+@@ -87,75 +95,80 @@ ApplicationWindow {
+             Menu {
+                 title: qsTr("Language")
+                 MenuItem {
+-                    text: "English"
+-                    checkable: true
+-                    exclusiveGroup: languageSettingsGroup
+-                    checked: settings.value("language") === "en_US" ? true : false
+-                    onTriggered: {
+-                        if (settings.value("language") !== "en_US") {
+-                            settings.setValue("language", "en_US");
+-                            changeLanguageDialog.open();
++                    action: Action {
++                        text: "English"
++                        checkable: true
++                        checked: settings.value("language") === "en_US"
++                        onTriggered: {
++                            if (settings.value("language") !== "en_US") {
++                                settings.setValue("language", "en_US")
++                                changeLanguageDialog.open()
++                            }
+                         }
+                     }
+                 }
+                 MenuItem {
+-                    text: "Français"
+-                    checkable: true
+-                    exclusiveGroup: languageSettingsGroup
+-                    checked: settings.value("language") === "fr_FR" ? true : false
+-                    onTriggered: {
+-                        if (settings.value("language") !== "fr_FR") {
+-                            settings.setValue("language", "fr_FR");
+-                            changeLanguageDialog.open();
++                    action: Action {
++                        text: "Français"
++                        checkable: true
++                        checked: settings.value("language") === "fr_FR"
++                        onTriggered: {
++                            if (settings.value("language") !== "fr_FR") {
++                                settings.setValue("language", "fr_FR")
++                                changeLanguageDialog.open()
++                            }
+                         }
+                     }
+                 }
+                 MenuItem {
+-                    text: "简体中文"
+-                    checkable: true
+-                    exclusiveGroup: languageSettingsGroup
+-                    checked: settings.value("language") === "zh_CN" ? true : false
+-                    onTriggered: {
+-                        if (settings.value("language") !== "zh_CN") {
+-                            settings.setValue("language", "zh_CN");
+-                            changeLanguageDialog.open();
++                    action: Action {
++                        text: "简体中文"
++                        checkable: true
++                        checked: settings.value("language") === "zh_CN"
++                        onTriggered: {
++                            if (settings.value("language") !== "zh_CN") {
++                                settings.setValue("language", "zh_CN")
++                                changeLanguageDialog.open()
++                            }
+                         }
+                     }
+                 }
+                 MenuItem {
+-                    text: "Polski"
+-                    checkable: true
+-                    exclusiveGroup: languageSettingsGroup
+-                    checked: settings.value("language") === "pl_PL" ? true : false
+-                    onTriggered: {
+-                        if (settings.value("language") !== "pl_PL") {
+-                            settings.setValue("language", "pl_PL");
+-                            changeLanguageDialog.open();
++                    action: Action {
++                        text: "Polski"
++                        checkable: true
++                        checked: settings.value("language") === "pl_PL"
++                        onTriggered: {
++                            if (settings.value("language") !== "pl_PL") {
++                                settings.setValue("language", "pl_PL")
++                                changeLanguageDialog.open()
++                            }
+                         }
+                     }
+                 }
+-
+                 MenuItem {
+-                    text: "Русский"
+-                    checkable: true
+-                    exclusiveGroup: languageSettingsGroup
+-                    checked: settings.value("language") === "ru_RU" ? true : false
+-                    onTriggered: {
+-                        if (settings.value("language") !== "ru_RU") {
+-                            settings.setValue("language", "ru_RU");
+-                            changeLanguageDialog.open();
++                    action: Action {
++                        text: "Русский"
++                        checkable: true
++                        checked: settings.value("language") === "ru_RU"
++                        onTriggered: {
++                            if (settings.value("language") !== "ru_RU") {
++                                settings.setValue("language", "ru_RU")
++                                changeLanguageDialog.open()
++                            }
+                         }
+                     }
+                 }
+                 MenuItem {
+-                    text: "German"
+-                    checkable: true
+-                    exclusiveGroup: languageSettingsGroup
+-                    checked: settings.value("language") == "de_DE" ?  true : false
+-                    onTriggered: {
+-                        if (settings.value("language") != "de_DE") {
+-                            settings.setValue("language", "de_DE");
+-                            changeLanguageDialog.open();
++                    action: Action {
++                        text: "German"
++                        checkable: true
++                        checked: settings.value("language") == "de_DE"
++                        onTriggered: {
++                            if (settings.value("language") != "de_DE") {
++                                settings.setValue("language", "de_DE")
++                                changeLanguageDialog.open()
++                            }
+                         }
+                     }
+                 }
+@@ -166,17 +179,20 @@ ApplicationWindow {
+             id: helpMenu
+             title: qsTr("Help")
+             MenuItem {
+-                text: qsTr("About")
+-                onTriggered: aboutDialog.open();
++                action: Action {
++                    text: qsTr("About")
++                    onTriggered: aboutDialog.open()
++                }
+             }
+             MenuItem {
+-                text: qsTr("About Qt")
+-                onTriggered: myClass.aboutQt();
++                action: Action {
++                    text: qsTr("About Qt")
++                    onTriggered: myClass.aboutQt()
++                }
+             }
+         }
+     }
+ 
+-
+     Item {
+         id: helper
+         focus: false
+@@ -296,25 +312,25 @@ ApplicationWindow {
+         }
+ 
+         Button {
+-            width: 129
+-            height: 40
++            width: 130
++            height: 50
+             y: 90
+             anchors.right: parent.right
+ 
+-            style: ButtonStyle {
+-                background: Rectangle {
+-                    color: helper.myColors.bgbutton
+-                    radius: 3
+-                    Text{
+-                        anchors.centerIn: parent
+-                        text: qsTr("New Game")
+-                        color: helper.myColors.fgbutton
+-                        font.family: localFont.name
+-                        font.pixelSize: 18
+-                        font.bold: true
+-                    }
+-                }
++            background: Rectangle {
++                color: helper.myColors.bgbutton
++                radius: 3
++            }
++
++            contentItem: Text {
++                anchors.centerIn: parent
++                text: qsTr("New Game")
++                color: helper.myColors.fgbutton
++                font.family: localFont.name
++                font.pixelSize: 18
++                font.bold: true
+             }
++
+             onClicked: MyScript.startupFunction()
+         }
+ 
+@@ -347,21 +363,21 @@ ApplicationWindow {
+             id: changeLanguageDialog
+             title: qsTr("Language Setting Hint")
+             text: qsTr("Please restart the program to make the language setting take effect.")
+-            standardButtons: StandardButton.Ok
++            buttons: MessageDialog.Ok
+         }
+ 
+         MessageDialog {
+             id: aboutDialog
+             title: qsTr("About 2048-Qt")
+             text: qsTr("<p style='font-weight: bold; font-size: 24px'>2048-Qt</p><p>Version " + settings.getVersion() + "</p><p>2015 Qiaoyong Zhong &lt;solary.sh@gmail.com&gt;</p>")
+-            standardButtons: StandardButton.Ok
++            buttons: MessageDialog.Ok
+         }
+ 
+         MessageDialog {
+             id: deadMessage
+             title: qsTr("Game Over")
+             text: qsTr("Game Over!")
+-            standardButtons: StandardButton.Retry | StandardButton.Abort
++            buttons: MessageDialog.Retry | MessageDialog.Abort
+             onAccepted: {
+                 MyScript.startupFunction();
+             }
+@@ -372,12 +388,16 @@ ApplicationWindow {
+             id: winMessage
+             title: qsTr("You Win")
+             text: qsTr("You win! Continue playing?")
+-            standardButtons: StandardButton.Yes | StandardButton.No
+-            onYes: {
+-                MyScript.checkTargetFlag = false;
++            buttons: MessageDialog.Yes | MessageDialog.No
++            onAccepted: {
++                if (winMessage.clickedButton === MessageDialog.Yes) {
++                    MyScript.checkTargetFlag = false;
++                } else if (winMessage.clickedButton === MessageDialog.No) {
++                    MyScript.startupFunction();
++                }
+                 close()
+             }
+-            onNo: MyScript.startupFunction()
++
+             onRejected: {
+                 MyScript.checkTargetFlag = false;
+                 close()
diff -pruN 0.1.6-2/debian/patches/series 0.1.6-2ubuntu1/debian/patches/series
--- 0.1.6-2/debian/patches/series	2019-04-09 17:51:06.000000000 +0000
+++ 0.1.6-2ubuntu1/debian/patches/series	2024-10-17 00:00:35.000000000 +0000
@@ -1,3 +1,4 @@
 window.patch
 FixDesktopFile.diff
 FixPathBinary.diff
+qt6-port.patch
diff -pruN 0.1.6-2/debian/rules 0.1.6-2ubuntu1/debian/rules
--- 0.1.6-2/debian/rules	2019-04-09 17:51:06.000000000 +0000
+++ 0.1.6-2ubuntu1/debian/rules	2024-10-17 00:01:52.000000000 +0000
@@ -1,6 +1,5 @@
 #!/usr/bin/make -f
-export QT_SELECT=qt5
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
-	dh $@
+	dh $@ --buildsystem=qmake6
