summaryrefslogtreecommitdiff
path: root/chinese/xsim
diff options
context:
space:
mode:
authorTilman Keskinoz <arved@FreeBSD.org>2007-08-12 13:48:10 +0000
committerTilman Keskinoz <arved@FreeBSD.org>2007-08-12 13:48:10 +0000
commit92ad72608baca7f3a8a6063745714d38d1ae123f (patch)
treea569e250a62234defdb4f8a61e7f23b19cd709c6 /chinese/xsim
parentThe master sites are down for some days, then mirror the tarballs. (diff)
Fix build on CURRENT 64bit archs
Notes
Notes: svn path=/head/; revision=197526
Diffstat (limited to 'chinese/xsim')
-rw-r--r--chinese/xsim/Makefile4
-rw-r--r--chinese/xsim/files/patch-ic.cpp9
-rw-r--r--chinese/xsim/files/patch-ic.h11
-rw-r--r--chinese/xsim/files/patch-simpleimc.h11
-rw-r--r--chinese/xsim/files/patch-tableimc.h11
5 files changed, 46 insertions, 0 deletions
diff --git a/chinese/xsim/Makefile b/chinese/xsim/Makefile
index ad3c5659b7db..76e6f6eb7432 100644
--- a/chinese/xsim/Makefile
+++ b/chinese/xsim/Makefile
@@ -27,7 +27,11 @@ USE_BDB= 40+
.include <bsd.port.pre.mk>
CFLAGS+= -fPIC
+.if ${OSVERSION} < 700000
MAKE_ARGS+= gcclib=`${CXX} -print-file-name=libgcc_pic.a`
+.else
+MAKE_ARGS+= gcclib=`${CXX} -print-file-name=libgcc_s.so`
+.endif
post-patch:
@${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' \
diff --git a/chinese/xsim/files/patch-ic.cpp b/chinese/xsim/files/patch-ic.cpp
new file mode 100644
index 000000000000..ce43634f1665
--- /dev/null
+++ b/chinese/xsim/files/patch-ic.cpp
@@ -0,0 +1,9 @@
+--- xsim/ic.cpp.orig 2007-08-12 15:43:13.000000000 +0200
++++ xsim/ic.cpp 2007-08-12 15:43:35.000000000 +0200
+@@ -103,5 +103,5 @@
+
+ int TIC::alive()
+ {
+- return (int)im;
++ return (intptr_t)im;
+ }
diff --git a/chinese/xsim/files/patch-ic.h b/chinese/xsim/files/patch-ic.h
new file mode 100644
index 000000000000..c5685f880121
--- /dev/null
+++ b/chinese/xsim/files/patch-ic.h
@@ -0,0 +1,11 @@
+--- xsim/ic.h.orig 2007-08-12 15:40:46.000000000 +0200
++++ xsim/ic.h 2007-08-12 15:42:35.000000000 +0200
+@@ -76,7 +76,7 @@
+ void set_im(TIM * val);
+
+ TIMC * get_imc();
+- int has_imc() { return (int)imc; }
++ intptr_t has_imc() { return (intptr_t)imc; }
+
+ void init(int init_mode, TIM * val);
+
diff --git a/chinese/xsim/files/patch-simpleimc.h b/chinese/xsim/files/patch-simpleimc.h
new file mode 100644
index 000000000000..bdcdacf2e7a5
--- /dev/null
+++ b/chinese/xsim/files/patch-simpleimc.h
@@ -0,0 +1,11 @@
+--- plugins/IMs/jianpin/simpleimc.h.orig 2007-08-12 15:33:23.000000000 +0200
++++ plugins/IMs/jianpin/simpleimc.h 2007-08-12 15:34:18.000000000 +0200
+@@ -45,7 +45,7 @@
+ uint16_t access_count;
+ wchar_t w[MAX_WORD_LEN + 1];
+
+- size_t ac_size() { return (uint32_t) w - (uint32_t)&access_count; }
++ size_t ac_size() { return (uintptr_t) w - (uintptr_t)&access_count; }
+ size_t size(){ return ac_size() + wcslen(w) * sizeof(wchar_t); }
+ void copy(struct Word_Rec_tag * val) { memcpy(this, val, sizeof(Word_Rec_tag));}
+ }Word_Rec;
diff --git a/chinese/xsim/files/patch-tableimc.h b/chinese/xsim/files/patch-tableimc.h
new file mode 100644
index 000000000000..9e5b16f7cd19
--- /dev/null
+++ b/chinese/xsim/files/patch-tableimc.h
@@ -0,0 +1,11 @@
+--- plugins/IMs/table/tableimc.h.orig 2007-08-12 15:38:33.000000000 +0200
++++ plugins/IMs/table/tableimc.h 2007-08-12 15:38:58.000000000 +0200
+@@ -23,7 +23,7 @@
+ uint8_t sort_index;
+ wchar_t w[MAX_WORD_LEN + 1];
+
+- size_t si_size() { return (uint32_t) w - (uint32_t)&sort_index; }
++ size_t si_size() { return (uintptr_t) w - (uintptr_t)&sort_index; }
+ size_t size(){ return si_size() + (wcslen(w) + 1) * sizeof(wchar_t); }
+ void copy(struct Word_Rec_tag * val) { memcpy(this, val, sizeof(Word_Rec_tag));}
+ }Word_Rec;