--- configure.orig 2019-09-05 05:24:10 UTC +++ configure @@ -1,4 +1,4 @@ -##!/bin/bash +#!/bin/sh if [ "$1" = "-h" -o "$1" = "--help" -o "$1" = "-help" ]; then @@ -16,7 +16,7 @@ if [ "$1" = "-h" -o "$1" = "--help" -o "$1" = "-help" echo " --use_qt5=N : disable Qt5 immodule" echo " --use_gtk3=N : disable GTK+ 3.x immodule" echo " --gcinlibdir=dir : runtime path of gcin's *.so" - echo " --doc_version_dir=N : doc path use /usr/share/doc/gcin instead of /doc/gcin-x.x.x" + echo " --doc_version_dir=N : doc path use $prefix/share/doc/gcin instead of /doc/gcin-x.x.x" exit fi @@ -232,7 +232,7 @@ fi QT4_IM='N' -QT4_IM_DIR=/usr/$LIB/qt4/plugins/inputmethods +QT4_IM_DIR=$prefix/$LIB/qt4/plugins/inputmethods echo "testing if you have qt4 support" pkg-config --libs QtCore QtGui > /dev/null 2> /dev/null if [ $? = 0 ]; then @@ -291,7 +291,7 @@ fi bindir=$prefix/bin datadir=$prefix/share -mandir=$datadir/man +mandir=$prefix/man libdir=$prefix/$LIB includedir=$prefix/include optdir=/opt @@ -306,9 +306,9 @@ if [ $QT_IM = 'N' ]; then mv gcin.spec gcin.spec.tmp grep -v qt3/plugins/inputmethods gcin.spec.tmp > gcin.spec else - for i in /usr/share/qt/bin/moc /usr/lib/qt/bin/moc /usr/lib64/qt/bin/moc /usr/lib/qt3/bin/moc /usr/share/qt3/bin/moc /usr/lib64/qt3/bin/moc + for i in $prefix/share/qt/bin/moc /usr/lib/qt/bin/moc /usr/lib64/qt/bin/moc /usr/lib/qt3/bin/moc $prefix/share/qt3/bin/moc /usr/lib64/qt3/bin/moc do - [ ! -x $i ] && continue + [ ! -x $i ] continue QT_MOC=$i echo "QT_MOC=$QT_MOC" break; @@ -322,9 +322,9 @@ if [ $QT4_IM = 'N' ]; then mv gcin.spec gcin.spec.tmp grep -v qt4/plugins/inputmethods gcin.spec.tmp > gcin.spec else - for i in /usr/share/qt4/bin/moc /usr/lib/qt4/bin/moc /usr/lib64/qt4/bin/moc /usr/bin/moc + for i in %%MOC%% $prefix/share/qt4/bin/moc /usr/lib/qt4/bin/moc /usr/lib64/qt4/bin/moc /usr/bin/moc do - [ ! -x $i ] && continue + [ ! -x $i ] continue QT4_MOC=$i echo "QT4_MOC=$QT4_MOC" break @@ -351,9 +351,9 @@ else cp gcin-qt5.h.in gcin-qt5.h fi cd .. - for i in /usr/share/qt5/bin/moc /usr/lib/qt5/bin/moc /usr/lib/x86_64-linux-gnu/qt5/bin/moc /usr/lib/i386-linux-gnu/qt5/bin/moc /usr/lib64/qt5/bin/moc /usr/bin/moc + for i in $prefix/share/qt6/bin/moc /usr/lib/qt5/bin/moc /usr/lib/x86_64-linux-gnu/qt5/bin/moc /usr/lib/i386-linux-gnu/qt5/bin/moc /usr/lib64/qt5/bin/moc /usr/bin/moc do - [ ! -x $i ] && continue + [ ! -x $i ] continue QT5_MOC=$i echo "QT5_MOC=$QT5_MOC" break @@ -362,7 +362,7 @@ fi BUILD_MODULE='Y' -if [ $USE_ANTHY = 'Y' ] || [ $USE_CHEWING = 'Y' ]; then +if [ $USE_ANTHY = 'Y' ]; then BUILD_MODULE='Y' fi @@ -388,7 +388,7 @@ echo "datadir_r=$datadir" >> config.mak echo "libdir=\$(DESTDIR)$libdir" >> config.mak echo "gcinlibdir=\$(DESTDIR)$gcinlibdir" >> config.mak echo "includedir=\$(DESTDIR)$includedir" >> config.mak -echo "LDFLAGS=-Wl,--as-needed $GTKLDFLAGS -lX11 -ldl -lm" >> config.mak +echo "LDFLAGS=-Wl,--as-needed $GTKLDFLAGS -lX11 -lm" >> config.mak echo "GCIN_VERSION=$GCIN_VERSION" >> config.mak echo "GCIN_TABLE_DIR=\$(datadir_r)/gcin/table" >> config.mak echo "GCIN_OGG_DIR=\$(datadir_r)/gcin/ogg" >> config.mak @@ -406,8 +406,8 @@ if [ "$doc_version_dir" = 'N' ]; then echo "DOC_DIR=\$(datadir_r)/doc/gcin" >> config.mak echo "DOC_DIR_i=\$(datadir)/doc/gcin" >> config.mak else - echo "DOC_DIR=\$(datadir_r)/doc/gcin-$GCIN_VERSION" >> config.mak - echo "DOC_DIR_i=\$(datadir)/doc/gcin-$GCIN_VERSION" >> config.mak + echo "DOC_DIR=\$(datadir_r)/doc/gcin" >> config.mak + echo "DOC_DIR_i=\$(datadir)/doc/gcin" >> config.mak fi echo "GCIN_ICON_DIR=\$(datadir_r)/icons/gcin" >> config.mak @@ -435,11 +435,16 @@ echo "USE_INDICATOR=$USE_INDICATOR" >> config.mak echo "USE_GCB=$use_gcb" >> config.mak echo "BUILD_MODULE=$BUILD_MODULE" >> config.mak echo "GTK_QUERY_IM_64=$GTK_QUERY_IM_64" >> config.mak -[ $QT5_IM = 'Y' ] && echo "QT5_MOC=$QT5_MOC" >> config.mak -[ $QT4_IM = 'Y' ] && echo "QT4_MOC=$QT4_MOC" >> config.mak -[ $QT_IM = 'Y' ] && echo "QT_MOC=$QT_MOC" >> config.mak +if [ $QT5_IM = 'Y' ]; then + echo "QT5_MOC=$QT5_MOC" >> config.mak +fi +if [ $QT4_IM = 'Y' ]; then + echo "QT4_MOC=$QT4_MOC" >> config.mak +fi +if [ $QT_IM = 'Y' ]; then + echo "QT_MOC=$QT_MOC" >> config.mak +fi -echo "GCIN_DEBUG=0" >> config.mak if [ $prefix = /usr/local ]; then echo "gcin_ld_run_path=$PWD:$PWD/im-client:\$(gcinlibdir)" >> config.mak else