summaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorChin-San Huang <chinsan@FreeBSD.org>2012-01-30 15:52:29 +0000
committerChin-San Huang <chinsan@FreeBSD.org>2012-01-30 15:52:29 +0000
commit0fa6062a4a7c95fa4f3afae2cbbb49af10a69da3 (patch)
tree13f460363e5cabcdb89b75cd534e80f519b16ab5 /chinese
parent- Fix build due to libtool updates. [1] (diff)
- Update to 2.7.0
- Add CHEWING knob to enable Chewing IM module - Limit to compile on FreeBSD 7.0+ - Fix japanese/anthy dependency - Many thanks to the contributer: vanilla@ - Drop maintainership Changelog: http://www.csie.nctu.edu.tw/~cp76/gcin/download/Changelog.html
Notes
Notes: svn path=/head/; revision=290117
Diffstat (limited to 'chinese')
-rw-r--r--chinese/gcin/Makefile52
-rw-r--r--chinese/gcin/distinfo4
-rw-r--r--chinese/gcin/files/patch-im-client-Makefile11
-rw-r--r--chinese/gcin/files/patch-menu17
-rw-r--r--chinese/gcin/files/patch-qt4-im-Makefile27
-rw-r--r--chinese/gcin/pkg-plist23
6 files changed, 60 insertions, 74 deletions
diff --git a/chinese/gcin/Makefile b/chinese/gcin/Makefile
index 99f516adeba5..1b1ecf409233 100644
--- a/chinese/gcin/Makefile
+++ b/chinese/gcin/Makefile
@@ -6,27 +6,27 @@
#
PORTNAME= gcin
-PORTVERSION= 1.6.0
+PORTVERSION= 2.7.0
CATEGORIES= chinese textproc gnome
-MASTER_SITES= http://www.csie.nctu.edu.tw/~cp76/gcin/download/:main \
- LOCAL/chinsan/gcin:main
+MASTER_SITES= http://www.csie.nctu.edu.tw/~cp76/gcin/download/:main
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:main
-EXTRACT_ONLY= gcin-${PORTVERSION}.tar.bz2
+EXTRACT_ONLY= gcin-${PORTVERSION}.tar.xz
-MAINTAINER= chinsan@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= A traditional chinese input utility in X
LICENSE= LGPL21
-USE_BZIP2= YES
+USE_XZ= YES
HAS_CONFIGURE= YES
-CONFIGURE_ARGS+= --use_gtk3=N
+CONFIGURE_ARGS+= --use_gtk3=N --use_qt3=N
USE_GNOME= gtk20
USE_GMAKE= YES
USE_XORG= x11 xtst xext
INSTALLS_ICONS= YES
USE_LDCONFIG= YES
OPTIONS= ANTHY "enable Japanese anthy IM module" off \
+ CHEWING "enable Chewing IM module" off \
QT_IM_MODULE "enable QT IM module" off
MAN1= gcin.1 gcin-exit.1 gcin2tab.1 gcin-gb-toggle.1 gcin-kbm-toggle.1 \
@@ -39,21 +39,44 @@ MAN1= gcin.1 gcin-exit.1 gcin2tab.1 gcin-gb-toggle.1 gcin-kbm-toggle.1 \
USE_QT_VER= 4
QT_COMPONENTS= inputmethods qmake_build moc_build corelib gui
LIB_DEPENDS+= mng:${PORTSDIR}/graphics/libmng
+PLIST_SUB+= QT_IM_MODULE=""
+.else
+CONFIGURE_ARGS+= --use_qt4=N
+PLIST_SUB+= QT_IM_MODULE="@comment "
.endif
.include <bsd.port.pre.mk>
+.if ${OSVERSION} < 700000
+BROKEN= does not compile
+.endif
+
.if defined(WITH_ANTHY)
BUILD_DEPENDS+= ${LOCALBASE}/include/anthy/anthy.h:${PORTSDIR}/japanese/anthy
-RUN_DEPENDS+= ${LOCALBASE}/include/anthy/anthy.h:${PORTSDIR}/japanese/anthy
+LIB_DEPENDS+= anthy.1:${PORTSDIR}/japanese/anthy
+PLIST_SUB+= ANTHY_MODULE=""
+.else
+CONFIGURE_ARGS+= --use_anthy=N
+PLIST_SUB+= ANTHY_MODULE="@comment "
+.endif
+
+.if defined(WITH_CHEWING)
+BUILD_DEPENDS+= ${LOCALBASE}/include/chewing/chewing.h:${PORTSDIR}/chinese/libchewing
+LIB_DEPENDS+= chewing.3:${PORTSDIR}/chinese/libchewing
+PLIST_SUB+= CHEWING_MODULE=""
+.else
+CONFIGURE_ARGS+= --use_chewing=N
+PLIST_SUB+= CHEWING_MODULE="@comment "
.endif
post-patch:
- @${REINPLACE_CMD} -e 's,&,,; 1 s,bash,sh,; \
+ @${REINPLACE_CMD} -e 's,&,,; 1 s,##!/bin/bash,#!/bin/sh,; \
s,QT_IM_DIR=/usr,QT_IM_DIR=$$prefix,g; \
s,QT4_IM_DIR=/usr,QT4_IM_DIR=$$prefix,g; \
+ s,-ldl,,; \
s,mandir=$$datadir,mandir=$$prefix,; \
s,/usr/share,$$prefix/share,; \
+ s,/usr/lib64/qt4/bin/moc,${LOCALBASE}/bin/moc-qt4,; \
1, 300 s,gcc,$$CC,; s,gcin-$$GCIN_VERSION,gcin,; \
/GCIN_DEBUG/ d' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's,\/usr\/share,$$(prefix)\/share,;' \
@@ -78,16 +101,11 @@ post-patch:
${WRKSRC}/qt-im/Makefile ${WRKSRC}/scripts/modify-XIM \
${WRKSRC}/scripts/utf8-edit
@${REINPLACE_CMD} -e '/make/ d' ${WRKSRC}/IMdkit/lib/Makefile
+ @${REINPLACE_CMD} -e 's,/usr/X11R6/lib,${LOCALBASE}/lib,' ${WRKSRC}/im-client/Makefile
.ifdef NOPORTDOCS
@${REINPLACE_CMD} '/install.*DOC_DIR/d' ${WRKSRC}/Makefile
.endif
-.if defined(WITH_QT_IM_MODULE)
-PLIST_SUB+= QT_IM_MODULE=""
-.else
-PLIST_SUB+= QT_IM_MODULE="@comment "
-.endif
-
post-build:
.if !defined(DEBUG_FLAGS)
@${FIND} ${WRKSRC} -name "*.so*" | ${XARGS} ${STRIP_CMD}
@@ -101,8 +119,8 @@ post-install:
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
-.for file in Changelog.html README.html
- ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+.for f in Changelog.html README.html
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
@gtk-query-immodules-2.0 > ${PREFIX}/etc/gtk-2.0/gtk.immodules
diff --git a/chinese/gcin/distinfo b/chinese/gcin/distinfo
index fbfc2735721c..49c2f4e5913c 100644
--- a/chinese/gcin/distinfo
+++ b/chinese/gcin/distinfo
@@ -1,2 +1,2 @@
-SHA256 (gcin-1.6.0.tar.bz2) = 2a23efd53f8c2e42317c20b5da763418a50cad9ecb06fae134371e88e31dde97
-SIZE (gcin-1.6.0.tar.bz2) = 2871306
+SHA256 (gcin-2.7.0.tar.xz) = 4002cf81df9f651407a4a7d36428bb6c6e970b807fe49b078985901293cb8329
+SIZE (gcin-2.7.0.tar.xz) = 2680408
diff --git a/chinese/gcin/files/patch-im-client-Makefile b/chinese/gcin/files/patch-im-client-Makefile
deleted file mode 100644
index f69e02bf9340..000000000000
--- a/chinese/gcin/files/patch-im-client-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- im-client/Makefile.old 2011-02-08 09:20:29.000000000 +0800
-+++ im-client/Makefile 2011-02-16 05:14:52.000000000 +0800
-@@ -20,7 +20,7 @@
- $(CC) -x c -c $(CFLAGS) $<
-
- $(SOFILEVER): $(OBJS)
-- $(CC) $(SO_FLAGS) -Wl,-soname,libgcin-im-client.so.1 $(OBJS) -lX11 -o $@ -L/usr/X11R6/lib
-+ $(CC) $(SO_FLAGS) -Wl,-soname,libgcin-im-client.so.1 $(OBJS) -o $@ -lX11 -L/usr/local/lib
- ln -sf $(SOFILEVER) $(SOFILE)
- ln -sf $(SOFILEVER) $(SOFILE).1
- $(MAKE) -C ../gtk-im
diff --git a/chinese/gcin/files/patch-menu b/chinese/gcin/files/patch-menu
index e006c47ebdd9..e69de29bb2d1 100644
--- a/chinese/gcin/files/patch-menu
+++ b/chinese/gcin/files/patch-menu
@@ -1,17 +0,0 @@
---- menu/Makefile.bak 2010-11-19 04:16:50.000000000 +0800
-+++ menu/Makefile 2010-11-19 04:18:35.000000000 +0800
-@@ -12,12 +12,8 @@
- install -m 644 $(MENUS) /usr/lib/menu; \
- which update-menus > /dev/null 2>&1 && update-menus || exit 0; \
- else \
-- install -d $(libdir)/menu; \
-- install -m 644 $(MENUS) $(libdir)/menu; \
-- install -d $(GCIN_SETUP_DESKTOP_rpm); \
-- install -m 644 gcin-setup.desktop $(GCIN_SETUP_DESKTOP_rpm); \
-- install -d $(datadir)/applications; \
-- install -m 644 gcin-setup.desktop $(datadir)/applications; \
-+ install -d $(prefix)/share/applications; \
-+ install -m 644 $(MENUS) $(prefix)/share/applications; \
- fi
- clean:
- rm -f $(MENUS) *~
diff --git a/chinese/gcin/files/patch-qt4-im-Makefile b/chinese/gcin/files/patch-qt4-im-Makefile
index 070169b36947..d02fcf3ee912 100644
--- a/chinese/gcin/files/patch-qt4-im-Makefile
+++ b/chinese/gcin/files/patch-qt4-im-Makefile
@@ -1,28 +1,11 @@
---- qt4-im/Makefile.orig 2011-02-08 09:35:24.000000000 +0800
-+++ qt4-im/Makefile 2011-02-16 02:54:57.000000000 +0800
-@@ -1,21 +1,21 @@
- include ../config.mak
- QT=qt4
+--- qt4-im/Makefile.orig 2012-01-08 01:45:14.000000000 +0800
++++ qt4-im/Makefile 2012-01-08 01:47:10.000000000 +0800
+@@ -3,7 +3,7 @@ QT=qt4
QTIM=$(QT)/plugins/inputmethods
--IMMODULES=$(libdir)/$(QTIM)
-+IMMODULES=/usr/local/lib/$(QTIM)
+ IMMODULES=$(libdir)/$(QTIM)
-INCS=-I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags`
-+INCS=-I../im-client -I/usr/local/include/X11 -I/usr/local/include `pkg-config QtCore QtGui --cflags`
++INCS=-I../im-client -I$(prefix)/include/X11 -I$(prefix)/include `pkg-config QtCore QtGui --cflags`
CXXFLAGS=$(OPTFLAGS) $(INCS) -Wall -D_REENTRANT -DUNIX=1 -fPIC -DQT4 -DQT_SHARED \
-DQT_IMMODULE -DPIC
OBJS= moc_gcin-qt.o gcin-qt.o im-gcin-qt.o gcin-imcontext-qt.o
- .SUFFIXES: .c .cpp .a .so .E .h
--LDFLAGS=-L../im-client -lgcin-im-client `pkg-config QtCore QtGui --libs`
-+LDFLAGS=-L../im-client -lgcin-im-client -lpthread -Wl,-rpath,$(gcinlibdir) `pkg-config QtCore QtGui --libs`
- all: im-gcin.so
-
- .cpp.E:
- $(CXX) -E $(CFLAGS) $(INCS) $< > $@
-
- moc_gcin-qt.cpp: gcin-qt.h
-- /usr/lib/$(QT)/bin/moc $< -o moc_gcin-qt.cpp
-+ /usr/local/bin/moc-qt4 $< -o moc_gcin-qt.cpp
-
- im-gcin.so: $(OBJS)
- export LD_RUN_PATH=$(gcinlibdir) ;\
diff --git a/chinese/gcin/pkg-plist b/chinese/gcin/pkg-plist
index 21aa8a4d07b8..d7905172ef0f 100644
--- a/chinese/gcin/pkg-plist
+++ b/chinese/gcin/pkg-plist
@@ -3,7 +3,7 @@ bin/gcin-exit
bin/gcin-gb-toggle
bin/gcin-kbm-toggle
bin/gcin-message
-bin/gcin-setup
+bin/gcin-tools
bin/gcin2tab
bin/gtab-merge
bin/juyin-learn
@@ -11,16 +11,20 @@ bin/phoa2d
bin/phod2a
bin/sim2trad
bin/trad2sim
+bin/ts-edit
bin/tsa2d32
bin/tsd2a32
bin/tsin2gtab-phrase
bin/tslearn
lib/gtk-2.0/immodules/im-gcin.so
-@comment %%QT_IM_MODULE%%lib/qt4/plugins/inputmethods/im-gcin.so
+%%QT_IM_MODULE%%lib/qt4/plugins/inputmethods/im-gcin.so
+%%ANTHY_MODULE%%lib/gcin/anthy-module.so
+%%CHEWING_MODULE%%lib/gcin/chewing-module.so
lib/gcin/gcin1.so
lib/gcin/gcin2.so
+%%CHEWING_MODULE%%lib/gcin/intcode-module.so
lib/gcin/libgcin-im-client.so
-lib/gcin/libgcin-im-client.so.1.2.2
+lib/gcin/libgcin-im-client.so.1.2.5
lib/gcin/libgcin-im-client.so.1
%%DATADIR%%/script/gcin-user-setup
%%DATADIR%%/script/gtab.append_prepare
@@ -28,8 +32,10 @@ lib/gcin/libgcin-im-client.so.1
%%DATADIR%%/script/tsin-gtab-import
%%DATADIR%%/script/tsin-gtab-edit
%%DATADIR%%/script/utf8-edit
+%%DATADIR%%/table/NewCJ3.gtab
%%DATADIR%%/table/ar30.gtab
%%DATADIR%%/table/ar30-big.gtab
+%%DATADIR%%/table/ar33.gtab
%%DATADIR%%/table/cj-punc.gtab
%%DATADIR%%/table/cj.gtab
%%DATADIR%%/table/cj5.gtab
@@ -41,6 +47,7 @@ lib/gcin/libgcin-im-client.so.1
%%DATADIR%%/table/et26.kbm
%%DATADIR%%/table/greek.gtab
%%DATADIR%%/table/gtab.list
+%%DATADIR%%/table/hangul.gtab
%%DATADIR%%/table/hsu.kbm
%%DATADIR%%/table/ibm.kbm
%%DATADIR%%/table/jyutping.gtab
@@ -52,10 +59,16 @@ lib/gcin/libgcin-im-client.so.1
%%DATADIR%%/table/phrase.table
%%DATADIR%%/table/pinyin.gtab
%%DATADIR%%/table/pinyin.kbm
+%%DATADIR%%/table/pinyin-no-tone.kbm
%%DATADIR%%/table/pin-juyin.xlt
%%DATADIR%%/table/russian.gtab
+%%DATADIR%%/table/s-pho-huge.tab2
+%%DATADIR%%/table/s-pho.tab2
+%%DATADIR%%/table/s-tsin32
+%%DATADIR%%/table/s-tsin32.idx
%%DATADIR%%/table/s2t.dat
%%DATADIR%%/table/simplex.gtab
+%%DATADIR%%/table/simplex-punc.gtab
%%DATADIR%%/table/symbol-table
%%DATADIR%%/table/symbols.gtab
%%DATADIR%%/table/t2s.dat
@@ -65,8 +78,7 @@ lib/gcin/libgcin-im-client.so.1
%%DATADIR%%/table/zo.kbm
%%PORTDOCS%%%%DOCSDIR%%/Changelog.html
%%PORTDOCS%%%%DOCSDIR%%/README.html
-share/applications/gcin
-share/applications/gcin-setup
+share/applications/gcin-tools.desktop
share/icons/gcin/NewCJ3.png
share/icons/gcin/4corner.png
share/icons/gcin/amis-gcin.png
@@ -74,6 +86,7 @@ share/icons/gcin/ar30.png
share/icons/gcin/cj-punc.png
share/icons/gcin/cj.png
share/icons/gcin/cj5.png
+share/icons/gcin/chewing.png
share/icons/gcin/dayi3.png
share/icons/gcin/en-kana-nippon.png
share/icons/gcin/en-tsin.png