Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'qt5'
  • Loading branch information
mnogu committed May 4, 2012
2 parents a0dcfd8 + 2871016 commit 157ba61
Show file tree
Hide file tree
Showing 80 changed files with 3,873 additions and 1,335 deletions.
67 changes: 66 additions & 1 deletion .gitignore
@@ -1,3 +1,4 @@
*.swp

# /
/ChangeLog
Expand Down Expand Up @@ -31,7 +32,6 @@
/byeoru-data/Makefile
/byeoru-data/Makefile.in


# /doc/
/doc/Makefile.in
/doc/Makefile
Expand Down Expand Up @@ -501,6 +501,71 @@
/qt4/toolbar/uim-toolbar-qt4.pro
/qt4/toolbar/*.o

# /qt5/
/qt5/Makefile
/qt5/Makefile.in

# /qt5/candwin/
/qt5/candwin/Makefile
/qt5/candwin/Makefile.in
/qt5/candwin/Makefile.qmake
/qt5/candwin/moc_*.cpp
/qt5/candwin/uim-candwin-qt5
/qt5/candwin/uim-candwin-qt5.pro
/qt5/candwin/*.o

# /qt5/chardict/
/qt5/chardict/Makefile
/qt5/chardict/Makefile.in
/qt5/chardict/Makefile.qmake
/qt5/chardict/moc_*.cpp
/qt5/chardict/uim-chardict-qt5
/qt5/chardict/uim-chardict-qt5.pro
/qt5/chardict/*.o

# /qt5/edittest/
/qt5/edittest/Makefile
/qt5/edittest/Makefile.in
/qt5/edittest/Makefile.qmake
/qt5/edittest/edittest
/qt5/edittest/*.o

# /qt5/immodule/
/qt5/immodule/Makefile
/qt5/immodule/Makefile.in
/qt5/immodule/Makefile.qmake
/qt5/immodule/libuimplatforminputcontextplugin.so
/qt5/immodule/moc_*.cpp
/qt5/immodule/quimplatforminputcontextplugin.pro
/qt5/immodule/*.o

# /qt5/pref/
/qt5/pref/Makefile
/qt5/pref/Makefile.in
/qt5/pref/Makefile.qmake
/qt5/pref/moc_*.cpp
/qt5/pref/uim-pref-qt5
/qt5/pref/uim-pref-qt5.pro
/qt5/pref/*.o

# /qt5/switcher/
/qt5/switcher/Makefile
/qt5/switcher/Makefile.in
/qt5/switcher/Makefile.qmake
/qt5/switcher/moc_*.cpp
/qt5/switcher/uim-im-switcher-qt5
/qt5/switcher/uim-im-switcher-qt5.pro
/qt5/switcher/*.o

# /qt5/toolbar/
/qt5/toolbar/Makefile
/qt5/toolbar/Makefile.in
/qt5/toolbar/Makefile.qmake
/qt5/toolbar/moc_*.cpp
/qt5/toolbar/uim-toolbar-qt5
/qt5/toolbar/uim-toolbar-qt5.pro
/qt5/toolbar/*.o

# /replace/
/replace/.deps/
/replace/.libs/
Expand Down
3 changes: 1 addition & 2 deletions Makefile.am
Expand Up @@ -2,8 +2,7 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = m4 doc replace sigscheme uim scm test test2 \
gtk2 gtk3 qt3 notify
SUBDIRS += qt4
gtk2 gtk3 qt3 qt4 qt5 notify
SUBDIRS += xim fep emacs po pixmaps examples tables byeoru-data

EXTRA_DIST = RELNOTE ChangeLog.old ChangeLog.old.2 autogen.sh make-dist.sh \
Expand Down
103 changes: 101 additions & 2 deletions configure.ac
Expand Up @@ -36,6 +36,7 @@ AC_PATH_PROGS(MD5, md5 md5sum)
AC_PATH_PROGS(SHA1, sha1 sha1sum)
AC_PATH_PROGS(SED, sed gsed)
AX_PATH_QMAKE4
AX_PATH_QMAKE5

AM_MAINTAINER_MODE

Expand Down Expand Up @@ -1019,10 +1020,56 @@ case "$enable_qt4_qt3support" in
;;
esac

dnl *****************************
dnl *** Check for Qt5 Library ***
dnl *****************************
AC_ARG_WITH(qt5,
AC_HELP_STRING([--with-qt5],
[build qt5 helper applications
@<:@default=no@:>@]),
[
case $with_qt5 in
no)
use_qt5="no"
;;
yes|*)
use_qt5="yes"
;;
esac
],
[
use_qt5="no"
])


AC_ARG_WITH(qt5-immodule,
AC_HELP_STRING([--with-qt5-immodule],
[Build qt5-immodule extension
@<:@default=no@:>@]),
[
case $with_qt5_immodule in
no)
use_qt5_immodule="no"
;;
yes|*)
use_qt5_immodule="yes"
;;
esac
],
[
use_qt5_immodule="no"
])
if test x$use_qt5 = xyes || test x$use_qt5_immodule = xyes; then
if test -z "$QMAKE5"; then
AC_MSG_ERROR([no qmake for Qt5 found])
fi
fi

default_toolkit="gtk"
AC_ARG_ENABLE(default-toolkit,
AC_HELP_STRING([--enable-default-toolkit],
[Determine default toolkit (gtk, gtk3, qt, or qt4)
[Determine default toolkit (gtk, gtk3, qt, qt4 or qt5)
@<:@default=gtk@:>@]),
[
if test x"$enable_default_toolkit" = "xgtk" && test x"$use_gtk2" = "xyes"; then
Expand All @@ -1037,6 +1084,9 @@ AC_ARG_ENABLE(default-toolkit,
if test x"$enable_default_toolkit" = "xqt4" && test x"$use_qt4" = "xyes"; then
default_toolkit="qt4"
fi
if test x"$enable_default_toolkit" = "xqt5" && test x"$use_qt5" = "xyes"; then
default_toolkit="qt5"
fi
],
[])

Expand Down Expand Up @@ -1268,6 +1318,7 @@ AM_CONDITIONAL(DEFAULT_TOOLKIT_GTK, test x$default_toolkit = xgtk)
AM_CONDITIONAL(DEFAULT_TOOLKIT_GTK3, test x$default_toolkit = xgtk3)
AM_CONDITIONAL(DEFAULT_TOOLKIT_QT, test x$default_toolkit = xqt)
AM_CONDITIONAL(DEFAULT_TOOLKIT_QT4, test x$default_toolkit = xqt4)
AM_CONDITIONAL(DEFAULT_TOOLKIT_QT5, test x$default_toolkit = xqt5)
AM_CONDITIONAL(APPLET_GNOME, test x$use_applet_gnome = xyes)
AM_CONDITIONAL(APPLET_GNOME3, test x$use_applet_gnome3 = xyes)
AM_CONDITIONAL(UIM_FEP, test x$use_uim_fep = xyes)
Expand Down Expand Up @@ -1533,7 +1584,7 @@ if test "x$use_applet_kde4" = "xyes" && test "x$CMAKE" = "xno"; then
use_applet_kde4="no"
fi
AC_PATH_PROG(KDE4_CONFIG, [kde4-config], [no])
if test "x$use_qt4" = "xyes"; then
if test "x$use_qt4" = "xyes" || test "x$use_qt5" = "xyes"; then
if test "x$KDE4_CONFIG" != "xno"; then
KDE4_ICONDIR=`$KDE4_CONFIG --expandvars --install icon`
fi
Expand Down Expand Up @@ -1565,6 +1616,8 @@ AM_CONDITIONAL(APPLET_KDE, test x$use_applet_kde = xyes)
AM_CONDITIONAL(QT4, test x$use_qt4 = xyes)
AM_CONDITIONAL(QT4_IMMODULE, test x$use_qt4_immodule = xyes)
AM_CONDITIONAL(APPLET_KDE4, test x$use_applet_kde4 = xyes)
AM_CONDITIONAL(QT5, test x$use_qt5 = xyes)
AM_CONDITIONAL(QT5_IMMODULE, test x$use_qt5_immodule = xyes)

AC_ARG_ENABLE(pref,
AC_HELP_STRING([--enable-pref],
Expand All @@ -1588,6 +1641,9 @@ AC_ARG_ENABLE(pref,
elif test x"$default_toolkit" = "xqt4" && \
test x"$use_qt4" = "xyes"; then
use_pref="yes"
elif test x"$default_toolkit" = "xqt5" && \
test x"$use_qt5" = "xyes"; then
use_pref="yes"
else
use_pref="no"
AC_MSG_WARN([uim-pref needs Gtk+ or Qt toolkit, disabled...])
Expand All @@ -1607,6 +1663,9 @@ AC_ARG_ENABLE(pref,
elif test x"$default_toolkit" = "xqt4" && \
test x"$use_qt4" = "xyes"; then
use_pref="yes"
elif test x"$default_toolkit" = "xqt5" && \
test x"$use_qt5" = "xyes"; then
use_pref="yes"
else
use_pref="no"
AC_MSG_WARN([uim pref needs Gtk+ or Qt toolkit, disabled...])
Expand Down Expand Up @@ -1971,6 +2030,20 @@ AC_CONFIG_FILES([Makefile
qt4/toolbar/plasma-applet-uim.desktop
qt4/toolbar/uim-toolbar-qt4.pro
qt4/toolbar/Makefile
qt5/Makefile
qt5/candwin/Makefile
qt5/candwin/uim-candwin-qt5.pro
qt5/chardict/Makefile
qt5/chardict/uim-chardict-qt5.pro
qt5/edittest/Makefile
qt5/immodule/quimplatforminputcontextplugin.pro
qt5/immodule/Makefile
qt5/pref/uim-pref-qt5.pro
qt5/pref/Makefile
qt5/switcher/uim-im-switcher-qt5.pro
qt5/switcher/Makefile
qt5/toolbar/uim-toolbar-qt5.pro
qt5/toolbar/Makefile
xim/Makefile
fep/Makefile
emacs/Makefile
Expand Down Expand Up @@ -2052,6 +2125,30 @@ if test "x$use_knotify4" = xyes; then
${cmake_option} ${ac_abs_top_srcdir}/notify
cd -
fi
# Generate Makefiles for Qt5 by qmake
if test x$use_qt5 = xyes; then
if test x$use_qt5_immodule = xyes; then
qt5_immodule_option="DEFINES+=QT5_IMMODULE"
fi
${QMAKE5} -o ${ac_abs_top_builddir}/qt5/candwin/Makefile.qmake \
${ac_abs_top_builddir}/qt5/candwin/uim-candwin-qt5.pro
${QMAKE5} -o ${ac_abs_top_builddir}/qt5/chardict/Makefile.qmake \
${ac_abs_top_builddir}/qt5/chardict/uim-chardict-qt5.pro
${QMAKE5} -o ${ac_abs_top_builddir}/qt5/pref/Makefile.qmake \
${qt5_immodule_option} \
${ac_abs_top_builddir}/qt5/pref/uim-pref-qt5.pro
${QMAKE5} -o ${ac_abs_top_builddir}/qt5/switcher/Makefile.qmake \
${ac_abs_top_builddir}/qt5/switcher/uim-im-switcher-qt5.pro
${QMAKE5} -o ${ac_abs_top_builddir}/qt5/toolbar/Makefile.qmake \
${ac_abs_top_builddir}/qt5/toolbar/uim-toolbar-qt5.pro
fi
if test x$use_qt5_immodule = xyes; then
${QMAKE5} -o ${ac_abs_top_builddir}/qt5/immodule/Makefile.qmake \
${ac_abs_top_builddir}/qt5/immodule/quimplatforminputcontextplugin.pro
${QMAKE5} -o ${ac_abs_top_builddir}/qt5/edittest/Makefile.qmake \
${ac_abs_top_srcdir}/qt4/edittest/edittest.pro
fi


AC_MSG_RESULT([
Configure Result :
Expand Down Expand Up @@ -2080,6 +2177,8 @@ Configure Result :
Qt4 : ${use_qt4}
Qt4 immodule : ${use_qt4_immodule}
Qt4 Qt3Support : ${use_qt4_qt3support}
Qt5 : ${use_qt5}
Qt5 immodule : ${use_qt5_immodule}
KDE3 Applet : ${use_applet_kde}
KDE4 Applet : ${use_applet_kde4}
FEP : ${use_uim_fep}
Expand Down
1 change: 1 addition & 0 deletions m4/Makefile.am
Expand Up @@ -6,6 +6,7 @@ EXTRA_DIST = \
ax_func_sigsetjmp.m4 \
ax_lib_glibc.m4 \
ax_path_qmake4.m4 \
ax_path_qmake5.m4 \
codeset.m4 \
gettext.m4 \
glibc21.m4 \
Expand Down
39 changes: 39 additions & 0 deletions m4/ax_path_qmake5.m4
@@ -0,0 +1,39 @@
#####
#
# SYNOPSIS
#
# AX_PATH_QMAKE5
#
# DESCRIPTION
#
# Check for Qt5 version of qmake.
#
# $QMAKE5 is set to absolute name of the executable if found.
#
# COPYLEFT
#
# Copyright (c) 2007 YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
# Copyright (c) 2012 Muneyuki Noguchi <nogu.dev AT gmail.com>
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved.

AC_DEFUN([AX_PATH_QMAKE5], [
ax_guessed_qt5_dirs="/usr/lib/qt5/bin:/usr/local/lib/qt5/bin:/usr/qt5/bin:/usr/local/qt5/bin:${QT5DIR}/bin:${QTDIR}/bin"
AC_PROG_EGREP
AC_PATH_PROGS(_QMAKE5, [qmake-qt5 qmake5], [], ["$PATH:$ax_guessed_qt5_dirs"])
AC_PATH_PROGS(_QMAKE, [qmake], [], ["$PATH:$ax_guessed_qt5_dirs"])
AC_CACHE_CHECK([for Qt5 version of qmake], ax_cv_path_QMAKE5, [
ax_cv_path_QMAKE5=no
for qmake5 in ${_QMAKE5} ${_QMAKE}; do
if ($qmake5 --version 2>&1 | $EGREP -q 'Qt version 5'); then
QMAKE5="$qmake5"
ax_cv_path_QMAKE5="$qmake5"
break
fi
done
])
AC_SUBST([QMAKE5])
])
2 changes: 1 addition & 1 deletion make-dist.sh
Expand Up @@ -26,7 +26,7 @@ fi

# --without-scim since it is broken
# --without-qt
CONF_FULL_WO_MAINT="$CONF_NOWERROR --enable-debug --enable-fep --enable-emacs --enable-gnome-applet --enable-gnome3-applet --enable-kde-applet --enable-kde4-applet --enable-pref --enable-dict --enable-notify=libnotify,knotify4 --with-anthy --with-canna --with-wnn --with-sj3 --with-mana --with-prime --with-m17nlib --without-scim --with-gtk2 --with-gtk3 --without-qt --without-qt-immodule --enable-compat-scm --with-eb --with-eb-conf=$EB_CONF --with-libedit --with-qt4 --with-qt4-immodule"
CONF_FULL_WO_MAINT="$CONF_NOWERROR --enable-debug --enable-fep --enable-emacs --enable-gnome-applet --enable-gnome3-applet --enable-kde-applet --enable-kde4-applet --enable-pref --enable-dict --enable-notify=libnotify,knotify4 --with-anthy --with-canna --with-wnn --with-sj3 --with-mana --with-prime --with-m17nlib --without-scim --with-gtk2 --with-gtk3 --without-qt --without-qt-immodule --enable-compat-scm --with-eb --with-eb-conf=$EB_CONF --with-libedit --with-qt4 --with-qt4-immodule --with-qt5 --with-qt5-immodule"
CONF_FULL="$CONF_MAINT $CONF_FULL_WO_MAINT"

git submodule update --init --recursive
Expand Down
11 changes: 9 additions & 2 deletions qt4/candwin/Makefile.am
Expand Up @@ -17,5 +17,12 @@ endif
FORCE:

EXTRA_DIST = uim-candwin-qt4.pro.in \
qt4.h \
qt4.cpp
abstractcandidatewindow.h \
abstractcandidatewindow.cpp \
candidatetablewindow.h \
candidatetablewindow.cpp \
candidatewindow.h \
candidatewindow.cpp \
subwindow.h \
subwindow.cpp \
qt4.cpp

0 comments on commit 157ba61

Please sign in to comment.