summaryrefslogtreecommitdiff
path: root/sysui/desktop
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-03-08 14:39:20 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-03-08 14:39:20 +0000
commitb9335e650a1e93d61412fa41dd43dfa7d96baef1 (patch)
tree37bf35693923e8838e3eba5d61b511a3e479295e /sysui/desktop
parent6c3f2a853b414a2af9b4b00fbcb95751b89bc5bd (diff)
INTEGRATION: CWS sysui05 (1.2.12); FILE MERGED
2005/02/21 14:55:46 obr 1.2.12.1: #i33761# CDE desktop integration no longer uses a binary for codeset conversions
Diffstat (limited to 'sysui/desktop')
-rw-r--r--sysui/desktop/solaris/postinstall42
1 files changed, 39 insertions, 3 deletions
diff --git a/sysui/desktop/solaris/postinstall b/sysui/desktop/solaris/postinstall
index 0a25c9f7245b..7bb22c276802 100644
--- a/sysui/desktop/solaris/postinstall
+++ b/sysui/desktop/solaris/postinstall
@@ -1,8 +1,44 @@
#!/bin/sh
-if [ -x ${OFFICE_PATH}/share/cde/dtintegrate ]; then
- ${OFFICE_PATH}/share/cde/dtintegrate
-fi
+DTAPPDIR=usr/dt/appconfig/types
+ICONVDIR=usr/lib/iconv
+
+# Return the charset name for the specified locale
+getcharset ()
+{
+ # query codeset for locale and remove the ISO prefix
+ codeset=`LC_CTYPE=$1 locale -c code_set_name 2>/dev/null | sed -e 's/ISO8859/8859/'`
+
+ if [ -f ${BASEDIR}/${ICONVDIR}/UTF-8%${codeset}.so ]
+ then
+ echo $codeset
+ fi
+}
+
+# Create non UTF-8 entries for CDE on the fly by iterating of real existing
+# directories and converting from UTF-8 into the appropriate codeset.
+for i in `cd ${BASEDIR}/${DTAPPDIR}; find * -type d ! -name "*.UTF-8" ! -name "C"`
+do
+ locale=`echo $i | sed -e 's/\..*//g' -e 's/ja$/ja_JP/' -e 's/en.*/C/g`
+ if [ "${locale}" != "C" ]
+ then
+ locale="${locale}.UTF-8"
+ fi
+
+ # Check for existing source file.
+ if [ -f "${BASEDIR}/${DTAPPDIR}/${locale}/%PREFIX.fp" ]
+ then
+ charset=`getcharset $i`
+ if [ "$charset" != "" ]
+ then
+ echo "${CLIENT_BASEDIR}/${DTAPPDIR}/$i d 0755 root bin"
+ LC_CTYPE=$i cat ${BASEDIR}/${DTAPPDIR}/${locale}/%PREFIX.fp | iconv -f UTF-8 -t $charset > ${BASEDIR}/${DTAPPDIR}/$i/%PREFIX.fp \
+ && echo "${CLIENT_BASEDIR}/${DTAPPDIR}/$i/%PREFIX.fp"
+ LC_CTYPE=$i cat ${BASEDIR}/${DTAPPDIR}/${locale}/%PREFIX.dt | iconv -f UTF-8 -t $charset > ${BASEDIR}/${DTAPPDIR}/$i/%PREFIX.dt \
+ && echo "${CLIENT_BASEDIR}/${DTAPPDIR}/$i/%PREFIX.dt"
+ fi
+ fi
+done | installf ${PKGINST} - || exit 2
# Add the symlink to software installation database
installf ${PKG_INSTALL_ROOT:+'-R'} ${PKG_INSTALL_ROOT} ${PKGINST} ${CLIENT_BASEDIR}/etc/%PREFIX=${OFFICE_PATH} s