summaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2011-06-07 00:25:30 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2011-06-07 00:25:30 +0000
commitec238eebaf5cb2089a83bd293db66b562bad7530 (patch)
tree01388ca792c6056013fa54d826b5e51cea763f12 /chinese
parent- Document CVE-2011-1910 (diff)
- Unbreak on 7.X by replacing getline() GNU extension with fgets()
- Replace ${DISTDIR}/${DIST_SUBDIR} with ${_DISTDIR} shortcut - Cleanup logging-related stuff since this option was dropped upstream - Turn explicit dependency on libXft into USE_XORG+=xft - Use gnomehack and drop two corresponding patches - Sort knobs and fix some whitespace Approved by: maintainer
Notes
Notes: svn path=/head/; revision=275168
Diffstat (limited to 'chinese')
-rw-r--r--chinese/fcitx/Makefile28
-rw-r--r--chinese/fcitx/files/patch-src-core-Makefile.in11
-rw-r--r--chinese/fcitx/files/patch-src-fcitx_config-Makefile.in11
3 files changed, 16 insertions, 34 deletions
diff --git a/chinese/fcitx/Makefile b/chinese/fcitx/Makefile
index f619abf0a3f7..c3bdb186630a 100644
--- a/chinese/fcitx/Makefile
+++ b/chinese/fcitx/Makefile
@@ -11,6 +11,7 @@ CATEGORIES= chinese x11
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} pinyin.tar.gz table.tar.gz
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+DIST_SUBDIR= ${PORTNAME}
MAINTAINER= darcsis@gmail.com
COMMENT= A simple and fast GBK Chinese XIM server
@@ -19,27 +20,22 @@ LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo
LICENSE= GPLv2
-DIST_SUBDIR= fcitx
-USE_GNOME= pango intltool
+USE_GNOME= pango intltool gnomehack
USE_XORG= xpm x11 xtst
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
OPTIONS= XFT "Use Xft for Freetype font support" on \
- TRAY "Enable system tray support" on \
+ TRAY "Enable system tray support" on \
DBUS "Enable D-Bus for KIMPanel support" off \
RECORDING "Enable recording of user input" off \
- DEBUG "Enable debug build with logging" off \
+ DEBUG "Build with debug information" off
.include <bsd.port.options.mk>
-.if ${OSVERSION} < 800000
-BROKEN= does not build on 7.X
-.endif
-
.if defined(WITH_XFT)
-LIB_DEPENDS+= Xft.2:${PORTSDIR}/x11-fonts/libXft
+USE_XORG+= xft
.else
CONFIGURE_ARGS+= --disable-xft
.endif
@@ -59,12 +55,20 @@ CONFIGURE_ARGS+= --enable-recording
.endif
.if defined(WITH_DEBUG)
-CONFIGURE_ARGS+= --enable-debug --enable-log
+CONFIGURE_ARGS+= --enable-debug
.endif
post-patch:
- @${CP} ${DISTDIR}/${DIST_SUBDIR}/pinyin.tar.gz ${WRKSRC}/data
- @${CP} ${DISTDIR}/${DIST_SUBDIR}/table.tar.gz ${WRKSRC}/data/table
+ @${CP} ${_DISTDIR}/pinyin.tar.gz ${WRKSRC}/data
+ @${CP} ${_DISTDIR}/table.tar.gz ${WRKSRC}/data/table
+.if ${OSVERSION} < 800067
+# getline() is GNU extension which FreeBSD only recently adopted
+ @${REINPLACE_CMD} -E \
+ 's:getline\(&(.+, )&(.+, .+\) != )-1:fgets(\1\2NULL:' \
+ ${WRKSRC}/src/fcitx-config/fcitx-config.c \
+ ${WRKSRC}/src/im/special/QuickPhrase.c \
+ ${WRKSRC}/src/tools/tools.c
+.endif
pre-install:
@${CHMOD} +x ${WRKSRC}/install-sh
diff --git a/chinese/fcitx/files/patch-src-core-Makefile.in b/chinese/fcitx/files/patch-src-core-Makefile.in
deleted file mode 100644
index 1c08cf044bc3..000000000000
--- a/chinese/fcitx/files/patch-src-core-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/core/Makefile.in.orig 2010-11-29 23:26:13.597770436 +0800
-+++ src/core/Makefile.in 2010-11-29 23:26:24.798549651 +0800
-@@ -284,7 +284,7 @@
- fcitxinclude_HEADERS = \
- im.h
-
--pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfigdir = $(prefix)/libdata/pkgconfig
- pkgconfig_DATA = fcitx.pc
- EXTRA_DIST = \
- fcitx.pc.in
diff --git a/chinese/fcitx/files/patch-src-fcitx_config-Makefile.in b/chinese/fcitx/files/patch-src-fcitx_config-Makefile.in
deleted file mode 100644
index 0a663bda3c79..000000000000
--- a/chinese/fcitx/files/patch-src-fcitx_config-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/fcitx-config/Makefile.in.orig 2010-11-29 23:24:37.995657941 +0800
-+++ src/fcitx-config/Makefile.in 2010-11-29 23:25:13.265959780 +0800
-@@ -277,7 +277,7 @@
- hotkey.h \
- xdg.h
-
--pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfigdir = $(prefix)/libdata/pkgconfig
- pkgconfig_DATA = fcitx-config.pc
- EXTRA_DIST = \
- fcitx-config.pc.in