zeissoctopus 发表于 2012-11-24 12:19

[PATCH] 修正 chinese/fcitx 打開 QT4 後的 QT4 倚賴報錯

本帖最后由 zeissoctopus 于 2012-11-24 12:23 编辑

如何重現報錯?
編譯 chinese/fcitx 時選用 QT4 ,在 configure 階段,便會發生以下報錯

-- checking for module 'dbus-1>=1.1.0'
--   found dbus-1, version 1.4.14
-- checking for module 'gio-2.0>=2.26'
--   found gio-2.0, version 2.28.8
-- checking for module 'gobject-introspection-1.0'
--   found gobject-introspection-1.0, version 0.10.8
CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTCORE_INCLUDE_DIR
QT_QTCORE_LIBRARY QT_QTGUI_INCLUDE_DIR QT_QTGUI_LIBRARY
QT_QTDBUS_INCLUDE_DIR QT_QTDBUS_LIBRARY QT_UIC_EXECUTABLE) (Required is at
least version "4.5")
Call Stack (most recent call first):
/usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake/Modules/FindQt4.cmake:1186 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/frontend/qt/CMakeLists.txt:2 (find_package)


-- Configuring incomplete, errors occurred!
*** Error code 1

Stop in /usr/ports/chinese/fcitx.


報錯原因:現有 Makefile 寫法,沒有關聯所需要 QT4 倚賴。

以下是 PATCH, 修正 QT4 有關倚賴
--- Makefile.orig       2012-11-24 09:33:50.000000000 +0800
+++ Makefile    2012-11-24 09:33:54.000000000 +0800
@@ -68,12 +68,11 @@
PLIST_SUB+=    GTK3="@comment "
SUB_LIST+=   GTK3_IM=xim
.endif

.if ${PORT_OPTIONS:MQT4}
-USE_QT=      yes
-USE_QT4=       gui
+USE_QT4=       qmake_build moc_build rcc_build uic_build dbus gui inputmethods
CMAKE_ARGS+=   -DENABLE_QT_IM_MODULE=ON
PLIST_SUB+=    QT4=""
.else
PLIST_SUB+=    QT4="@comment "
.endif


已向官方發了 PR
PR ports/173887

love2006 发表于 2012-11-24 20:08

没必要用qt4吧,其实一直很好的。firefox不是qt,这样可能有问题

wenheping 发表于 2012-11-25 23:28

zeissoctopus 发表于 2012-11-24 12:19 static/image/common/back.gif
如何重現報錯?
編譯 chinese/fcitx 時選用 QT4 ,在 configure 階段,便會發生以下報錯



I committed a patch to fix it just now, would you update your portstree and test it again?

wen

zeissoctopus 发表于 2012-11-26 07:46

多謝 wenheping 君。測試了打開 QT4 選項編譯 fcitx 成功。fcitx 整合在 KDE4 也很美觀。

wenheping 发表于 2012-11-26 09:17

zeissoctopus 发表于 2012-11-26 07:46 static/image/common/back.gif
多謝 wenheping 君。測試了打開 QT4 選項編譯 fcitx 成功。fcitx 整合在 KDE4 也很美觀。

原来PR是你发的 :)
页: [1]
查看完整版本: [PATCH] 修正 chinese/fcitx 打開 QT4 後的 QT4 倚賴報錯