Bug 78492

Summary: [PORT UPDATE] editors/ooodict-all: adds thesaurus support, more dictionaries supported
Product: Ports & Packages Reporter: Pawel Wieleba <P.Wieleba>
Component: Individual Port(s)Assignee: freebsd-openoffice (Nobody) <openoffice>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Pawel Wieleba 2005-03-06 15:40:00 UTC
editors/ooodict-all now doesn't support thesaurus dictionary.
I've added THESAURUS support.
I've also added support for a dozen of dictionaries.

Fix: I've changed two files:
 editors/ooodict-all/Makefile
 editors/ooodict-all/distinfo
New versions can be downloaded from my web:
 http://www.iem.pw.edu.pl/~wielebap/ooodict-all/Makefile
 http://www.iem.pw.edu.pl/~wielebap/ooodict-all/distinfo

It would be nice to have a new version integrated with the ports tree.
Best for you,
Pawel Wieleba

A diff to Makefile is presented here:
srv# cat ooodict-all/Makefile.diff


PORTNAME=      ooodict
-PORTVERSION=   1.20050221
+PORTVERSION=   1.20050305
 CATEGORIES+=   editors
-MASTER_SITES+= http://ftp.gwdg.de/pub/misc/openoffice/contrib/dictionaries/
+MASTER_SITES+= http://ftp.gwdg.de/pub/misc/openoffice/contrib/dictionaries/ \
+                http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries/
 DISTFILES+=    ${LANGDIST}
 DISTFILES+=    ${HYPHDIST}
+DISTFILES+=    ${THESDIST}

 MAINTAINER=     openoffice@FreeBSD.org
 COMMENT?=      MySpell dictionaries for OpenOffice.org
@@ -20,18 +22,38 @@

 .if !defined(LANGDIST)
 DICTMETAPORT=  yes
-LANGDIST?=     bg_BG.zip ca_ES.zip hr_HR.zip cs_CZ.zip \
-               da_DK.zip nl_NL.zip en_CA.zip en_GB.zip \
-               fr_FR.zip de_DE.zip de_CH.zip hu_HU.zip \
-               it_IT.zip pl_PL.zip pt_PT.zip pt_BR.zip \
-               es_ES.zip sk_SK.zip sv_SE.zip el_GR.zip \
-               ru_RU_yo.zip uk_UA.zip
-
-HYPHDIST?=     hyph_cs_CZ.zip hyph_da_DK.zip hyph_de_DE.zip \
-               hyph_en_CA.zip hyph_en_GB.zip hyph_es_ES.zip \
-               hyph_fr_FR.zip hyph_it_IT.zip hyph_nl_NL.zip \
-               hyph_pt_BR.zip hyph_pt_PT.zip hyph_ru_RU.zip \
-               hyph_sk_SK.zip hyph_sl_SI.zip hyph_uk_UA.zip
+LANGDIST?=     af_ZA.zip bg_BG.zip ca_ES.zip \
+               cs_CZ.zip cy_GB.zip da_DK.zip \
+               de_AT.zip de_CH.zip de_DE.zip \
+               el_GR.zip en_AU.zip en_CA.zip \
+               en_GB.zip en_NZ.zip en_US.zip \
+               es_ES.zip es_MX.zip \
+               fo_FO.zip fr_BE.zip fr_FR.zip \
+               ga_IE.zip gd_GB.zip gl_ES.zip \
+               he_IL.zip hr_HR.zip hu_HU.zip \
+               id_ID.zip it_IT.zip \
+               ku_TR.zip lt_LT.zip mg_MG.zip \
+               mi_NZ.zip ms_MY.zip nb_NO.zip \
+               nl_NL.zip nn_NO.zip \
+               ny_MW.zip pl_PL.zip pt_BR.zip \
+               pt_PT.zip ro_RO.zip ru_RU.zip \
+               rw_RW.zip sk_SK.zip sl_SI.zip \
+               sv_SE.zip sw_KE.zip tl_PH.zip \
+               tn_ZA.zip uk_UA.zip zu_ZA.zip
+HYPHDIST?=     hyph_bg_BG.zip hyph_cs_CZ.zip hyph_da_DK.zip \
+               hyph_de_CH.zip hyph_de_DE.zip hyph_el_GR.zip \
+               hyph_en_AU.zip hyph_en_CA.zip hyph_en_GB.zip \
+               hyph_en_NZ.zip hyph_en_US.zip hyph_es_ES.zip \
+               hyph_es_MX.zip hyph_fi_FI.zip hyph_fr_BE.zip \
+               hyph_fr_FR.zip hyph_ga_IE.zip hyph_hu_HU.zip \
+               hyph_id_ID.zip hyph_is_IS.zip hyph_it_IT.zip \
+               hyph_lt_LT.zip hyph_nl_NL.zip hyph_pl_PL.zip \
+               hyph_pt_BR.zip hyph_pt_PT.zip hyph_ro_RO.zip \
+               hyph_ru_RU.zip hyph_sk_SK.zip hyph_sl_SI.zip \
+               hyph_sv_SE.zip hyph_uk_UA.zip
+THESDIST?=     thes_sk_SK.zip thes_bg_BG.zip thes_cs_CZ.zip \
+               thes_de_DE.zip thes_es_ES.zip thes_fr_FR.zip \
+               thes_hu_HU.zip thes_it_IT.zip thes_pl_PL.zip
 .endif
 IGNOREFILES=   ${DISTFILES}
 CUT?=  /usr/bin/cut
@@ -180,6 +202,44 @@
                                ${ECHO_MSG} "===>   Hyphenation Dictionary $${LANGUAGE}_$${COUNTRY} already registered"; \
                                ${ECHO_MSG} "===>   Set DICT_OVERWRITE=YES if you like to overwrite it"; \
                fi ; \
+       done
+       @for file in ${THESDIST}; do \
+               ABRV=`${ECHO_CMD} $${file} | ${SED} -e 's|\.zip||' -e 's|^thes_||'`; \
+               LANGUAGE=`${ECHO_CMD} $${ABRV} | ${SED} -e 's|_.*||'`; \
+               COUNTRY=`${ECHO_CMD} $${ABRV} | ${SED} -e 's|.*_||' | ${CUT} -c 1,2 | ${TR} "[:lower:]" "[:upper:]"` ; \
+               if ! ( ${GREP} "THES $${LANGUAGE} $${COUNTRY}" \
+                       ${DICT_LIST_INST} > /dev/null && test -z $${DICT_OVERWRITE} ) ; \
+               then \
+                       if ! (cd ${DICT_PATH} && ${EXTRACT_CMD_L} \
+                               ${EXTRACT_BEFORE_ARGS_L} \
+                               ${_DISTDIR}/$${file} '*.dat' '*.idx' \
+                                ${EXTRACT_AFTER_ARGS_L}) ; \
+                       then \
+                               ${ECHO} "Extracting of $${file} failed"; \
+                                exit 1; \
+                        fi ; \
+                       ${ECHO_MSG} "===>   Register thesaurus dictionary th_$${ABRV}"; \
+                       ${ECHO} "@exec ${ECHO} \"THES $${LANGUAGE} $${COUNTRY} th_$${ABRV}\" \
+                               >> ${DICT_LIST}" >> ${TMPPLIST} ; \
+                       ${ECHO_CMD} "THES $${LANGUAGE} $${COUNTRY} th_$${ABRV}" >> ${DICT_LIST_INST} ; \
+                        cd ${PREFIX} && ${FIND} -s ${DICT_DIR} -type f | \
+                            ${GREP} th_$${ABRV} >> ${TMPPLIST} ; \
+                        cd ${PREFIX} && ${FIND} -s ${DICT_DIR} -type f | \
+                            ${GREP} th_$${ABRV} | \
+                            ${XARGS} chmod 755 ; \
+                        ${ECHO} "@unexec ${CP} ${DICT_LIST} \
+                            ${DICT_LIST}.th_$${LANGUAGE}_$${COUNTRY}" >> ${TMPPLIST} ; \
+                        ${ECHO} "@unexec \
+                            if ! ( ${CAT} ${DICT_LIST}.th_$${LANGUAGE}_$${COUNTRY} | \
+                                ${GREP} -v -e '^THES.*th_$${ABRV}' > ${DICT_LIST} ) ; then \
+                                        ${ECHO_MSG} '===>   Notice: ${DICT_LIST} is empty' ; \
+                            fi" >> ${TMPPLIST} ; \
+                        ${ECHO} "@unexec ${RM} ${DICT_LIST}.th_$${LANGUAGE}_$${COUNTRY}" \
+                            >> ${TMPPLIST} ; \
+                else \
+                                ${ECHO_MSG} "===>   THESAURUS Dictionary $${LANGUAGE}_$${COUNTRY} already registered"; \
+                                ${ECHO_MSG} "===>   Set DICT_OVERWRITE=YES if you like to overwrite it"; \
+                fi ; \
        done

 .include <bsd.port.post.mk>
srv% cat ooodict-all/distinfo
MD5 (openoffice/af_ZA.zip) = IGNORE
MD5 (openoffice/bg_BG.zip) = IGNORE
MD5 (openoffice/ca_ES.zip) = IGNORE
MD5 (openoffice/cs_CZ.zip) = IGNORE
MD5 (openoffice/cy_GB.zip) = IGNORE
MD5 (openoffice/da_DK.zip) = IGNORE
MD5 (openoffice/de_AT.zip) = IGNORE
MD5 (openoffice/de_CH.zip) = IGNORE
MD5 (openoffice/de_DE.zip) = IGNORE
MD5 (openoffice/el_GR.zip) = IGNORE
MD5 (openoffice/en_AU.zip) = IGNORE
MD5 (openoffice/en_CA.zip) = IGNORE
MD5 (openoffice/en_GB.zip) = IGNORE
MD5 (openoffice/en_NZ.zip) = IGNORE
MD5 (openoffice/en_US.zip) = IGNORE
MD5 (openoffice/es_ES.zip) = IGNORE
MD5 (openoffice/es_MX.zip) = IGNORE
MD5 (openoffice/fo_FO.zip) = IGNORE
MD5 (openoffice/fr_BE.zip) = IGNORE
MD5 (openoffice/fr_FR.zip) = IGNORE
MD5 (openoffice/ga_IE.zip) = IGNORE
MD5 (openoffice/gd_GB.zip) = IGNORE
MD5 (openoffice/gl_ES.zip) = IGNORE
MD5 (openoffice/he_IL.zip) = IGNORE
MD5 (openoffice/hr_HR.zip) = IGNORE
MD5 (openoffice/hu_HU.zip) = IGNORE
MD5 (openoffice/id_ID.zip) = IGNORE
MD5 (openoffice/it_IT.zip) = IGNORE
MD5 (openoffice/ku_TR.zip) = IGNORE
MD5 (openoffice/lt_LT.zip) = IGNORE
MD5 (openoffice/mg_MG.zip) = IGNORE
MD5 (openoffice/mi_NZ.zip) = IGNORE
MD5 (openoffice/ms_MY.zip) = IGNORE
MD5 (openoffice/nb_NO.zip) = IGNORE
MD5 (openoffice/nl_NL.zip) = IGNORE
MD5 (openoffice/nn_NO.zip) = IGNORE
MD5 (openoffice/ny_MW.zip) = IGNORE
MD5 (openoffice/pl_PL.zip) = IGNORE
MD5 (openoffice/pt_BR.zip) = IGNORE
MD5 (openoffice/pt_PT.zip) = IGNORE
MD5 (openoffice/ro_RO.zip) = IGNORE
MD5 (openoffice/ru_RU.zip) = IGNORE
MD5 (openoffice/rw_RW.zip) = IGNORE
MD5 (openoffice/sk_SK.zip) = IGNORE
MD5 (openoffice/sl_SI.zip) = IGNORE
MD5 (openoffice/sv_SE.zip) = IGNORE
MD5 (openoffice/sw_KE.zip) = IGNORE
MD5 (openoffice/tl_PH.zip) = IGNORE
MD5 (openoffice/tn_ZA.zip) = IGNORE
MD5 (openoffice/uk_UA.zip) = IGNORE
MD5 (openoffice/zu_ZA.zip) = IGNORE
MD5 (openoffice/hyph_bg_BG.zip) = IGNORE
MD5 (openoffice/hyph_cs_CZ.zip) = IGNORE
MD5 (openoffice/hyph_da_DK.zip) = IGNORE
MD5 (openoffice/hyph_de_CH.zip) = IGNORE
MD5 (openoffice/hyph_de_DE.zip) = IGNORE
MD5 (openoffice/hyph_el_GR.zip) = IGNORE
MD5 (openoffice/hyph_en_AU.zip) = IGNORE
MD5 (openoffice/hyph_en_CA.zip) = IGNORE
MD5 (openoffice/hyph_en_GB.zip) = IGNORE
MD5 (openoffice/hyph_en_NZ.zip) = IGNORE
MD5 (openoffice/hyph_en_US.zip) = IGNORE
MD5 (openoffice/hyph_es_ES.zip) = IGNORE
MD5 (openoffice/hyph_es_MX.zip) = IGNORE
MD5 (openoffice/hyph_fi_FI.zip) = IGNORE
MD5 (openoffice/hyph_fr_BE.zip) = IGNORE
MD5 (openoffice/hyph_fr_FR.zip) = IGNORE
MD5 (openoffice/hyph_ga_IE.zip) = IGNORE
MD5 (openoffice/hyph_hu_HU.zip) = IGNORE
MD5 (openoffice/hyph_id_ID.zip) = IGNORE
MD5 (openoffice/hyph_is_IS.zip) = IGNORE
MD5 (openoffice/hyph_it_IT.zip) = IGNORE
MD5 (openoffice/hyph_lt_LT.zip) = IGNORE
MD5 (openoffice/hyph_nl_NL.zip) = IGNORE
MD5 (openoffice/hyph_pl_PL.zip) = IGNORE
MD5 (openoffice/hyph_pt_BR.zip) = IGNORE
MD5 (openoffice/hyph_pt_PT.zip) = IGNORE
MD5 (openoffice/hyph_ro_RO.zip) = IGNORE
MD5 (openoffice/hyph_ru_RU.zip) = IGNORE
MD5 (openoffice/hyph_sk_SK.zip) = IGNORE
MD5 (openoffice/hyph_sl_SI.zip) = IGNORE
MD5 (openoffice/hyph_sv_SE.zip) = IGNORE
MD5 (openoffice/hyph_uk_UA.zip) = IGNORE
MD5 (openoffice/thes_sk_SK.zip) = IGNORE
MD5 (openoffice/thes_bg_BG.zip) = IGNORE
MD5 (openoffice/thes_cs_CZ.zip) = IGNORE
MD5 (openoffice/thes_de_DE.zip) = IGNORE
MD5 (openoffice/thes_es_ES.zip) = IGNORE
MD5 (openoffice/thes_fr_FR.zip) = IGNORE
MD5 (openoffice/thes_hu_HU.zip) = IGNORE
MD5 (openoffice/thes_it_IT.zip) = IGNORE
MD5 (openoffice/thes_pl_PL.zip) = IGNORE--IoWkQXkMNETMvSg1S8OuyCxAY3VTN2FR3o1QPSAFg2YOigKX
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- ooodict-all/Makefile-ORG    Sat Mar  5 22:11:45 2005
+++ ooodict-all/Makefile        Sun Mar  6 16:13:16 2005
@@ -6,11 +6,13 @@
 #
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-03-07 01:38:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->openoffice

Over to maintainer(s).
Comment 2 Pav Lucistnik freebsd_committer 2005-06-06 00:52:12 UTC
State Changed
From-To: open->closed

Committed, thanks!