diff options
-rw-r--r-- | chinese/stardict2/Makefile | 36 | ||||
-rw-r--r-- | chinese/stardict2/distinfo | 10 | ||||
-rw-r--r-- | chinese/stardict2/files/patch-src::tools::olddic2newdic.c | 157 | ||||
-rw-r--r-- | chinese/stardict2/files/patch-src::tools::oxford2dic.c | 64 | ||||
-rw-r--r-- | chinese/stardict2/files/patch-src::tools::pydict2dic.c | 64 | ||||
-rw-r--r-- | chinese/stardict2/pkg-plist | 68 | ||||
-rw-r--r-- | textproc/stardict2/Makefile | 36 | ||||
-rw-r--r-- | textproc/stardict2/distinfo | 10 | ||||
-rw-r--r-- | textproc/stardict2/files/patch-src::tools::olddic2newdic.c | 157 | ||||
-rw-r--r-- | textproc/stardict2/files/patch-src::tools::oxford2dic.c | 64 | ||||
-rw-r--r-- | textproc/stardict2/files/patch-src::tools::pydict2dic.c | 64 | ||||
-rw-r--r-- | textproc/stardict2/pkg-plist | 68 | ||||
-rw-r--r-- | textproc/stardict3/Makefile | 36 | ||||
-rw-r--r-- | textproc/stardict3/distinfo | 10 | ||||
-rw-r--r-- | textproc/stardict3/files/patch-src::tools::olddic2newdic.c | 157 | ||||
-rw-r--r-- | textproc/stardict3/files/patch-src::tools::oxford2dic.c | 64 | ||||
-rw-r--r-- | textproc/stardict3/files/patch-src::tools::pydict2dic.c | 64 | ||||
-rw-r--r-- | textproc/stardict3/pkg-plist | 68 |
18 files changed, 213 insertions, 984 deletions
diff --git a/chinese/stardict2/Makefile b/chinese/stardict2/Makefile index efcf58f6c885..8abe12e2145d 100644 --- a/chinese/stardict2/Makefile +++ b/chinese/stardict2/Makefile @@ -5,16 +5,17 @@ # $FreeBSD$ # -PORTNAME= stardict2 -PORTVERSION= 2.0.0 -CATEGORIES= chinese -MASTER_SITES= http://reciteword.cosoft.org.cn/yaoguang/myapps/ \ +PORTNAME= stardict +PORTVERSION= 2.2.0 +CATEGORIES= chinese textproc +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ ftp://freebsd.sinica.edu.tw/pub/statue/stardict2/ -DISTFILES= stardict-${PORTVERSION}.tar.gz \ - stardict-cdict-big5-${PORTVERSION}.tar.bz2 \ - stardict-cedict-big5-${PORTVERSION}.tar.bz2 \ - stardict-xdict-big5-${PORTVERSION}.tar.bz2 \ - stardict-xdict-ce-big5-${PORTVERSION}.tar.bz2 +MASTER_SITE_SUBDIR= ${PORTNAME} +DISTFILES= stardict-${PORTVERSION}.tar.bz2 \ + stardict-cdict-big5-2.1.0.tar.bz2 \ + stardict-cedict-big5-2.1.0.tar.bz2 \ + stardict-xdict-big5-2.1.0.tar.bz2 \ + stardict-xdict-ce-big5-2.1.0.tar.bz2 MAINTAINER= statue@freebsd.sinica.edu.tw COMMENT= English-Chinese dictionary @@ -26,23 +27,14 @@ USE_GMAKE= yes USE_X_PREFIX= yes USE_BZIP2= yes USE_GNOME= libgnome libgnomeui libbonobo bonoboactivation gconf2 -WRKSRC= ${WRKDIR}/stardict-${PORTVERSION} MAN1= stardict.1 -do-extract: - ${MKDIR} ${WRKDIR} - cd ${WRKDIR} && tar zxf ${DISTDIR}/stardict-2.0.0.tar.gz && \ - tar jxf ${DISTDIR}/stardict-cdict-big5-2.0.0.tar.bz2 && \ - tar jxf ${DISTDIR}/stardict-cedict-big5-2.0.0.tar.bz2 && \ - tar jxf ${DISTDIR}/stardict-xdict-big5-2.0.0.tar.bz2 && \ - tar jxf ${DISTDIR}/stardict-xdict-ce-big5-2.0.0.tar.bz2 - post-install: ${MKDIR} ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-cdict-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-cedict-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-ce-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-cdict-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-cedict-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-ce-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ .include <bsd.port.mk> diff --git a/chinese/stardict2/distinfo b/chinese/stardict2/distinfo index b6213f3e6220..6643b2148433 100644 --- a/chinese/stardict2/distinfo +++ b/chinese/stardict2/distinfo @@ -1,5 +1,5 @@ -MD5 (stardict-2.0.0.tar.gz) = 6ba52d96f1692a129f29601ac339ab49 -MD5 (stardict-cdict-big5-2.0.0.tar.bz2) = e66240efde994c0dc3bfd630cf9c53e5 -MD5 (stardict-cedict-big5-2.0.0.tar.bz2) = 372ae3391610634163443114382319b4 -MD5 (stardict-xdict-big5-2.0.0.tar.bz2) = 5bb8289d8381ea89d23eca60c7996519 -MD5 (stardict-xdict-ce-big5-2.0.0.tar.bz2) = 0d26411ac196cd240b266c95ede71bc2 +MD5 (stardict-2.2.0.tar.bz2) = 5ca3bd410fd6aea508a65b5227a7e902 +MD5 (stardict-cdict-big5-2.1.0.tar.bz2) = 2dc9784e735e43516fc2bf6f382923be +MD5 (stardict-cedict-big5-2.1.0.tar.bz2) = d0743c765b789dc66d0a6a533fcd851e +MD5 (stardict-xdict-big5-2.1.0.tar.bz2) = 5b2de427b9af5f4b5baaf5d80dad63a3 +MD5 (stardict-xdict-ce-big5-2.1.0.tar.bz2) = 7ca866de79faeea494c5e6e1cce8aa80 diff --git a/chinese/stardict2/files/patch-src::tools::olddic2newdic.c b/chinese/stardict2/files/patch-src::tools::olddic2newdic.c deleted file mode 100644 index f888334a040f..000000000000 --- a/chinese/stardict2/files/patch-src::tools::olddic2newdic.c +++ /dev/null @@ -1,157 +0,0 @@ ---- src/tools/olddic2newdic.c.orig Sat May 3 18:48:30 2003 -+++ src/tools/olddic2newdic.c Mon May 5 04:05:05 2003 -@@ -52,28 +52,54 @@ - void convert(char *filename,char *idxheadfilename) - { - struct stat stats; -+ FILE *idxheadfile; -+ gchar *buffer; -+ FILE *idxfile,*dicfile; -+ gchar str[256],basename[256]; -+ long wordcount_offset; -+ glong tmpglong=0; -+ gboolean sametypesequence = FALSE; -+ int fd; -+ struct stat stStat; -+ int iFileSize; -+ unsigned int iCapacity,iStyle; -+ unsigned char cIndex, cWord, cMeaning, cMark; -+ caddr_t pFileMem; -+ caddr_t p=pFileMem; -+ caddr_t pMeaning, pMark; -+ gchar *utf8_str; -+ gsize write_size; -+ long tmp_long,wordcount=0; -+ int word_len, meaning_len,mark_len=0; -+ int iLength=0; -+ GArray *array; -+ struct _worditem worditem; -+ glong old_size; -+ long offset_old=0; -+ int i; -+ gchar *previous_word = g_strdup(""); //there should have no word equal this. -+ glong previous_datasize = 0; -+ gchar *previous_data = g_strdup(""); -+ struct _worditem *pworditem; -+ -+ - if (stat (idxheadfilename, &stats) == -1) - { - printf("idxhead file not exist!\n"); - return; - } - -- FILE *idxheadfile; - idxheadfile = fopen(idxheadfilename,"r"); -- gchar *buffer; - buffer = (gchar *)g_malloc (stats.st_size + 1); - fread (buffer, 1, stats.st_size, idxheadfile); - fclose (idxheadfile); - buffer[stats.st_size] = '\0'; -- gboolean sametypesequence = FALSE; - if (strstr(buffer,"sametypesequence=")) - sametypesequence = TRUE; - - //in the next code we will always treat sametypesequence to be TRUE. - //as now all old stardict dictionaries use these two feature. - -- FILE *idxfile,*dicfile; -- gchar str[256],basename[256]; - - strcpy(basename,idxheadfilename); - basename[strlen(idxheadfilename)-8]='\0'; -@@ -86,11 +112,10 @@ - fwrite(buffer, 1, stats.st_size, idxfile); - g_free(buffer); - -- long wordcount_offset = ftell(idxfile); -- glong tmpglong=0; -+ wordcount_offset = ftell(idxfile); - fwrite(&(tmpglong),sizeof(glong),1,idxfile); - -- int fd=open(filename,O_RDONLY); -+ fd=open(filename,O_RDONLY); - if(fd==-1) - { - g_print("open fail\n"); -@@ -98,17 +123,15 @@ - } - - // get length of dicfile. -- struct stat stStat; - if(fstat(fd,&stStat)!=0) - { - g_print("stat fail\n"); - return; - } -- int iFileSize=stStat.st_size; -+ iFileSize=stStat.st_size; - - // get item count - lseek(fd,0-sizeof(int)*2,SEEK_END); -- unsigned int iCapacity,iStyle; - read(fd,&iCapacity,sizeof(int)); - read(fd,&iStyle,sizeof(int)); - //disable the next two line when the convert file is from the same arch machine. -@@ -117,14 +140,14 @@ - vConvertEndian(&iStyle); - #endif - -- unsigned char cIndex=(unsigned char)(iStyle>>24); -- unsigned char cWord=(unsigned char)(iStyle>>16); -- unsigned char cMeaning=(unsigned char)(iStyle>>8); -- unsigned char cMark=(unsigned char)iStyle; -+ cIndex=(unsigned char)(iStyle>>24); -+ cWord=(unsigned char)(iStyle>>16); -+ cMeaning=(unsigned char)(iStyle>>8); -+ cMark=(unsigned char)iStyle; - g_print("flag: %c %c %c\n",cIndex,cWord,cMeaning); - - // mmap the file to memory -- caddr_t pFileMem=(caddr_t)mmap( (caddr_t)0,iFileSize-sizeof(int)*2, -+ pFileMem=(caddr_t)mmap( (caddr_t)0,iFileSize-sizeof(int)*2, - PROT_READ,MAP_SHARED|MAP_NORESERVE,fd,0 ); - if(pFileMem==MAP_FAILED) - { -@@ -133,9 +156,7 @@ - } - - // begin to read items. -- caddr_t p=pFileMem; -- caddr_t pMeaning, pMark; -- gchar *utf8_str; -+ p=pFileMem; - #ifndef DISABLE_CONVERT_LOCALE - gchar *locale_str; - gsize locale_write_size; -@@ -157,14 +178,7 @@ - return;*/ - - #endif -- gsize write_size; -- long tmp_long,wordcount=0; -- int word_len, meaning_len,mark_len=0; -- int iLength=0; -- -- GArray *array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),iCapacity); -- struct _worditem worditem; -- glong old_size; -+ array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),iCapacity); - - while(p<pFileMem+iFileSize-sizeof(int)*2 && iLength<iCapacity) - { -@@ -303,14 +317,6 @@ - //g_qsort_with_data(parray->pdata,parray->len,sizeof(gpointer),comparefunc,NULL); - g_array_sort(array,comparefunc); - -- long offset_old=0; -- -- int i; -- -- gchar *previous_word = g_strdup(""); //there should have no word equal this. -- glong previous_datasize = 0; -- gchar *previous_data = g_strdup(""); -- struct _worditem *pworditem; - for (i=0;i<array->len;i++) - { - pworditem = &g_array_index(array, struct _worditem, i); diff --git a/chinese/stardict2/files/patch-src::tools::oxford2dic.c b/chinese/stardict2/files/patch-src::tools::oxford2dic.c deleted file mode 100644 index 8529786c8474..000000000000 --- a/chinese/stardict2/files/patch-src::tools::oxford2dic.c +++ /dev/null @@ -1,64 +0,0 @@ ---- src/tools/oxford2dic.c.orig Mon May 5 04:05:50 2003 -+++ src/tools/oxford2dic.c Mon May 5 04:08:14 2003 -@@ -24,6 +24,19 @@ - { - struct stat stats; - FILE *oxfile,*idxfile,*dicfile; -+ gchar *buffer; -+ gchar *p1,*p2; -+ glong line_num = 0; -+ gchar *utf_str; -+ gsize write_size; -+ struct _worditem worditem; -+ GArray *array; -+ glong tmpglong=0; -+ long offset_old; -+ glong wordcount; -+ glong i; -+ gchar *previous_word = ""; -+ struct _worditem *pworditem; - - if (stat (filename, &stats) == -1) - { -@@ -32,21 +45,15 @@ - } - oxfile = fopen(filename,"r"); - -- gchar *buffer; - buffer = (gchar *)g_malloc (stats.st_size + 2); - fread (buffer, 1, stats.st_size, oxfile); - fclose (oxfile); - buffer[stats.st_size] = '\n'; - buffer[stats.st_size+1] = '\0'; - -- GArray *array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),39000); //oxford.txt have 77304 lines. -- struct _worditem worditem; -+ array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),39000); //oxford.txt have 77304 lines. - -- gchar *p1,*p2; -- glong line_num = 0; - p1 = buffer; -- gchar *utf_str; -- gsize write_size; - - while (1) { - if (*p1=='\0') { -@@ -91,17 +98,11 @@ - idxfile = fopen("oxford.idxdata","w"); - dicfile = fopen("oxford.dict","w"); - -- glong tmpglong=0; - fwrite(&(tmpglong),sizeof(glong),1,idxfile); - - - -- long offset_old; -- -- glong wordcount = array->len; -- glong i; -- gchar *previous_word = ""; -- struct _worditem *pworditem; -+ wordcount = array->len; - for (i=0;i<array->len;i++) - { - pworditem = &g_array_index(array, struct _worditem, i); diff --git a/chinese/stardict2/files/patch-src::tools::pydict2dic.c b/chinese/stardict2/files/patch-src::tools::pydict2dic.c deleted file mode 100644 index 59016223c047..000000000000 --- a/chinese/stardict2/files/patch-src::tools::pydict2dic.c +++ /dev/null @@ -1,64 +0,0 @@ ---- src/tools/pydict2dic.c.orig Fri Apr 25 18:55:55 2003 -+++ src/tools/pydict2dic.c Mon May 5 04:10:27 2003 -@@ -24,6 +24,20 @@ - { - struct stat stats; - FILE *pyfile,*ecidxfile,*ecdicfile,*ceidxfile,*cedicfile; -+ gchar *buffer; -+ GArray *ecarray; -+ struct _worditem ecworditem; -+ GArray *cearray; -+ struct _worditem ceworditem; -+ gchar *p1,*p2,*p3,*p4; -+ gchar *utf_str; -+ gsize write_size; -+ glong word_len; -+ long offset_old; -+ glong wordcount; -+ glong i; -+ gchar *previous_word = ""; -+ struct _worditem *pworditem; - - if (stat (filename, &stats) == -1) - { -@@ -32,24 +46,17 @@ - } - pyfile = fopen(filename,"r"); - -- gchar *buffer; - buffer = (gchar *)g_malloc (stats.st_size + 2); - fread (buffer, 1, stats.st_size, pyfile); - fclose (pyfile); - buffer[stats.st_size] = '\n'; - buffer[stats.st_size+1] = '\0'; - -- GArray *ecarray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); //pydict.lib have 177785 lines. -- struct _worditem ecworditem; -- GArray *cearray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); -- struct _worditem ceworditem; -+ ecarray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); //pydict.lib have 177785 lines. -+ cearray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); - -- gchar *p1,*p2,*p3,*p4; - p1 = buffer; -- gchar *utf_str; -- gsize write_size; -- glong word_len; -- -+ - while (1) { - if (*p1=='\0') { - g_print("over\n"); -@@ -142,12 +149,6 @@ - fprintf(ceidxfile,"stardict's idx file\ndictfile=pydict-big5-ce.dict\nbookname=pydict-big5-ce\nbeigin:\n"); - */ - -- long offset_old; -- -- glong wordcount; -- glong i; -- gchar *previous_word = ""; -- struct _worditem *pworditem; - - wordcount = ecarray->len; - for (i=0;i<ecarray->len;i++) diff --git a/chinese/stardict2/pkg-plist b/chinese/stardict2/pkg-plist index e0b561d06f81..e3f8bd7884d2 100644 --- a/chinese/stardict2/pkg-plist +++ b/chinese/stardict2/pkg-plist @@ -1,24 +1,33 @@ bin/stardict +share/idl/GNOME_Stardict.idl share/pixmaps/stardict.png -share/stardict/dic/cdict-big5.dict +share/stardict/dic/cdict-big5.dict.dz share/stardict/dic/cdict-big5.idx.gz -share/stardict/dic/cedict-big5.dict +share/stardict/dic/cedict-big5.dict.dz share/stardict/dic/cedict-big5.idx.gz -share/stardict/dic/xdict-big5.dict +share/stardict/dic/xdict-big5.dict.dz share/stardict/dic/xdict-big5.idx.gz -share/stardict/dic/xdict-ce-big5.dict +share/stardict/dic/xdict-ce-big5.dict.dz share/stardict/dic/xdict-ce-big5.idx.gz -share/stardict/skins/default/about_menu.png -share/stardict/skins/default/docklet_normal.png -share/stardict/skins/default/docklet_scan.png -share/stardict/skins/default/docklet_stop.png -share/stardict/skins/default/phonetic.png -share/stardict/skins/default/skin.inf +share/stardict/pixmaps/about_menu.png +share/stardict/pixmaps/docklet_normal.png +share/stardict/pixmaps/docklet_scan.png +share/stardict/pixmaps/docklet_stop.png +share/stardict/pixmaps/index_appendix.png +share/stardict/pixmaps/index_wazard.png +share/stardict/pixmaps/splash.png +share/stardict/sounds/menushow.wav +share/stardict/sounds/buttonactive.wav share/gnome/help/stardict/C/legal.xml share/gnome/help/stardict/C/stardict.xml share/gnome/help/stardict/C/figures/stardict_float_window.png share/gnome/help/stardict/C/figures/stardict_main_window.png share/gnome/help/stardict/C/figures/stardict_notification_area.png +share/gnome/help/stardict/ru/legal.xml +share/gnome/help/stardict/ru/stardict.xml +share/gnome/help/stardict/ru/figures/stardict_float_window.png +share/gnome/help/stardict/ru/figures/stardict_main_window.png +share/gnome/help/stardict/ru/figures/stardict_notification_area.png share/gnome/help/stardict/zh_CN/legal.xml share/gnome/help/stardict/zh_CN/stardict.xml share/gnome/help/stardict/zh_CN/figures/stardict_float_window.png @@ -27,27 +36,54 @@ share/gnome/help/stardict/zh_CN/figures/stardict_notification_area.png share/omf/stardict/stardict-C.omf @exec scrollkeeper-install -q %D/share/omf/stardict/stardict-C.omf 2>/dev/null || /usr/bin/true @unexec scrollkeeper-uninstall -q %D/share/omf/stardict/stardict-C.omf 2>/dev/null || /usr/bin/true +share/omf/stardict/stardict-ru.omf +@exec scrollkeeper-install -q %D/share/omf/stardict/stardict-ru.omf 2>/dev/null || /usr/bin/true +@unexec scrollkeeper-uninstall -q %D/share/omf/stardict/stardict-ru.omf 2>/dev/null || /usr/bin/true share/omf/stardict/stardict-zh_CN.omf @exec scrollkeeper-install -q %D/share/omf/stardict/stardict-zh_CN.omf 2>/dev/null || /usr/bin/true @unexec scrollkeeper-uninstall -q %D/share/omf/stardict/stardict-zh_CN.omf 2>/dev/null || /usr/bin/true share/applications/stardict.desktop etc/gconf/schemas/stardict.schemas lib/bonobo/servers/GNOME_Stardict.server +lib/locale/ru/LC_MESSAGES/stardict.mo +lib/locale/zh_CN/LC_MESSAGES/stardict.mo etc/gconf/gconf.xml.defaults/apps/stardict/%gconf.xml -etc/gconf/gconf.xml.defaults/apps/stardict/float_window/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/manage_dictionaries/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/dictionary/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/floating_window/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/main_window/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/notification_area_icon/%gconf.xml etc/gconf/gconf.xml.defaults/schemas/apps/stardict/%gconf.xml -etc/gconf/gconf.xml.defaults/schemas/apps/stardict/float_window/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/manage_dictionaries/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/dictionary/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/floating_window/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/main_window/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/notification_area_icon/%gconf.xml @dirrm share/gnome/help/stardict/zh_CN/figures @dirrm share/gnome/help/stardict/zh_CN +@dirrm share/gnome/help/stardict/ru/figures +@dirrm share/gnome/help/stardict/ru @dirrm share/gnome/help/stardict/C/figures @dirrm share/gnome/help/stardict/C @dirrm share/gnome/help/stardict -@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/float_window +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/notification_area_icon +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/main_window +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/floating_window +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/dictionary +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/manage_dictionaries @dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict -@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/float_window +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/notification_area_icon +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/main_window +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/floating_window +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/dictionary +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/manage_dictionaries @dirrm etc/gconf/gconf.xml.defaults/apps/stardict @dirrm share/omf/stardict @dirrm share/stardict/dic -@dirrm share/stardict/skins/default -@dirrm share/stardict/skins +@dirrm share/stardict/pixmaps +@dirrm share/stardict/sounds @dirrm share/stardict diff --git a/textproc/stardict2/Makefile b/textproc/stardict2/Makefile index efcf58f6c885..8abe12e2145d 100644 --- a/textproc/stardict2/Makefile +++ b/textproc/stardict2/Makefile @@ -5,16 +5,17 @@ # $FreeBSD$ # -PORTNAME= stardict2 -PORTVERSION= 2.0.0 -CATEGORIES= chinese -MASTER_SITES= http://reciteword.cosoft.org.cn/yaoguang/myapps/ \ +PORTNAME= stardict +PORTVERSION= 2.2.0 +CATEGORIES= chinese textproc +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ ftp://freebsd.sinica.edu.tw/pub/statue/stardict2/ -DISTFILES= stardict-${PORTVERSION}.tar.gz \ - stardict-cdict-big5-${PORTVERSION}.tar.bz2 \ - stardict-cedict-big5-${PORTVERSION}.tar.bz2 \ - stardict-xdict-big5-${PORTVERSION}.tar.bz2 \ - stardict-xdict-ce-big5-${PORTVERSION}.tar.bz2 +MASTER_SITE_SUBDIR= ${PORTNAME} +DISTFILES= stardict-${PORTVERSION}.tar.bz2 \ + stardict-cdict-big5-2.1.0.tar.bz2 \ + stardict-cedict-big5-2.1.0.tar.bz2 \ + stardict-xdict-big5-2.1.0.tar.bz2 \ + stardict-xdict-ce-big5-2.1.0.tar.bz2 MAINTAINER= statue@freebsd.sinica.edu.tw COMMENT= English-Chinese dictionary @@ -26,23 +27,14 @@ USE_GMAKE= yes USE_X_PREFIX= yes USE_BZIP2= yes USE_GNOME= libgnome libgnomeui libbonobo bonoboactivation gconf2 -WRKSRC= ${WRKDIR}/stardict-${PORTVERSION} MAN1= stardict.1 -do-extract: - ${MKDIR} ${WRKDIR} - cd ${WRKDIR} && tar zxf ${DISTDIR}/stardict-2.0.0.tar.gz && \ - tar jxf ${DISTDIR}/stardict-cdict-big5-2.0.0.tar.bz2 && \ - tar jxf ${DISTDIR}/stardict-cedict-big5-2.0.0.tar.bz2 && \ - tar jxf ${DISTDIR}/stardict-xdict-big5-2.0.0.tar.bz2 && \ - tar jxf ${DISTDIR}/stardict-xdict-ce-big5-2.0.0.tar.bz2 - post-install: ${MKDIR} ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-cdict-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-cedict-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-ce-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-cdict-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-cedict-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-ce-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ .include <bsd.port.mk> diff --git a/textproc/stardict2/distinfo b/textproc/stardict2/distinfo index b6213f3e6220..6643b2148433 100644 --- a/textproc/stardict2/distinfo +++ b/textproc/stardict2/distinfo @@ -1,5 +1,5 @@ -MD5 (stardict-2.0.0.tar.gz) = 6ba52d96f1692a129f29601ac339ab49 -MD5 (stardict-cdict-big5-2.0.0.tar.bz2) = e66240efde994c0dc3bfd630cf9c53e5 -MD5 (stardict-cedict-big5-2.0.0.tar.bz2) = 372ae3391610634163443114382319b4 -MD5 (stardict-xdict-big5-2.0.0.tar.bz2) = 5bb8289d8381ea89d23eca60c7996519 -MD5 (stardict-xdict-ce-big5-2.0.0.tar.bz2) = 0d26411ac196cd240b266c95ede71bc2 +MD5 (stardict-2.2.0.tar.bz2) = 5ca3bd410fd6aea508a65b5227a7e902 +MD5 (stardict-cdict-big5-2.1.0.tar.bz2) = 2dc9784e735e43516fc2bf6f382923be +MD5 (stardict-cedict-big5-2.1.0.tar.bz2) = d0743c765b789dc66d0a6a533fcd851e +MD5 (stardict-xdict-big5-2.1.0.tar.bz2) = 5b2de427b9af5f4b5baaf5d80dad63a3 +MD5 (stardict-xdict-ce-big5-2.1.0.tar.bz2) = 7ca866de79faeea494c5e6e1cce8aa80 diff --git a/textproc/stardict2/files/patch-src::tools::olddic2newdic.c b/textproc/stardict2/files/patch-src::tools::olddic2newdic.c deleted file mode 100644 index f888334a040f..000000000000 --- a/textproc/stardict2/files/patch-src::tools::olddic2newdic.c +++ /dev/null @@ -1,157 +0,0 @@ ---- src/tools/olddic2newdic.c.orig Sat May 3 18:48:30 2003 -+++ src/tools/olddic2newdic.c Mon May 5 04:05:05 2003 -@@ -52,28 +52,54 @@ - void convert(char *filename,char *idxheadfilename) - { - struct stat stats; -+ FILE *idxheadfile; -+ gchar *buffer; -+ FILE *idxfile,*dicfile; -+ gchar str[256],basename[256]; -+ long wordcount_offset; -+ glong tmpglong=0; -+ gboolean sametypesequence = FALSE; -+ int fd; -+ struct stat stStat; -+ int iFileSize; -+ unsigned int iCapacity,iStyle; -+ unsigned char cIndex, cWord, cMeaning, cMark; -+ caddr_t pFileMem; -+ caddr_t p=pFileMem; -+ caddr_t pMeaning, pMark; -+ gchar *utf8_str; -+ gsize write_size; -+ long tmp_long,wordcount=0; -+ int word_len, meaning_len,mark_len=0; -+ int iLength=0; -+ GArray *array; -+ struct _worditem worditem; -+ glong old_size; -+ long offset_old=0; -+ int i; -+ gchar *previous_word = g_strdup(""); //there should have no word equal this. -+ glong previous_datasize = 0; -+ gchar *previous_data = g_strdup(""); -+ struct _worditem *pworditem; -+ -+ - if (stat (idxheadfilename, &stats) == -1) - { - printf("idxhead file not exist!\n"); - return; - } - -- FILE *idxheadfile; - idxheadfile = fopen(idxheadfilename,"r"); -- gchar *buffer; - buffer = (gchar *)g_malloc (stats.st_size + 1); - fread (buffer, 1, stats.st_size, idxheadfile); - fclose (idxheadfile); - buffer[stats.st_size] = '\0'; -- gboolean sametypesequence = FALSE; - if (strstr(buffer,"sametypesequence=")) - sametypesequence = TRUE; - - //in the next code we will always treat sametypesequence to be TRUE. - //as now all old stardict dictionaries use these two feature. - -- FILE *idxfile,*dicfile; -- gchar str[256],basename[256]; - - strcpy(basename,idxheadfilename); - basename[strlen(idxheadfilename)-8]='\0'; -@@ -86,11 +112,10 @@ - fwrite(buffer, 1, stats.st_size, idxfile); - g_free(buffer); - -- long wordcount_offset = ftell(idxfile); -- glong tmpglong=0; -+ wordcount_offset = ftell(idxfile); - fwrite(&(tmpglong),sizeof(glong),1,idxfile); - -- int fd=open(filename,O_RDONLY); -+ fd=open(filename,O_RDONLY); - if(fd==-1) - { - g_print("open fail\n"); -@@ -98,17 +123,15 @@ - } - - // get length of dicfile. -- struct stat stStat; - if(fstat(fd,&stStat)!=0) - { - g_print("stat fail\n"); - return; - } -- int iFileSize=stStat.st_size; -+ iFileSize=stStat.st_size; - - // get item count - lseek(fd,0-sizeof(int)*2,SEEK_END); -- unsigned int iCapacity,iStyle; - read(fd,&iCapacity,sizeof(int)); - read(fd,&iStyle,sizeof(int)); - //disable the next two line when the convert file is from the same arch machine. -@@ -117,14 +140,14 @@ - vConvertEndian(&iStyle); - #endif - -- unsigned char cIndex=(unsigned char)(iStyle>>24); -- unsigned char cWord=(unsigned char)(iStyle>>16); -- unsigned char cMeaning=(unsigned char)(iStyle>>8); -- unsigned char cMark=(unsigned char)iStyle; -+ cIndex=(unsigned char)(iStyle>>24); -+ cWord=(unsigned char)(iStyle>>16); -+ cMeaning=(unsigned char)(iStyle>>8); -+ cMark=(unsigned char)iStyle; - g_print("flag: %c %c %c\n",cIndex,cWord,cMeaning); - - // mmap the file to memory -- caddr_t pFileMem=(caddr_t)mmap( (caddr_t)0,iFileSize-sizeof(int)*2, -+ pFileMem=(caddr_t)mmap( (caddr_t)0,iFileSize-sizeof(int)*2, - PROT_READ,MAP_SHARED|MAP_NORESERVE,fd,0 ); - if(pFileMem==MAP_FAILED) - { -@@ -133,9 +156,7 @@ - } - - // begin to read items. -- caddr_t p=pFileMem; -- caddr_t pMeaning, pMark; -- gchar *utf8_str; -+ p=pFileMem; - #ifndef DISABLE_CONVERT_LOCALE - gchar *locale_str; - gsize locale_write_size; -@@ -157,14 +178,7 @@ - return;*/ - - #endif -- gsize write_size; -- long tmp_long,wordcount=0; -- int word_len, meaning_len,mark_len=0; -- int iLength=0; -- -- GArray *array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),iCapacity); -- struct _worditem worditem; -- glong old_size; -+ array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),iCapacity); - - while(p<pFileMem+iFileSize-sizeof(int)*2 && iLength<iCapacity) - { -@@ -303,14 +317,6 @@ - //g_qsort_with_data(parray->pdata,parray->len,sizeof(gpointer),comparefunc,NULL); - g_array_sort(array,comparefunc); - -- long offset_old=0; -- -- int i; -- -- gchar *previous_word = g_strdup(""); //there should have no word equal this. -- glong previous_datasize = 0; -- gchar *previous_data = g_strdup(""); -- struct _worditem *pworditem; - for (i=0;i<array->len;i++) - { - pworditem = &g_array_index(array, struct _worditem, i); diff --git a/textproc/stardict2/files/patch-src::tools::oxford2dic.c b/textproc/stardict2/files/patch-src::tools::oxford2dic.c deleted file mode 100644 index 8529786c8474..000000000000 --- a/textproc/stardict2/files/patch-src::tools::oxford2dic.c +++ /dev/null @@ -1,64 +0,0 @@ ---- src/tools/oxford2dic.c.orig Mon May 5 04:05:50 2003 -+++ src/tools/oxford2dic.c Mon May 5 04:08:14 2003 -@@ -24,6 +24,19 @@ - { - struct stat stats; - FILE *oxfile,*idxfile,*dicfile; -+ gchar *buffer; -+ gchar *p1,*p2; -+ glong line_num = 0; -+ gchar *utf_str; -+ gsize write_size; -+ struct _worditem worditem; -+ GArray *array; -+ glong tmpglong=0; -+ long offset_old; -+ glong wordcount; -+ glong i; -+ gchar *previous_word = ""; -+ struct _worditem *pworditem; - - if (stat (filename, &stats) == -1) - { -@@ -32,21 +45,15 @@ - } - oxfile = fopen(filename,"r"); - -- gchar *buffer; - buffer = (gchar *)g_malloc (stats.st_size + 2); - fread (buffer, 1, stats.st_size, oxfile); - fclose (oxfile); - buffer[stats.st_size] = '\n'; - buffer[stats.st_size+1] = '\0'; - -- GArray *array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),39000); //oxford.txt have 77304 lines. -- struct _worditem worditem; -+ array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),39000); //oxford.txt have 77304 lines. - -- gchar *p1,*p2; -- glong line_num = 0; - p1 = buffer; -- gchar *utf_str; -- gsize write_size; - - while (1) { - if (*p1=='\0') { -@@ -91,17 +98,11 @@ - idxfile = fopen("oxford.idxdata","w"); - dicfile = fopen("oxford.dict","w"); - -- glong tmpglong=0; - fwrite(&(tmpglong),sizeof(glong),1,idxfile); - - - -- long offset_old; -- -- glong wordcount = array->len; -- glong i; -- gchar *previous_word = ""; -- struct _worditem *pworditem; -+ wordcount = array->len; - for (i=0;i<array->len;i++) - { - pworditem = &g_array_index(array, struct _worditem, i); diff --git a/textproc/stardict2/files/patch-src::tools::pydict2dic.c b/textproc/stardict2/files/patch-src::tools::pydict2dic.c deleted file mode 100644 index 59016223c047..000000000000 --- a/textproc/stardict2/files/patch-src::tools::pydict2dic.c +++ /dev/null @@ -1,64 +0,0 @@ ---- src/tools/pydict2dic.c.orig Fri Apr 25 18:55:55 2003 -+++ src/tools/pydict2dic.c Mon May 5 04:10:27 2003 -@@ -24,6 +24,20 @@ - { - struct stat stats; - FILE *pyfile,*ecidxfile,*ecdicfile,*ceidxfile,*cedicfile; -+ gchar *buffer; -+ GArray *ecarray; -+ struct _worditem ecworditem; -+ GArray *cearray; -+ struct _worditem ceworditem; -+ gchar *p1,*p2,*p3,*p4; -+ gchar *utf_str; -+ gsize write_size; -+ glong word_len; -+ long offset_old; -+ glong wordcount; -+ glong i; -+ gchar *previous_word = ""; -+ struct _worditem *pworditem; - - if (stat (filename, &stats) == -1) - { -@@ -32,24 +46,17 @@ - } - pyfile = fopen(filename,"r"); - -- gchar *buffer; - buffer = (gchar *)g_malloc (stats.st_size + 2); - fread (buffer, 1, stats.st_size, pyfile); - fclose (pyfile); - buffer[stats.st_size] = '\n'; - buffer[stats.st_size+1] = '\0'; - -- GArray *ecarray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); //pydict.lib have 177785 lines. -- struct _worditem ecworditem; -- GArray *cearray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); -- struct _worditem ceworditem; -+ ecarray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); //pydict.lib have 177785 lines. -+ cearray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); - -- gchar *p1,*p2,*p3,*p4; - p1 = buffer; -- gchar *utf_str; -- gsize write_size; -- glong word_len; -- -+ - while (1) { - if (*p1=='\0') { - g_print("over\n"); -@@ -142,12 +149,6 @@ - fprintf(ceidxfile,"stardict's idx file\ndictfile=pydict-big5-ce.dict\nbookname=pydict-big5-ce\nbeigin:\n"); - */ - -- long offset_old; -- -- glong wordcount; -- glong i; -- gchar *previous_word = ""; -- struct _worditem *pworditem; - - wordcount = ecarray->len; - for (i=0;i<ecarray->len;i++) diff --git a/textproc/stardict2/pkg-plist b/textproc/stardict2/pkg-plist index e0b561d06f81..e3f8bd7884d2 100644 --- a/textproc/stardict2/pkg-plist +++ b/textproc/stardict2/pkg-plist @@ -1,24 +1,33 @@ bin/stardict +share/idl/GNOME_Stardict.idl share/pixmaps/stardict.png -share/stardict/dic/cdict-big5.dict +share/stardict/dic/cdict-big5.dict.dz share/stardict/dic/cdict-big5.idx.gz -share/stardict/dic/cedict-big5.dict +share/stardict/dic/cedict-big5.dict.dz share/stardict/dic/cedict-big5.idx.gz -share/stardict/dic/xdict-big5.dict +share/stardict/dic/xdict-big5.dict.dz share/stardict/dic/xdict-big5.idx.gz -share/stardict/dic/xdict-ce-big5.dict +share/stardict/dic/xdict-ce-big5.dict.dz share/stardict/dic/xdict-ce-big5.idx.gz -share/stardict/skins/default/about_menu.png -share/stardict/skins/default/docklet_normal.png -share/stardict/skins/default/docklet_scan.png -share/stardict/skins/default/docklet_stop.png -share/stardict/skins/default/phonetic.png -share/stardict/skins/default/skin.inf +share/stardict/pixmaps/about_menu.png +share/stardict/pixmaps/docklet_normal.png +share/stardict/pixmaps/docklet_scan.png +share/stardict/pixmaps/docklet_stop.png +share/stardict/pixmaps/index_appendix.png +share/stardict/pixmaps/index_wazard.png +share/stardict/pixmaps/splash.png +share/stardict/sounds/menushow.wav +share/stardict/sounds/buttonactive.wav share/gnome/help/stardict/C/legal.xml share/gnome/help/stardict/C/stardict.xml share/gnome/help/stardict/C/figures/stardict_float_window.png share/gnome/help/stardict/C/figures/stardict_main_window.png share/gnome/help/stardict/C/figures/stardict_notification_area.png +share/gnome/help/stardict/ru/legal.xml +share/gnome/help/stardict/ru/stardict.xml +share/gnome/help/stardict/ru/figures/stardict_float_window.png +share/gnome/help/stardict/ru/figures/stardict_main_window.png +share/gnome/help/stardict/ru/figures/stardict_notification_area.png share/gnome/help/stardict/zh_CN/legal.xml share/gnome/help/stardict/zh_CN/stardict.xml share/gnome/help/stardict/zh_CN/figures/stardict_float_window.png @@ -27,27 +36,54 @@ share/gnome/help/stardict/zh_CN/figures/stardict_notification_area.png share/omf/stardict/stardict-C.omf @exec scrollkeeper-install -q %D/share/omf/stardict/stardict-C.omf 2>/dev/null || /usr/bin/true @unexec scrollkeeper-uninstall -q %D/share/omf/stardict/stardict-C.omf 2>/dev/null || /usr/bin/true +share/omf/stardict/stardict-ru.omf +@exec scrollkeeper-install -q %D/share/omf/stardict/stardict-ru.omf 2>/dev/null || /usr/bin/true +@unexec scrollkeeper-uninstall -q %D/share/omf/stardict/stardict-ru.omf 2>/dev/null || /usr/bin/true share/omf/stardict/stardict-zh_CN.omf @exec scrollkeeper-install -q %D/share/omf/stardict/stardict-zh_CN.omf 2>/dev/null || /usr/bin/true @unexec scrollkeeper-uninstall -q %D/share/omf/stardict/stardict-zh_CN.omf 2>/dev/null || /usr/bin/true share/applications/stardict.desktop etc/gconf/schemas/stardict.schemas lib/bonobo/servers/GNOME_Stardict.server +lib/locale/ru/LC_MESSAGES/stardict.mo +lib/locale/zh_CN/LC_MESSAGES/stardict.mo etc/gconf/gconf.xml.defaults/apps/stardict/%gconf.xml -etc/gconf/gconf.xml.defaults/apps/stardict/float_window/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/manage_dictionaries/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/dictionary/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/floating_window/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/main_window/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/notification_area_icon/%gconf.xml etc/gconf/gconf.xml.defaults/schemas/apps/stardict/%gconf.xml -etc/gconf/gconf.xml.defaults/schemas/apps/stardict/float_window/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/manage_dictionaries/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/dictionary/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/floating_window/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/main_window/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/notification_area_icon/%gconf.xml @dirrm share/gnome/help/stardict/zh_CN/figures @dirrm share/gnome/help/stardict/zh_CN +@dirrm share/gnome/help/stardict/ru/figures +@dirrm share/gnome/help/stardict/ru @dirrm share/gnome/help/stardict/C/figures @dirrm share/gnome/help/stardict/C @dirrm share/gnome/help/stardict -@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/float_window +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/notification_area_icon +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/main_window +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/floating_window +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/dictionary +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/manage_dictionaries @dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict -@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/float_window +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/notification_area_icon +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/main_window +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/floating_window +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/dictionary +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/manage_dictionaries @dirrm etc/gconf/gconf.xml.defaults/apps/stardict @dirrm share/omf/stardict @dirrm share/stardict/dic -@dirrm share/stardict/skins/default -@dirrm share/stardict/skins +@dirrm share/stardict/pixmaps +@dirrm share/stardict/sounds @dirrm share/stardict diff --git a/textproc/stardict3/Makefile b/textproc/stardict3/Makefile index efcf58f6c885..8abe12e2145d 100644 --- a/textproc/stardict3/Makefile +++ b/textproc/stardict3/Makefile @@ -5,16 +5,17 @@ # $FreeBSD$ # -PORTNAME= stardict2 -PORTVERSION= 2.0.0 -CATEGORIES= chinese -MASTER_SITES= http://reciteword.cosoft.org.cn/yaoguang/myapps/ \ +PORTNAME= stardict +PORTVERSION= 2.2.0 +CATEGORIES= chinese textproc +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ ftp://freebsd.sinica.edu.tw/pub/statue/stardict2/ -DISTFILES= stardict-${PORTVERSION}.tar.gz \ - stardict-cdict-big5-${PORTVERSION}.tar.bz2 \ - stardict-cedict-big5-${PORTVERSION}.tar.bz2 \ - stardict-xdict-big5-${PORTVERSION}.tar.bz2 \ - stardict-xdict-ce-big5-${PORTVERSION}.tar.bz2 +MASTER_SITE_SUBDIR= ${PORTNAME} +DISTFILES= stardict-${PORTVERSION}.tar.bz2 \ + stardict-cdict-big5-2.1.0.tar.bz2 \ + stardict-cedict-big5-2.1.0.tar.bz2 \ + stardict-xdict-big5-2.1.0.tar.bz2 \ + stardict-xdict-ce-big5-2.1.0.tar.bz2 MAINTAINER= statue@freebsd.sinica.edu.tw COMMENT= English-Chinese dictionary @@ -26,23 +27,14 @@ USE_GMAKE= yes USE_X_PREFIX= yes USE_BZIP2= yes USE_GNOME= libgnome libgnomeui libbonobo bonoboactivation gconf2 -WRKSRC= ${WRKDIR}/stardict-${PORTVERSION} MAN1= stardict.1 -do-extract: - ${MKDIR} ${WRKDIR} - cd ${WRKDIR} && tar zxf ${DISTDIR}/stardict-2.0.0.tar.gz && \ - tar jxf ${DISTDIR}/stardict-cdict-big5-2.0.0.tar.bz2 && \ - tar jxf ${DISTDIR}/stardict-cedict-big5-2.0.0.tar.bz2 && \ - tar jxf ${DISTDIR}/stardict-xdict-big5-2.0.0.tar.bz2 && \ - tar jxf ${DISTDIR}/stardict-xdict-ce-big5-2.0.0.tar.bz2 - post-install: ${MKDIR} ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-cdict-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-cedict-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ - ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-ce-big5-2.0.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-cdict-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-cedict-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ + ${INSTALL_DATA} ${WRKDIR}/stardict-xdict-ce-big5-2.1.0/* ${PREFIX}/share/stardict/dic/ .include <bsd.port.mk> diff --git a/textproc/stardict3/distinfo b/textproc/stardict3/distinfo index b6213f3e6220..6643b2148433 100644 --- a/textproc/stardict3/distinfo +++ b/textproc/stardict3/distinfo @@ -1,5 +1,5 @@ -MD5 (stardict-2.0.0.tar.gz) = 6ba52d96f1692a129f29601ac339ab49 -MD5 (stardict-cdict-big5-2.0.0.tar.bz2) = e66240efde994c0dc3bfd630cf9c53e5 -MD5 (stardict-cedict-big5-2.0.0.tar.bz2) = 372ae3391610634163443114382319b4 -MD5 (stardict-xdict-big5-2.0.0.tar.bz2) = 5bb8289d8381ea89d23eca60c7996519 -MD5 (stardict-xdict-ce-big5-2.0.0.tar.bz2) = 0d26411ac196cd240b266c95ede71bc2 +MD5 (stardict-2.2.0.tar.bz2) = 5ca3bd410fd6aea508a65b5227a7e902 +MD5 (stardict-cdict-big5-2.1.0.tar.bz2) = 2dc9784e735e43516fc2bf6f382923be +MD5 (stardict-cedict-big5-2.1.0.tar.bz2) = d0743c765b789dc66d0a6a533fcd851e +MD5 (stardict-xdict-big5-2.1.0.tar.bz2) = 5b2de427b9af5f4b5baaf5d80dad63a3 +MD5 (stardict-xdict-ce-big5-2.1.0.tar.bz2) = 7ca866de79faeea494c5e6e1cce8aa80 diff --git a/textproc/stardict3/files/patch-src::tools::olddic2newdic.c b/textproc/stardict3/files/patch-src::tools::olddic2newdic.c deleted file mode 100644 index f888334a040f..000000000000 --- a/textproc/stardict3/files/patch-src::tools::olddic2newdic.c +++ /dev/null @@ -1,157 +0,0 @@ ---- src/tools/olddic2newdic.c.orig Sat May 3 18:48:30 2003 -+++ src/tools/olddic2newdic.c Mon May 5 04:05:05 2003 -@@ -52,28 +52,54 @@ - void convert(char *filename,char *idxheadfilename) - { - struct stat stats; -+ FILE *idxheadfile; -+ gchar *buffer; -+ FILE *idxfile,*dicfile; -+ gchar str[256],basename[256]; -+ long wordcount_offset; -+ glong tmpglong=0; -+ gboolean sametypesequence = FALSE; -+ int fd; -+ struct stat stStat; -+ int iFileSize; -+ unsigned int iCapacity,iStyle; -+ unsigned char cIndex, cWord, cMeaning, cMark; -+ caddr_t pFileMem; -+ caddr_t p=pFileMem; -+ caddr_t pMeaning, pMark; -+ gchar *utf8_str; -+ gsize write_size; -+ long tmp_long,wordcount=0; -+ int word_len, meaning_len,mark_len=0; -+ int iLength=0; -+ GArray *array; -+ struct _worditem worditem; -+ glong old_size; -+ long offset_old=0; -+ int i; -+ gchar *previous_word = g_strdup(""); //there should have no word equal this. -+ glong previous_datasize = 0; -+ gchar *previous_data = g_strdup(""); -+ struct _worditem *pworditem; -+ -+ - if (stat (idxheadfilename, &stats) == -1) - { - printf("idxhead file not exist!\n"); - return; - } - -- FILE *idxheadfile; - idxheadfile = fopen(idxheadfilename,"r"); -- gchar *buffer; - buffer = (gchar *)g_malloc (stats.st_size + 1); - fread (buffer, 1, stats.st_size, idxheadfile); - fclose (idxheadfile); - buffer[stats.st_size] = '\0'; -- gboolean sametypesequence = FALSE; - if (strstr(buffer,"sametypesequence=")) - sametypesequence = TRUE; - - //in the next code we will always treat sametypesequence to be TRUE. - //as now all old stardict dictionaries use these two feature. - -- FILE *idxfile,*dicfile; -- gchar str[256],basename[256]; - - strcpy(basename,idxheadfilename); - basename[strlen(idxheadfilename)-8]='\0'; -@@ -86,11 +112,10 @@ - fwrite(buffer, 1, stats.st_size, idxfile); - g_free(buffer); - -- long wordcount_offset = ftell(idxfile); -- glong tmpglong=0; -+ wordcount_offset = ftell(idxfile); - fwrite(&(tmpglong),sizeof(glong),1,idxfile); - -- int fd=open(filename,O_RDONLY); -+ fd=open(filename,O_RDONLY); - if(fd==-1) - { - g_print("open fail\n"); -@@ -98,17 +123,15 @@ - } - - // get length of dicfile. -- struct stat stStat; - if(fstat(fd,&stStat)!=0) - { - g_print("stat fail\n"); - return; - } -- int iFileSize=stStat.st_size; -+ iFileSize=stStat.st_size; - - // get item count - lseek(fd,0-sizeof(int)*2,SEEK_END); -- unsigned int iCapacity,iStyle; - read(fd,&iCapacity,sizeof(int)); - read(fd,&iStyle,sizeof(int)); - //disable the next two line when the convert file is from the same arch machine. -@@ -117,14 +140,14 @@ - vConvertEndian(&iStyle); - #endif - -- unsigned char cIndex=(unsigned char)(iStyle>>24); -- unsigned char cWord=(unsigned char)(iStyle>>16); -- unsigned char cMeaning=(unsigned char)(iStyle>>8); -- unsigned char cMark=(unsigned char)iStyle; -+ cIndex=(unsigned char)(iStyle>>24); -+ cWord=(unsigned char)(iStyle>>16); -+ cMeaning=(unsigned char)(iStyle>>8); -+ cMark=(unsigned char)iStyle; - g_print("flag: %c %c %c\n",cIndex,cWord,cMeaning); - - // mmap the file to memory -- caddr_t pFileMem=(caddr_t)mmap( (caddr_t)0,iFileSize-sizeof(int)*2, -+ pFileMem=(caddr_t)mmap( (caddr_t)0,iFileSize-sizeof(int)*2, - PROT_READ,MAP_SHARED|MAP_NORESERVE,fd,0 ); - if(pFileMem==MAP_FAILED) - { -@@ -133,9 +156,7 @@ - } - - // begin to read items. -- caddr_t p=pFileMem; -- caddr_t pMeaning, pMark; -- gchar *utf8_str; -+ p=pFileMem; - #ifndef DISABLE_CONVERT_LOCALE - gchar *locale_str; - gsize locale_write_size; -@@ -157,14 +178,7 @@ - return;*/ - - #endif -- gsize write_size; -- long tmp_long,wordcount=0; -- int word_len, meaning_len,mark_len=0; -- int iLength=0; -- -- GArray *array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),iCapacity); -- struct _worditem worditem; -- glong old_size; -+ array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),iCapacity); - - while(p<pFileMem+iFileSize-sizeof(int)*2 && iLength<iCapacity) - { -@@ -303,14 +317,6 @@ - //g_qsort_with_data(parray->pdata,parray->len,sizeof(gpointer),comparefunc,NULL); - g_array_sort(array,comparefunc); - -- long offset_old=0; -- -- int i; -- -- gchar *previous_word = g_strdup(""); //there should have no word equal this. -- glong previous_datasize = 0; -- gchar *previous_data = g_strdup(""); -- struct _worditem *pworditem; - for (i=0;i<array->len;i++) - { - pworditem = &g_array_index(array, struct _worditem, i); diff --git a/textproc/stardict3/files/patch-src::tools::oxford2dic.c b/textproc/stardict3/files/patch-src::tools::oxford2dic.c deleted file mode 100644 index 8529786c8474..000000000000 --- a/textproc/stardict3/files/patch-src::tools::oxford2dic.c +++ /dev/null @@ -1,64 +0,0 @@ ---- src/tools/oxford2dic.c.orig Mon May 5 04:05:50 2003 -+++ src/tools/oxford2dic.c Mon May 5 04:08:14 2003 -@@ -24,6 +24,19 @@ - { - struct stat stats; - FILE *oxfile,*idxfile,*dicfile; -+ gchar *buffer; -+ gchar *p1,*p2; -+ glong line_num = 0; -+ gchar *utf_str; -+ gsize write_size; -+ struct _worditem worditem; -+ GArray *array; -+ glong tmpglong=0; -+ long offset_old; -+ glong wordcount; -+ glong i; -+ gchar *previous_word = ""; -+ struct _worditem *pworditem; - - if (stat (filename, &stats) == -1) - { -@@ -32,21 +45,15 @@ - } - oxfile = fopen(filename,"r"); - -- gchar *buffer; - buffer = (gchar *)g_malloc (stats.st_size + 2); - fread (buffer, 1, stats.st_size, oxfile); - fclose (oxfile); - buffer[stats.st_size] = '\n'; - buffer[stats.st_size+1] = '\0'; - -- GArray *array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),39000); //oxford.txt have 77304 lines. -- struct _worditem worditem; -+ array = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),39000); //oxford.txt have 77304 lines. - -- gchar *p1,*p2; -- glong line_num = 0; - p1 = buffer; -- gchar *utf_str; -- gsize write_size; - - while (1) { - if (*p1=='\0') { -@@ -91,17 +98,11 @@ - idxfile = fopen("oxford.idxdata","w"); - dicfile = fopen("oxford.dict","w"); - -- glong tmpglong=0; - fwrite(&(tmpglong),sizeof(glong),1,idxfile); - - - -- long offset_old; -- -- glong wordcount = array->len; -- glong i; -- gchar *previous_word = ""; -- struct _worditem *pworditem; -+ wordcount = array->len; - for (i=0;i<array->len;i++) - { - pworditem = &g_array_index(array, struct _worditem, i); diff --git a/textproc/stardict3/files/patch-src::tools::pydict2dic.c b/textproc/stardict3/files/patch-src::tools::pydict2dic.c deleted file mode 100644 index 59016223c047..000000000000 --- a/textproc/stardict3/files/patch-src::tools::pydict2dic.c +++ /dev/null @@ -1,64 +0,0 @@ ---- src/tools/pydict2dic.c.orig Fri Apr 25 18:55:55 2003 -+++ src/tools/pydict2dic.c Mon May 5 04:10:27 2003 -@@ -24,6 +24,20 @@ - { - struct stat stats; - FILE *pyfile,*ecidxfile,*ecdicfile,*ceidxfile,*cedicfile; -+ gchar *buffer; -+ GArray *ecarray; -+ struct _worditem ecworditem; -+ GArray *cearray; -+ struct _worditem ceworditem; -+ gchar *p1,*p2,*p3,*p4; -+ gchar *utf_str; -+ gsize write_size; -+ glong word_len; -+ long offset_old; -+ glong wordcount; -+ glong i; -+ gchar *previous_word = ""; -+ struct _worditem *pworditem; - - if (stat (filename, &stats) == -1) - { -@@ -32,24 +46,17 @@ - } - pyfile = fopen(filename,"r"); - -- gchar *buffer; - buffer = (gchar *)g_malloc (stats.st_size + 2); - fread (buffer, 1, stats.st_size, pyfile); - fclose (pyfile); - buffer[stats.st_size] = '\n'; - buffer[stats.st_size+1] = '\0'; - -- GArray *ecarray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); //pydict.lib have 177785 lines. -- struct _worditem ecworditem; -- GArray *cearray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); -- struct _worditem ceworditem; -+ ecarray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); //pydict.lib have 177785 lines. -+ cearray = g_array_sized_new(FALSE,FALSE, sizeof(struct _worditem),177785); - -- gchar *p1,*p2,*p3,*p4; - p1 = buffer; -- gchar *utf_str; -- gsize write_size; -- glong word_len; -- -+ - while (1) { - if (*p1=='\0') { - g_print("over\n"); -@@ -142,12 +149,6 @@ - fprintf(ceidxfile,"stardict's idx file\ndictfile=pydict-big5-ce.dict\nbookname=pydict-big5-ce\nbeigin:\n"); - */ - -- long offset_old; -- -- glong wordcount; -- glong i; -- gchar *previous_word = ""; -- struct _worditem *pworditem; - - wordcount = ecarray->len; - for (i=0;i<ecarray->len;i++) diff --git a/textproc/stardict3/pkg-plist b/textproc/stardict3/pkg-plist index e0b561d06f81..e3f8bd7884d2 100644 --- a/textproc/stardict3/pkg-plist +++ b/textproc/stardict3/pkg-plist @@ -1,24 +1,33 @@ bin/stardict +share/idl/GNOME_Stardict.idl share/pixmaps/stardict.png -share/stardict/dic/cdict-big5.dict +share/stardict/dic/cdict-big5.dict.dz share/stardict/dic/cdict-big5.idx.gz -share/stardict/dic/cedict-big5.dict +share/stardict/dic/cedict-big5.dict.dz share/stardict/dic/cedict-big5.idx.gz -share/stardict/dic/xdict-big5.dict +share/stardict/dic/xdict-big5.dict.dz share/stardict/dic/xdict-big5.idx.gz -share/stardict/dic/xdict-ce-big5.dict +share/stardict/dic/xdict-ce-big5.dict.dz share/stardict/dic/xdict-ce-big5.idx.gz -share/stardict/skins/default/about_menu.png -share/stardict/skins/default/docklet_normal.png -share/stardict/skins/default/docklet_scan.png -share/stardict/skins/default/docklet_stop.png -share/stardict/skins/default/phonetic.png -share/stardict/skins/default/skin.inf +share/stardict/pixmaps/about_menu.png +share/stardict/pixmaps/docklet_normal.png +share/stardict/pixmaps/docklet_scan.png +share/stardict/pixmaps/docklet_stop.png +share/stardict/pixmaps/index_appendix.png +share/stardict/pixmaps/index_wazard.png +share/stardict/pixmaps/splash.png +share/stardict/sounds/menushow.wav +share/stardict/sounds/buttonactive.wav share/gnome/help/stardict/C/legal.xml share/gnome/help/stardict/C/stardict.xml share/gnome/help/stardict/C/figures/stardict_float_window.png share/gnome/help/stardict/C/figures/stardict_main_window.png share/gnome/help/stardict/C/figures/stardict_notification_area.png +share/gnome/help/stardict/ru/legal.xml +share/gnome/help/stardict/ru/stardict.xml +share/gnome/help/stardict/ru/figures/stardict_float_window.png +share/gnome/help/stardict/ru/figures/stardict_main_window.png +share/gnome/help/stardict/ru/figures/stardict_notification_area.png share/gnome/help/stardict/zh_CN/legal.xml share/gnome/help/stardict/zh_CN/stardict.xml share/gnome/help/stardict/zh_CN/figures/stardict_float_window.png @@ -27,27 +36,54 @@ share/gnome/help/stardict/zh_CN/figures/stardict_notification_area.png share/omf/stardict/stardict-C.omf @exec scrollkeeper-install -q %D/share/omf/stardict/stardict-C.omf 2>/dev/null || /usr/bin/true @unexec scrollkeeper-uninstall -q %D/share/omf/stardict/stardict-C.omf 2>/dev/null || /usr/bin/true +share/omf/stardict/stardict-ru.omf +@exec scrollkeeper-install -q %D/share/omf/stardict/stardict-ru.omf 2>/dev/null || /usr/bin/true +@unexec scrollkeeper-uninstall -q %D/share/omf/stardict/stardict-ru.omf 2>/dev/null || /usr/bin/true share/omf/stardict/stardict-zh_CN.omf @exec scrollkeeper-install -q %D/share/omf/stardict/stardict-zh_CN.omf 2>/dev/null || /usr/bin/true @unexec scrollkeeper-uninstall -q %D/share/omf/stardict/stardict-zh_CN.omf 2>/dev/null || /usr/bin/true share/applications/stardict.desktop etc/gconf/schemas/stardict.schemas lib/bonobo/servers/GNOME_Stardict.server +lib/locale/ru/LC_MESSAGES/stardict.mo +lib/locale/zh_CN/LC_MESSAGES/stardict.mo etc/gconf/gconf.xml.defaults/apps/stardict/%gconf.xml -etc/gconf/gconf.xml.defaults/apps/stardict/float_window/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/manage_dictionaries/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/dictionary/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/floating_window/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/main_window/%gconf.xml +etc/gconf/gconf.xml.defaults/apps/stardict/preferences/notification_area_icon/%gconf.xml etc/gconf/gconf.xml.defaults/schemas/apps/stardict/%gconf.xml -etc/gconf/gconf.xml.defaults/schemas/apps/stardict/float_window/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/manage_dictionaries/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/dictionary/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/floating_window/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/main_window/%gconf.xml +etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/notification_area_icon/%gconf.xml @dirrm share/gnome/help/stardict/zh_CN/figures @dirrm share/gnome/help/stardict/zh_CN +@dirrm share/gnome/help/stardict/ru/figures +@dirrm share/gnome/help/stardict/ru @dirrm share/gnome/help/stardict/C/figures @dirrm share/gnome/help/stardict/C @dirrm share/gnome/help/stardict -@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/float_window +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/notification_area_icon +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/main_window +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/floating_window +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences/dictionary +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/preferences +@dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict/manage_dictionaries @dirrm etc/gconf/gconf.xml.defaults/schemas/apps/stardict -@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/float_window +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/notification_area_icon +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/main_window +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/floating_window +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences/dictionary +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/preferences +@dirrm etc/gconf/gconf.xml.defaults/apps/stardict/manage_dictionaries @dirrm etc/gconf/gconf.xml.defaults/apps/stardict @dirrm share/omf/stardict @dirrm share/stardict/dic -@dirrm share/stardict/skins/default -@dirrm share/stardict/skins +@dirrm share/stardict/pixmaps +@dirrm share/stardict/sounds @dirrm share/stardict |