diff --git a/debian/changelog b/debian/changelog index 3979df7..356c938 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,9 @@ -fcitx-unikey (0.2.6-2) unstable; urgency=medium +fcitx-unikey (0.2.6-1) unstable; urgency=medium + * Team upload. + * Acknowledge previous NMU. + * New upstream release. + + Cherry-pick upstream commit to port to Qt5. * Apply "wrap-and-sort -abst". * Refresh packaging instructions. + Use GitHub as homepage. @@ -12,14 +16,6 @@ * Refresh d/copyright information. -- Boyuan Yang <073plan@gmail.com> Thu, 28 Sep 2017 16:47:19 +0800 - -fcitx-unikey (0.2.6-1) unstable; urgency=medium - - * Team upload. - * Acknowledge previous NMU. - * New upstream release. - - -- Boyuan Yang <073plan@gmail.com> Thu, 28 Sep 2017 16:27:26 +0800 fcitx-unikey (0.2.4-1.1) unstable; urgency=medium diff --git a/debian/control b/debian/control index 686b542..746f56d 100644 --- a/debian/control +++ b/debian/control @@ -11,9 +11,10 @@ fcitx-bin (>= 1:4.2.8), fcitx-libs-dev (>= 1:4.2.8), intltool, + libfcitx-qt5-dev, pkg-config, - qt4-qmake, - libqt4-dev, + qt5-qmake, + qtbase5-dev, Standards-Version: 4.1.0 Homepage: https://github.com/fcitx/fcitx-unikey Vcs-Git: https://anonscm.debian.org/git/pkg-ime/fcitx-unikey.git diff --git a/debian/patches/0001-unikey-port-editor-to-qt5.patch b/debian/patches/0001-unikey-port-editor-to-qt5.patch new file mode 100644 index 0000000..9af9dcd --- /dev/null +++ b/debian/patches/0001-unikey-port-editor-to-qt5.patch @@ -0,0 +1,137 @@ +From: Weng Xuetian +Date: Thu, 28 Sep 2017 18:31:02 -0700 +Subject: [unikey] port editor to qt5. + +Fix #20. +--- + CMakeLists.txt | 5 +++-- + macro-editor/CMakeLists.txt | 24 ++++++++---------------- + macro-editor/editor.h | 2 +- + macro-editor/macro-editor.json | 2 ++ + macro-editor/main.cpp | 3 --- + macro-editor/main.h | 3 ++- + 6 files changed, 16 insertions(+), 23 deletions(-) + create mode 100644 macro-editor/macro-editor.json + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 280330c..8b8eb11 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,9 +25,10 @@ find_package(Gettext REQUIRED) + find_package(LibIntl REQUIRED) + + if (ENABLE_QT) +-find_package(Qt4 4.8) ++find_package(Qt5 5.7 REQUIRED COMPONENTS Core Gui Widgets) ++find_package(FcitxQt5WidgetsAddons 1.1 REQUIRED) ++find_package(FcitxQt5DBusAddons 1.1 REQUIRED) + +-pkg_check_modules(FCITX_QT "fcitx-qt>=4.2.8") + endif (ENABLE_QT) + + configure_file(config.h.in config.h) +diff --git a/macro-editor/CMakeLists.txt b/macro-editor/CMakeLists.txt +index cc57ea2..71aaabd 100644 +--- a/macro-editor/CMakeLists.txt ++++ b/macro-editor/CMakeLists.txt +@@ -16,14 +16,11 @@ fcitx_translate_add_sources( + ${MACRO_EDITOR_SRCS} + ${MACRO_EDITOR_HDRS}) + +-if (NOT QT_FOUND OR NOT FCITX_QT_FOUND OR NOT ENABLE_QT) ++if (NOT ENABLE_QT) + return() +-endif (NOT QT_FOUND OR NOT FCITX_QT_FOUND OR NOT ENABLE_QT) ++endif (NOT ENABLE_QT) + + include_directories( +- ${FCITX_QT_INCLUDE_DIRS} +- ${QT_QTCORE_INCLUDE_DIR} +- ${QT_QTGUI_INCLUDE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${PROJECT_SOURCE_DIR}/unikey + ) +@@ -31,27 +28,22 @@ include_directories( + link_directories( + ${FCITX4_FCITX_UTILS_LIBRARY_DIRS} + ${FCITX4_FCITX_CONFIG_LIBRARY_DIRS} +-${FCITX_QT_LIBRARY_DIRS} + ) +-qt4_wrap_cpp(MACRO_EDITOR_MOCS ${MACRO_EDITOR_HDRS}) +-qt4_wrap_ui(MACRO_EDITOR_SRCS editor.ui dialog.ui) ++qt5_wrap_ui(MACRO_EDITOR_SRCS editor.ui dialog.ui) + add_library(fcitx-unikey-macro-editor + MODULE ${MACRO_EDITOR_SRCS} ${MACRO_EDITOR_MOCS}) + set_target_properties(fcitx-unikey-macro-editor PROPERTIES + LINK_FLAGS "-Wl,--no-undefined" ++ AUTOMOC TRUE + ) + target_link_libraries(fcitx-unikey-macro-editor +- debug ${QT_QTCORE_LIBRARY_DEBUG} +- debug ${QT_QTDBUS_LIBRARY_DEBUG} +- debug ${QT_QTGUI_LIBRARY_DEBUG} +- optimized ${QT_QTCORE_LIBRARY_RELEASE} +- optimized ${QT_QTDBUS_LIBRARY_RELEASE} +- optimized ${QT_QTGUI_LIBRARY_RELEASE} ++ Qt5::Core ++ Qt5::Widgets ++ FcitxQt5::WidgetsAddons ++ LibIntl::LibIntl + unikey + ${FCITX4_FCITX_UTILS_LIBRARIES} + ${FCITX4_FCITX_CONFIG_LIBRARIES} +- ${FCITX_QT_LIBRARIES} +- LibIntl::LibIntl + ) + + install(TARGETS fcitx-unikey-macro-editor DESTINATION ${FCITX4_ADDON_INSTALL_DIR}/qt) +diff --git a/macro-editor/editor.h b/macro-editor/editor.h +index 2426032..137e0b0 100644 +--- a/macro-editor/editor.h ++++ b/macro-editor/editor.h +@@ -17,7 +17,7 @@ + * * + ***************************************************************************/ + +-#include ++#include + + class CMacroTable; + namespace Ui { +diff --git a/macro-editor/macro-editor.json b/macro-editor/macro-editor.json +new file mode 100644 +index 0000000..2c63c08 +--- /dev/null ++++ b/macro-editor/macro-editor.json +@@ -0,0 +1,2 @@ ++{ ++} +diff --git a/macro-editor/main.cpp b/macro-editor/main.cpp +index 12b769a..890eade 100644 +--- a/macro-editor/main.cpp ++++ b/macro-editor/main.cpp +@@ -50,6 +50,3 @@ QString MacroEditorPlugin::domain() + { + return "fcitx-unikey"; + } +- +- +-Q_EXPORT_PLUGIN2 (fcitx_macro_editor, MacroEditorPlugin) +diff --git a/macro-editor/main.h b/macro-editor/main.h +index dfd06fc..e6a62c6 100644 +--- a/macro-editor/main.h ++++ b/macro-editor/main.h +@@ -20,11 +20,12 @@ + #ifndef _MAIN_H_ + #define _MAIN_H_ + +-#include ++#include + + class MacroEditorPlugin : public FcitxQtConfigUIPlugin { + Q_OBJECT + public: ++ Q_PLUGIN_METADATA(IID FcitxQtConfigUIFactoryInterface_iid FILE "macro-editor.json") + explicit MacroEditorPlugin(QObject* parent = 0); + virtual QString name(); + virtual QStringList files(); diff --git a/debian/patches/0002-unikey-remove-unused-deps.patch b/debian/patches/0002-unikey-remove-unused-deps.patch new file mode 100644 index 0000000..80fe703 --- /dev/null +++ b/debian/patches/0002-unikey-remove-unused-deps.patch @@ -0,0 +1,20 @@ +From: Weng Xuetian +Date: Thu, 28 Sep 2017 18:45:17 -0700 +Subject: [unikey] remove unused deps + +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b8eb11..eb3e5ba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,7 +27,6 @@ find_package(LibIntl REQUIRED) + if (ENABLE_QT) + find_package(Qt5 5.7 REQUIRED COMPONENTS Core Gui Widgets) + find_package(FcitxQt5WidgetsAddons 1.1 REQUIRED) +-find_package(FcitxQt5DBusAddons 1.1 REQUIRED) + + endif (ENABLE_QT) + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..424e4b4 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +0001-unikey-port-editor-to-qt5.patch +0002-unikey-remove-unused-deps.patch diff --git a/debian/rules b/debian/rules index 3482e16..0800824 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,8 @@ #export DH_VERBOSE = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export QT_SELECT := 5 + %: dh $@