aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2008-03-28 01:06:05 +0800
committerpav <pav@FreeBSD.org>2008-03-28 01:06:05 +0800
commite9096a0a38bc36a4b4a59ae83b4301cd715d13b7 (patch)
tree34d13713e33d131f9cd5c08638fc9d3fba56d25a /japanese
parentaa4a8ba2f99e8ca7e8d026805431cc4d553b13a8 (diff)
downloadfreebsd-ports-gnome-e9096a0a38bc36a4b4a59ae83b4301cd715d13b7.tar.gz
freebsd-ports-gnome-e9096a0a38bc36a4b4a59ae83b4301cd715d13b7.tar.zst
freebsd-ports-gnome-e9096a0a38bc36a4b4a59ae83b4301cd715d13b7.zip
- Unbreak with gcc42
PR: ports/121637 Submitted by: TANAKA Hiroyuki <kattyo@abk.nu> (maintainer)
Diffstat (limited to 'japanese')
-rw-r--r--japanese/xtr/Makefile8
-rw-r--r--japanese/xtr/files/patch-str-xstring.c23
2 files changed, 24 insertions, 7 deletions
diff --git a/japanese/xtr/Makefile b/japanese/xtr/Makefile
index ec752c4e4bcc..04b562e504a8 100644
--- a/japanese/xtr/Makefile
+++ b/japanese/xtr/Makefile
@@ -23,12 +23,6 @@ GNU_CONFIGURE= yes
NO_CDROM= Need to obtain permission for commercial redistribution.
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN= Does not compile with GCC 4.2
-.endif
-
post-extract:
@${ECHO_MSG} "===> Converting Kanji code for ${DISTNAME}"
@(cd ${WRKSRC} && $(SH) EUCsetup )
@@ -45,4 +39,4 @@ do-install:
@${MKDIR} ${PREFIX}/share/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/sample/*.xtr ${PREFIX}/share/${PORTNAME}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/japanese/xtr/files/patch-str-xstring.c b/japanese/xtr/files/patch-str-xstring.c
new file mode 100644
index 000000000000..5b5cb070bae7
--- /dev/null
+++ b/japanese/xtr/files/patch-str-xstring.c
@@ -0,0 +1,23 @@
+--- src/xstring.c.orig 2008-03-27 17:58:25.000000000 +0100
++++ src/xstring.c 2008-03-27 18:02:39.000000000 +0100
+@@ -351,10 +351,16 @@
+ uchar *dstp = dst;
+
+ while (*src) {
+- if (IsKanjiStr(src))
+- *((ushort*)dstp)++ = *((ushort*)src)++;
+- else
+- *dstp++ = (*func)(*src++);
++ if (IsKanjiStr(src)) {
++ *((ushort*)dstp) = *((ushort*)src);
++ (ushort*)src++;
++ (ushort*)dstp++;
++ }
++ else {
++ *dstp = (*func)(*src);
++ src++;
++ dstp++;
++ }
+ }
+ *dstp = 0;
+ return dstp - dst;